Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-28-2007, 09:02 PM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
Converting GS1 to GS2

I am bored at my brother's place so if anyone wants some of their GS1 scripts converted to GS2 post them and i will see what i can do.
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #2  
Old 06-29-2007, 01:38 AM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
no one? lol come on..you can pm me your script if you don't want people looking at it.
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #3  
Old 06-29-2007, 01:46 AM
kia345 kia345 is offline
z0rbi 4 life 🤘
kia345's Avatar
Join Date: Dec 2006
Location: delteria
Posts: 6,737
kia345 has a reputation beyond reputekia345 has a reputation beyond reputekia345 has a reputation beyond reputekia345 has a reputation beyond reputekia345 has a reputation beyond reputekia345 has a reputation beyond reputekia345 has a reputation beyond reputekia345 has a reputation beyond reputekia345 has a reputation beyond reputekia345 has a reputation beyond reputekia345 has a reputation beyond repute
All of Delteria.
__________________
pojo
Reply With Quote
  #4  
Old 06-29-2007, 02:08 AM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
Haha sure why not? I can try.
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #5  
Old 06-29-2007, 03:10 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by kia345 View Post
All of Delteria.



What many people fail to realize is that servers do not need to convert everything in NC to GS2. You only need to convert the things that don't work when transferred over to the GS2 engine.
Reply With Quote
  #6  
Old 06-29-2007, 04:17 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Indeed, however, everything should be GS2 >:P
__________________
Reply With Quote
  #7  
Old 06-29-2007, 08:12 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Quote:
Originally Posted by Inverness View Post
Indeed, however, everything should be GS2 >:P
<3

And, if that were the case Gambet...a LOT would need to be made GS2...basically anything with a serverside portion.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #8  
Old 06-29-2007, 08:43 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by coreys View Post
<3

And, if that were the case Gambet...a LOT would need to be made GS2...basically anything with a serverside portion.


Not exactly, I mean, a large portion of Zone is still in GS1 because it works fine.
Reply With Quote
  #9  
Old 06-29-2007, 08:45 PM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
Quote:
Originally Posted by Gambet View Post
Not exactly, I mean, a large portion of Zone is still in GS1 because it works fine.
The only reason for converting everything to gs2 is so that its just all the same language. I mean i personally agree if it works in gs1 then leave it be. But some people want to keep it all in the same language.
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #10  
Old 06-29-2007, 09:19 PM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
heres one ;D
PHP Code:
//#CLIENTSIDE
if (playerenters) {
hide;
playerx=int(playerx);
playery=int(playery);
playerdir=3;
timeout=0.05;
theHAWKER.isKickAss true;
}
if (
timeout) {
if (!
antigravity) {
if (
keydown(0)&&playersprite>=1&&playersprite<=8playery+=0.5;
if (
playerdir==0||playerdir==2playerdir=gravdir;
if (
onwall(playerx+0.5,playery+3)||onwall(playerx+1.5,playery+3)) {
velocity=0;
playery=int(playery);
if (
keydown(6)) velocity=-2;

}
else if (
keydown(2)&&playersprite>=1&&playersprite<=8playery-=0.5;
if (
onwall(playerx+0.5,playery-0.1)||onwall(playerx+0.5,playery)||onwall(playerx+1.5,playery)||onwall(playerx+1.5,playery-0.1)) velocity=0.1;
else {
if (
velocity>-0.1&&velocity<=0velocity=0.1;
if (
velocity>3velocity=3;
}
if (
abs(velocity)>0) {
playery+=velocity/6;
if ((
velocity>0&&(onwall(playerx+0.5,playery+3)||onwall(playerx+1.5,playery+3)))||(velocity<0&&(onwall(playerx+0.5,playery)||onwall(playerx+1.5,playery)))) playery=int(playery);
else 
playery+=velocity/6;
if ((
velocity>0&&(onwall(playerx+0.5,playery+3)||onwall(playerx+1.5,playery+3)))||(velocity<0&&(onwall(playerx+0.5,playery)||onwall(playerx+1.5,playery)))) playery=int(playery);
else 
playery+=velocity/6;
if ((
velocity>0&&(onwall(playerx+0.5,playery+3)||onwall(playerx+1.5,playery+3)))||(velocity<0&&(onwall(playerx+0.5,playery)||onwall(playerx+1.5,playery)))) playery=int(playery);
else 
playery+=velocity/6;
if ((
velocity>0&&(onwall(playerx+0.5,playery+3)||onwall(playerx+1.5,playery+3)))||(velocity<0&&(onwall(playerx+0.5,playery)||onwall(playerx+1.5,playery)))) playery=int(playery);
else 
playery+=velocity/6;
if ((
velocity>0&&(onwall(playerx+0.5,playery+3)||onwall(playerx+1.5,playery+3)))||(velocity<0&&(onwall(playerx+0.5,playery)||onwall(playerx+1.5,playery)))) playery=int(playery);
else 
playery+=velocity/6;
}
velocity+=abs(velocity/4);
if (
this.shot==9) {
hideimg 345;
this.shot=0;
}
if (
this.shot>0) {
if (
this.sd==1this.sx-=0.75;
if (
this.sd==3this.sx+=0.75;
showimg 345,busterl2d#v(this.sd).gif,this.sx,this.sy;
if (this.sd==1) {
if (
testplayer(this.sx,this.sy)>-2hitplayer testplayer(this.sx,this.sy),2,playerx,playery;
if (
testnpc(this.sx,this.sy)>-2hitnpc testnpc(this.sx,this.sy),2,playerx,playery;
if (
testcompu(this.sx,this.sy)>-2hitcompu testcompu(this.sx,this.sy),2,playerx,playery;
}
if (
this.sd==3) {
if (
testplayer(this.sx+1,this.sy)>-2hitplayer testplayer(this.sx+1,this.sy),2,playerx,playery;
if (
testnpc(this.sx+1,this.sy)>-2hitnpc testnpc(this.sx+1,this.sy),2,playerx,playery;
if (
testcompu(this.sx+1,this.sy)>-2hitcompu testcompu(this.sx+1,this.sy),2,playerx,playery;
}
this.shot++;
}
if (
playersprite==11&&playerhearts==playerfullhearts) {
this.shot=1;
this.sd=playerdir;
if (
this.sd==1) {
this.sx=playerx-2;
this.sy=playery+1;
}
if (
this.sd==3) {
this.sx=playerx+2;
this.sy=playery+1;
}
showimg 345,busterl2d#v(this.sd).gif,this.sx,this.sy;
}
if ((
keydown(0)||keydown(2))&&!(keydown(1)||keydown(3))) playersprite=0;
if (
keydown(1)&&!keydown(3)) playerdir=1;
if (
keydown(3)&&!keydown(1)) playerdir=3;
gravdir=playerdir;
}
timeout=0.05;
}
if (
created) {
if (
keydown(6)) {setani jumpnrun,;}

__________________
**FLIP OUT**
Reply With Quote
  #11  
Old 06-30-2007, 01:21 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
PHP Code:
//#CLIENTSIDE
function onPlayerEnters() {
  
hide();
  
player.int(player.x);
  
player.int(player.y);
  
player.dir 3;
  
setTimer(0.05);
  
coreys.isKickAss true;
}
function 
onTimeOut() {
  if (!
antigravity) {
    if (
keydown(0) && playersprite >= && playersprite <= 8player.+= 0.5;
    if (
playerdir == 0||playerdir == 2player.dir gravdir;
    if (
onwall(player.0.5,player.3)||onwall(player.1.5,player.3)) {
      
velocity=0;
      
player.y=int(player.y);
      if (
keydown(6)) velocity=-2;
    }
    else if (
keydown(2) && playersprite >= && playersprite<=8player.-= 0.5;
    if (
onwall(player.0.5,player.0.1)||onwall(player.0.5,player.y)||onwall(player.1.5,player.y)||onwall(player.1.5,player.0.1)) velocity 0.1;
    else {
      if (
velocity > -0.1 && velocity <= 0velocity 0.1;
      if (
velocity 3velocity 3;
    }
    if (
abs(velocity) > 0) {
      
player.+= velocity/6;
      if ((
velocity && (onwall(player.0.5,player.3) || onwall(player.1.5,player.3))) || (velocity && (onwall(player.0.5,player.y) || onwall(player.1.5,player.y)))) player.int(player.y);
      else 
player.+= velocity/6;
      if ((
velocity && (onwall(player.0.5,player.3) || onwall(player.1.5,player.3))) || (velocity && (onwall(player.0.5,player.y) || onwall(player.1.5,player.y)))) player.int(player.y);
      else 
player.+= velocity/6;
    }
    
velocity += abs(velocity/4);
    if (
this.shot == 9) {
      
hideimg(345);
      
this.shot=0;
    }
    if (
this.shot 0) {
      
showimg(345,"busterl2d" this.sd ".gif",this.sx,this.sy);
      if (
this.sd == 1) {
        
this.sx -= 0.75;
        if (
testplayer(this.sx,this.sy) > -2hitplayer(testplayer(this.sx,this.sy),2,player.x,player.y);
        if (
testnpc(this.sx,this.sy) > -2hitnpc(testnpc(this.sx,this.sy),2,player.x,player.y);
        if (
testcompu(this.sx,this.sy) >- 2hitcompu(testcompu(this.sx,this.sy),2,player.x,player.y);
      }
      if (
this.sd == 3) {
        
this.sx += 0.75;
        if (
testplayer(this.sx+1,this.sy) >- 2hitplayer(testplayer(this.sx+1,this.sy),2,player.x,player.y);
        if (
testnpc(this.sx+1,this.sy) >- 2hitnpc(testnpc(this.sx+1,this.sy),2,player.x,player.y);
        if (
testcompu(this.sx+1,this.sy) >- 2hitcompu(testcompu(this.sx+1,this.sy),2,player.x,player.y);
      }
      
this.shot++;
    }
    if (
playersprite == 11 && player.hearts == player.fullhearts) {
      
this.shot 1;
      
this.sd player.dir;
      if (
this.sd == 1) {
        
this.sx player.2;
        
this.sy player.1;
      }
      if (
this.sd == 3) {
        
this.sx player.2;
        
this.sy player.1;
      }
      
showimg(345,"busterl2d" this.sd ".gif",this.sx,this.sy);
    }
    if ((
keydown(0) || keydown(2)) && !(keydown(1) || keydown(3))) playersprite 0;
    if (
keydown(1) && !keydown(3)) player.dir 1;
    if (
keydown(3) && !keydown(1)) player.dir 3;
    
gravdir player.dir;
  }
  
setTimer(0.05);
}
function 
onCreated() if (keydown(6)) setani("jumpnrun",NULL); 
No guarantee's it all works. I'm not exactly the best scripter in the world.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #12  
Old 06-30-2007, 05:13 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by Gambet View Post
Not exactly, I mean, a large portion of Zone is still in GS1 because it works fine.
I thought having both languages run at the same time was more inefficient than just having GS1
Reply With Quote
  #13  
Old 06-30-2007, 08:51 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Twinny View Post
I thought having both languages run at the same time was more inefficient than just having GS1


GS2 allows you to do things GS1 doesn't, yes, but if the GS1 code is efficient itself, then there is no need in converting it unless one must alter it in a way that would be more efficient in GS2.

It all depends on whether or not converting to GS2 would make a difference in efficiency in that certain script.
Reply With Quote
  #14  
Old 06-30-2007, 10:07 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
But GS1 is ugly!
__________________
Do it with a DON!
Reply With Quote
  #15  
Old 06-30-2007, 11:05 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by zokemon View Post
But GS1 is ugly!


GS1 is more challenging than GS2 since GS2 comes with a lot of predefined functions such as the GUI Ctrls and so forth, while GS1 is much more limiting and requires everything to be done custom.


But, yes, I dislike GS1 as well.
Reply With Quote
  #16  
Old 06-30-2007, 11:43 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
GS1 is highly illogical >_>.
__________________
Reply With Quote
  #17  
Old 07-01-2007, 02:26 AM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
but its a lot easyer to just put:
message hey jeff!;
instead of:
this.chat = "hey jeff!";
__________________
**FLIP OUT**
Reply With Quote
  #18  
Old 07-01-2007, 03:18 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Not really. About the same, really.
You can still use message() too, ya know...
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #19  
Old 07-01-2007, 04:04 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by theHAWKER View Post
but its a lot easyer to just put:
message hey jeff!;
instead of:
this.chat = "hey jeff!";
So?

That doesn't mean its proper, and thats not even quite the same thing. message() worked for all npcs even if they weren't a 'character', the 'chat' variable is for character, npc or player.
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:12 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.