<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://graalonline.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Excaliber7388</id>
	<title>Graal Bible - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://graalonline.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Excaliber7388"/>
	<link rel="alternate" type="text/html" href="https://graalonline.net/Special:Contributions/Excaliber7388"/>
	<updated>2026-04-09T20:45:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.4</generator>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=7712</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=7712"/>
		<updated>2006-12-04T17:41:18Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Excaliber's Scripting Guide''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:dr-ss.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
DR recently introduced an in game Computer for staff to test. Basically, it allows the players to send e-mails to each other, chat off the IRC, in game, go on the internet, and soon, play games. After a few days testing we will release it to the public (it will be released without games, however, you will receive a freebie or two automatically, and most you will have to buy). Start saving your money up!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now. For the longest time, Dark Rival was one of the fastest growing servers around. However, due to popularity, lack of staff activity, and a slow internet connection on the owner's part, the server was shut down. Excaliber has decided to RESTART Dark Rival! It will take a while, due to the lack of Mac dev tools &lt;br /&gt;
&amp;gt;=(&lt;br /&gt;
Once these are available, DR can come back to life.&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
[[Image:darkrival_wiki.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Wood Chopping'''&lt;br /&gt;
-Help an elderly man build his lodge by chopping and delivering wood to him from the local area.&lt;br /&gt;
[[Image:wood.gif|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (Admin)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps. We also could use someone who can convert normal levels into gmap format.&lt;br /&gt;
::LATs::&lt;br /&gt;
&lt;br /&gt;
LATs, (Level Administration Team) would be responsible for the uploading, maintnence, and developement of levels. Currently, we are making a new overworld, so much of the work would go to making a unique world.&lt;br /&gt;
&lt;br /&gt;
NATs, (NPC Administration Team) would be responsible for the uploading, maintnence, and creation of new and exciting scripts and NPCS. Dark Rival has many weapons, and unique systems, and the NAT's input is greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
GATs, (GFX Administration Team) would be responsibe for the uploading, maintnence, and creation of new, unique graphics.&lt;br /&gt;
&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=7711</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=7711"/>
		<updated>2006-12-04T17:40:25Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''About:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:dr-ss.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
DR recently introduced an in game Computer for staff to test. Basically, it allows the players to send e-mails to each other, chat off the IRC, in game, go on the internet, and soon, play games. After a few days testing we will release it to the public (it will be released without games, however, you will receive a freebie or two automatically, and most you will have to buy). Start saving your money up!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now. For the longest time, Dark Rival was one of the fastest growing servers around. However, due to popularity, lack of staff activity, and a slow internet connection on the owner's part, the server was shut down. Excaliber has decided to RESTART Dark Rival! It will take a while, due to the lack of Mac dev tools &lt;br /&gt;
&amp;gt;=(&lt;br /&gt;
Once these are available, DR can come back to life.&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
[[Image:darkrival_wiki.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Wood Chopping'''&lt;br /&gt;
-Help an elderly man build his lodge by chopping and delivering wood to him from the local area.&lt;br /&gt;
[[Image:wood.gif|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (Admin)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps. We also could use someone who can convert normal levels into gmap format.&lt;br /&gt;
::LATs::&lt;br /&gt;
&lt;br /&gt;
LATs, (Level Administration Team) would be responsible for the uploading, maintnence, and developement of levels. Currently, we are making a new overworld, so much of the work would go to making a unique world.&lt;br /&gt;
&lt;br /&gt;
NATs, (NPC Administration Team) would be responsible for the uploading, maintnence, and creation of new and exciting scripts and NPCS. Dark Rival has many weapons, and unique systems, and the NAT's input is greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
GATs, (GFX Administration Team) would be responsibe for the uploading, maintnence, and creation of new, unique graphics.&lt;br /&gt;
&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onActiontouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time++;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wile(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other rational expressions you may use. (Well, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEEDS to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
Now, back to the 'for' loop.&lt;br /&gt;
This a very interesting loop it's format is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(command;expression;command)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  for(this.i=0;this.i&amp;lt;10;this.i++)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Loops: &amp;quot; @this.i;&lt;br /&gt;
    sleep(.5);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This loop would be activated when the player touchs it.&lt;br /&gt;
It would go through 10 loops, displaying the count, and taking .5 seconds for each loop (due to the sleep() command)&lt;br /&gt;
Now remember this while loop?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There's an easier way of doing it with a for loop, in fact all loops done with wile can be replaced by for.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(this.size=10;this.size&amp;lt;=20;this.size++)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? Much shorter and easier to use!&lt;br /&gt;
Once you know the format of a for loop, you can make longer and more complex loops as well, and they'll take less time to script, which is always a bonus.&lt;br /&gt;
&lt;br /&gt;
Some more detail on actions:&lt;br /&gt;
An action is an effective way to use a portion of script more than once, have one script act on another script, more script to serverside from clientside (and the other way) and more.&lt;br /&gt;
So how do you use them? Here's the format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
triggeraction(x,y,&amp;quot;params[0]&amp;quot;,&amp;quot;params[1]&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You must have two parameters, but you can have as many as you want a quick example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontrigger()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Account: &amp;quot; @params[1]@ &amp;quot; Sword &amp;quot; @params[2]@ &amp;quot; head: &amp;quot; @params[3];&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;Who am I?&amp;quot;) //amnesia? multiple identities?&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;trigger&amp;quot;,player.account,player.swordimg,player.headimg);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? You can make more than one parameter.&lt;br /&gt;
Now, there are a few differences between a level NPC with a triggeraction, and a weapon with a triggeraction. Weapons need their location (serverside or clientside) as the first parameter, params[0] is the one after it. Here, you can have just one parameter, and the x and y is always 0 (because the npc server is at 0,0), and you need to include the name of the weapon in the action.&lt;br /&gt;
here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//weapon script with a triggeraction &lt;br /&gt;
//Weapon name: Fire Ball&lt;br /&gt;
function onActionserverside()&lt;br /&gt;
{&lt;br /&gt;
  if(params[0]==&amp;quot;mp&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    playermp-=10&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onWeaponfired()&lt;br /&gt;
{&lt;br /&gt;
  if(playermp&amp;gt;=10)&lt;br /&gt;
  {&lt;br /&gt;
    shootfireball(playerdir);&lt;br /&gt;
    triggeraction(0,0,&amp;quot;serverside&amp;quot;,&amp;quot;Fireball&amp;quot;,&amp;quot;mp&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
    player.chat=&amp;quot;Not enough mp!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This nifty little weapon will cost 10 mp per use, and fires a fireball in the direction the player is facing. Hopefully, you can learn to make many weapons of your own!&lt;br /&gt;
Triggeractions can be used in shops as well (and these are the scripts people ask for the most).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//a shop script, yay!&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActionbuy()&lt;br /&gt;
{&lt;br /&gt;
  if(playerrupees&amp;gt;=100)&lt;br /&gt;
  {&lt;br /&gt;
    addweapon Fire Ball;&lt;br /&gt;
    playerrupees-=100;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;buy fire ball&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;buy&amp;quot;,&amp;quot;buy&amp;quot;); &lt;br /&gt;
    //the level npc triggeraction type&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There, now you can make a little shop that sells a Fire Ball weapon. Have fun with it, search the commands, there's plenty of easy weapons you can make, and the weapon script is easy to follow and modify as well. Hopefully, you know enough about parameters to make more than one weapon for sale in the same NPC, just make the weapon name part of the action, then check for that parameter before they can buy. &lt;br /&gt;
 Now there are other types of loops. One I commonly see is a timeout loop. You should understand why. Back with GS1, it was a bit easier to tell what was happening in the script. In GS1 the script for function onTimeout() would be displayed as if(timeout). It was a bit easier to tell that when a timeout was done, it set a flag that if(timeout) would check. function onTimeout does the same thing, however, for new users this may be harder to tell. here's an example of an NPC that uses a timeout loop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Counter: &amp;quot; @this.time;&lt;br /&gt;
  this.time++;&lt;br /&gt;
  settimer(1); &lt;br /&gt;
//after 1 second, the timeout loop will restart&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would cause the player to count up every second.&lt;br /&gt;
You may have noticed that the variables often start of with client. or this. There are actually a few prefixes, each does a different thing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
client. variable is saved to the client, it can be modified on the clientside or serverside, and read from either.&lt;br /&gt;
clientr. variables can be rad from server or clientside, but only written from serverside. This is more secure, but only if you use it right.&lt;br /&gt;
server. variables are saved to the server, can only be written on the serverside, read on either side&lt;br /&gt;
serverr. more secure version of server. read only on clientside&lt;br /&gt;
this. is a variable that only functions in the NPC it is in. This prevents NPCs from morifying each others variables&lt;br /&gt;
temp. only exists in between the brackets of a function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use scripts effectivly, you should know how to use each of these.&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Some important commands can be found here:&lt;br /&gt;
page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
Which is also helpful for learning how to script. Enjoy!&lt;br /&gt;
&lt;br /&gt;
--[[User:Excaliber7388|Excaliber7388]] 00:13, 8 May 2006 (CEST)&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript&amp;diff=7463</id>
		<title>Creation/Dev/GScript</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript&amp;diff=7463"/>
		<updated>2006-10-07T15:38:27Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''GScript''' is [[Graal]]'s scripting language.&lt;br /&gt;
&lt;br /&gt;
Its syntax and some of its semantics might seem familiar to those who program in [[WikiPedia:C (Programming Language) |C]] or [[WikiPedia:Java_programming_language|Java]]. In some ways it is more dynamic, e.g. supporting dynamicly joining and leaving of classes, and brings support for easy management of online game content.&lt;br /&gt;
&lt;br /&gt;
GScript started as a very limited language ([[Creation/Dev/Old GScript|Old GScript]]) and has since kept up with improvements to the game engine and can now be used for pretty sophisticated scripts that greatly customise the gaming experience.&lt;br /&gt;
&lt;br /&gt;
It is used, with minor differences, for [[Clientside]] tasks like [[GUI | GUI programming]], special effects with nifty 3d lighting and custom [[NPC weapon|NPC Weapons]] or &amp;amp;quot;engines&amp;amp;quot;, and [[Serverside]] systems like player housing, complex baddies or pets.&lt;br /&gt;
&lt;br /&gt;
GScript can be discussed in the non-official [[GScript IRC channel]].&lt;br /&gt;
&lt;br /&gt;
'''If you would like to contribute to the GraalBible's GScript documentation, you might want to [[Creation/Dev/GScript/Contribute|read this article]].'''&lt;br /&gt;
&lt;br /&gt;
In your scripting quest, you may find the following articles to be of use:&lt;br /&gt;
&lt;br /&gt;
'''Basic information'''&lt;br /&gt;
* [[Creation/Dev/Script/Starting Guide|Starting Guide]]&lt;br /&gt;
* [[Creation/Dev/Script/Client|Functions, variables and objects (clientside)]] &lt;br /&gt;
* [[Creation/Dev/Script/Client/GuiControls_List|GUI Controls]]&lt;br /&gt;
&lt;br /&gt;
'''Specific Features'''&lt;br /&gt;
* [[Creation/Dev/GS1_To_GS2|GS1 To GS2: Guide for fixing scripts to work with the new engine]]&lt;br /&gt;
* [[Particle Engine|Particle Engine]]&lt;br /&gt;
* [[Creation/Dev/Graal v4 IRC|Graal IRC Scripting: Graal IRC Scripting Reference]]&lt;br /&gt;
* [[Creation/Dev/Troubleshooting Graal v4 IRC|Graal IRC Scripting: Troubleshooting Scripting Reference]]&lt;br /&gt;
* [[Creation/Dev/Output Methods|Output methods]]&lt;br /&gt;
* [[Creation/Dev/Using Classes Effectively|Use of classes]]&lt;br /&gt;
* [[Creation/Dev/GScript/Understanding GUI Profiles|GUI Features: Understanding GUI profiles]]&lt;br /&gt;
* [[Creation/Dev/GScript/Constants|Constants]]&lt;br /&gt;
&lt;br /&gt;
'''Tutorials'''&lt;br /&gt;
* [[Creation/Dev/Creating Tabbed Window Panes|Creating Tabbed Window Panes]]&lt;br /&gt;
* [[Creation/Dev/Database_Communication|Indexed Database Communication]]&lt;br /&gt;
* [[Creation/Dev/Excalibur's scripting guide|Excalibur's Scripting Guide]]&lt;br /&gt;
'''Script Functions'''&lt;br /&gt;
&lt;br /&gt;
These are frequently updated, to get the latest list run Graal with the -listscriptfunctions option:&lt;br /&gt;
* [[Creation/Dev/Script/Clientside_Functions|Client side]]&lt;br /&gt;
* [[Creation/Dev/Script Functions: NPC Server|Server side]]&lt;br /&gt;
&lt;br /&gt;
[[Creation/Dev/Script/Index|Related Artices]]&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript&amp;diff=7462</id>
		<title>Creation/Dev/GScript</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript&amp;diff=7462"/>
		<updated>2006-10-07T15:37:58Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''GScript''' is [[Graal]]'s scripting language.&lt;br /&gt;
&lt;br /&gt;
Its syntax and some of its semantics might seem familiar to those who program in [[WikiPedia:C (Programming Language) |C]] or [[WikiPedia:Java_programming_language|Java]]. In some ways it is more dynamic, e.g. supporting dynamicly joining and leaving of classes, and brings support for easy management of online game content.&lt;br /&gt;
&lt;br /&gt;
GScript started as a very limited language ([[Creation/Dev/Old GScript|Old GScript]]) and has since kept up with improvements to the game engine and can now be used for pretty sophisticated scripts that greatly customise the gaming experience.&lt;br /&gt;
&lt;br /&gt;
It is used, with minor differences, for [[Clientside]] tasks like [[GUI | GUI programming]], special effects with nifty 3d lighting and custom [[NPC weapon|NPC Weapons]] or &amp;amp;quot;engines&amp;amp;quot;, and [[Serverside]] systems like player housing, complex baddies or pets.&lt;br /&gt;
&lt;br /&gt;
GScript can be discussed in the non-official [[GScript IRC channel]].&lt;br /&gt;
&lt;br /&gt;
'''If you would like to contribute to the GraalBible's GScript documentation, you might want to [[Creation/Dev/GScript/Contribute|read this article]].'''&lt;br /&gt;
&lt;br /&gt;
In your scripting quest, you may find the following articles to be of use:&lt;br /&gt;
&lt;br /&gt;
'''Basic information'''&lt;br /&gt;
* [[Creation/Dev/Script/Starting Guide|Starting Guide]]&lt;br /&gt;
* [[Creation/Dev/Script/Client|Functions, variables and objects (clientside)]] &lt;br /&gt;
* [[Creation/Dev/Script/Client/GuiControls_List|GUI Controls]]&lt;br /&gt;
&lt;br /&gt;
'''Specific Features'''&lt;br /&gt;
* [[Creation/Dev/GS1_To_GS2|GS1 To GS2: Guide for fixing scripts to work with the new engine]]&lt;br /&gt;
* [[Particle Engine|Particle Engine]]&lt;br /&gt;
* [[Creation/Dev/Graal v4 IRC|Graal IRC Scripting: Graal IRC Scripting Reference]]&lt;br /&gt;
* [[Creation/Dev/Troubleshooting Graal v4 IRC|Graal IRC Scripting: Troubleshooting Scripting Reference]]&lt;br /&gt;
* [[Creation/Dev/Output Methods|Output methods]]&lt;br /&gt;
* [[Creation/Dev/Using Classes Effectively|Use of classes]]&lt;br /&gt;
* [[Creation/Dev/GScript/Understanding GUI Profiles|GUI Features: Understanding GUI profiles]]&lt;br /&gt;
* [[Creation/Dev/GScript/Constants|Constants]]&lt;br /&gt;
&lt;br /&gt;
'''Tutorials'''&lt;br /&gt;
* [[Creation/Dev/Creating Tabbed Window Panes|Creating Tabbed Window Panes]]&lt;br /&gt;
* [[Creation/Dev/Database_Communication|Indexed Database Communication]]&lt;br /&gt;
* [[Excalibur's scripting guide|Excalibur's Scripting Guide]]&lt;br /&gt;
'''Script Functions'''&lt;br /&gt;
&lt;br /&gt;
These are frequently updated, to get the latest list run Graal with the -listscriptfunctions option:&lt;br /&gt;
* [[Creation/Dev/Script/Clientside_Functions|Client side]]&lt;br /&gt;
* [[Creation/Dev/Script Functions: NPC Server|Server side]]&lt;br /&gt;
&lt;br /&gt;
[[Creation/Dev/Script/Index|Related Artices]]&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/Excalibur%27s_scripting_guide&amp;diff=7461</id>
		<title>Creation/Dev/Excalibur's scripting guide</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/Excalibur%27s_scripting_guide&amp;diff=7461"/>
		<updated>2006-10-07T15:37:36Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Excalibur's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow. This should help you get started out. I'm afraid it isn't complete and there are a few typos in it. I'm working on it. &lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onActiontouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time++;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wile(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other rational expressions you may use. (Well, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEEDS to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
Now, back to the 'for' loop.&lt;br /&gt;
This a very interesting loop it's format is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(command;expression;command)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  for(this.i=0;this.i&amp;lt;10;this.i++)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Loops: &amp;quot; @this.i;&lt;br /&gt;
    sleep(.5);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This loop would be activated when the player touchs it.&lt;br /&gt;
It would go through 10 loops, displaying the count, and taking .5 seconds for each loop (due to the sleep() command)&lt;br /&gt;
Now remember this while loop?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There's an easier way of doing it with a for loop, in fact all loops done with wile can be replaced by for.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(this.size=10;this.size&amp;lt;=20;this.size++)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? Much shorter and easier to use!&lt;br /&gt;
Once you know the format of a for loop, you can make longer and more complex loops as well, and they'll take less time to script, which is always a bonus.&lt;br /&gt;
&lt;br /&gt;
Some more detail on actions:&lt;br /&gt;
An action is an effective way to use a portion of script more than once, have one script act on another script, more script to serverside from clientside (and the other way) and more.&lt;br /&gt;
So how do you use them? Here's the format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
triggeraction(x,y,&amp;quot;params[0]&amp;quot;,&amp;quot;params[1]&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You must have two parameters, but you can have as many as you want a quick example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontrigger()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Account: &amp;quot; @params[1]@ &amp;quot; Sword &amp;quot; @params[2]@ &amp;quot; head: &amp;quot; @params[3];&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;Who am I?&amp;quot;) //amnesia? multiple identities?&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;trigger&amp;quot;,player.account,player.swordimg,player.headimg);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? You can make more than one parameter.&lt;br /&gt;
Now, there are a few differences between a level NPC with a triggeraction, and a weapon with a triggeraction. Weapons need their location (serverside or clientside) as the first parameter, params[0] is the one after it. Here, you can have just one parameter, and the x and y is always 0 (because the npc server is at 0,0), and you need to include the name of the weapon in the action.&lt;br /&gt;
here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//weapon script with a triggeraction &lt;br /&gt;
//Weapon name: Fire Ball&lt;br /&gt;
function onActionserverside()&lt;br /&gt;
{&lt;br /&gt;
  if(params[0]==&amp;quot;mp&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    playermp-=10&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onWeaponfired()&lt;br /&gt;
{&lt;br /&gt;
  if(playermp&amp;gt;=10)&lt;br /&gt;
  {&lt;br /&gt;
    shootfireball(playerdir);&lt;br /&gt;
    triggeraction(0,0,&amp;quot;serverside&amp;quot;,&amp;quot;Fireball&amp;quot;,&amp;quot;mp&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
    player.chat=&amp;quot;Not enough mp!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This nifty little weapon will cost 10 mp per use, and fires a fireball in the direction the player is facing. Hopefully, you can learn to make many weapons of your own!&lt;br /&gt;
Triggeractions can be used in shops as well (and these are the scripts people ask for the most).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//a shop script, yay!&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActionbuy()&lt;br /&gt;
{&lt;br /&gt;
  if(playerrupees&amp;gt;=100)&lt;br /&gt;
  {&lt;br /&gt;
    addweapon Fire Ball;&lt;br /&gt;
    playerrupees-=100;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;buy fire ball&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;buy&amp;quot;,&amp;quot;buy&amp;quot;); &lt;br /&gt;
    //the level npc triggeraction type&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There, now you can make a little shop that sells a Fire Ball weapon. Have fun with it, search the commands, there's plenty of easy weapons you can make, and the weapon script is easy to follow and modify as well. Hopefully, you know enough about parameters to make more than one weapon for sale in the same NPC, just make the weapon name part of the action, then check for that parameter before they can buy. &lt;br /&gt;
 Now there are other types of loops. One I commonly see is a timeout loop. You should understand why. Back with GS1, it was a bit easier to tell what was happening in the script. In GS1 the script for function onTimeout() would be displayed as if(timeout). It was a bit easier to tell that when a timeout was done, it set a flag that if(timeout) would check. function onTimeout does the same thing, however, for new users this may be harder to tell. here's an example of an NPC that uses a timeout loop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Counter: &amp;quot; @this.time;&lt;br /&gt;
  this.time++;&lt;br /&gt;
  settimer(1); &lt;br /&gt;
//after 1 second, the timeout loop will restart&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would cause the player to count up every second.&lt;br /&gt;
You may have noticed that the variables often start of with client. or this. There are actually a few prefixes, each does a different thing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
client. variable is saved to the client, it can be modified on the clientside or serverside, and read from either.&lt;br /&gt;
clientr. variables can be rad from server or clientside, but only written from serverside. This is more secure, but only if you use it right.&lt;br /&gt;
server. variables are saved to the server, can only be written on the serverside, read on either side&lt;br /&gt;
serverr. more secure version of server. read only on clientside&lt;br /&gt;
this. is a variable that only functions in the NPC it is in. This prevents NPCs from morifying each others variables&lt;br /&gt;
temp. only exists in between the brackets of a function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use scripts effectivly, you should know how to use each of these.&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Some important commands can be found here:&lt;br /&gt;
page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
Which is also helpful for learning how to script. Enjoy!&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Creation/Dev/GScript&amp;diff=7460</id>
		<title>Creation/Dev/GScript</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Creation/Dev/GScript&amp;diff=7460"/>
		<updated>2006-10-07T15:37:15Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''GScript''' is [[Graal]]'s scripting language.&lt;br /&gt;
&lt;br /&gt;
Its syntax and some of its semantics might seem familiar to those who program in [[WikiPedia:C (Programming Language) |C]] or [[WikiPedia:Java_programming_language|Java]]. In some ways it is more dynamic, e.g. supporting dynamicly joining and leaving of classes, and brings support for easy management of online game content.&lt;br /&gt;
&lt;br /&gt;
GScript started as a very limited language ([[Creation/Dev/Old GScript|Old GScript]]) and has since kept up with improvements to the game engine and can now be used for pretty sophisticated scripts that greatly customise the gaming experience.&lt;br /&gt;
&lt;br /&gt;
It is used, with minor differences, for [[Clientside]] tasks like [[GUI | GUI programming]], special effects with nifty 3d lighting and custom [[NPC weapon|NPC Weapons]] or &amp;amp;quot;engines&amp;amp;quot;, and [[Serverside]] systems like player housing, complex baddies or pets.&lt;br /&gt;
&lt;br /&gt;
GScript can be discussed in the non-official [[GScript IRC channel]].&lt;br /&gt;
&lt;br /&gt;
'''If you would like to contribute to the GraalBible's GScript documentation, you might want to [[Creation/Dev/GScript/Contribute|read this article]].'''&lt;br /&gt;
&lt;br /&gt;
In your scripting quest, you may find the following articles to be of use:&lt;br /&gt;
&lt;br /&gt;
'''Basic information'''&lt;br /&gt;
* [[Creation/Dev/Script/Starting Guide|Starting Guide]]&lt;br /&gt;
* [[Creation/Dev/Script/Client|Functions, variables and objects (clientside)]] &lt;br /&gt;
* [[Creation/Dev/Script/Client/GuiControls_List|GUI Controls]]&lt;br /&gt;
&lt;br /&gt;
'''Specific Features'''&lt;br /&gt;
* [[Creation/Dev/GS1_To_GS2|GS1 To GS2: Guide for fixing scripts to work with the new engine]]&lt;br /&gt;
* [[Particle Engine|Particle Engine]]&lt;br /&gt;
* [[Creation/Dev/Graal v4 IRC|Graal IRC Scripting: Graal IRC Scripting Reference]]&lt;br /&gt;
* [[Creation/Dev/Troubleshooting Graal v4 IRC|Graal IRC Scripting: Troubleshooting Scripting Reference]]&lt;br /&gt;
* [[Creation/Dev/Output Methods|Output methods]]&lt;br /&gt;
* [[Creation/Dev/Using Classes Effectively|Use of classes]]&lt;br /&gt;
* [[Creation/Dev/GScript/Understanding GUI Profiles|GUI Features: Understanding GUI profiles]]&lt;br /&gt;
* [[Creation/Dev/GScript/Constants|Constants]]&lt;br /&gt;
&lt;br /&gt;
'''Tutorials'''&lt;br /&gt;
* [[Creation/Dev/Creating Tabbed Window Panes|Creating Tabbed Window Panes]]&lt;br /&gt;
* [[Creation/Dev/Database_Communication|Indexed Database Communication]]&lt;br /&gt;
* [[Creation/Dev/Excalibur's scripting guide|Excalibur's Scripting Guide]]&lt;br /&gt;
'''Script Functions'''&lt;br /&gt;
&lt;br /&gt;
These are frequently updated, to get the latest list run Graal with the -listscriptfunctions option:&lt;br /&gt;
* [[Creation/Dev/Script/Clientside_Functions|Client side]]&lt;br /&gt;
* [[Creation/Dev/Script Functions: NPC Server|Server side]]&lt;br /&gt;
&lt;br /&gt;
[[Creation/Dev/Script/Index|Related Artices]]&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=7458</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=7458"/>
		<updated>2006-10-07T14:59:26Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:dr-ss.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
DR recently introduced an in game Computer for staff to test. Basically, it allows the players to send e-mails to each other, chat off the IRC, in game, go on the internet, and soon, play games. After a few days testing we will release it to the public (it will be released without games, however, you will receive a freebie or two automatically, and most you will have to buy). Start saving your money up!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now. For the longest time, Dark Rival was one of the fastest growing servers around. However, due to popularity, lack of staff activity, and a slow internet connection on the owner's part, the server was shut down. Excaliber has decided to start on another server, Legend, but it's progress may be slow due to the lack of a new offline editor, and a slow internet connection.&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
[[Image:darkrival_wiki.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Wood Chopping'''&lt;br /&gt;
-Help an elderly man build his lodge by chopping and delivering wood to him from the local area.&lt;br /&gt;
[[Image:wood.gif|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (Admin)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps. We also could use someone who can convert normal levels into gmap format.&lt;br /&gt;
::LATs::&lt;br /&gt;
&lt;br /&gt;
LATs, (Level Administration Team) would be responsible for the uploading, maintnence, and developement of levels. Currently, we are making a new overworld, so much of the work would go to making a unique world.&lt;br /&gt;
&lt;br /&gt;
NATs, (NPC Administration Team) would be responsible for the uploading, maintnence, and creation of new and exciting scripts and NPCS. Dark Rival has many weapons, and unique systems, and the NAT's input is greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
GATs, (GFX Administration Team) would be responsibe for the uploading, maintnence, and creation of new, unique graphics.&lt;br /&gt;
&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onActiontouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time++;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wile(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other rational expressions you may use. (Well, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEEDS to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
Now, back to the 'for' loop.&lt;br /&gt;
This a very interesting loop it's format is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(command;expression;command)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  for(this.i=0;this.i&amp;lt;10;this.i++)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Loops: &amp;quot; @this.i;&lt;br /&gt;
    sleep(.5);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This loop would be activated when the player touchs it.&lt;br /&gt;
It would go through 10 loops, displaying the count, and taking .5 seconds for each loop (due to the sleep() command)&lt;br /&gt;
Now remember this while loop?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There's an easier way of doing it with a for loop, in fact all loops done with wile can be replaced by for.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(this.size=10;this.size&amp;lt;=20;this.size++)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? Much shorter and easier to use!&lt;br /&gt;
Once you know the format of a for loop, you can make longer and more complex loops as well, and they'll take less time to script, which is always a bonus.&lt;br /&gt;
&lt;br /&gt;
Some more detail on actions:&lt;br /&gt;
An action is an effective way to use a portion of script more than once, have one script act on another script, more script to serverside from clientside (and the other way) and more.&lt;br /&gt;
So how do you use them? Here's the format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
triggeraction(x,y,&amp;quot;params[0]&amp;quot;,&amp;quot;params[1]&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You must have two parameters, but you can have as many as you want a quick example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontrigger()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Account: &amp;quot; @params[1]@ &amp;quot; Sword &amp;quot; @params[2]@ &amp;quot; head: &amp;quot; @params[3];&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;Who am I?&amp;quot;) //amnesia? multiple identities?&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;trigger&amp;quot;,player.account,player.swordimg,player.headimg);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? You can make more than one parameter.&lt;br /&gt;
Now, there are a few differences between a level NPC with a triggeraction, and a weapon with a triggeraction. Weapons need their location (serverside or clientside) as the first parameter, params[0] is the one after it. Here, you can have just one parameter, and the x and y is always 0 (because the npc server is at 0,0), and you need to include the name of the weapon in the action.&lt;br /&gt;
here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//weapon script with a triggeraction &lt;br /&gt;
//Weapon name: Fire Ball&lt;br /&gt;
function onActionserverside()&lt;br /&gt;
{&lt;br /&gt;
  if(params[0]==&amp;quot;mp&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    playermp-=10&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onWeaponfired()&lt;br /&gt;
{&lt;br /&gt;
  if(playermp&amp;gt;=10)&lt;br /&gt;
  {&lt;br /&gt;
    shootfireball(playerdir);&lt;br /&gt;
    triggeraction(0,0,&amp;quot;serverside&amp;quot;,&amp;quot;Fireball&amp;quot;,&amp;quot;mp&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
    player.chat=&amp;quot;Not enough mp!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This nifty little weapon will cost 10 mp per use, and fires a fireball in the direction the player is facing. Hopefully, you can learn to make many weapons of your own!&lt;br /&gt;
Triggeractions can be used in shops as well (and these are the scripts people ask for the most).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//a shop script, yay!&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActionbuy()&lt;br /&gt;
{&lt;br /&gt;
  if(playerrupees&amp;gt;=100)&lt;br /&gt;
  {&lt;br /&gt;
    addweapon Fire Ball;&lt;br /&gt;
    playerrupees-=100;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;buy fire ball&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;buy&amp;quot;,&amp;quot;buy&amp;quot;); &lt;br /&gt;
    //the level npc triggeraction type&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There, now you can make a little shop that sells a Fire Ball weapon. Have fun with it, search the commands, there's plenty of easy weapons you can make, and the weapon script is easy to follow and modify as well. Hopefully, you know enough about parameters to make more than one weapon for sale in the same NPC, just make the weapon name part of the action, then check for that parameter before they can buy. &lt;br /&gt;
 Now there are other types of loops. One I commonly see is a timeout loop. You should understand why. Back with GS1, it was a bit easier to tell what was happening in the script. In GS1 the script for function onTimeout() would be displayed as if(timeout). It was a bit easier to tell that when a timeout was done, it set a flag that if(timeout) would check. function onTimeout does the same thing, however, for new users this may be harder to tell. here's an example of an NPC that uses a timeout loop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Counter: &amp;quot; @this.time;&lt;br /&gt;
  this.time++;&lt;br /&gt;
  settimer(1); &lt;br /&gt;
//after 1 second, the timeout loop will restart&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would cause the player to count up every second.&lt;br /&gt;
You may have noticed that the variables often start of with client. or this. There are actually a few prefixes, each does a different thing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
client. variable is saved to the client, it can be modified on the clientside or serverside, and read from either.&lt;br /&gt;
clientr. variables can be rad from server or clientside, but only written from serverside. This is more secure, but only if you use it right.&lt;br /&gt;
server. variables are saved to the server, can only be written on the serverside, read on either side&lt;br /&gt;
serverr. more secure version of server. read only on clientside&lt;br /&gt;
this. is a variable that only functions in the NPC it is in. This prevents NPCs from morifying each others variables&lt;br /&gt;
temp. only exists in between the brackets of a function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use scripts effectivly, you should know how to use each of these.&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Some important commands can be found here:&lt;br /&gt;
page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
Which is also helpful for learning how to script. Enjoy!&lt;br /&gt;
&lt;br /&gt;
--[[User:Excaliber7388|Excaliber7388]] 00:13, 8 May 2006 (CEST)&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=File:Login_server_darkrival.png&amp;diff=7286</id>
		<title>File:Login server darkrival.png</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=File:Login_server_darkrival.png&amp;diff=7286"/>
		<updated>2006-09-07T16:38:46Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=7025</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=7025"/>
		<updated>2006-06-11T02:06:55Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:dr-ss.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
DR recently introduced an in game Computer for staff to test. Basically, it allows the players to send e-mails to each other, chat off the IRC, in game, go on the internet, and soon, play games. After a few days testing we will release it to the public (it will be released without games, however, you will receive a freebie or two automatically, and most you will have to buy). Start saving your money up!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
[[Image:darkrival_wiki.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Wood Chopping'''&lt;br /&gt;
-Help an elderly man build his lodge by chopping and delivering wood to him from the local area.&lt;br /&gt;
[[Image:wood.gif|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (Admin)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps. We also could use someone who can convert normal levels into gmap format.&lt;br /&gt;
::LATs::&lt;br /&gt;
&lt;br /&gt;
LATs, (Level Administration Team) would be responsible for the uploading, maintnence, and developement of levels. Currently, we are making a new overworld, so much of the work would go to making a unique world.&lt;br /&gt;
&lt;br /&gt;
NATs, (NPC Administration Team) would be responsible for the uploading, maintnence, and creation of new and exciting scripts and NPCS. Dark Rival has many weapons, and unique systems, and the NAT's input is greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
GATs, (GFX Administration Team) would be responsibe for the uploading, maintnence, and creation of new, unique graphics.&lt;br /&gt;
&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onActiontouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time++;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wile(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other rational expressions you may use. (Well, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEEDS to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
Now, back to the 'for' loop.&lt;br /&gt;
This a very interesting loop it's format is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(command;expression;command)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  for(this.i=0;this.i&amp;lt;10;this.i++)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Loops: &amp;quot; @this.i;&lt;br /&gt;
    sleep(.5);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This loop would be activated when the player touchs it.&lt;br /&gt;
It would go through 10 loops, displaying the count, and taking .5 seconds for each loop (due to the sleep() command)&lt;br /&gt;
Now remember this while loop?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There's an easier way of doing it with a for loop, in fact all loops done with wile can be replaced by for.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(this.size=10;this.size&amp;lt;=20;this.size++)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? Much shorter and easier to use!&lt;br /&gt;
Once you know the format of a for loop, you can make longer and more complex loops as well, and they'll take less time to script, which is always a bonus.&lt;br /&gt;
&lt;br /&gt;
Some more detail on actions:&lt;br /&gt;
An action is an effective way to use a portion of script more than once, have one script act on another script, more script to serverside from clientside (and the other way) and more.&lt;br /&gt;
So how do you use them? Here's the format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
triggeraction(x,y,&amp;quot;params[0]&amp;quot;,&amp;quot;params[1]&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You must have two parameters, but you can have as many as you want a quick example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontrigger()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Account: &amp;quot; @params[1]@ &amp;quot; Sword &amp;quot; @params[2]@ &amp;quot; head: &amp;quot; @params[3];&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;Who am I?&amp;quot;) //amnesia? multiple identities?&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;trigger&amp;quot;,player.account,player.swordimg,player.headimg);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? You can make more than one parameter.&lt;br /&gt;
Now, there are a few differences between a level NPC with a triggeraction, and a weapon with a triggeraction. Weapons need their location (serverside or clientside) as the first parameter, params[0] is the one after it. Here, you can have just one parameter, and the x and y is always 0 (because the npc server is at 0,0), and you need to include the name of the weapon in the action.&lt;br /&gt;
here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//weapon script with a triggeraction &lt;br /&gt;
//Weapon name: Fire Ball&lt;br /&gt;
function onActionserverside()&lt;br /&gt;
{&lt;br /&gt;
  if(params[0]==&amp;quot;mp&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    playermp-=10&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onWeaponfired()&lt;br /&gt;
{&lt;br /&gt;
  if(playermp&amp;gt;=10)&lt;br /&gt;
  {&lt;br /&gt;
    shootfireball(playerdir);&lt;br /&gt;
    triggeraction(0,0,&amp;quot;serverside&amp;quot;,&amp;quot;Fireball&amp;quot;,&amp;quot;mp&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
    player.chat=&amp;quot;Not enough mp!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This nifty little weapon will cost 10 mp per use, and fires a fireball in the direction the player is facing. Hopefully, you can learn to make many weapons of your own!&lt;br /&gt;
Triggeractions can be used in shops as well (and these are the scripts people ask for the most).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//a shop script, yay!&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActionbuy()&lt;br /&gt;
{&lt;br /&gt;
  if(playerrupees&amp;gt;=100)&lt;br /&gt;
  {&lt;br /&gt;
    addweapon Fire Ball;&lt;br /&gt;
    playerrupees-=100;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;buy fire ball&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;buy&amp;quot;,&amp;quot;buy&amp;quot;); &lt;br /&gt;
    //the level npc triggeraction type&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There, now you can make a little shop that sells a Fire Ball weapon. Have fun with it, search the commands, there's plenty of easy weapons you can make, and the weapon script is easy to follow and modify as well. Hopefully, you know enough about parameters to make more than one weapon for sale in the same NPC, just make the weapon name part of the action, then check for that parameter before they can buy. &lt;br /&gt;
 Now there are other types of loops. One I commonly see is a timeout loop. You should understand why. Back with GS1, it was a bit easier to tell what was happening in the script. In GS1 the script for function onTimeout() would be displayed as if(timeout). It was a bit easier to tell that when a timeout was done, it set a flag that if(timeout) would check. function onTimeout does the same thing, however, for new users this may be harder to tell. here's an example of an NPC that uses a timeout loop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Counter: &amp;quot; @this.time;&lt;br /&gt;
  this.time++;&lt;br /&gt;
  settimer(1); &lt;br /&gt;
//after 1 second, the timeout loop will restart&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would cause the player to count up every second.&lt;br /&gt;
You may have noticed that the variables often start of with client. or this. There are actually a few prefixes, each does a different thing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
client. variable is saved to the client, it can be modified on the clientside or serverside, and read from either.&lt;br /&gt;
clientr. variables can be rad from server or clientside, but only written from serverside. This is more secure, but only if you use it right.&lt;br /&gt;
server. variables are saved to the server, can only be written on the serverside, read on either side&lt;br /&gt;
serverr. more secure version of server. read only on clientside&lt;br /&gt;
this. is a variable that only functions in the NPC it is in. This prevents NPCs from morifying each others variables&lt;br /&gt;
temp. only exists in between the brackets of a function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use scripts effectivly, you should know how to use each of these.&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Some important commands can be found here:&lt;br /&gt;
page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
Which is also helpful for learning how to script. Enjoy!&lt;br /&gt;
&lt;br /&gt;
--[[User:Excaliber7388|Excaliber7388]] 00:13, 8 May 2006 (CEST)&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=File:Dr-ss.png&amp;diff=7024</id>
		<title>File:Dr-ss.png</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=File:Dr-ss.png&amp;diff=7024"/>
		<updated>2006-06-11T02:06:22Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6983</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6983"/>
		<updated>2006-05-21T21:42:49Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
DR recently introduced an in game Computer for staff to test. Basically, it allows the players to send e-mails to each other, chat off the IRC, in game, go on the internet, and soon, play games. After a few days testing we will release it to the public (it will be released without games, however, you will receive a freebie or two automatically, and most you will have to buy). Start saving your money up!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
[[Image:darkrival_wiki.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Wood Chopping'''&lt;br /&gt;
-Help an elderly man build his lodge by chopping and delivering wood to him from the local area.&lt;br /&gt;
[[Image:wood.gif|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (Admin)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps. We also could use someone who can convert normal levels into gmap format.&lt;br /&gt;
::LATs::&lt;br /&gt;
&lt;br /&gt;
LATs, (Level Administration Team) would be responsible for the uploading, maintnence, and developement of levels. Currently, we are making a new overworld, so much of the work would go to making a unique world.&lt;br /&gt;
&lt;br /&gt;
NATs, (NPC Administration Team) would be responsible for the uploading, maintnence, and creation of new and exciting scripts and NPCS. Dark Rival has many weapons, and unique systems, and the NAT's input is greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
GATs, (GFX Administration Team) would be responsibe for the uploading, maintnence, and creation of new, unique graphics.&lt;br /&gt;
&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onActiontouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time++;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wile(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other rational expressions you may use. (Well, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEEDS to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
Now, back to the 'for' loop.&lt;br /&gt;
This a very interesting loop it's format is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(command;expression;command)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  for(this.i=0;this.i&amp;lt;10;this.i++)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Loops: &amp;quot; @this.i;&lt;br /&gt;
    sleep(.5);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This loop would be activated when the player touchs it.&lt;br /&gt;
It would go through 10 loops, displaying the count, and taking .5 seconds for each loop (due to the sleep() command)&lt;br /&gt;
Now remember this while loop?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There's an easier way of doing it with a for loop, in fact all loops done with wile can be replaced by for.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(this.size=10;this.size&amp;lt;=20;this.size++)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? Much shorter and easier to use!&lt;br /&gt;
Once you know the format of a for loop, you can make longer and more complex loops as well, and they'll take less time to script, which is always a bonus.&lt;br /&gt;
&lt;br /&gt;
Some more detail on actions:&lt;br /&gt;
An action is an effective way to use a portion of script more than once, have one script act on another script, more script to serverside from clientside (and the other way) and more.&lt;br /&gt;
So how do you use them? Here's the format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
triggeraction(x,y,&amp;quot;params[0]&amp;quot;,&amp;quot;params[1]&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You must have two parameters, but you can have as many as you want a quick example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontrigger()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Account: &amp;quot; @params[1]@ &amp;quot; Sword &amp;quot; @params[2]@ &amp;quot; head: &amp;quot; @params[3];&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;Who am I?&amp;quot;) //amnesia? multiple identities?&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;trigger&amp;quot;,player.account,player.swordimg,player.headimg);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? You can make more than one parameter.&lt;br /&gt;
Now, there are a few differences between a level NPC with a triggeraction, and a weapon with a triggeraction. Weapons need their location (serverside or clientside) as the first parameter, params[0] is the one after it. Here, you can have just one parameter, and the x and y is always 0 (because the npc server is at 0,0), and you need to include the name of the weapon in the action.&lt;br /&gt;
here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//weapon script with a triggeraction &lt;br /&gt;
//Weapon name: Fire Ball&lt;br /&gt;
function onActionserverside()&lt;br /&gt;
{&lt;br /&gt;
  if(params[0]==&amp;quot;mp&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    playermp-=10&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onWeaponfired()&lt;br /&gt;
{&lt;br /&gt;
  if(playermp&amp;gt;=10)&lt;br /&gt;
  {&lt;br /&gt;
    shootfireball(playerdir);&lt;br /&gt;
    triggeraction(0,0,&amp;quot;serverside&amp;quot;,&amp;quot;Fireball&amp;quot;,&amp;quot;mp&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
    player.chat=&amp;quot;Not enough mp!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This nifty little weapon will cost 10 mp per use, and fires a fireball in the direction the player is facing. Hopefully, you can learn to make many weapons of your own!&lt;br /&gt;
Triggeractions can be used in shops as well (and these are the scripts people ask for the most).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//a shop script, yay!&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActionbuy()&lt;br /&gt;
{&lt;br /&gt;
  if(playerrupees&amp;gt;=100)&lt;br /&gt;
  {&lt;br /&gt;
    addweapon Fire Ball;&lt;br /&gt;
    playerrupees-=100;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;buy fire ball&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;buy&amp;quot;,&amp;quot;buy&amp;quot;); &lt;br /&gt;
    //the level npc triggeraction type&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There, now you can make a little shop that sells a Fire Ball weapon. Have fun with it, search the commands, there's plenty of easy weapons you can make, and the weapon script is easy to follow and modify as well. Hopefully, you know enough about parameters to make more than one weapon for sale in the same NPC, just make the weapon name part of the action, then check for that parameter before they can buy. &lt;br /&gt;
 Now there are other types of loops. One I commonly see is a timeout loop. You should understand why. Back with GS1, it was a bit easier to tell what was happening in the script. In GS1 the script for function onTimeout() would be displayed as if(timeout). It was a bit easier to tell that when a timeout was done, it set a flag that if(timeout) would check. function onTimeout does the same thing, however, for new users this may be harder to tell. here's an example of an NPC that uses a timeout loop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Counter: &amp;quot; @this.time;&lt;br /&gt;
  this.time++;&lt;br /&gt;
  settimer(1); &lt;br /&gt;
//after 1 second, the timeout loop will restart&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would cause the player to count up every second.&lt;br /&gt;
You may have noticed that the variables often start of with client. or this. There are actually a few prefixes, each does a different thing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
client. variable is saved to the client, it can be modified on the clientside or serverside, and read from either.&lt;br /&gt;
clientr. variables can be rad from server or clientside, but only written from serverside. This is more secure, but only if you use it right.&lt;br /&gt;
server. variables are saved to the server, can only be written on the serverside, read on either side&lt;br /&gt;
serverr. more secure version of server. read only on clientside&lt;br /&gt;
this. is a variable that only functions in the NPC it is in. This prevents NPCs from morifying each others variables&lt;br /&gt;
temp. only exists in between the brackets of a function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use scripts effectivly, you should know how to use each of these.&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Some important commands can be found here:&lt;br /&gt;
page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
Which is also helpful for learning how to script. Enjoy!&lt;br /&gt;
&lt;br /&gt;
--[[User:Excaliber7388|Excaliber7388]] 00:13, 8 May 2006 (CEST)&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6958</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6958"/>
		<updated>2006-05-10T19:12:34Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''About:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
[[Image:darkrival_wiki.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Wood Chopping'''&lt;br /&gt;
-Help an elderly man build his lodge by chopping and delivering wood to him from the local area.&lt;br /&gt;
[[Image:wood.gif|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps. We also could use someone who can convert normal levels into gmap format.&lt;br /&gt;
::LATs::&lt;br /&gt;
&lt;br /&gt;
LATs, (Level Administration Team) would be responsible for the uploading, maintnence, and developement of levels. Currently, we are making a new overworld, so much of the work would go to making a unique world.&lt;br /&gt;
&lt;br /&gt;
NATs, (NPC Administration Team) would be responsible for the uploading, maintnence, and creation of new and exciting scripts and NPCS. Dark Rival has many weapons, and unique systems, and the NAT's input is greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
GATs, (GFX Administration Team) would be responsibe for the uploading, maintnence, and creation of new, unique graphics.&lt;br /&gt;
&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onActiontouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time++;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wile(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other rational expressions you may use. (Well, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEEDS to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
Now, back to the 'for' loop.&lt;br /&gt;
This a very interesting loop it's format is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(command;expression;command)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  for(this.i=0;this.i&amp;lt;10;this.i++)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Loops: &amp;quot; @this.i;&lt;br /&gt;
    sleep(.5);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This loop would be activated when the player touchs it.&lt;br /&gt;
It would go through 10 loops, displaying the count, and taking .5 seconds for each loop (due to the sleep() command)&lt;br /&gt;
Now remember this while loop?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There's an easier way of doing it with a for loop, in fact all loops done with wile can be replaced by for.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(this.size=10;this.size&amp;lt;=20;this.size++)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? Much shorter and easier to use!&lt;br /&gt;
Once you know the format of a for loop, you can make longer and more complex loops as well, and they'll take less time to script, which is always a bonus.&lt;br /&gt;
&lt;br /&gt;
Some more detail on actions:&lt;br /&gt;
An action is an effective way to use a portion of script more than once, have one script act on another script, more script to serverside from clientside (and the other way) and more.&lt;br /&gt;
So how do you use them? Here's the format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
triggeraction(x,y,&amp;quot;params[0]&amp;quot;,&amp;quot;params[1]&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You must have two parameters, but you can have as many as you want a quick example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontrigger()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Account: &amp;quot; @params[1]@ &amp;quot; Sword &amp;quot; @params[2]@ &amp;quot; head: &amp;quot; @params[3];&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;Who am I?&amp;quot;) //amnesia? multiple identities?&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;trigger&amp;quot;,player.account,player.swordimg,player.headimg);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? You can make more than one parameter.&lt;br /&gt;
Now, there are a few differences between a level NPC with a triggeraction, and a weapon with a triggeraction. Weapons need their location (serverside or clientside) as the first parameter, params[0] is the one after it. Here, you can have just one parameter, and the x and y is always 0 (because the npc server is at 0,0), and you need to include the name of the weapon in the action.&lt;br /&gt;
here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//weapon script with a triggeraction &lt;br /&gt;
//Weapon name: Fire Ball&lt;br /&gt;
function onActionserverside()&lt;br /&gt;
{&lt;br /&gt;
  if(params[0]==&amp;quot;mp&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    playermp-=10&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onWeaponfired()&lt;br /&gt;
{&lt;br /&gt;
  if(playermp&amp;gt;=10)&lt;br /&gt;
  {&lt;br /&gt;
    shootfireball(playerdir);&lt;br /&gt;
    triggeraction(0,0,&amp;quot;serverside&amp;quot;,&amp;quot;Fireball&amp;quot;,&amp;quot;mp&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
    player.chat=&amp;quot;Not enough mp!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This nifty little weapon will cost 10 mp per use, and fires a fireball in the direction the player is facing. Hopefully, you can learn to make many weapons of your own!&lt;br /&gt;
Triggeractions can be used in shops as well (and these are the scripts people ask for the most).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//a shop script, yay!&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActionbuy()&lt;br /&gt;
{&lt;br /&gt;
  if(playerrupees&amp;gt;=100)&lt;br /&gt;
  {&lt;br /&gt;
    addweapon Fire Ball;&lt;br /&gt;
    playerrupees-=100;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;buy fire ball&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;buy&amp;quot;,&amp;quot;buy&amp;quot;); &lt;br /&gt;
    //the level npc triggeraction type&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There, now you can make a little shop that sells a Fire Ball weapon. Have fun with it, search the commands, there's plenty of easy weapons you can make, and the weapon script is easy to follow and modify as well. Hopefully, you know enough about parameters to make more than one weapon for sale in the same NPC, just make the weapon name part of the action, then check for that parameter before they can buy. &lt;br /&gt;
 Now there are other types of loops. One I commonly see is a timeout loop. You should understand why. Back with GS1, it was a bit easier to tell what was happening in the script. In GS1 the script for function onTimeout() would be displayed as if(timeout). It was a bit easier to tell that when a timeout was done, it set a flag that if(timeout) would check. function onTimeout does the same thing, however, for new users this may be harder to tell. here's an example of an NPC that uses a timeout loop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Counter: &amp;quot; @this.time;&lt;br /&gt;
  this.time++;&lt;br /&gt;
  settimer(1); &lt;br /&gt;
//after 1 second, the timeout loop will restart&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would cause the player to count up every second.&lt;br /&gt;
You may have noticed that the variables often start of with client. or this. There are actually a few prefixes, each does a different thing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
client. variable is saved to the client, it can be modified on the clientside or serverside, and read from either.&lt;br /&gt;
clientr. variables can be rad from server or clientside, but only written from serverside. This is more secure, but only if you use it right.&lt;br /&gt;
server. variables are saved to the server, can only be written on the serverside, read on either side&lt;br /&gt;
serverr. more secure version of server. read only on clientside&lt;br /&gt;
this. is a variable that only functions in the NPC it is in. This prevents NPCs from morifying each others variables&lt;br /&gt;
temp. only exists in between the brackets of a function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use scripts effectivly, you should know how to use each of these.&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Some important commands can be found here:&lt;br /&gt;
page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
Which is also helpful for learning how to script. Enjoy!&lt;br /&gt;
&lt;br /&gt;
--[[User:Excaliber7388|Excaliber7388]] 00:13, 8 May 2006 (CEST)&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6940</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6940"/>
		<updated>2006-05-07T22:13:44Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!Also Look For Instruments!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
[[Image:darkrival_wiki.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Wood Chopping'''&lt;br /&gt;
-Help an elderly man build his lodge by chopping and delivering wood to him from the local area.&lt;br /&gt;
[[Image:wood.gif|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps. We also could use someone who can convert normal levels into gmap format.&lt;br /&gt;
::LATs::&lt;br /&gt;
&lt;br /&gt;
LATs, (Level Administration Team) would be responsible for the uploading, maintnence, and developement of levels. Currently, we are making a new overworld, so much of the work would go to making a unique world.&lt;br /&gt;
&lt;br /&gt;
NATs, (NPC Administration Team) would be responsible for the uploading, maintnence, and creation of new and exciting scripts and NPCS. Dark Rival has many weapons, and unique systems, and the NAT's input is greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
GATs, (GFX Administration Team) would be responsibe for the uploading, maintnence, and creation of new, unique graphics.&lt;br /&gt;
&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onActiontouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time++;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wile(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other rational expressions you may use. (Well, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEEDS to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
Now, back to the 'for' loop.&lt;br /&gt;
This a very interesting loop it's format is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(command;expression;command)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  for(this.i=0;this.i&amp;lt;10;this.i++)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Loops: &amp;quot; @this.i;&lt;br /&gt;
    sleep(.5);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This loop would be activated when the player touchs it.&lt;br /&gt;
It would go through 10 loops, displaying the count, and taking .5 seconds for each loop (due to the sleep() command)&lt;br /&gt;
Now remember this while loop?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There's an easier way of doing it with a for loop, in fact all loops done with wile can be replaced by for.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(this.size=10;this.size&amp;lt;=20;this.size++)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? Much shorter and easier to use!&lt;br /&gt;
Once you know the format of a for loop, you can make longer and more complex loops as well, and they'll take less time to script, which is always a bonus.&lt;br /&gt;
&lt;br /&gt;
Some more detail on actions:&lt;br /&gt;
An action is an effective way to use a portion of script more than once, have one script act on another script, more script to serverside from clientside (and the other way) and more.&lt;br /&gt;
So how do you use them? Here's the format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
triggeraction(x,y,&amp;quot;params[0]&amp;quot;,&amp;quot;params[1]&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You must have two parameters, but you can have as many as you want a quick example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontrigger()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Account: &amp;quot; @params[1]@ &amp;quot; Sword &amp;quot; @params[2]@ &amp;quot; head: &amp;quot; @params[3];&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;Who am I?&amp;quot;) //amnesia? multiple identities?&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;trigger&amp;quot;,player.account,player.swordimg,player.headimg);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? You can make more than one parameter.&lt;br /&gt;
Now, there are a few differences between a level NPC with a triggeraction, and a weapon with a triggeraction. Weapons need their location (serverside or clientside) as the first parameter, params[0] is the one after it. Here, you can have just one parameter, and the x and y is always 0 (because the npc server is at 0,0), and you need to include the name of the weapon in the action.&lt;br /&gt;
here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//weapon script with a triggeraction &lt;br /&gt;
//Weapon name: Fire Ball&lt;br /&gt;
function onActionserverside()&lt;br /&gt;
{&lt;br /&gt;
  if(params[0]==&amp;quot;mp&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    playermp-=10&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onWeaponfired()&lt;br /&gt;
{&lt;br /&gt;
  if(playermp&amp;gt;=10)&lt;br /&gt;
  {&lt;br /&gt;
    shootfireball(playerdir);&lt;br /&gt;
    triggeraction(0,0,&amp;quot;serverside&amp;quot;,&amp;quot;Fireball&amp;quot;,&amp;quot;mp&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
    player.chat=&amp;quot;Not enough mp!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This nifty little weapon will cost 10 mp per use, and fires a fireball in the direction the player is facing. Hopefully, you can learn to make many weapons of your own!&lt;br /&gt;
Triggeractions can be used in shops as well (and these are the scripts people ask for the most).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//a shop script, yay!&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActionbuy()&lt;br /&gt;
{&lt;br /&gt;
  if(playerrupees&amp;gt;=100)&lt;br /&gt;
  {&lt;br /&gt;
    addweapon Fire Ball;&lt;br /&gt;
    playerrupees-=100;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;buy fire ball&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;buy&amp;quot;,&amp;quot;buy&amp;quot;); &lt;br /&gt;
    //the level npc triggeraction type&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There, now you can make a little shop that sells a Fire Ball weapon. Have fun with it, search the commands, there's plenty of easy weapons you can make, and the weapon script is easy to follow and modify as well. Hopefully, you know enough about parameters to make more than one weapon for sale in the same NPC, just make the weapon name part of the action, then check for that parameter before they can buy. &lt;br /&gt;
 Now there are other types of loops. One I commonly see is a timeout loop. You should understand why. Back with GS1, it was a bit easier to tell what was happening in the script. In GS1 the script for function onTimeout() would be displayed as if(timeout). It was a bit easier to tell that when a timeout was done, it set a flag that if(timeout) would check. function onTimeout does the same thing, however, for new users this may be harder to tell. here's an example of an NPC that uses a timeout loop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Counter: &amp;quot; @this.time;&lt;br /&gt;
  this.time++;&lt;br /&gt;
  settimer(1); &lt;br /&gt;
//after 1 second, the timeout loop will restart&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would cause the player to count up every second.&lt;br /&gt;
You may have noticed that the variables often start of with client. or this. There are actually a few prefixes, each does a different thing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
client. variable is saved to the client, it can be modified on the clientside or serverside, and read from either.&lt;br /&gt;
clientr. variables can be rad from server or clientside, but only written from serverside. This is more secure, but only if you use it right.&lt;br /&gt;
server. variables are saved to the server, can only be written on the serverside, read on either side&lt;br /&gt;
serverr. more secure version of server. read only on clientside&lt;br /&gt;
this. is a variable that only functions in the NPC it is in. This prevents NPCs from morifying each others variables&lt;br /&gt;
temp. only exists in between the brackets of a function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use scripts effectivly, you should know how to use each of these.&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Some important commands can be found here:&lt;br /&gt;
page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
Which is also helpful for learning how to script. Enjoy!&lt;br /&gt;
&lt;br /&gt;
--[[User:Excaliber7388|Excaliber7388]] 00:13, 8 May 2006 (CEST)&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6939</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6939"/>
		<updated>2006-05-07T22:11:17Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Hiring!''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!Also Look For Instruments!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
[[Image:darkrival_wiki.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Wood Chopping'''&lt;br /&gt;
-Help an elderly man build his lodge by chopping and delivering wood to him from the local area.&lt;br /&gt;
[[Image:wood.gif|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps. We also could use someone who can convert normal levels into gmap format.&lt;br /&gt;
::LATs::&lt;br /&gt;
&lt;br /&gt;
LATs, (Level Administration Team) would be responsible for the uploading, maintnence, and developement of levels. Currently, we are making a new overworld, so much of the work would go to making a unique world.&lt;br /&gt;
&lt;br /&gt;
NATs, (NPC Administration Team) would be responsible for the uploading, maintnence, and creation of new and exciting scripts and NPCS. Dark Rival has many weapons, and unique systems, and the NAT's input is greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
GATs, (GFX Administration Team) would be responsibe for the uploading, maintnence, and creation of new, unique graphics.&lt;br /&gt;
&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onActiontouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time++;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wile(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other rational expressions you may use. (Well, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEEDS to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
Now, back to the 'for' loop.&lt;br /&gt;
This a very interesting loop it's format is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(command;expression;command)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  for(this.i=0;this.i&amp;lt;10;this.i++)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Loops: &amp;quot; @this.i;&lt;br /&gt;
    sleep(.5);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This loop would be activated when the player touchs it.&lt;br /&gt;
It would go through 10 loops, displaying the count, and taking .5 seconds for each loop (due to the sleep() command)&lt;br /&gt;
Now remember this while loop?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There's an easier way of doing it with a for loop, in fact all loops done with wile can be replaced by for.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(this.size=10;this.size&amp;lt;=20;this.size++)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? Much shorter and easier to use!&lt;br /&gt;
Once you know the format of a for loop, you can make longer and more complex loops as well, and they'll take less time to script, which is always a bonus.&lt;br /&gt;
&lt;br /&gt;
Some more detail on actions:&lt;br /&gt;
An action is an effective way to use a portion of script more than once, have one script act on another script, more script to serverside from clientside (and the other way) and more.&lt;br /&gt;
So how do you use them? Here's the format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
triggeraction(x,y,&amp;quot;params[0]&amp;quot;,&amp;quot;params[1]&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You must have two parameters, but you can have as many as you want a quick example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontrigger()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Account: &amp;quot; @params[1]@ &amp;quot; Sword &amp;quot; @params[2]@ &amp;quot; head: &amp;quot; @params[3];&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;Who am I?&amp;quot;) //amnesia? multiple identities?&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;trigger&amp;quot;,player.account,player.swordimg,player.headimg);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? You can make more than one parameter.&lt;br /&gt;
Now, there are a few differences between a level NPC with a triggeraction, and a weapon with a triggeraction. Weapons need their location (serverside or clientside) as the first parameter, params[0] is the one after it. Here, you can have just one parameter, and the x and y is always 0 (because the npc server is at 0,0), and you need to include the name of the weapon in the action.&lt;br /&gt;
here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//weapon script with a triggeraction &lt;br /&gt;
//Weapon name: Fire Ball&lt;br /&gt;
function onActionserverside()&lt;br /&gt;
{&lt;br /&gt;
  if(params[0]==&amp;quot;mp&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    playermp-=10&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onWeaponfired()&lt;br /&gt;
{&lt;br /&gt;
  if(playermp&amp;gt;=10)&lt;br /&gt;
  {&lt;br /&gt;
    shootfireball(playerdir);&lt;br /&gt;
    triggeraction(0,0,&amp;quot;serverside&amp;quot;,&amp;quot;Fireball&amp;quot;,&amp;quot;mp&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
    player.chat=&amp;quot;Not enough mp!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This nifty little weapon will cost 10 mp per use, and fires a fireball in the direction the player is facing. Hopefully, you can learn to make many weapons of your own!&lt;br /&gt;
Triggeractions can be used in shops as well (and these are the scripts people ask for the most).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//a shop script, yay!&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActionbuy()&lt;br /&gt;
{&lt;br /&gt;
  if(playerrupees&amp;gt;=100)&lt;br /&gt;
  {&lt;br /&gt;
    addweapon Fire Ball;&lt;br /&gt;
    playerrupees-=100;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;buy fire ball&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;buy&amp;quot;,&amp;quot;buy&amp;quot;); &lt;br /&gt;
    //the level npc triggeraction type&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There, now you can make a little shop that sells a Fire Ball weapon. Have fun with it, search the commands, there's plenty of easy weapons you can make, and the weapon script is easy to follow and modify as well. Hopefully, you know enough about parameters to make more than one weapon for sale in the same NPC, just make the weapon name part of the action, then check for that parameter before they can buy. &lt;br /&gt;
 Now there are other types of loops. One I commonly see is a timeout loop. You should understand why. Back with GS1, it was a bit easier to tell what was happening in the script. In GS1 the script for function onTimeout() would be displayed as if(timeout). It was a bit easier to tell that when a timeout was done, it set a flag that if(timeout) would check. function onTimeout does the same thing, however, for new users this may be harder to tell. here's an example of an NPC that uses a timeout loop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Counter: &amp;quot; @this.time;&lt;br /&gt;
  this.time++;&lt;br /&gt;
  settimer(1); &lt;br /&gt;
//after 1 second, the timeout loop will restart&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would cause the player to count up every second.&lt;br /&gt;
You may have noticed that the variables often start of with client. or this. There are actually a few prefixes, each does a different thing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
client. variable is saved to the client, it can be modified on the clientside or serverside, and read from either.&lt;br /&gt;
clientr. variables can be rad from server or clientside, but only written from serverside. This is more secure, but only if you use it right.&lt;br /&gt;
server. variables are saved to the server, can only be written on the serverside, read on either side&lt;br /&gt;
serverr. more secure version of server. read only on clientside&lt;br /&gt;
this. is a variable that only functions in the NPC it is in. This prevents NPCs from morifying each others variables&lt;br /&gt;
temp. only exists in between the brackets of a function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use scripts effectivly, you should know how to use each of these.&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Some important commands can be found here:&lt;br /&gt;
page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
Which is also helpful for learning how to script. Enjoy!&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6938</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6938"/>
		<updated>2006-05-07T22:06:34Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Current staff:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!Also Look For Instruments!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
[[Image:darkrival_wiki.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Wood Chopping'''&lt;br /&gt;
-Help an elderly man build his lodge by chopping and delivering wood to him from the local area.&lt;br /&gt;
[[Image:wood.gif|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onActiontouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time++;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wile(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other rational expressions you may use. (Well, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEEDS to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
Now, back to the 'for' loop.&lt;br /&gt;
This a very interesting loop it's format is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(command;expression;command)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  for(this.i=0;this.i&amp;lt;10;this.i++)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Loops: &amp;quot; @this.i;&lt;br /&gt;
    sleep(.5);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This loop would be activated when the player touchs it.&lt;br /&gt;
It would go through 10 loops, displaying the count, and taking .5 seconds for each loop (due to the sleep() command)&lt;br /&gt;
Now remember this while loop?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There's an easier way of doing it with a for loop, in fact all loops done with wile can be replaced by for.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(this.size=10;this.size&amp;lt;=20;this.size++)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? Much shorter and easier to use!&lt;br /&gt;
Once you know the format of a for loop, you can make longer and more complex loops as well, and they'll take less time to script, which is always a bonus.&lt;br /&gt;
&lt;br /&gt;
Some more detail on actions:&lt;br /&gt;
An action is an effective way to use a portion of script more than once, have one script act on another script, more script to serverside from clientside (and the other way) and more.&lt;br /&gt;
So how do you use them? Here's the format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
triggeraction(x,y,&amp;quot;params[0]&amp;quot;,&amp;quot;params[1]&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You must have two parameters, but you can have as many as you want a quick example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontrigger()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Account: &amp;quot; @params[1]@ &amp;quot; Sword &amp;quot; @params[2]@ &amp;quot; head: &amp;quot; @params[3];&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;Who am I?&amp;quot;) //amnesia? multiple identities?&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;trigger&amp;quot;,player.account,player.swordimg,player.headimg);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? You can make more than one parameter.&lt;br /&gt;
Now, there are a few differences between a level NPC with a triggeraction, and a weapon with a triggeraction. Weapons need their location (serverside or clientside) as the first parameter, params[0] is the one after it. Here, you can have just one parameter, and the x and y is always 0 (because the npc server is at 0,0), and you need to include the name of the weapon in the action.&lt;br /&gt;
here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//weapon script with a triggeraction &lt;br /&gt;
//Weapon name: Fire Ball&lt;br /&gt;
function onActionserverside()&lt;br /&gt;
{&lt;br /&gt;
  if(params[0]==&amp;quot;mp&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    playermp-=10&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onWeaponfired()&lt;br /&gt;
{&lt;br /&gt;
  if(playermp&amp;gt;=10)&lt;br /&gt;
  {&lt;br /&gt;
    shootfireball(playerdir);&lt;br /&gt;
    triggeraction(0,0,&amp;quot;serverside&amp;quot;,&amp;quot;Fireball&amp;quot;,&amp;quot;mp&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
    player.chat=&amp;quot;Not enough mp!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This nifty little weapon will cost 10 mp per use, and fires a fireball in the direction the player is facing. Hopefully, you can learn to make many weapons of your own!&lt;br /&gt;
Triggeractions can be used in shops as well (and these are the scripts people ask for the most).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//a shop script, yay!&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActionbuy()&lt;br /&gt;
{&lt;br /&gt;
  if(playerrupees&amp;gt;=100)&lt;br /&gt;
  {&lt;br /&gt;
    addweapon Fire Ball;&lt;br /&gt;
    playerrupees-=100;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;buy fire ball&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;buy&amp;quot;,&amp;quot;buy&amp;quot;); &lt;br /&gt;
    //the level npc triggeraction type&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There, now you can make a little shop that sells a Fire Ball weapon. Have fun with it, search the commands, there's plenty of easy weapons you can make, and the weapon script is easy to follow and modify as well. Hopefully, you know enough about parameters to make more than one weapon for sale in the same NPC, just make the weapon name part of the action, then check for that parameter before they can buy. &lt;br /&gt;
 Now there are other types of loops. One I commonly see is a timeout loop. You should understand why. Back with GS1, it was a bit easier to tell what was happening in the script. In GS1 the script for function onTimeout() would be displayed as if(timeout). It was a bit easier to tell that when a timeout was done, it set a flag that if(timeout) would check. function onTimeout does the same thing, however, for new users this may be harder to tell. here's an example of an NPC that uses a timeout loop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Counter: &amp;quot; @this.time;&lt;br /&gt;
  this.time++;&lt;br /&gt;
  settimer(1); &lt;br /&gt;
//after 1 second, the timeout loop will restart&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would cause the player to count up every second.&lt;br /&gt;
You may have noticed that the variables often start of with client. or this. There are actually a few prefixes, each does a different thing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
client. variable is saved to the client, it can be modified on the clientside or serverside, and read from either.&lt;br /&gt;
clientr. variables can be rad from server or clientside, but only written from serverside. This is more secure, but only if you use it right.&lt;br /&gt;
server. variables are saved to the server, can only be written on the serverside, read on either side&lt;br /&gt;
serverr. more secure version of server. read only on clientside&lt;br /&gt;
this. is a variable that only functions in the NPC it is in. This prevents NPCs from morifying each others variables&lt;br /&gt;
temp. only exists in between the brackets of a function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use scripts effectivly, you should know how to use each of these.&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Some important commands can be found here:&lt;br /&gt;
page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
Which is also helpful for learning how to script. Enjoy!&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6937</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6937"/>
		<updated>2006-05-07T22:06:18Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!Also Look For Instruments!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
[[Image:darkrival_wiki.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Wood Chopping'''&lt;br /&gt;
-Help an elderly man build his lodge by chopping and delivering wood to him from the local area.&lt;br /&gt;
[[Image:wood.gif|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onActiontouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time++;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wile(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other rational expressions you may use. (Well, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEEDS to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
Now, back to the 'for' loop.&lt;br /&gt;
This a very interesting loop it's format is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(command;expression;command)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  for(this.i=0;this.i&amp;lt;10;this.i++)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Loops: &amp;quot; @this.i;&lt;br /&gt;
    sleep(.5);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This loop would be activated when the player touchs it.&lt;br /&gt;
It would go through 10 loops, displaying the count, and taking .5 seconds for each loop (due to the sleep() command)&lt;br /&gt;
Now remember this while loop?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There's an easier way of doing it with a for loop, in fact all loops done with wile can be replaced by for.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(this.size=10;this.size&amp;lt;=20;this.size++)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? Much shorter and easier to use!&lt;br /&gt;
Once you know the format of a for loop, you can make longer and more complex loops as well, and they'll take less time to script, which is always a bonus.&lt;br /&gt;
&lt;br /&gt;
Some more detail on actions:&lt;br /&gt;
An action is an effective way to use a portion of script more than once, have one script act on another script, more script to serverside from clientside (and the other way) and more.&lt;br /&gt;
So how do you use them? Here's the format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
triggeraction(x,y,&amp;quot;params[0]&amp;quot;,&amp;quot;params[1]&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You must have two parameters, but you can have as many as you want a quick example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontrigger()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Account: &amp;quot; @params[1]@ &amp;quot; Sword &amp;quot; @params[2]@ &amp;quot; head: &amp;quot; @params[3];&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;Who am I?&amp;quot;) //amnesia? multiple identities?&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;trigger&amp;quot;,player.account,player.swordimg,player.headimg);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? You can make more than one parameter.&lt;br /&gt;
Now, there are a few differences between a level NPC with a triggeraction, and a weapon with a triggeraction. Weapons need their location (serverside or clientside) as the first parameter, params[0] is the one after it. Here, you can have just one parameter, and the x and y is always 0 (because the npc server is at 0,0), and you need to include the name of the weapon in the action.&lt;br /&gt;
here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//weapon script with a triggeraction &lt;br /&gt;
//Weapon name: Fire Ball&lt;br /&gt;
function onActionserverside()&lt;br /&gt;
{&lt;br /&gt;
  if(params[0]==&amp;quot;mp&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    playermp-=10&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onWeaponfired()&lt;br /&gt;
{&lt;br /&gt;
  if(playermp&amp;gt;=10)&lt;br /&gt;
  {&lt;br /&gt;
    shootfireball(playerdir);&lt;br /&gt;
    triggeraction(0,0,&amp;quot;serverside&amp;quot;,&amp;quot;Fireball&amp;quot;,&amp;quot;mp&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
    player.chat=&amp;quot;Not enough mp!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This nifty little weapon will cost 10 mp per use, and fires a fireball in the direction the player is facing. Hopefully, you can learn to make many weapons of your own!&lt;br /&gt;
Triggeractions can be used in shops as well (and these are the scripts people ask for the most).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//a shop script, yay!&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActionbuy()&lt;br /&gt;
{&lt;br /&gt;
  if(playerrupees&amp;gt;=100)&lt;br /&gt;
  {&lt;br /&gt;
    addweapon Fire Ball;&lt;br /&gt;
    playerrupees-=100;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;buy fire ball&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;buy&amp;quot;,&amp;quot;buy&amp;quot;); &lt;br /&gt;
    //the level npc triggeraction type&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There, now you can make a little shop that sells a Fire Ball weapon. Have fun with it, search the commands, there's plenty of easy weapons you can make, and the weapon script is easy to follow and modify as well. Hopefully, you know enough about parameters to make more than one weapon for sale in the same NPC, just make the weapon name part of the action, then check for that parameter before they can buy. &lt;br /&gt;
 Now there are other types of loops. One I commonly see is a timeout loop. You should understand why. Back with GS1, it was a bit easier to tell what was happening in the script. In GS1 the script for function onTimeout() would be displayed as if(timeout). It was a bit easier to tell that when a timeout was done, it set a flag that if(timeout) would check. function onTimeout does the same thing, however, for new users this may be harder to tell. here's an example of an NPC that uses a timeout loop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Counter: &amp;quot; @this.time;&lt;br /&gt;
  this.time++;&lt;br /&gt;
  settimer(1); &lt;br /&gt;
//after 1 second, the timeout loop will restart&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would cause the player to count up every second.&lt;br /&gt;
You may have noticed that the variables often start of with client. or this. There are actually a few prefixes, each does a different thing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
client. variable is saved to the client, it can be modified on the clientside or serverside, and read from either.&lt;br /&gt;
clientr. variables can be rad from server or clientside, but only written from serverside. This is more secure, but only if you use it right.&lt;br /&gt;
server. variables are saved to the server, can only be written on the serverside, read on either side&lt;br /&gt;
serverr. more secure version of server. read only on clientside&lt;br /&gt;
this. is a variable that only functions in the NPC it is in. This prevents NPCs from morifying each others variables&lt;br /&gt;
temp. only exists in between the brackets of a function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use scripts effectivly, you should know how to use each of these.&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Some important commands can be found here:&lt;br /&gt;
page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
Which is also helpful for learning how to script. Enjoy!&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6936</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6936"/>
		<updated>2006-05-07T22:05:44Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Jobs:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!Also Look For Instruments!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
[[Image:darkrival_wiki.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Wood Chopping'''&lt;br /&gt;
-Help an elderly man build his lodge by chopping and delivering wood to him from the local area.&lt;br /&gt;
[[Image:wood.gif|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onActiontouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time++;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wile(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other rational expressions you may use. (Well, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEEDS to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
Now, back to the 'for' loop.&lt;br /&gt;
This a very interesting loop it's format is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(command;expression;command)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  for(this.i=0;this.i&amp;lt;10;this.i++)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Loops: &amp;quot; @this.i;&lt;br /&gt;
    sleep(.5);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This loop would be activated when the player touchs it.&lt;br /&gt;
It would go through 10 loops, displaying the count, and taking .5 seconds for each loop (due to the sleep() command)&lt;br /&gt;
Now remember this while loop?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There's an easier way of doing it with a for loop, in fact all loops done with wile can be replaced by for.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(this.size=10;this.size&amp;lt;=20;this.size++)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? Much shorter and easier to use!&lt;br /&gt;
Once you know the format of a for loop, you can make longer and more complex loops as well, and they'll take less time to script, which is always a bonus.&lt;br /&gt;
&lt;br /&gt;
Some more detail on actions:&lt;br /&gt;
An action is an effective way to use a portion of script more than once, have one script act on another script, more script to serverside from clientside (and the other way) and more.&lt;br /&gt;
So how do you use them? Here's the format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
triggeraction(x,y,&amp;quot;params[0]&amp;quot;,&amp;quot;params[1]&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You must have two parameters, but you can have as many as you want a quick example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontrigger()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Account: &amp;quot; @params[1]@ &amp;quot; Sword &amp;quot; @params[2]@ &amp;quot; head: &amp;quot; @params[3];&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;Who am I?&amp;quot;) //amnesia? multiple identities?&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;trigger&amp;quot;,player.account,player.swordimg,player.headimg);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? You can make more than one parameter.&lt;br /&gt;
Now, there are a few differences between a level NPC with a triggeraction, and a weapon with a triggeraction. Weapons need their location (serverside or clientside) as the first parameter, params[0] is the one after it. Here, you can have just one parameter, and the x and y is always 0 (because the npc server is at 0,0), and you need to include the name of the weapon in the action.&lt;br /&gt;
here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//weapon script with a triggeraction &lt;br /&gt;
//Weapon name: Fire Ball&lt;br /&gt;
function onActionserverside()&lt;br /&gt;
{&lt;br /&gt;
  if(params[0]==&amp;quot;mp&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    playermp-=10&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onWeaponfired()&lt;br /&gt;
{&lt;br /&gt;
  if(playermp&amp;gt;=10)&lt;br /&gt;
  {&lt;br /&gt;
    shootfireball(playerdir);&lt;br /&gt;
    triggeraction(0,0,&amp;quot;serverside&amp;quot;,&amp;quot;Fireball&amp;quot;,&amp;quot;mp&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
    player.chat=&amp;quot;Not enough mp!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This nifty little weapon will cost 10 mp per use, and fires a fireball in the direction the player is facing. Hopefully, you can learn to make many weapons of your own!&lt;br /&gt;
Triggeractions can be used in shops as well (and these are the scripts people ask for the most).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//a shop script, yay!&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActionbuy()&lt;br /&gt;
{&lt;br /&gt;
  if(playerrupees&amp;gt;=100)&lt;br /&gt;
  {&lt;br /&gt;
    addweapon Fire Ball;&lt;br /&gt;
    playerrupees-=100;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;buy fire ball&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;buy&amp;quot;,&amp;quot;buy&amp;quot;); &lt;br /&gt;
    //the level npc triggeraction type&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There, now you can make a little shop that sells a Fire Ball weapon. Have fun with it, search the commands, there's plenty of easy weapons you can make, and the weapon script is easy to follow and modify as well. Hopefully, you know enough about parameters to make more than one weapon for sale in the same NPC, just make the weapon name part of the action, then check for that parameter before they can buy. &lt;br /&gt;
 Now there are other types of loops. One I commonly see is a timeout loop. You should understand why. Back with GS1, it was a bit easier to tell what was happening in the script. In GS1 the script for function onTimeout() would be displayed as if(timeout). It was a bit easier to tell that when a timeout was done, it set a flag that if(timeout) would check. function onTimeout does the same thing, however, for new users this may be harder to tell. here's an example of an NPC that uses a timeout loop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Counter: &amp;quot; @this.time;&lt;br /&gt;
  this.time++;&lt;br /&gt;
  settimer(1); &lt;br /&gt;
//after 1 second, the timeout loop will restart&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would cause the player to count up every second.&lt;br /&gt;
You may have noticed that the variables often start of with client. or this. There are actually a few prefixes, each does a different thing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
client. variable is saved to the client, it can be modified on the clientside or serverside, and read from either.&lt;br /&gt;
clientr. variables can be rad from server or clientside, but only written from serverside. This is more secure, but only if you use it right.&lt;br /&gt;
server. variables are saved to the server, can only be written on the serverside, read on either side&lt;br /&gt;
serverr. more secure version of server. read only on clientside&lt;br /&gt;
this. is a variable that only functions in the NPC it is in. This prevents NPCs from morifying each others variables&lt;br /&gt;
temp. only exists in between the brackets of a function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use scripts effectivly, you should know how to use each of these.&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Some important commands can be found here:&lt;br /&gt;
page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
Which is also helpful for learning how to script. Enjoy!&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=File:Wood.gif&amp;diff=6935</id>
		<title>File:Wood.gif</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=File:Wood.gif&amp;diff=6935"/>
		<updated>2006-05-07T22:04:40Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Talk:Creation/Dev/Script/Client&amp;diff=6780</id>
		<title>Talk:Creation/Dev/Script/Client</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Talk:Creation/Dev/Script/Client&amp;diff=6780"/>
		<updated>2006-04-12T23:56:45Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I need help with a new system I'm making for my server, I've posted some info on the forums, but it hasn't gotten replys, and I'm stumped. Here's the forums site, it would mean a lot to me if someone could help me out a bit, thanks!!!&lt;br /&gt;
http://forums.graalonline.com/forums/showthread.php?t=65330&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6731</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6731"/>
		<updated>2006-04-03T13:53:36Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Excaliber's Scripting Guide''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!Also Look For Instruments!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
[[Image:darkrival_wiki.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onActiontouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time++;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wile(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other rational expressions you may use. (Well, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEEDS to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
Now, back to the 'for' loop.&lt;br /&gt;
This a very interesting loop it's format is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(command;expression;command)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  for(this.i=0;this.i&amp;lt;10;this.i++)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Loops: &amp;quot; @this.i;&lt;br /&gt;
    sleep(.5);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This loop would be activated when the player touchs it.&lt;br /&gt;
It would go through 10 loops, displaying the count, and taking .5 seconds for each loop (due to the sleep() command)&lt;br /&gt;
Now remember this while loop?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There's an easier way of doing it with a for loop, in fact all loops done with wile can be replaced by for.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(this.size=10;this.size&amp;lt;=20;this.size++)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? Much shorter and easier to use!&lt;br /&gt;
Once you know the format of a for loop, you can make longer and more complex loops as well, and they'll take less time to script, which is always a bonus.&lt;br /&gt;
&lt;br /&gt;
Some more detail on actions:&lt;br /&gt;
An action is an effective way to use a portion of script more than once, have one script act on another script, more script to serverside from clientside (and the other way) and more.&lt;br /&gt;
So how do you use them? Here's the format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
triggeraction(x,y,&amp;quot;params[0]&amp;quot;,&amp;quot;params[1]&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You must have two parameters, but you can have as many as you want a quick example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontrigger()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Account: &amp;quot; @params[1]@ &amp;quot; Sword &amp;quot; @params[2]@ &amp;quot; head: &amp;quot; @params[3];&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;Who am I?&amp;quot;) //amnesia? multiple identities?&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;trigger&amp;quot;,player.account,player.swordimg,player.headimg);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? You can make more than one parameter.&lt;br /&gt;
Now, there are a few differences between a level NPC with a triggeraction, and a weapon with a triggeraction. Weapons need their location (serverside or clientside) as the first parameter, params[0] is the one after it. Here, you can have just one parameter, and the x and y is always 0 (because the npc server is at 0,0), and you need to include the name of the weapon in the action.&lt;br /&gt;
here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//weapon script with a triggeraction &lt;br /&gt;
//Weapon name: Fire Ball&lt;br /&gt;
function onActionserverside()&lt;br /&gt;
{&lt;br /&gt;
  if(params[0]==&amp;quot;mp&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    playermp-=10&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onWeaponfired()&lt;br /&gt;
{&lt;br /&gt;
  if(playermp&amp;gt;=10)&lt;br /&gt;
  {&lt;br /&gt;
    shootfireball(playerdir);&lt;br /&gt;
    triggeraction(0,0,&amp;quot;serverside&amp;quot;,&amp;quot;Fireball&amp;quot;,&amp;quot;mp&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
    player.chat=&amp;quot;Not enough mp!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This nifty little weapon will cost 10 mp per use, and fires a fireball in the direction the player is facing. Hopefully, you can learn to make many weapons of your own!&lt;br /&gt;
Triggeractions can be used in shops as well (and these are the scripts people ask for the most).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//a shop script, yay!&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActionbuy()&lt;br /&gt;
{&lt;br /&gt;
  if(playerrupees&amp;gt;=100)&lt;br /&gt;
  {&lt;br /&gt;
    addweapon Fire Ball;&lt;br /&gt;
    playerrupees-=100;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;buy fire ball&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;buy&amp;quot;,&amp;quot;buy&amp;quot;); &lt;br /&gt;
    //the level npc triggeraction type&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There, now you can make a little shop that sells a Fire Ball weapon. Have fun with it, search the commands, there's plenty of easy weapons you can make, and the weapon script is easy to follow and modify as well. Hopefully, you know enough about parameters to make more than one weapon for sale in the same NPC, just make the weapon name part of the action, then check for that parameter before they can buy. &lt;br /&gt;
 Now there are other types of loops. One I commonly see is a timeout loop. You should understand why. Back with GS1, it was a bit easier to tell what was happening in the script. In GS1 the script for function onTimeout() would be displayed as if(timeout). It was a bit easier to tell that when a timeout was done, it set a flag that if(timeout) would check. function onTimeout does the same thing, however, for new users this may be harder to tell. here's an example of an NPC that uses a timeout loop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Counter: &amp;quot; @this.time;&lt;br /&gt;
  this.time++;&lt;br /&gt;
  settimer(1); &lt;br /&gt;
//after 1 second, the timeout loop will restart&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would cause the player to count up every second.&lt;br /&gt;
You may have noticed that the variables often start of with client. or this. There are actually a few prefixes, each does a different thing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
client. variable is saved to the client, it can be modified on the clientside or serverside, and read from either.&lt;br /&gt;
clientr. variables can be rad from server or clientside, but only written from serverside. This is more secure, but only if you use it right.&lt;br /&gt;
server. variables are saved to the server, can only be written on the serverside, read on either side&lt;br /&gt;
serverr. more secure version of server. read only on clientside&lt;br /&gt;
this. is a variable that only functions in the NPC it is in. This prevents NPCs from morifying each others variables&lt;br /&gt;
temp. only exists in between the brackets of a function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use scripts effectivly, you should know how to use each of these.&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Some important commands can be found here:&lt;br /&gt;
page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
Which is also helpful for learning how to script. Enjoy!&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6717</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6717"/>
		<updated>2006-03-31T20:48:18Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Excaliber's Scripting Guide''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!Also Look For Instruments!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
[[Image:darkrival_wiki.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onActiontouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time++;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wile(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other rational expressions you may use. (Well, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEEDS to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
Now, back to the 'for' loop.&lt;br /&gt;
This a very interesting loop it's format is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(command;expression;command)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  for(this.i=0;this.i&amp;lt;10;this.i++)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Loops: &amp;quot; @this.i;&lt;br /&gt;
    sleep(.5);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This loop would be activated when the player touchs it.&lt;br /&gt;
It would go through 10 loops, displaying the count, and taking .5 seconds for each loop (due to the sleep() command)&lt;br /&gt;
Now remember this while loop?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There's an easier way of doing it with a for loop, in fact all loops done with wile can be replaced by for.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(this.size=10;this.size&amp;lt;=20;this.size++)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? Much shorter and easier to use!&lt;br /&gt;
Once you know the format of a for loop, you can make longer and more complex loops as well, and they'll take less time to script, which is always a bonus.&lt;br /&gt;
&lt;br /&gt;
Some more detail on actions:&lt;br /&gt;
An action is an effective way to use a portion of script more than once, have one script act on another script, more script to serverside from clientside (and the other way) and more.&lt;br /&gt;
So how do you use them? Here's the format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
triggeraction(x,y,&amp;quot;params[0]&amp;quot;,&amp;quot;params[1]&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You must have two parameters, but you can have as many as you want a quick example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontrigger()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Account: &amp;quot; @params[1]@ &amp;quot; Sword &amp;quot; @params[2]@ &amp;quot; head: &amp;quot; @params[3];&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;Who am I?&amp;quot;) //amnesia? multiple identities?&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;trigger&amp;quot;,player.account,player.swordimg,player.headimg);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? You can make more than one parameter.&lt;br /&gt;
Now, there are a few differences between a level NPC with a triggeraction, and a weapon with a triggeraction. Weapons need their location (serverside or clientside) as the first parameter, params[0] is the one after it. Here, you can have just one parameter, and the x and y is always 0 (because the npc server is at 0,0), and you need to include the name of the weapon in the action.&lt;br /&gt;
here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//weapon script with a triggeraction &lt;br /&gt;
//Weapon name: Fire Ball&lt;br /&gt;
function onActionserverside()&lt;br /&gt;
{&lt;br /&gt;
  if(params[0]==&amp;quot;mp&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    playermp-=10&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onWeaponfired()&lt;br /&gt;
{&lt;br /&gt;
  if(playermp&amp;gt;=10)&lt;br /&gt;
  {&lt;br /&gt;
    shootfireball(playerdir);&lt;br /&gt;
    triggeraction(0,0,&amp;quot;serverside&amp;quot;,&amp;quot;Fireball&amp;quot;,&amp;quot;mp&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
    player.chat=&amp;quot;Not enough mp!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This nifty little weapon will cost 10 mp per use, and fires a fireball in the direction the player is facing. Hopefully, you can learn to make many weapons of your own!&lt;br /&gt;
Triggeractions can be used in shops as well (and these are the scripts people ask for the most).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//a shop script, yay!&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActionbuy()&lt;br /&gt;
{&lt;br /&gt;
  if(playerrupees&amp;gt;=100)&lt;br /&gt;
  {&lt;br /&gt;
    addweapon Fire Ball;&lt;br /&gt;
    playerrupees-=100;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;buy fire ball&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;buy&amp;quot;,&amp;quot;buy&amp;quot;); &lt;br /&gt;
    //the level npc triggeraction type&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There, now you can make a little shop that sells a Fire Ball weapon. Have fun with it, search the commands, there's plenty of easy weapons you can make, and the weapon script is easy to follow and modify as well. Hopefully, you know enough about parameters to make more than one weapon for sale in the same NPC, just make the weapon name part of the action, then check for that parameter before they can buy. &lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Some important commands can be found here:&lt;br /&gt;
page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
Which is also helpful for learning how to script. Enjoy!&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6716</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6716"/>
		<updated>2006-03-30T22:44:16Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Excaliber's Scripting Guide''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!Also Look For Instruments!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
[[Image:darkrival_wiki.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onTouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time+=1;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wile(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other rational expressions you may use. (Well, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEEDS to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
Now, back to the 'for' loop.&lt;br /&gt;
This a very interesting loop it's format is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(command;expression;command)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  for(this.i=0;this.i&amp;lt;10;this.i++)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Loops: &amp;quot; @this.i;&lt;br /&gt;
    sleep(.5);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This loop would be activated when the player touchs it.&lt;br /&gt;
It would go through 10 loops, displaying the count, and taking .5 seconds for each loop (due to the sleep() command)&lt;br /&gt;
Now remember this while loop?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There's an easier way of doing it with a for loop, in fact all loops done with wile can be replaced by for.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(this.size=10;this.size&amp;lt;=20;this.size++)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? Much shorter and easier to use!&lt;br /&gt;
Once you know the format of a for loop, you can make longer and more complex loops as well, and they'll take less time to script, which is always a bonus.&lt;br /&gt;
&lt;br /&gt;
Some more detail on actions:&lt;br /&gt;
An action is an effective way to use a portion of script more than once, have one script act on another script, more script to serverside from clientside (and the other way) and more.&lt;br /&gt;
So how do you use them? Here's the format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
triggeraction(x,y,&amp;quot;params[0]&amp;quot;,&amp;quot;params[1]&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You must have two parameters, but you can have as many as you want a quick example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontrigger()&lt;br /&gt;
{&lt;br /&gt;
  player.chat=&amp;quot;Account: &amp;quot; @params[1]@ &amp;quot; Sword &amp;quot; @params[2]@ &amp;quot; head: &amp;quot; @params[3];&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;Who am I?&amp;quot;) //amnesia? multiple identities?&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;trigger&amp;quot;,player.account,player.swordimg,player.headimg);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? You can make more than one parameter.&lt;br /&gt;
Now, there are a few differences between a level NPC with a triggeraction, and a weapon with a triggeraction. Weapons need their location (serverside or clientside) as the first parameter, params[0] is the one after it. Here, you can have just one parameter, and the x and y is always 0 (because the npc server is at 0,0), and you need to include the name of the weapon in the action.&lt;br /&gt;
here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//weapon script with a triggeraction &lt;br /&gt;
//Weapon name: Fire Ball&lt;br /&gt;
function onActionserverside()&lt;br /&gt;
{&lt;br /&gt;
  if(params[0]==&amp;quot;mp&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    playermp-=10&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onWeaponfired()&lt;br /&gt;
{&lt;br /&gt;
  if(playermp&amp;gt;=10)&lt;br /&gt;
  {&lt;br /&gt;
    shootfireball(playerdir);&lt;br /&gt;
    triggeraction(0,0,&amp;quot;serverside&amp;quot;,&amp;quot;Fireball&amp;quot;,&amp;quot;mp&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
    player.chat=&amp;quot;Not enough mp!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This nifty little weapon will cost 10 mp per use, and fires a fireball in the direction the player is facing. Hopefully, you can learn to make many weapons of your own!&lt;br /&gt;
Triggeractions can be used in shops as well (and these are the scripts people ask for the most).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//a shop script, yay!&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActionbuy()&lt;br /&gt;
{&lt;br /&gt;
  if(playerrupees&amp;gt;=100)&lt;br /&gt;
  {&lt;br /&gt;
    addweapon Fire Ball;&lt;br /&gt;
    playerrupees-=100;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayerchats()&lt;br /&gt;
{&lt;br /&gt;
  if(player.chat==&amp;quot;buy fire ball&amp;quot;)&lt;br /&gt;
  {&lt;br /&gt;
    triggeraction(x,y,&amp;quot;buy&amp;quot;,&amp;quot;buy&amp;quot;); &lt;br /&gt;
    //the level npc triggeraction type&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There, now you can make a little shop that sells a Fire Ball weapon. Have fun with it, search the commands, there's plenty of easy weapons you can make, and the weapon script is easy to follow and modify as well. Hopefully, you know enough about parameters to make more than one weapon for sale in the same NPC, just make the weapon name part of the action, then check for that parameter before they can buy. &lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Some important commands can be found here:&lt;br /&gt;
page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
Which is also helpful for learning how to script. Enjoy!&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6708</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6708"/>
		<updated>2006-03-30T17:32:22Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Excaliber's Scripting Guide''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!Also Look For Instruments!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
[[Image:darkrival_wiki.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onTouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time+=1;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wile(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other rational expressions you may use. (Well, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEEDS to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
Now, back to the 'for' loop.&lt;br /&gt;
This a very interesting loop it's format is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(command;expression;command)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  for(this.i=0;this.i&amp;lt;10;this.i++)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Loops: &amp;quot; @this.i;&lt;br /&gt;
    sleep(.5);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This loop would be activated when the player touchs it.&lt;br /&gt;
It would go through 10 loops, displaying the count, and taking .5 seconds for each loop (due to the sleep() command)&lt;br /&gt;
Now remember this while loop?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There's an easier way of doing it with a for loop, in fact all loops done with wile can be replaced by for.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(this.size=10;this.size&amp;lt;=20;this.size++)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? Much shorter and easier to use!&lt;br /&gt;
Once you know the format of a for loop, you can make longer and more complex loops as well, and they'll take less time to script, which is always a bonus.&lt;br /&gt;
&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Some important commands can be found here:&lt;br /&gt;
page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
Which is also helpful for learning how to script. Enjoy!&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6706</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6706"/>
		<updated>2006-03-29T14:46:43Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Excaliber's Scripting Guide''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!Also Look For Instruments!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
[[Image:darkrival_wiki.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onTouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time+=1;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wile(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other rational expressions you may use. (Well, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEEDS to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
Now, back to the 'for' loop.&lt;br /&gt;
This a very interesting loop it's format is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(command;expression;command)&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here's an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  for(this.i=0;this.i&amp;lt;10;this.i++)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Loops: &amp;quot; @this.i;&lt;br /&gt;
    sleep(.5);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This loop would be activated when the player touchs it.&lt;br /&gt;
It would go through 10 loops, displaying the count, and taking .5 seconds for each loop (due to the sleep() command)&lt;br /&gt;
Now remember this while loop?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20)&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
There's an easier way of doing it with a for loop, in fact all loops done with wile can be replaced by for.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(this.size=10;this.size&amp;lt;=20;this.size&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See? Much shorter and easier to use!&lt;br /&gt;
Once you know the format of a for loop, you can make longer and more complex loops as well, and they'll take less time to script, which is always a bonus.&lt;br /&gt;
&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Some important commands can be found here:&lt;br /&gt;
page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
Which is also helpful for learning how to script. Enjoy!&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6698</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6698"/>
		<updated>2006-03-29T03:06:49Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Excaliber's Scripting Guide''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!Also Look For Instruments!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
[[Image:darkrival_wiki.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onTouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time+=1;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
with(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other ration expressios you may use. (Hell, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEEDS to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Some important commands can be found here:&lt;br /&gt;
page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
Which is also helpful for learning how to script. Enjoy!&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6693</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6693"/>
		<updated>2006-03-28T20:43:16Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Excaliber's Scripting Guide''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onTouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time+=1;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
with(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other ration expressios you may use. (Hell, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEED to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Some important commands can be found here:&lt;br /&gt;
page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
Which is also helpful for learning how to script. Enjoy!&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6692</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6692"/>
		<updated>2006-03-28T20:42:22Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* Old script compatibility */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onTouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time+=1;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
with(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other ration expressios you may use. (Hell, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEED to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Note: if you know gs1, gs2 is easy to learn, below is a list of commands in their old form and their new format, on the right. You can also use this list to learn the commands. This is taken from this page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
which is also helpful for learning how to script. Enjoy!&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6691</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6691"/>
		<updated>2006-03-28T20:41:53Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Jobs:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onTouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time+=1;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
with(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other ration expressios you may use. (Hell, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEED to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Note: if you know gs1, gs2 is easy to learn, below is a list of commands in their old form and their new format, on the right. You can also use this list to learn the commands. This is taken from this page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
which is also helpful for learning how to script. Enjoy!&lt;br /&gt;
== Old script compatibility ==&lt;br /&gt;
&lt;br /&gt;
=== Removed functionality ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- toinventory&lt;br /&gt;
- followplayer&lt;br /&gt;
- playersays()&lt;br /&gt;
- setbackpal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Supported old scripting commands and their mapping to new script ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
addstring oldstring, oldstring;&lt;br /&gt;
                                list.add(string);&lt;br /&gt;
addtiledef oldstring, oldstring, float;&lt;br /&gt;
                                addtiledef(string,string,float);&lt;br /&gt;
addtiledef2 oldstring, oldstring, float, float;&lt;br /&gt;
                                addtiledef2(string,string,float,float);&lt;br /&gt;
attachplayertoobj float, float;&lt;br /&gt;
                                attachplayertoobj(float,float);&lt;br /&gt;
blockagain;&lt;br /&gt;
                                blockagain();&lt;br /&gt;
blockagainlocal;&lt;br /&gt;
                                blockagainlocal();&lt;br /&gt;
callnpc float, oldstring;&lt;br /&gt;
                                callnpc(float,string);&lt;br /&gt;
callweapon float, oldstring;&lt;br /&gt;
                                callweapon(float,string);&lt;br /&gt;
canbecarried;&lt;br /&gt;
                                canbecarried();&lt;br /&gt;
canbepulled;&lt;br /&gt;
                                canbepulled();&lt;br /&gt;
canbepushed;&lt;br /&gt;
                                canbepushed();&lt;br /&gt;
cannotbecarried;&lt;br /&gt;
                                cannotbecarried();&lt;br /&gt;
cannotbepulled;&lt;br /&gt;
                                cannotbepulled();&lt;br /&gt;
cannotbepushed;&lt;br /&gt;
                                cannotbepushed();&lt;br /&gt;
canwarp;&lt;br /&gt;
                                canwarp();&lt;br /&gt;
canwarp2;&lt;br /&gt;
                                canwarp2();&lt;br /&gt;
carryobject oldstring;&lt;br /&gt;
                                carryobject(string);&lt;br /&gt;
changeimgcolors float, float, float, float, float;&lt;br /&gt;
                                changeimgcolors(float,float,float,float,float);&lt;br /&gt;
changeimgmode float, float;&lt;br /&gt;
                                changeimgmode(float,float);&lt;br /&gt;
changeimgpart float, float, float, float, float;&lt;br /&gt;
                                changeimgpart(float,float,float,float,float);&lt;br /&gt;
changeimgvis float, float;&lt;br /&gt;
                                changeimgvis(float,float);&lt;br /&gt;
changeimgzoom float, float;&lt;br /&gt;
                                changeimgzoom(float,float);&lt;br /&gt;
deletestring oldstring, float;&lt;br /&gt;
                                deletestring(string,float);&lt;br /&gt;
destroy;&lt;br /&gt;
                                destroy();&lt;br /&gt;
detachplayer;&lt;br /&gt;
                                detachplayer();&lt;br /&gt;
disabledefmovement;&lt;br /&gt;
                                disabledefmovement();&lt;br /&gt;
disablemap;&lt;br /&gt;
                                disablemap();&lt;br /&gt;
disablepause;&lt;br /&gt;
                                disablepause();&lt;br /&gt;
disableselectweapons;&lt;br /&gt;
                                disableselectweapons();&lt;br /&gt;
disableweapons;&lt;br /&gt;
                                disableweapons();&lt;br /&gt;
dontblock;&lt;br /&gt;
                                dontblock();&lt;br /&gt;
dontblocklocal;&lt;br /&gt;
                                dontblocklocal();&lt;br /&gt;
drawaslight;&lt;br /&gt;
                                drawaslight();&lt;br /&gt;
drawoverplayer;&lt;br /&gt;
                                drawoverplayer();&lt;br /&gt;
drawunderplayer;&lt;br /&gt;
                                drawunderplayer();&lt;br /&gt;
enabledefmovement;&lt;br /&gt;
                                enabledefmovement();&lt;br /&gt;
enablefeatures float;&lt;br /&gt;
                                enablefeatures(float);&lt;br /&gt;
enablemap;&lt;br /&gt;
                                enablemap();&lt;br /&gt;
enablepause;&lt;br /&gt;
                                enablepause();&lt;br /&gt;
enableselectweapons;&lt;br /&gt;
                                enableselectweapons();&lt;br /&gt;
enableweapons;&lt;br /&gt;
                                enableweapons();&lt;br /&gt;
explodebomb float;&lt;br /&gt;
                                explodebomb(float);&lt;br /&gt;
followplayer;&lt;br /&gt;
                                followplayer();&lt;br /&gt;
freezeplayer float;&lt;br /&gt;
                                freezeplayer(float);&lt;br /&gt;
freezeplayer2;&lt;br /&gt;
                                freezeplayer2();&lt;br /&gt;
hide;&lt;br /&gt;
                                hide();&lt;br /&gt;
hideimg float;&lt;br /&gt;
                                hideimg(float);&lt;br /&gt;
hideimgs float, float;&lt;br /&gt;
                                hideimgs(float,float);&lt;br /&gt;
hidelocal;&lt;br /&gt;
                                hidelocal();&lt;br /&gt;
&lt;br /&gt;
hitcompu float, float, float, float;&lt;br /&gt;
                                hitcompu(float,float,float,float);&lt;br /&gt;
hitnpc float, float, float, float;&lt;br /&gt;
                                hitnpc(float,float,float,float);&lt;br /&gt;
hitobjects float, float, float;&lt;br /&gt;
                                hitobjects(float,float,float);&lt;br /&gt;
hideplayer float;&lt;br /&gt;
                                hideplayer(float);&lt;br /&gt;
hidesword float;&lt;br /&gt;
                                hidesword(float);&lt;br /&gt;
hitplayer float, float, float, float;&lt;br /&gt;
                                hitplayer(float,float,float,float);&lt;br /&gt;
hurt float;&lt;br /&gt;
                                hurt(float);&lt;br /&gt;
insertstring oldstring, float, oldstring;&lt;br /&gt;
                                insertstring(string,float,string);&lt;br /&gt;
join oldstring;&lt;br /&gt;
                                join(string);&lt;br /&gt;
lay oldstring;&lt;br /&gt;
                                lay(string);&lt;br /&gt;
lay2 oldstring, float, float;&lt;br /&gt;
                                lay2(string,float,float);&lt;br /&gt;
loadmap oldstring;&lt;br /&gt;
                                loadmap(string);&lt;br /&gt;
message oldstring;&lt;br /&gt;
                                message(string);&lt;br /&gt;
move float, float, float, float;&lt;br /&gt;
                                move(float,float,float,float);&lt;br /&gt;
noplayerkilling;&lt;br /&gt;
                                noplayerkilling();&lt;br /&gt;
openurl oldstring;&lt;br /&gt;
                                openurl(string);&lt;br /&gt;
openurl2 oldstring, float, float;&lt;br /&gt;
                                openurl2(string,float,float);&lt;br /&gt;
play oldstring;&lt;br /&gt;
                                play(string);&lt;br /&gt;
play2 oldstring, float, float, float;&lt;br /&gt;
                                play2(string,float,float,float);&lt;br /&gt;
playlooped oldstring;&lt;br /&gt;
                                playlooped(string);&lt;br /&gt;
putbomb float, float, float;&lt;br /&gt;
                                putbomb(float,float,float);&lt;br /&gt;
putcomp oldstring, float, float;&lt;br /&gt;
                                putcomp(string,float,float);&lt;br /&gt;
putexplosion float, float, float;&lt;br /&gt;
                                putexplosion(float,float,float);&lt;br /&gt;
putexplosion2 float, float, float, float;&lt;br /&gt;
                                putexplosion2(float,float,float,float);&lt;br /&gt;
puthorse oldstring, float, float;&lt;br /&gt;
                                puthorse(string,float,float);&lt;br /&gt;
putleaps float, float, float;&lt;br /&gt;
                                putleaps(float,float,float);&lt;br /&gt;
putnewcomp oldstring, float, float, oldstring, float;&lt;br /&gt;
                                putnewcomp(string,float,float,string,float);&lt;br /&gt;
putnpc oldstring, oldstring, float, float;&lt;br /&gt;
                                putnpc(string,string,float,float);&lt;br /&gt;
putnpc2 float, float, oldstring;&lt;br /&gt;
                                putnpc2(float,float,string);&lt;br /&gt;
reflectarrow float;&lt;br /&gt;
                                reflectarrow(float);&lt;br /&gt;
removearrow float;&lt;br /&gt;
                                removearrow(float);&lt;br /&gt;
removebomb float;&lt;br /&gt;
                                removebomb(float);&lt;br /&gt;
removecompus;&lt;br /&gt;
                                removecompus();&lt;br /&gt;
removeexplo float;&lt;br /&gt;
                                removeexplo(float);&lt;br /&gt;
removehorse float;&lt;br /&gt;
                                removehorse(float);&lt;br /&gt;
rmeoveitem float;&lt;br /&gt;
                                removeitem(float)&lt;br /&gt;
removestring oldstring, oldstring;&lt;br /&gt;
                                removestring(string,string);&lt;br /&gt;
removetiledefs oldstring;&lt;br /&gt;
                                removetiledefs(string);&lt;br /&gt;
replaceani oldstring, oldstring;&lt;br /&gt;
                                replaceani(string,string);&lt;br /&gt;
replacestring oldstring, float, oldstring;&lt;br /&gt;
                                replacestring(string,float,string);&lt;br /&gt;
resetfocus;&lt;br /&gt;
                                resetfocus();&lt;br /&gt;
savelog oldstring;&lt;br /&gt;
                                savelog(string);&lt;br /&gt;
savelog2 oldstring, oldstring;&lt;br /&gt;
                                savelog2(string,string);&lt;br /&gt;
say float;&lt;br /&gt;
                                say(float);&lt;br /&gt;
say2 oldstring;&lt;br /&gt;
                                say2(string);&lt;br /&gt;
sendrpgmessage oldstring;&lt;br /&gt;
                                sendrpgmessage(string);&lt;br /&gt;
sendpm oldstring;&lt;br /&gt;
                                sendpm(string);&lt;br /&gt;
sendtonc oldstring;&lt;br /&gt;
                                sendtonc(string);&lt;br /&gt;
sendtorc oldstring;&lt;br /&gt;
                                sendtorc(string);&lt;br /&gt;
serverwarp oldstring;&lt;br /&gt;
                                serverwarp(string);&lt;br /&gt;
set oldstring;&lt;br /&gt;
                                set(string);&lt;br /&gt;
setani oldstring, oldstring;&lt;br /&gt;
                                setani(string,string);&lt;br /&gt;
setarray float, float;&lt;br /&gt;
                                setarray(var,float);&lt;br /&gt;
setbeltcolor oldstring;&lt;br /&gt;
                                setbeltcolor(string);&lt;br /&gt;
setbow oldstring;&lt;br /&gt;
                                setbow(string);&lt;br /&gt;
setcharani oldstring, oldstring;&lt;br /&gt;
                                setcharani(string,string);&lt;br /&gt;
setchargender oldstring;&lt;br /&gt;
                                setchargender(string);&lt;br /&gt;
setcharprop oldstring, oldstring;&lt;br /&gt;
                                string = string;&lt;br /&gt;
setcoatcolor oldstring;&lt;br /&gt;
                                setcoatcolor(string);&lt;br /&gt;
setcoloreffect float, float, float, float;&lt;br /&gt;
                                setcoloreffect(float,float,float,float);&lt;br /&gt;
setcursor float;&lt;br /&gt;
                                setcursor(float);&lt;br /&gt;
setcurcor2 oldstring;&lt;br /&gt;
                                setcursor2(string);&lt;br /&gt;
seteffect float, float, float, float;&lt;br /&gt;
                                seteffect(float,float,float,float);&lt;br /&gt;
seteffectmode float;&lt;br /&gt;
                                seteffectmode(float);&lt;br /&gt;
setfocus float, float;&lt;br /&gt;
                                setfocus(float,float);&lt;br /&gt;
setgender oldstring;&lt;br /&gt;
                                setgender(string);&lt;br /&gt;
sethead oldstring;&lt;br /&gt;
                                sethead(string);&lt;br /&gt;
setlevel oldstring;&lt;br /&gt;
                                setlevel(string);&lt;br /&gt;
setlevel2 oldstring, float, float;&lt;br /&gt;
                                setlevel2(string,float,float);&lt;br /&gt;
setmap oldstring, oldstring, float, float;&lt;br /&gt;
                                setmap(string,string,float,float);&lt;br /&gt;
setminimap oldstring, oldstring, float, float;&lt;br /&gt;
                                setminimap(string,string,float,float);&lt;br /&gt;
setmusicvolume float, float;&lt;br /&gt;
                                setmusicvolume(float,float);&lt;br /&gt;
setimg oldstring;&lt;br /&gt;
                                setimg(string);&lt;br /&gt;
setimgpart oldstring, float, float, float, float;&lt;br /&gt;
                                setimgpart(string,float,float,float,float);&lt;br /&gt;
setletters oldstring;&lt;br /&gt;
                                setletters(string);&lt;br /&gt;
setplayerdir oldstring;&lt;br /&gt;
                                setplayerdir(string);&lt;br /&gt;
setplayerprop oldstring, oldstring;&lt;br /&gt;
                                string = string;&lt;br /&gt;
setpm oldstring;&lt;br /&gt;
                                setpm(string);&lt;br /&gt;
setshape float, float, float;&lt;br /&gt;
                                setshape(float,float,float);&lt;br /&gt;
setshape2 float, float, float;&lt;br /&gt;
                                setshape2(float,float,float);&lt;br /&gt;
setshield oldstring, float;&lt;br /&gt;
                                setshield(string,float);&lt;br /&gt;
setshoecolor oldstring;&lt;br /&gt;
                                setshoecolor(string);&lt;br /&gt;
setshootparams oldstring;&lt;br /&gt;
                                setshootparams(string);&lt;br /&gt;
setskincolor oldstring;&lt;br /&gt;
                                setskincolor(string);&lt;br /&gt;
setsleevecolor oldstring;&lt;br /&gt;
                                setsleevecolor(string);&lt;br /&gt;
setstring oldstring, oldstring;&lt;br /&gt;
                                setstring(string,string);&lt;br /&gt;
setsword oldstring, float;&lt;br /&gt;
                                setsword(string,float);&lt;br /&gt;
seturllevel oldstring;&lt;br /&gt;
                                seturllevel(string);&lt;br /&gt;
setz float, float, float, float, float, float, float, float;&lt;br /&gt;
                                setz(float,float,float,float,float,float,float,float);&lt;br /&gt;
setzoomeffect float;&lt;br /&gt;
                                setzoomeffect(float);&lt;br /&gt;
shoot float, float, float, float, float, float, oldstring, oldstring;&lt;br /&gt;
                                shoot(float,float,float,float,float,float,string,string);&lt;br /&gt;
shootarrow float;&lt;br /&gt;
                                shootarrow(float);&lt;br /&gt;
shootball;&lt;br /&gt;
                                shootball();&lt;br /&gt;
shootfireball float;&lt;br /&gt;
                                shootfireball(float);&lt;br /&gt;
shootfireblast float;&lt;br /&gt;
                                shootfireblast(float);&lt;br /&gt;
shootnuke float;&lt;br /&gt;
                                shootnuke(float);&lt;br /&gt;
show;&lt;br /&gt;
                                show();&lt;br /&gt;
showani float, float, float, float, oldstring;&lt;br /&gt;
                                showani(float,float,float,float,string);&lt;br /&gt;
showani2 float, float, float, float, float, oldstring;&lt;br /&gt;
                                showani2(float,float,float,float,float,string);&lt;br /&gt;
showcharacter;&lt;br /&gt;
                                showcharacter();&lt;br /&gt;
showfile oldstring;&lt;br /&gt;
                                showfile(string);&lt;br /&gt;
showimg float, oldstring, float, float;&lt;br /&gt;
                                showimg(float,string,float,float);&lt;br /&gt;
showimg2 float, oldstring, float, float, float;&lt;br /&gt;
                                showimg2(float,string,float,float,float);&lt;br /&gt;
showlocal;&lt;br /&gt;
                                showlocal();&lt;br /&gt;
&lt;br /&gt;
showpoly float, float;&lt;br /&gt;
                                showpoly(float,array);&lt;br /&gt;
showpoly2 float, float;&lt;br /&gt;
                                showpoly2(float,array);&lt;br /&gt;
showstats float;&lt;br /&gt;
                                showstats(float);&lt;br /&gt;
showtext float, float, float, oldstring, oldstring, oldstring;&lt;br /&gt;
                                showtext(float,float,float,string,string,string);&lt;br /&gt;
showtext2 float, float, float, float, oldstring, oldstring, oldstring;&lt;br /&gt;
                                showtext2(float,float,float,float,string,string,string);&lt;br /&gt;
sleep float;&lt;br /&gt;
                                sleep(float);&lt;br /&gt;
spyfire float, float;&lt;br /&gt;
                                spyfire(float,float);&lt;br /&gt;
stopmidi;&lt;br /&gt;
                                stopmidi();&lt;br /&gt;
stopsound oldstring;&lt;br /&gt;
                                stopsound(string);&lt;br /&gt;
take oldstring;&lt;br /&gt;
                                take(string);&lt;br /&gt;
take2 float;&lt;br /&gt;
                                take2(float);&lt;br /&gt;
takehorse float;&lt;br /&gt;
                                takehorse(float);&lt;br /&gt;
takeplayercarry;&lt;br /&gt;
                                takeplayercarry();&lt;br /&gt;
takeplayerhorse;&lt;br /&gt;
                                takeplayerhorse();&lt;br /&gt;
throwcarry;&lt;br /&gt;
                                throwcarry();&lt;br /&gt;
timereverywhere;&lt;br /&gt;
                                timereverywhere();&lt;br /&gt;
timershow;&lt;br /&gt;
                                timershow();&lt;br /&gt;
toinventory oldstring;&lt;br /&gt;
                                toinventory(string);&lt;br /&gt;
tokenize oldstring;&lt;br /&gt;
                                tokens = string.tokenize();&lt;br /&gt;
tokenize2 oldstring, oldstring;&lt;br /&gt;
                                tokens = string.tokenize(&amp;quot; ,&amp;quot; @ string);&lt;br /&gt;
toweapons oldstring;&lt;br /&gt;
                                toweapons(string);&lt;br /&gt;
triggeraction float, float, oldstring, oldstring;&lt;br /&gt;
                                triggeraction(float,float,string,string);&lt;br /&gt;
unfreezeplayer;&lt;br /&gt;
                                unfreezeplayer();&lt;br /&gt;
unset oldstring;&lt;br /&gt;
                                unset(string);&lt;br /&gt;
updateboard float, float, float, float;&lt;br /&gt;
                                updateboard(float,float,float,float);&lt;br /&gt;
updateterrain;&lt;br /&gt;
                                updateterrain();&lt;br /&gt;
wraptext float, oldstring, oldstring;&lt;br /&gt;
                                tokens = wraptext(float,&amp;quot; ,&amp;quot; @ string,string);&lt;br /&gt;
wraptext2 float, float, oldstring, oldstring;&lt;br /&gt;
                                tokens = wraptext2(float,float,&amp;quot; ,&amp;quot; @ string,string);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Supported old string operations ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
These old string operators can be used in string parameters&lt;br /&gt;
for the old commands, also you can use them directly as operators, e.g.&lt;br /&gt;
#c = &amp;quot;hello&amp;quot;&lt;br /&gt;
is actually doing&lt;br /&gt;
player.chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#a            player.account&lt;br /&gt;
#a(float)     players[float].account&lt;br /&gt;
#m            player.ani&lt;br /&gt;
              ani&lt;br /&gt;
#m(float)     players[float].ani&lt;br /&gt;
#K(float)     char(float)&lt;br /&gt;
#8            player.bodyimg&lt;br /&gt;
              bodyimg&lt;br /&gt;
#8(float)     players[float].bodyimg&lt;br /&gt;
#c            player.chat&lt;br /&gt;
              chat&lt;br /&gt;
#c(float)     players[float].chat&lt;br /&gt;
#C0           player.colors[0]&lt;br /&gt;
              colors[0]&lt;br /&gt;
#C0(float)    players[float].colors[0]&lt;br /&gt;
#C1           player.colors[1]&lt;br /&gt;
              colors[1]&lt;br /&gt;
#C1(float)    players[float].colors[1]&lt;br /&gt;
#C2           player.colors[2]&lt;br /&gt;
              colors[2]&lt;br /&gt;
#C2(float)    players[float].colors[2]&lt;br /&gt;
#C3           player.colors[3]&lt;br /&gt;
              colors[3]&lt;br /&gt;
#C3(float)    players[float].colors[3]&lt;br /&gt;
#C4           player.colors[4]&lt;br /&gt;
              colors[4]&lt;br /&gt;
#C4(float)    players[float].colors[4]&lt;br /&gt;
#C5           player.colors[5]&lt;br /&gt;
              colors[5]&lt;br /&gt;
#C5(float)    players[float].colors[5]&lt;br /&gt;
#D            downloadfile()&lt;br /&gt;
#E            emoticonchar()&lt;br /&gt;
#e(float,float,oldstring)&lt;br /&gt;
              string.substring(float,float)&lt;br /&gt;
#g            player.guild&lt;br /&gt;
              guild&lt;br /&gt;
#g(float)     players[float].guild&lt;br /&gt;
#3            player.headimg&lt;br /&gt;
              headimg&lt;br /&gt;
#3(float)     players[float].headimg&lt;br /&gt;
#5            player.horseimg&lt;br /&gt;
              horseimg&lt;br /&gt;
#5(float)     players[float].horseimg&lt;br /&gt;
#k(float)     keyname(float)&lt;br /&gt;
#L            player.level&lt;br /&gt;
#I(oldstring,float)&lt;br /&gt;
              getstring(string)[float]&lt;br /&gt;
#n            player.nick&lt;br /&gt;
              nick&lt;br /&gt;
#n(float)     players[float].nick&lt;br /&gt;
#f            image&lt;br /&gt;
#f(float)     npcs[float].image&lt;br /&gt;
#F            level&lt;br /&gt;
#p(float)     params[float]&lt;br /&gt;
#P(float)     player.attr[float]&lt;br /&gt;
              attr[float]&lt;br /&gt;
#P(float_1,float_2)&lt;br /&gt;
              players[float_2].attr[float_1]&lt;br /&gt;
#P1           player.attr[1]&lt;br /&gt;
              attr[1]&lt;br /&gt;
#P1(float)    players[float].attr[1]&lt;br /&gt;
#P2           player.attr[2]&lt;br /&gt;
              attr[2]&lt;br /&gt;
#P2(float)    players[float].attr[2]&lt;br /&gt;
#P3           player.attr[3]&lt;br /&gt;
              attr[3]&lt;br /&gt;
#P3(float)    players[float].attr[3]&lt;br /&gt;
#P4           player.attr[4]&lt;br /&gt;
              attr[4]&lt;br /&gt;
#P4(float)    players[float].attr[4]&lt;br /&gt;
#P5           player.attr[5]&lt;br /&gt;
              attr[5]&lt;br /&gt;
#P5(float)    players[float].attr[5]&lt;br /&gt;
#P6           player.attr[6]&lt;br /&gt;
              attr[6]&lt;br /&gt;
#P6(float)    players[float].attr[6]&lt;br /&gt;
#P7           player.attr[7]&lt;br /&gt;
              attr[7]&lt;br /&gt;
#P7(float)    players[float].attr[7]&lt;br /&gt;
#P8           player.attr[8]&lt;br /&gt;
              attr[8]&lt;br /&gt;
#P8(float)    players[float].attr[8]&lt;br /&gt;
#P9           player.attr[9]&lt;br /&gt;
              attr[9]&lt;br /&gt;
#P9(float)    players[float].attr[9]&lt;br /&gt;
#R(oldstring) string.random()&lt;br /&gt;
#2            player.shieldimg&lt;br /&gt;
              shieldimg&lt;br /&gt;
#2(float)     players[float].shieldimg&lt;br /&gt;
#s(oldstring) getstring(string)&lt;br /&gt;
#1            player.swordimg&lt;br /&gt;
              swordimg&lt;br /&gt;
#1(float)     players[float].swordimg&lt;br /&gt;
#S            player.sword.script&lt;br /&gt;
#t(float)     tokens[float]&lt;br /&gt;
#T(oldstring) string.trim()&lt;br /&gt;
#v(float)     float&lt;br /&gt;
#W            player.weapon.image&lt;br /&gt;
#W(float)     weapons[float].image&lt;br /&gt;
#w            player.weapon.name&lt;br /&gt;
#w(float)     weapons[float].name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Compatibility note:&lt;br /&gt;
When you use the command setcharprop then the first parameter&lt;br /&gt;
is handled differently: instead of changing 'player.chat' it&lt;br /&gt;
is changing 'chat', the chat text of the npc. So 'setcharprop #c,hello'&lt;br /&gt;
would be translated into&lt;br /&gt;
chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
while 'setplayerprop #c,hello' is translated into&lt;br /&gt;
player.chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
In the list above both possibilities are listed.&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6690</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6690"/>
		<updated>2006-03-28T20:41:24Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Jobs:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onTouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time+=1;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
with(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other ration expressios you may use. (Hell, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEED to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Note: if you know gs1, gs2 is easy to learn, below is a list of commands in their old form and their new format, on the right. You can also use this list to learn the commands. This is taken from this page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
which is also helpful for learning how to script. Enjoy!&lt;br /&gt;
== Old script compatibility ==&lt;br /&gt;
&lt;br /&gt;
=== Removed functionality ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- toinventory&lt;br /&gt;
- followplayer&lt;br /&gt;
- playersays()&lt;br /&gt;
- setbackpal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Supported old scripting commands and their mapping to new script ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
addstring oldstring, oldstring;&lt;br /&gt;
                                list.add(string);&lt;br /&gt;
addtiledef oldstring, oldstring, float;&lt;br /&gt;
                                addtiledef(string,string,float);&lt;br /&gt;
addtiledef2 oldstring, oldstring, float, float;&lt;br /&gt;
                                addtiledef2(string,string,float,float);&lt;br /&gt;
attachplayertoobj float, float;&lt;br /&gt;
                                attachplayertoobj(float,float);&lt;br /&gt;
blockagain;&lt;br /&gt;
                                blockagain();&lt;br /&gt;
blockagainlocal;&lt;br /&gt;
                                blockagainlocal();&lt;br /&gt;
callnpc float, oldstring;&lt;br /&gt;
                                callnpc(float,string);&lt;br /&gt;
callweapon float, oldstring;&lt;br /&gt;
                                callweapon(float,string);&lt;br /&gt;
canbecarried;&lt;br /&gt;
                                canbecarried();&lt;br /&gt;
canbepulled;&lt;br /&gt;
                                canbepulled();&lt;br /&gt;
canbepushed;&lt;br /&gt;
                                canbepushed();&lt;br /&gt;
cannotbecarried;&lt;br /&gt;
                                cannotbecarried();&lt;br /&gt;
cannotbepulled;&lt;br /&gt;
                                cannotbepulled();&lt;br /&gt;
cannotbepushed;&lt;br /&gt;
                                cannotbepushed();&lt;br /&gt;
canwarp;&lt;br /&gt;
                                canwarp();&lt;br /&gt;
canwarp2;&lt;br /&gt;
                                canwarp2();&lt;br /&gt;
carryobject oldstring;&lt;br /&gt;
                                carryobject(string);&lt;br /&gt;
changeimgcolors float, float, float, float, float;&lt;br /&gt;
                                changeimgcolors(float,float,float,float,float);&lt;br /&gt;
changeimgmode float, float;&lt;br /&gt;
                                changeimgmode(float,float);&lt;br /&gt;
changeimgpart float, float, float, float, float;&lt;br /&gt;
                                changeimgpart(float,float,float,float,float);&lt;br /&gt;
changeimgvis float, float;&lt;br /&gt;
                                changeimgvis(float,float);&lt;br /&gt;
changeimgzoom float, float;&lt;br /&gt;
                                changeimgzoom(float,float);&lt;br /&gt;
deletestring oldstring, float;&lt;br /&gt;
                                deletestring(string,float);&lt;br /&gt;
destroy;&lt;br /&gt;
                                destroy();&lt;br /&gt;
detachplayer;&lt;br /&gt;
                                detachplayer();&lt;br /&gt;
disabledefmovement;&lt;br /&gt;
                                disabledefmovement();&lt;br /&gt;
disablemap;&lt;br /&gt;
                                disablemap();&lt;br /&gt;
disablepause;&lt;br /&gt;
                                disablepause();&lt;br /&gt;
disableselectweapons;&lt;br /&gt;
                                disableselectweapons();&lt;br /&gt;
disableweapons;&lt;br /&gt;
                                disableweapons();&lt;br /&gt;
dontblock;&lt;br /&gt;
                                dontblock();&lt;br /&gt;
dontblocklocal;&lt;br /&gt;
                                dontblocklocal();&lt;br /&gt;
drawaslight;&lt;br /&gt;
                                drawaslight();&lt;br /&gt;
drawoverplayer;&lt;br /&gt;
                                drawoverplayer();&lt;br /&gt;
drawunderplayer;&lt;br /&gt;
                                drawunderplayer();&lt;br /&gt;
enabledefmovement;&lt;br /&gt;
                                enabledefmovement();&lt;br /&gt;
enablefeatures float;&lt;br /&gt;
                                enablefeatures(float);&lt;br /&gt;
enablemap;&lt;br /&gt;
                                enablemap();&lt;br /&gt;
enablepause;&lt;br /&gt;
                                enablepause();&lt;br /&gt;
enableselectweapons;&lt;br /&gt;
                                enableselectweapons();&lt;br /&gt;
enableweapons;&lt;br /&gt;
                                enableweapons();&lt;br /&gt;
explodebomb float;&lt;br /&gt;
                                explodebomb(float);&lt;br /&gt;
followplayer;&lt;br /&gt;
                                followplayer();&lt;br /&gt;
freezeplayer float;&lt;br /&gt;
                                freezeplayer(float);&lt;br /&gt;
freezeplayer2;&lt;br /&gt;
                                freezeplayer2();&lt;br /&gt;
hide;&lt;br /&gt;
                                hide();&lt;br /&gt;
hideimg float;&lt;br /&gt;
                                hideimg(float);&lt;br /&gt;
hideimgs float, float;&lt;br /&gt;
                                hideimgs(float,float);&lt;br /&gt;
hidelocal;&lt;br /&gt;
                                hidelocal();&lt;br /&gt;
&lt;br /&gt;
hitcompu float, float, float, float;&lt;br /&gt;
                                hitcompu(float,float,float,float);&lt;br /&gt;
hitnpc float, float, float, float;&lt;br /&gt;
                                hitnpc(float,float,float,float);&lt;br /&gt;
hitobjects float, float, float;&lt;br /&gt;
                                hitobjects(float,float,float);&lt;br /&gt;
hideplayer float;&lt;br /&gt;
                                hideplayer(float);&lt;br /&gt;
hidesword float;&lt;br /&gt;
                                hidesword(float);&lt;br /&gt;
hitplayer float, float, float, float;&lt;br /&gt;
                                hitplayer(float,float,float,float);&lt;br /&gt;
hurt float;&lt;br /&gt;
                                hurt(float);&lt;br /&gt;
insertstring oldstring, float, oldstring;&lt;br /&gt;
                                insertstring(string,float,string);&lt;br /&gt;
join oldstring;&lt;br /&gt;
                                join(string);&lt;br /&gt;
lay oldstring;&lt;br /&gt;
                                lay(string);&lt;br /&gt;
lay2 oldstring, float, float;&lt;br /&gt;
                                lay2(string,float,float);&lt;br /&gt;
loadmap oldstring;&lt;br /&gt;
                                loadmap(string);&lt;br /&gt;
message oldstring;&lt;br /&gt;
                                message(string);&lt;br /&gt;
move float, float, float, float;&lt;br /&gt;
                                move(float,float,float,float);&lt;br /&gt;
noplayerkilling;&lt;br /&gt;
                                noplayerkilling();&lt;br /&gt;
openurl oldstring;&lt;br /&gt;
                                openurl(string);&lt;br /&gt;
openurl2 oldstring, float, float;&lt;br /&gt;
                                openurl2(string,float,float);&lt;br /&gt;
play oldstring;&lt;br /&gt;
                                play(string);&lt;br /&gt;
play2 oldstring, float, float, float;&lt;br /&gt;
                                play2(string,float,float,float);&lt;br /&gt;
playlooped oldstring;&lt;br /&gt;
                                playlooped(string);&lt;br /&gt;
putbomb float, float, float;&lt;br /&gt;
                                putbomb(float,float,float);&lt;br /&gt;
putcomp oldstring, float, float;&lt;br /&gt;
                                putcomp(string,float,float);&lt;br /&gt;
putexplosion float, float, float;&lt;br /&gt;
                                putexplosion(float,float,float);&lt;br /&gt;
putexplosion2 float, float, float, float;&lt;br /&gt;
                                putexplosion2(float,float,float,float);&lt;br /&gt;
puthorse oldstring, float, float;&lt;br /&gt;
                                puthorse(string,float,float);&lt;br /&gt;
putleaps float, float, float;&lt;br /&gt;
                                putleaps(float,float,float);&lt;br /&gt;
putnewcomp oldstring, float, float, oldstring, float;&lt;br /&gt;
                                putnewcomp(string,float,float,string,float);&lt;br /&gt;
putnpc oldstring, oldstring, float, float;&lt;br /&gt;
                                putnpc(string,string,float,float);&lt;br /&gt;
putnpc2 float, float, oldstring;&lt;br /&gt;
                                putnpc2(float,float,string);&lt;br /&gt;
reflectarrow float;&lt;br /&gt;
                                reflectarrow(float);&lt;br /&gt;
removearrow float;&lt;br /&gt;
                                removearrow(float);&lt;br /&gt;
removebomb float;&lt;br /&gt;
                                removebomb(float);&lt;br /&gt;
removecompus;&lt;br /&gt;
                                removecompus();&lt;br /&gt;
removeexplo float;&lt;br /&gt;
                                removeexplo(float);&lt;br /&gt;
removehorse float;&lt;br /&gt;
                                removehorse(float);&lt;br /&gt;
rmeoveitem float;&lt;br /&gt;
                                removeitem(float)&lt;br /&gt;
removestring oldstring, oldstring;&lt;br /&gt;
                                removestring(string,string);&lt;br /&gt;
removetiledefs oldstring;&lt;br /&gt;
                                removetiledefs(string);&lt;br /&gt;
replaceani oldstring, oldstring;&lt;br /&gt;
                                replaceani(string,string);&lt;br /&gt;
replacestring oldstring, float, oldstring;&lt;br /&gt;
                                replacestring(string,float,string);&lt;br /&gt;
resetfocus;&lt;br /&gt;
                                resetfocus();&lt;br /&gt;
savelog oldstring;&lt;br /&gt;
                                savelog(string);&lt;br /&gt;
savelog2 oldstring, oldstring;&lt;br /&gt;
                                savelog2(string,string);&lt;br /&gt;
say float;&lt;br /&gt;
                                say(float);&lt;br /&gt;
say2 oldstring;&lt;br /&gt;
                                say2(string);&lt;br /&gt;
sendrpgmessage oldstring;&lt;br /&gt;
                                sendrpgmessage(string);&lt;br /&gt;
sendpm oldstring;&lt;br /&gt;
                                sendpm(string);&lt;br /&gt;
sendtonc oldstring;&lt;br /&gt;
                                sendtonc(string);&lt;br /&gt;
sendtorc oldstring;&lt;br /&gt;
                                sendtorc(string);&lt;br /&gt;
serverwarp oldstring;&lt;br /&gt;
                                serverwarp(string);&lt;br /&gt;
set oldstring;&lt;br /&gt;
                                set(string);&lt;br /&gt;
setani oldstring, oldstring;&lt;br /&gt;
                                setani(string,string);&lt;br /&gt;
setarray float, float;&lt;br /&gt;
                                setarray(var,float);&lt;br /&gt;
setbeltcolor oldstring;&lt;br /&gt;
                                setbeltcolor(string);&lt;br /&gt;
setbow oldstring;&lt;br /&gt;
                                setbow(string);&lt;br /&gt;
setcharani oldstring, oldstring;&lt;br /&gt;
                                setcharani(string,string);&lt;br /&gt;
setchargender oldstring;&lt;br /&gt;
                                setchargender(string);&lt;br /&gt;
setcharprop oldstring, oldstring;&lt;br /&gt;
                                string = string;&lt;br /&gt;
setcoatcolor oldstring;&lt;br /&gt;
                                setcoatcolor(string);&lt;br /&gt;
setcoloreffect float, float, float, float;&lt;br /&gt;
                                setcoloreffect(float,float,float,float);&lt;br /&gt;
setcursor float;&lt;br /&gt;
                                setcursor(float);&lt;br /&gt;
setcurcor2 oldstring;&lt;br /&gt;
                                setcursor2(string);&lt;br /&gt;
seteffect float, float, float, float;&lt;br /&gt;
                                seteffect(float,float,float,float);&lt;br /&gt;
seteffectmode float;&lt;br /&gt;
                                seteffectmode(float);&lt;br /&gt;
setfocus float, float;&lt;br /&gt;
                                setfocus(float,float);&lt;br /&gt;
setgender oldstring;&lt;br /&gt;
                                setgender(string);&lt;br /&gt;
sethead oldstring;&lt;br /&gt;
                                sethead(string);&lt;br /&gt;
setlevel oldstring;&lt;br /&gt;
                                setlevel(string);&lt;br /&gt;
setlevel2 oldstring, float, float;&lt;br /&gt;
                                setlevel2(string,float,float);&lt;br /&gt;
setmap oldstring, oldstring, float, float;&lt;br /&gt;
                                setmap(string,string,float,float);&lt;br /&gt;
setminimap oldstring, oldstring, float, float;&lt;br /&gt;
                                setminimap(string,string,float,float);&lt;br /&gt;
setmusicvolume float, float;&lt;br /&gt;
                                setmusicvolume(float,float);&lt;br /&gt;
setimg oldstring;&lt;br /&gt;
                                setimg(string);&lt;br /&gt;
setimgpart oldstring, float, float, float, float;&lt;br /&gt;
                                setimgpart(string,float,float,float,float);&lt;br /&gt;
setletters oldstring;&lt;br /&gt;
                                setletters(string);&lt;br /&gt;
setplayerdir oldstring;&lt;br /&gt;
                                setplayerdir(string);&lt;br /&gt;
setplayerprop oldstring, oldstring;&lt;br /&gt;
                                string = string;&lt;br /&gt;
setpm oldstring;&lt;br /&gt;
                                setpm(string);&lt;br /&gt;
setshape float, float, float;&lt;br /&gt;
                                setshape(float,float,float);&lt;br /&gt;
setshape2 float, float, float;&lt;br /&gt;
                                setshape2(float,float,float);&lt;br /&gt;
setshield oldstring, float;&lt;br /&gt;
                                setshield(string,float);&lt;br /&gt;
setshoecolor oldstring;&lt;br /&gt;
                                setshoecolor(string);&lt;br /&gt;
setshootparams oldstring;&lt;br /&gt;
                                setshootparams(string);&lt;br /&gt;
setskincolor oldstring;&lt;br /&gt;
                                setskincolor(string);&lt;br /&gt;
setsleevecolor oldstring;&lt;br /&gt;
                                setsleevecolor(string);&lt;br /&gt;
setstring oldstring, oldstring;&lt;br /&gt;
                                setstring(string,string);&lt;br /&gt;
setsword oldstring, float;&lt;br /&gt;
                                setsword(string,float);&lt;br /&gt;
seturllevel oldstring;&lt;br /&gt;
                                seturllevel(string);&lt;br /&gt;
setz float, float, float, float, float, float, float, float;&lt;br /&gt;
                                setz(float,float,float,float,float,float,float,float);&lt;br /&gt;
setzoomeffect float;&lt;br /&gt;
                                setzoomeffect(float);&lt;br /&gt;
shoot float, float, float, float, float, float, oldstring, oldstring;&lt;br /&gt;
                                shoot(float,float,float,float,float,float,string,string);&lt;br /&gt;
shootarrow float;&lt;br /&gt;
                                shootarrow(float);&lt;br /&gt;
shootball;&lt;br /&gt;
                                shootball();&lt;br /&gt;
shootfireball float;&lt;br /&gt;
                                shootfireball(float);&lt;br /&gt;
shootfireblast float;&lt;br /&gt;
                                shootfireblast(float);&lt;br /&gt;
shootnuke float;&lt;br /&gt;
                                shootnuke(float);&lt;br /&gt;
show;&lt;br /&gt;
                                show();&lt;br /&gt;
showani float, float, float, float, oldstring;&lt;br /&gt;
                                showani(float,float,float,float,string);&lt;br /&gt;
showani2 float, float, float, float, float, oldstring;&lt;br /&gt;
                                showani2(float,float,float,float,float,string);&lt;br /&gt;
showcharacter;&lt;br /&gt;
                                showcharacter();&lt;br /&gt;
showfile oldstring;&lt;br /&gt;
                                showfile(string);&lt;br /&gt;
showimg float, oldstring, float, float;&lt;br /&gt;
                                showimg(float,string,float,float);&lt;br /&gt;
showimg2 float, oldstring, float, float, float;&lt;br /&gt;
                                showimg2(float,string,float,float,float);&lt;br /&gt;
showlocal;&lt;br /&gt;
                                showlocal();&lt;br /&gt;
&lt;br /&gt;
showpoly float, float;&lt;br /&gt;
                                showpoly(float,array);&lt;br /&gt;
showpoly2 float, float;&lt;br /&gt;
                                showpoly2(float,array);&lt;br /&gt;
showstats float;&lt;br /&gt;
                                showstats(float);&lt;br /&gt;
showtext float, float, float, oldstring, oldstring, oldstring;&lt;br /&gt;
                                showtext(float,float,float,string,string,string);&lt;br /&gt;
showtext2 float, float, float, float, oldstring, oldstring, oldstring;&lt;br /&gt;
                                showtext2(float,float,float,float,string,string,string);&lt;br /&gt;
sleep float;&lt;br /&gt;
                                sleep(float);&lt;br /&gt;
spyfire float, float;&lt;br /&gt;
                                spyfire(float,float);&lt;br /&gt;
stopmidi;&lt;br /&gt;
                                stopmidi();&lt;br /&gt;
stopsound oldstring;&lt;br /&gt;
                                stopsound(string);&lt;br /&gt;
take oldstring;&lt;br /&gt;
                                take(string);&lt;br /&gt;
take2 float;&lt;br /&gt;
                                take2(float);&lt;br /&gt;
takehorse float;&lt;br /&gt;
                                takehorse(float);&lt;br /&gt;
takeplayercarry;&lt;br /&gt;
                                takeplayercarry();&lt;br /&gt;
takeplayerhorse;&lt;br /&gt;
                                takeplayerhorse();&lt;br /&gt;
throwcarry;&lt;br /&gt;
                                throwcarry();&lt;br /&gt;
timereverywhere;&lt;br /&gt;
                                timereverywhere();&lt;br /&gt;
timershow;&lt;br /&gt;
                                timershow();&lt;br /&gt;
toinventory oldstring;&lt;br /&gt;
                                toinventory(string);&lt;br /&gt;
tokenize oldstring;&lt;br /&gt;
                                tokens = string.tokenize();&lt;br /&gt;
tokenize2 oldstring, oldstring;&lt;br /&gt;
                                tokens = string.tokenize(&amp;quot; ,&amp;quot; @ string);&lt;br /&gt;
toweapons oldstring;&lt;br /&gt;
                                toweapons(string);&lt;br /&gt;
triggeraction float, float, oldstring, oldstring;&lt;br /&gt;
                                triggeraction(float,float,string,string);&lt;br /&gt;
unfreezeplayer;&lt;br /&gt;
                                unfreezeplayer();&lt;br /&gt;
unset oldstring;&lt;br /&gt;
                                unset(string);&lt;br /&gt;
updateboard float, float, float, float;&lt;br /&gt;
                                updateboard(float,float,float,float);&lt;br /&gt;
updateterrain;&lt;br /&gt;
                                updateterrain();&lt;br /&gt;
wraptext float, oldstring, oldstring;&lt;br /&gt;
                                tokens = wraptext(float,&amp;quot; ,&amp;quot; @ string,string);&lt;br /&gt;
wraptext2 float, float, oldstring, oldstring;&lt;br /&gt;
                                tokens = wraptext2(float,float,&amp;quot; ,&amp;quot; @ string,string);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Supported old string operations ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
These old string operators can be used in string parameters&lt;br /&gt;
for the old commands, also you can use them directly as operators, e.g.&lt;br /&gt;
#c = &amp;quot;hello&amp;quot;&lt;br /&gt;
is actually doing&lt;br /&gt;
player.chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#a            player.account&lt;br /&gt;
#a(float)     players[float].account&lt;br /&gt;
#m            player.ani&lt;br /&gt;
              ani&lt;br /&gt;
#m(float)     players[float].ani&lt;br /&gt;
#K(float)     char(float)&lt;br /&gt;
#8            player.bodyimg&lt;br /&gt;
              bodyimg&lt;br /&gt;
#8(float)     players[float].bodyimg&lt;br /&gt;
#c            player.chat&lt;br /&gt;
              chat&lt;br /&gt;
#c(float)     players[float].chat&lt;br /&gt;
#C0           player.colors[0]&lt;br /&gt;
              colors[0]&lt;br /&gt;
#C0(float)    players[float].colors[0]&lt;br /&gt;
#C1           player.colors[1]&lt;br /&gt;
              colors[1]&lt;br /&gt;
#C1(float)    players[float].colors[1]&lt;br /&gt;
#C2           player.colors[2]&lt;br /&gt;
              colors[2]&lt;br /&gt;
#C2(float)    players[float].colors[2]&lt;br /&gt;
#C3           player.colors[3]&lt;br /&gt;
              colors[3]&lt;br /&gt;
#C3(float)    players[float].colors[3]&lt;br /&gt;
#C4           player.colors[4]&lt;br /&gt;
              colors[4]&lt;br /&gt;
#C4(float)    players[float].colors[4]&lt;br /&gt;
#C5           player.colors[5]&lt;br /&gt;
              colors[5]&lt;br /&gt;
#C5(float)    players[float].colors[5]&lt;br /&gt;
#D            downloadfile()&lt;br /&gt;
#E            emoticonchar()&lt;br /&gt;
#e(float,float,oldstring)&lt;br /&gt;
              string.substring(float,float)&lt;br /&gt;
#g            player.guild&lt;br /&gt;
              guild&lt;br /&gt;
#g(float)     players[float].guild&lt;br /&gt;
#3            player.headimg&lt;br /&gt;
              headimg&lt;br /&gt;
#3(float)     players[float].headimg&lt;br /&gt;
#5            player.horseimg&lt;br /&gt;
              horseimg&lt;br /&gt;
#5(float)     players[float].horseimg&lt;br /&gt;
#k(float)     keyname(float)&lt;br /&gt;
#L            player.level&lt;br /&gt;
#I(oldstring,float)&lt;br /&gt;
              getstring(string)[float]&lt;br /&gt;
#n            player.nick&lt;br /&gt;
              nick&lt;br /&gt;
#n(float)     players[float].nick&lt;br /&gt;
#f            image&lt;br /&gt;
#f(float)     npcs[float].image&lt;br /&gt;
#F            level&lt;br /&gt;
#p(float)     params[float]&lt;br /&gt;
#P(float)     player.attr[float]&lt;br /&gt;
              attr[float]&lt;br /&gt;
#P(float_1,float_2)&lt;br /&gt;
              players[float_2].attr[float_1]&lt;br /&gt;
#P1           player.attr[1]&lt;br /&gt;
              attr[1]&lt;br /&gt;
#P1(float)    players[float].attr[1]&lt;br /&gt;
#P2           player.attr[2]&lt;br /&gt;
              attr[2]&lt;br /&gt;
#P2(float)    players[float].attr[2]&lt;br /&gt;
#P3           player.attr[3]&lt;br /&gt;
              attr[3]&lt;br /&gt;
#P3(float)    players[float].attr[3]&lt;br /&gt;
#P4           player.attr[4]&lt;br /&gt;
              attr[4]&lt;br /&gt;
#P4(float)    players[float].attr[4]&lt;br /&gt;
#P5           player.attr[5]&lt;br /&gt;
              attr[5]&lt;br /&gt;
#P5(float)    players[float].attr[5]&lt;br /&gt;
#P6           player.attr[6]&lt;br /&gt;
              attr[6]&lt;br /&gt;
#P6(float)    players[float].attr[6]&lt;br /&gt;
#P7           player.attr[7]&lt;br /&gt;
              attr[7]&lt;br /&gt;
#P7(float)    players[float].attr[7]&lt;br /&gt;
#P8           player.attr[8]&lt;br /&gt;
              attr[8]&lt;br /&gt;
#P8(float)    players[float].attr[8]&lt;br /&gt;
#P9           player.attr[9]&lt;br /&gt;
              attr[9]&lt;br /&gt;
#P9(float)    players[float].attr[9]&lt;br /&gt;
#R(oldstring) string.random()&lt;br /&gt;
#2            player.shieldimg&lt;br /&gt;
              shieldimg&lt;br /&gt;
#2(float)     players[float].shieldimg&lt;br /&gt;
#s(oldstring) getstring(string)&lt;br /&gt;
#1            player.swordimg&lt;br /&gt;
              swordimg&lt;br /&gt;
#1(float)     players[float].swordimg&lt;br /&gt;
#S            player.sword.script&lt;br /&gt;
#t(float)     tokens[float]&lt;br /&gt;
#T(oldstring) string.trim()&lt;br /&gt;
#v(float)     float&lt;br /&gt;
#W            player.weapon.image&lt;br /&gt;
#W(float)     weapons[float].image&lt;br /&gt;
#w            player.weapon.name&lt;br /&gt;
#w(float)     weapons[float].name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Compatibility note:&lt;br /&gt;
When you use the command setcharprop then the first parameter&lt;br /&gt;
is handled differently: instead of changing 'player.chat' it&lt;br /&gt;
is changing 'chat', the chat text of the npc. So 'setcharprop #c,hello'&lt;br /&gt;
would be translated into&lt;br /&gt;
chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
while 'setplayerprop #c,hello' is translated into&lt;br /&gt;
player.chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
In the list above both possibilities are listed.&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6689</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6689"/>
		<updated>2006-03-28T20:40:40Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onTouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time+=1;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
with(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other ration expressios you may use. (Hell, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEED to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Note: if you know gs1, gs2 is easy to learn, below is a list of commands in their old form and their new format, on the right. You can also use this list to learn the commands. This is taken from this page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
which is also helpful for learning how to script. Enjoy!&lt;br /&gt;
== Old script compatibility ==&lt;br /&gt;
&lt;br /&gt;
=== Removed functionality ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- toinventory&lt;br /&gt;
- followplayer&lt;br /&gt;
- playersays()&lt;br /&gt;
- setbackpal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Supported old scripting commands and their mapping to new script ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
addstring oldstring, oldstring;&lt;br /&gt;
                                list.add(string);&lt;br /&gt;
addtiledef oldstring, oldstring, float;&lt;br /&gt;
                                addtiledef(string,string,float);&lt;br /&gt;
addtiledef2 oldstring, oldstring, float, float;&lt;br /&gt;
                                addtiledef2(string,string,float,float);&lt;br /&gt;
attachplayertoobj float, float;&lt;br /&gt;
                                attachplayertoobj(float,float);&lt;br /&gt;
blockagain;&lt;br /&gt;
                                blockagain();&lt;br /&gt;
blockagainlocal;&lt;br /&gt;
                                blockagainlocal();&lt;br /&gt;
callnpc float, oldstring;&lt;br /&gt;
                                callnpc(float,string);&lt;br /&gt;
callweapon float, oldstring;&lt;br /&gt;
                                callweapon(float,string);&lt;br /&gt;
canbecarried;&lt;br /&gt;
                                canbecarried();&lt;br /&gt;
canbepulled;&lt;br /&gt;
                                canbepulled();&lt;br /&gt;
canbepushed;&lt;br /&gt;
                                canbepushed();&lt;br /&gt;
cannotbecarried;&lt;br /&gt;
                                cannotbecarried();&lt;br /&gt;
cannotbepulled;&lt;br /&gt;
                                cannotbepulled();&lt;br /&gt;
cannotbepushed;&lt;br /&gt;
                                cannotbepushed();&lt;br /&gt;
canwarp;&lt;br /&gt;
                                canwarp();&lt;br /&gt;
canwarp2;&lt;br /&gt;
                                canwarp2();&lt;br /&gt;
carryobject oldstring;&lt;br /&gt;
                                carryobject(string);&lt;br /&gt;
changeimgcolors float, float, float, float, float;&lt;br /&gt;
                                changeimgcolors(float,float,float,float,float);&lt;br /&gt;
changeimgmode float, float;&lt;br /&gt;
                                changeimgmode(float,float);&lt;br /&gt;
changeimgpart float, float, float, float, float;&lt;br /&gt;
                                changeimgpart(float,float,float,float,float);&lt;br /&gt;
changeimgvis float, float;&lt;br /&gt;
                                changeimgvis(float,float);&lt;br /&gt;
changeimgzoom float, float;&lt;br /&gt;
                                changeimgzoom(float,float);&lt;br /&gt;
deletestring oldstring, float;&lt;br /&gt;
                                deletestring(string,float);&lt;br /&gt;
destroy;&lt;br /&gt;
                                destroy();&lt;br /&gt;
detachplayer;&lt;br /&gt;
                                detachplayer();&lt;br /&gt;
disabledefmovement;&lt;br /&gt;
                                disabledefmovement();&lt;br /&gt;
disablemap;&lt;br /&gt;
                                disablemap();&lt;br /&gt;
disablepause;&lt;br /&gt;
                                disablepause();&lt;br /&gt;
disableselectweapons;&lt;br /&gt;
                                disableselectweapons();&lt;br /&gt;
disableweapons;&lt;br /&gt;
                                disableweapons();&lt;br /&gt;
dontblock;&lt;br /&gt;
                                dontblock();&lt;br /&gt;
dontblocklocal;&lt;br /&gt;
                                dontblocklocal();&lt;br /&gt;
drawaslight;&lt;br /&gt;
                                drawaslight();&lt;br /&gt;
drawoverplayer;&lt;br /&gt;
                                drawoverplayer();&lt;br /&gt;
drawunderplayer;&lt;br /&gt;
                                drawunderplayer();&lt;br /&gt;
enabledefmovement;&lt;br /&gt;
                                enabledefmovement();&lt;br /&gt;
enablefeatures float;&lt;br /&gt;
                                enablefeatures(float);&lt;br /&gt;
enablemap;&lt;br /&gt;
                                enablemap();&lt;br /&gt;
enablepause;&lt;br /&gt;
                                enablepause();&lt;br /&gt;
enableselectweapons;&lt;br /&gt;
                                enableselectweapons();&lt;br /&gt;
enableweapons;&lt;br /&gt;
                                enableweapons();&lt;br /&gt;
explodebomb float;&lt;br /&gt;
                                explodebomb(float);&lt;br /&gt;
followplayer;&lt;br /&gt;
                                followplayer();&lt;br /&gt;
freezeplayer float;&lt;br /&gt;
                                freezeplayer(float);&lt;br /&gt;
freezeplayer2;&lt;br /&gt;
                                freezeplayer2();&lt;br /&gt;
hide;&lt;br /&gt;
                                hide();&lt;br /&gt;
hideimg float;&lt;br /&gt;
                                hideimg(float);&lt;br /&gt;
hideimgs float, float;&lt;br /&gt;
                                hideimgs(float,float);&lt;br /&gt;
hidelocal;&lt;br /&gt;
                                hidelocal();&lt;br /&gt;
&lt;br /&gt;
hitcompu float, float, float, float;&lt;br /&gt;
                                hitcompu(float,float,float,float);&lt;br /&gt;
hitnpc float, float, float, float;&lt;br /&gt;
                                hitnpc(float,float,float,float);&lt;br /&gt;
hitobjects float, float, float;&lt;br /&gt;
                                hitobjects(float,float,float);&lt;br /&gt;
hideplayer float;&lt;br /&gt;
                                hideplayer(float);&lt;br /&gt;
hidesword float;&lt;br /&gt;
                                hidesword(float);&lt;br /&gt;
hitplayer float, float, float, float;&lt;br /&gt;
                                hitplayer(float,float,float,float);&lt;br /&gt;
hurt float;&lt;br /&gt;
                                hurt(float);&lt;br /&gt;
insertstring oldstring, float, oldstring;&lt;br /&gt;
                                insertstring(string,float,string);&lt;br /&gt;
join oldstring;&lt;br /&gt;
                                join(string);&lt;br /&gt;
lay oldstring;&lt;br /&gt;
                                lay(string);&lt;br /&gt;
lay2 oldstring, float, float;&lt;br /&gt;
                                lay2(string,float,float);&lt;br /&gt;
loadmap oldstring;&lt;br /&gt;
                                loadmap(string);&lt;br /&gt;
message oldstring;&lt;br /&gt;
                                message(string);&lt;br /&gt;
move float, float, float, float;&lt;br /&gt;
                                move(float,float,float,float);&lt;br /&gt;
noplayerkilling;&lt;br /&gt;
                                noplayerkilling();&lt;br /&gt;
openurl oldstring;&lt;br /&gt;
                                openurl(string);&lt;br /&gt;
openurl2 oldstring, float, float;&lt;br /&gt;
                                openurl2(string,float,float);&lt;br /&gt;
play oldstring;&lt;br /&gt;
                                play(string);&lt;br /&gt;
play2 oldstring, float, float, float;&lt;br /&gt;
                                play2(string,float,float,float);&lt;br /&gt;
playlooped oldstring;&lt;br /&gt;
                                playlooped(string);&lt;br /&gt;
putbomb float, float, float;&lt;br /&gt;
                                putbomb(float,float,float);&lt;br /&gt;
putcomp oldstring, float, float;&lt;br /&gt;
                                putcomp(string,float,float);&lt;br /&gt;
putexplosion float, float, float;&lt;br /&gt;
                                putexplosion(float,float,float);&lt;br /&gt;
putexplosion2 float, float, float, float;&lt;br /&gt;
                                putexplosion2(float,float,float,float);&lt;br /&gt;
puthorse oldstring, float, float;&lt;br /&gt;
                                puthorse(string,float,float);&lt;br /&gt;
putleaps float, float, float;&lt;br /&gt;
                                putleaps(float,float,float);&lt;br /&gt;
putnewcomp oldstring, float, float, oldstring, float;&lt;br /&gt;
                                putnewcomp(string,float,float,string,float);&lt;br /&gt;
putnpc oldstring, oldstring, float, float;&lt;br /&gt;
                                putnpc(string,string,float,float);&lt;br /&gt;
putnpc2 float, float, oldstring;&lt;br /&gt;
                                putnpc2(float,float,string);&lt;br /&gt;
reflectarrow float;&lt;br /&gt;
                                reflectarrow(float);&lt;br /&gt;
removearrow float;&lt;br /&gt;
                                removearrow(float);&lt;br /&gt;
removebomb float;&lt;br /&gt;
                                removebomb(float);&lt;br /&gt;
removecompus;&lt;br /&gt;
                                removecompus();&lt;br /&gt;
removeexplo float;&lt;br /&gt;
                                removeexplo(float);&lt;br /&gt;
removehorse float;&lt;br /&gt;
                                removehorse(float);&lt;br /&gt;
rmeoveitem float;&lt;br /&gt;
                                removeitem(float)&lt;br /&gt;
removestring oldstring, oldstring;&lt;br /&gt;
                                removestring(string,string);&lt;br /&gt;
removetiledefs oldstring;&lt;br /&gt;
                                removetiledefs(string);&lt;br /&gt;
replaceani oldstring, oldstring;&lt;br /&gt;
                                replaceani(string,string);&lt;br /&gt;
replacestring oldstring, float, oldstring;&lt;br /&gt;
                                replacestring(string,float,string);&lt;br /&gt;
resetfocus;&lt;br /&gt;
                                resetfocus();&lt;br /&gt;
savelog oldstring;&lt;br /&gt;
                                savelog(string);&lt;br /&gt;
savelog2 oldstring, oldstring;&lt;br /&gt;
                                savelog2(string,string);&lt;br /&gt;
say float;&lt;br /&gt;
                                say(float);&lt;br /&gt;
say2 oldstring;&lt;br /&gt;
                                say2(string);&lt;br /&gt;
sendrpgmessage oldstring;&lt;br /&gt;
                                sendrpgmessage(string);&lt;br /&gt;
sendpm oldstring;&lt;br /&gt;
                                sendpm(string);&lt;br /&gt;
sendtonc oldstring;&lt;br /&gt;
                                sendtonc(string);&lt;br /&gt;
sendtorc oldstring;&lt;br /&gt;
                                sendtorc(string);&lt;br /&gt;
serverwarp oldstring;&lt;br /&gt;
                                serverwarp(string);&lt;br /&gt;
set oldstring;&lt;br /&gt;
                                set(string);&lt;br /&gt;
setani oldstring, oldstring;&lt;br /&gt;
                                setani(string,string);&lt;br /&gt;
setarray float, float;&lt;br /&gt;
                                setarray(var,float);&lt;br /&gt;
setbeltcolor oldstring;&lt;br /&gt;
                                setbeltcolor(string);&lt;br /&gt;
setbow oldstring;&lt;br /&gt;
                                setbow(string);&lt;br /&gt;
setcharani oldstring, oldstring;&lt;br /&gt;
                                setcharani(string,string);&lt;br /&gt;
setchargender oldstring;&lt;br /&gt;
                                setchargender(string);&lt;br /&gt;
setcharprop oldstring, oldstring;&lt;br /&gt;
                                string = string;&lt;br /&gt;
setcoatcolor oldstring;&lt;br /&gt;
                                setcoatcolor(string);&lt;br /&gt;
setcoloreffect float, float, float, float;&lt;br /&gt;
                                setcoloreffect(float,float,float,float);&lt;br /&gt;
setcursor float;&lt;br /&gt;
                                setcursor(float);&lt;br /&gt;
setcurcor2 oldstring;&lt;br /&gt;
                                setcursor2(string);&lt;br /&gt;
seteffect float, float, float, float;&lt;br /&gt;
                                seteffect(float,float,float,float);&lt;br /&gt;
seteffectmode float;&lt;br /&gt;
                                seteffectmode(float);&lt;br /&gt;
setfocus float, float;&lt;br /&gt;
                                setfocus(float,float);&lt;br /&gt;
setgender oldstring;&lt;br /&gt;
                                setgender(string);&lt;br /&gt;
sethead oldstring;&lt;br /&gt;
                                sethead(string);&lt;br /&gt;
setlevel oldstring;&lt;br /&gt;
                                setlevel(string);&lt;br /&gt;
setlevel2 oldstring, float, float;&lt;br /&gt;
                                setlevel2(string,float,float);&lt;br /&gt;
setmap oldstring, oldstring, float, float;&lt;br /&gt;
                                setmap(string,string,float,float);&lt;br /&gt;
setminimap oldstring, oldstring, float, float;&lt;br /&gt;
                                setminimap(string,string,float,float);&lt;br /&gt;
setmusicvolume float, float;&lt;br /&gt;
                                setmusicvolume(float,float);&lt;br /&gt;
setimg oldstring;&lt;br /&gt;
                                setimg(string);&lt;br /&gt;
setimgpart oldstring, float, float, float, float;&lt;br /&gt;
                                setimgpart(string,float,float,float,float);&lt;br /&gt;
setletters oldstring;&lt;br /&gt;
                                setletters(string);&lt;br /&gt;
setplayerdir oldstring;&lt;br /&gt;
                                setplayerdir(string);&lt;br /&gt;
setplayerprop oldstring, oldstring;&lt;br /&gt;
                                string = string;&lt;br /&gt;
setpm oldstring;&lt;br /&gt;
                                setpm(string);&lt;br /&gt;
setshape float, float, float;&lt;br /&gt;
                                setshape(float,float,float);&lt;br /&gt;
setshape2 float, float, float;&lt;br /&gt;
                                setshape2(float,float,float);&lt;br /&gt;
setshield oldstring, float;&lt;br /&gt;
                                setshield(string,float);&lt;br /&gt;
setshoecolor oldstring;&lt;br /&gt;
                                setshoecolor(string);&lt;br /&gt;
setshootparams oldstring;&lt;br /&gt;
                                setshootparams(string);&lt;br /&gt;
setskincolor oldstring;&lt;br /&gt;
                                setskincolor(string);&lt;br /&gt;
setsleevecolor oldstring;&lt;br /&gt;
                                setsleevecolor(string);&lt;br /&gt;
setstring oldstring, oldstring;&lt;br /&gt;
                                setstring(string,string);&lt;br /&gt;
setsword oldstring, float;&lt;br /&gt;
                                setsword(string,float);&lt;br /&gt;
seturllevel oldstring;&lt;br /&gt;
                                seturllevel(string);&lt;br /&gt;
setz float, float, float, float, float, float, float, float;&lt;br /&gt;
                                setz(float,float,float,float,float,float,float,float);&lt;br /&gt;
setzoomeffect float;&lt;br /&gt;
                                setzoomeffect(float);&lt;br /&gt;
shoot float, float, float, float, float, float, oldstring, oldstring;&lt;br /&gt;
                                shoot(float,float,float,float,float,float,string,string);&lt;br /&gt;
shootarrow float;&lt;br /&gt;
                                shootarrow(float);&lt;br /&gt;
shootball;&lt;br /&gt;
                                shootball();&lt;br /&gt;
shootfireball float;&lt;br /&gt;
                                shootfireball(float);&lt;br /&gt;
shootfireblast float;&lt;br /&gt;
                                shootfireblast(float);&lt;br /&gt;
shootnuke float;&lt;br /&gt;
                                shootnuke(float);&lt;br /&gt;
show;&lt;br /&gt;
                                show();&lt;br /&gt;
showani float, float, float, float, oldstring;&lt;br /&gt;
                                showani(float,float,float,float,string);&lt;br /&gt;
showani2 float, float, float, float, float, oldstring;&lt;br /&gt;
                                showani2(float,float,float,float,float,string);&lt;br /&gt;
showcharacter;&lt;br /&gt;
                                showcharacter();&lt;br /&gt;
showfile oldstring;&lt;br /&gt;
                                showfile(string);&lt;br /&gt;
showimg float, oldstring, float, float;&lt;br /&gt;
                                showimg(float,string,float,float);&lt;br /&gt;
showimg2 float, oldstring, float, float, float;&lt;br /&gt;
                                showimg2(float,string,float,float,float);&lt;br /&gt;
showlocal;&lt;br /&gt;
                                showlocal();&lt;br /&gt;
&lt;br /&gt;
showpoly float, float;&lt;br /&gt;
                                showpoly(float,array);&lt;br /&gt;
showpoly2 float, float;&lt;br /&gt;
                                showpoly2(float,array);&lt;br /&gt;
showstats float;&lt;br /&gt;
                                showstats(float);&lt;br /&gt;
showtext float, float, float, oldstring, oldstring, oldstring;&lt;br /&gt;
                                showtext(float,float,float,string,string,string);&lt;br /&gt;
showtext2 float, float, float, float, oldstring, oldstring, oldstring;&lt;br /&gt;
                                showtext2(float,float,float,float,string,string,string);&lt;br /&gt;
sleep float;&lt;br /&gt;
                                sleep(float);&lt;br /&gt;
spyfire float, float;&lt;br /&gt;
                                spyfire(float,float);&lt;br /&gt;
stopmidi;&lt;br /&gt;
                                stopmidi();&lt;br /&gt;
stopsound oldstring;&lt;br /&gt;
                                stopsound(string);&lt;br /&gt;
take oldstring;&lt;br /&gt;
                                take(string);&lt;br /&gt;
take2 float;&lt;br /&gt;
                                take2(float);&lt;br /&gt;
takehorse float;&lt;br /&gt;
                                takehorse(float);&lt;br /&gt;
takeplayercarry;&lt;br /&gt;
                                takeplayercarry();&lt;br /&gt;
takeplayerhorse;&lt;br /&gt;
                                takeplayerhorse();&lt;br /&gt;
throwcarry;&lt;br /&gt;
                                throwcarry();&lt;br /&gt;
timereverywhere;&lt;br /&gt;
                                timereverywhere();&lt;br /&gt;
timershow;&lt;br /&gt;
                                timershow();&lt;br /&gt;
toinventory oldstring;&lt;br /&gt;
                                toinventory(string);&lt;br /&gt;
tokenize oldstring;&lt;br /&gt;
                                tokens = string.tokenize();&lt;br /&gt;
tokenize2 oldstring, oldstring;&lt;br /&gt;
                                tokens = string.tokenize(&amp;quot; ,&amp;quot; @ string);&lt;br /&gt;
toweapons oldstring;&lt;br /&gt;
                                toweapons(string);&lt;br /&gt;
triggeraction float, float, oldstring, oldstring;&lt;br /&gt;
                                triggeraction(float,float,string,string);&lt;br /&gt;
unfreezeplayer;&lt;br /&gt;
                                unfreezeplayer();&lt;br /&gt;
unset oldstring;&lt;br /&gt;
                                unset(string);&lt;br /&gt;
updateboard float, float, float, float;&lt;br /&gt;
                                updateboard(float,float,float,float);&lt;br /&gt;
updateterrain;&lt;br /&gt;
                                updateterrain();&lt;br /&gt;
wraptext float, oldstring, oldstring;&lt;br /&gt;
                                tokens = wraptext(float,&amp;quot; ,&amp;quot; @ string,string);&lt;br /&gt;
wraptext2 float, float, oldstring, oldstring;&lt;br /&gt;
                                tokens = wraptext2(float,float,&amp;quot; ,&amp;quot; @ string,string);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Supported old string operations ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
These old string operators can be used in string parameters&lt;br /&gt;
for the old commands, also you can use them directly as operators, e.g.&lt;br /&gt;
#c = &amp;quot;hello&amp;quot;&lt;br /&gt;
is actually doing&lt;br /&gt;
player.chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#a            player.account&lt;br /&gt;
#a(float)     players[float].account&lt;br /&gt;
#m            player.ani&lt;br /&gt;
              ani&lt;br /&gt;
#m(float)     players[float].ani&lt;br /&gt;
#K(float)     char(float)&lt;br /&gt;
#8            player.bodyimg&lt;br /&gt;
              bodyimg&lt;br /&gt;
#8(float)     players[float].bodyimg&lt;br /&gt;
#c            player.chat&lt;br /&gt;
              chat&lt;br /&gt;
#c(float)     players[float].chat&lt;br /&gt;
#C0           player.colors[0]&lt;br /&gt;
              colors[0]&lt;br /&gt;
#C0(float)    players[float].colors[0]&lt;br /&gt;
#C1           player.colors[1]&lt;br /&gt;
              colors[1]&lt;br /&gt;
#C1(float)    players[float].colors[1]&lt;br /&gt;
#C2           player.colors[2]&lt;br /&gt;
              colors[2]&lt;br /&gt;
#C2(float)    players[float].colors[2]&lt;br /&gt;
#C3           player.colors[3]&lt;br /&gt;
              colors[3]&lt;br /&gt;
#C3(float)    players[float].colors[3]&lt;br /&gt;
#C4           player.colors[4]&lt;br /&gt;
              colors[4]&lt;br /&gt;
#C4(float)    players[float].colors[4]&lt;br /&gt;
#C5           player.colors[5]&lt;br /&gt;
              colors[5]&lt;br /&gt;
#C5(float)    players[float].colors[5]&lt;br /&gt;
#D            downloadfile()&lt;br /&gt;
#E            emoticonchar()&lt;br /&gt;
#e(float,float,oldstring)&lt;br /&gt;
              string.substring(float,float)&lt;br /&gt;
#g            player.guild&lt;br /&gt;
              guild&lt;br /&gt;
#g(float)     players[float].guild&lt;br /&gt;
#3            player.headimg&lt;br /&gt;
              headimg&lt;br /&gt;
#3(float)     players[float].headimg&lt;br /&gt;
#5            player.horseimg&lt;br /&gt;
              horseimg&lt;br /&gt;
#5(float)     players[float].horseimg&lt;br /&gt;
#k(float)     keyname(float)&lt;br /&gt;
#L            player.level&lt;br /&gt;
#I(oldstring,float)&lt;br /&gt;
              getstring(string)[float]&lt;br /&gt;
#n            player.nick&lt;br /&gt;
              nick&lt;br /&gt;
#n(float)     players[float].nick&lt;br /&gt;
#f            image&lt;br /&gt;
#f(float)     npcs[float].image&lt;br /&gt;
#F            level&lt;br /&gt;
#p(float)     params[float]&lt;br /&gt;
#P(float)     player.attr[float]&lt;br /&gt;
              attr[float]&lt;br /&gt;
#P(float_1,float_2)&lt;br /&gt;
              players[float_2].attr[float_1]&lt;br /&gt;
#P1           player.attr[1]&lt;br /&gt;
              attr[1]&lt;br /&gt;
#P1(float)    players[float].attr[1]&lt;br /&gt;
#P2           player.attr[2]&lt;br /&gt;
              attr[2]&lt;br /&gt;
#P2(float)    players[float].attr[2]&lt;br /&gt;
#P3           player.attr[3]&lt;br /&gt;
              attr[3]&lt;br /&gt;
#P3(float)    players[float].attr[3]&lt;br /&gt;
#P4           player.attr[4]&lt;br /&gt;
              attr[4]&lt;br /&gt;
#P4(float)    players[float].attr[4]&lt;br /&gt;
#P5           player.attr[5]&lt;br /&gt;
              attr[5]&lt;br /&gt;
#P5(float)    players[float].attr[5]&lt;br /&gt;
#P6           player.attr[6]&lt;br /&gt;
              attr[6]&lt;br /&gt;
#P6(float)    players[float].attr[6]&lt;br /&gt;
#P7           player.attr[7]&lt;br /&gt;
              attr[7]&lt;br /&gt;
#P7(float)    players[float].attr[7]&lt;br /&gt;
#P8           player.attr[8]&lt;br /&gt;
              attr[8]&lt;br /&gt;
#P8(float)    players[float].attr[8]&lt;br /&gt;
#P9           player.attr[9]&lt;br /&gt;
              attr[9]&lt;br /&gt;
#P9(float)    players[float].attr[9]&lt;br /&gt;
#R(oldstring) string.random()&lt;br /&gt;
#2            player.shieldimg&lt;br /&gt;
              shieldimg&lt;br /&gt;
#2(float)     players[float].shieldimg&lt;br /&gt;
#s(oldstring) getstring(string)&lt;br /&gt;
#1            player.swordimg&lt;br /&gt;
              swordimg&lt;br /&gt;
#1(float)     players[float].swordimg&lt;br /&gt;
#S            player.sword.script&lt;br /&gt;
#t(float)     tokens[float]&lt;br /&gt;
#T(oldstring) string.trim()&lt;br /&gt;
#v(float)     float&lt;br /&gt;
#W            player.weapon.image&lt;br /&gt;
#W(float)     weapons[float].image&lt;br /&gt;
#w            player.weapon.name&lt;br /&gt;
#w(float)     weapons[float].name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Compatibility note:&lt;br /&gt;
When you use the command setcharprop then the first parameter&lt;br /&gt;
is handled differently: instead of changing 'player.chat' it&lt;br /&gt;
is changing 'chat', the chat text of the npc. So 'setcharprop #c,hello'&lt;br /&gt;
would be translated into&lt;br /&gt;
chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
while 'setplayerprop #c,hello' is translated into&lt;br /&gt;
player.chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
In the list above both possibilities are listed.&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6688</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6688"/>
		<updated>2006-03-28T20:39:14Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Excaliber's Scripting Guide''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onTouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time+=1;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
with(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other ration expressios you may use. (Hell, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEED to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
Note: if you know gs1, gs2 is easy to learn, below is a list of commands in their old form and their new format, on the right. You can also use this list to learn the commands. This is taken from this page:http://wiki.graal.net/index.php/Creation/Dev/Script/Starting_Guide#Introduction&lt;br /&gt;
which is also helpful for learning how to script. Enjoy!&lt;br /&gt;
== Old script compatibility ==&lt;br /&gt;
&lt;br /&gt;
=== Removed functionality ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- toinventory&lt;br /&gt;
- followplayer&lt;br /&gt;
- playersays()&lt;br /&gt;
- setbackpal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Supported old scripting commands and their mapping to new script ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
addstring oldstring, oldstring;&lt;br /&gt;
                                list.add(string);&lt;br /&gt;
addtiledef oldstring, oldstring, float;&lt;br /&gt;
                                addtiledef(string,string,float);&lt;br /&gt;
addtiledef2 oldstring, oldstring, float, float;&lt;br /&gt;
                                addtiledef2(string,string,float,float);&lt;br /&gt;
attachplayertoobj float, float;&lt;br /&gt;
                                attachplayertoobj(float,float);&lt;br /&gt;
blockagain;&lt;br /&gt;
                                blockagain();&lt;br /&gt;
blockagainlocal;&lt;br /&gt;
                                blockagainlocal();&lt;br /&gt;
callnpc float, oldstring;&lt;br /&gt;
                                callnpc(float,string);&lt;br /&gt;
callweapon float, oldstring;&lt;br /&gt;
                                callweapon(float,string);&lt;br /&gt;
canbecarried;&lt;br /&gt;
                                canbecarried();&lt;br /&gt;
canbepulled;&lt;br /&gt;
                                canbepulled();&lt;br /&gt;
canbepushed;&lt;br /&gt;
                                canbepushed();&lt;br /&gt;
cannotbecarried;&lt;br /&gt;
                                cannotbecarried();&lt;br /&gt;
cannotbepulled;&lt;br /&gt;
                                cannotbepulled();&lt;br /&gt;
cannotbepushed;&lt;br /&gt;
                                cannotbepushed();&lt;br /&gt;
canwarp;&lt;br /&gt;
                                canwarp();&lt;br /&gt;
canwarp2;&lt;br /&gt;
                                canwarp2();&lt;br /&gt;
carryobject oldstring;&lt;br /&gt;
                                carryobject(string);&lt;br /&gt;
changeimgcolors float, float, float, float, float;&lt;br /&gt;
                                changeimgcolors(float,float,float,float,float);&lt;br /&gt;
changeimgmode float, float;&lt;br /&gt;
                                changeimgmode(float,float);&lt;br /&gt;
changeimgpart float, float, float, float, float;&lt;br /&gt;
                                changeimgpart(float,float,float,float,float);&lt;br /&gt;
changeimgvis float, float;&lt;br /&gt;
                                changeimgvis(float,float);&lt;br /&gt;
changeimgzoom float, float;&lt;br /&gt;
                                changeimgzoom(float,float);&lt;br /&gt;
deletestring oldstring, float;&lt;br /&gt;
                                deletestring(string,float);&lt;br /&gt;
destroy;&lt;br /&gt;
                                destroy();&lt;br /&gt;
detachplayer;&lt;br /&gt;
                                detachplayer();&lt;br /&gt;
disabledefmovement;&lt;br /&gt;
                                disabledefmovement();&lt;br /&gt;
disablemap;&lt;br /&gt;
                                disablemap();&lt;br /&gt;
disablepause;&lt;br /&gt;
                                disablepause();&lt;br /&gt;
disableselectweapons;&lt;br /&gt;
                                disableselectweapons();&lt;br /&gt;
disableweapons;&lt;br /&gt;
                                disableweapons();&lt;br /&gt;
dontblock;&lt;br /&gt;
                                dontblock();&lt;br /&gt;
dontblocklocal;&lt;br /&gt;
                                dontblocklocal();&lt;br /&gt;
drawaslight;&lt;br /&gt;
                                drawaslight();&lt;br /&gt;
drawoverplayer;&lt;br /&gt;
                                drawoverplayer();&lt;br /&gt;
drawunderplayer;&lt;br /&gt;
                                drawunderplayer();&lt;br /&gt;
enabledefmovement;&lt;br /&gt;
                                enabledefmovement();&lt;br /&gt;
enablefeatures float;&lt;br /&gt;
                                enablefeatures(float);&lt;br /&gt;
enablemap;&lt;br /&gt;
                                enablemap();&lt;br /&gt;
enablepause;&lt;br /&gt;
                                enablepause();&lt;br /&gt;
enableselectweapons;&lt;br /&gt;
                                enableselectweapons();&lt;br /&gt;
enableweapons;&lt;br /&gt;
                                enableweapons();&lt;br /&gt;
explodebomb float;&lt;br /&gt;
                                explodebomb(float);&lt;br /&gt;
followplayer;&lt;br /&gt;
                                followplayer();&lt;br /&gt;
freezeplayer float;&lt;br /&gt;
                                freezeplayer(float);&lt;br /&gt;
freezeplayer2;&lt;br /&gt;
                                freezeplayer2();&lt;br /&gt;
hide;&lt;br /&gt;
                                hide();&lt;br /&gt;
hideimg float;&lt;br /&gt;
                                hideimg(float);&lt;br /&gt;
hideimgs float, float;&lt;br /&gt;
                                hideimgs(float,float);&lt;br /&gt;
hidelocal;&lt;br /&gt;
                                hidelocal();&lt;br /&gt;
&lt;br /&gt;
hitcompu float, float, float, float;&lt;br /&gt;
                                hitcompu(float,float,float,float);&lt;br /&gt;
hitnpc float, float, float, float;&lt;br /&gt;
                                hitnpc(float,float,float,float);&lt;br /&gt;
hitobjects float, float, float;&lt;br /&gt;
                                hitobjects(float,float,float);&lt;br /&gt;
hideplayer float;&lt;br /&gt;
                                hideplayer(float);&lt;br /&gt;
hidesword float;&lt;br /&gt;
                                hidesword(float);&lt;br /&gt;
hitplayer float, float, float, float;&lt;br /&gt;
                                hitplayer(float,float,float,float);&lt;br /&gt;
hurt float;&lt;br /&gt;
                                hurt(float);&lt;br /&gt;
insertstring oldstring, float, oldstring;&lt;br /&gt;
                                insertstring(string,float,string);&lt;br /&gt;
join oldstring;&lt;br /&gt;
                                join(string);&lt;br /&gt;
lay oldstring;&lt;br /&gt;
                                lay(string);&lt;br /&gt;
lay2 oldstring, float, float;&lt;br /&gt;
                                lay2(string,float,float);&lt;br /&gt;
loadmap oldstring;&lt;br /&gt;
                                loadmap(string);&lt;br /&gt;
message oldstring;&lt;br /&gt;
                                message(string);&lt;br /&gt;
move float, float, float, float;&lt;br /&gt;
                                move(float,float,float,float);&lt;br /&gt;
noplayerkilling;&lt;br /&gt;
                                noplayerkilling();&lt;br /&gt;
openurl oldstring;&lt;br /&gt;
                                openurl(string);&lt;br /&gt;
openurl2 oldstring, float, float;&lt;br /&gt;
                                openurl2(string,float,float);&lt;br /&gt;
play oldstring;&lt;br /&gt;
                                play(string);&lt;br /&gt;
play2 oldstring, float, float, float;&lt;br /&gt;
                                play2(string,float,float,float);&lt;br /&gt;
playlooped oldstring;&lt;br /&gt;
                                playlooped(string);&lt;br /&gt;
putbomb float, float, float;&lt;br /&gt;
                                putbomb(float,float,float);&lt;br /&gt;
putcomp oldstring, float, float;&lt;br /&gt;
                                putcomp(string,float,float);&lt;br /&gt;
putexplosion float, float, float;&lt;br /&gt;
                                putexplosion(float,float,float);&lt;br /&gt;
putexplosion2 float, float, float, float;&lt;br /&gt;
                                putexplosion2(float,float,float,float);&lt;br /&gt;
puthorse oldstring, float, float;&lt;br /&gt;
                                puthorse(string,float,float);&lt;br /&gt;
putleaps float, float, float;&lt;br /&gt;
                                putleaps(float,float,float);&lt;br /&gt;
putnewcomp oldstring, float, float, oldstring, float;&lt;br /&gt;
                                putnewcomp(string,float,float,string,float);&lt;br /&gt;
putnpc oldstring, oldstring, float, float;&lt;br /&gt;
                                putnpc(string,string,float,float);&lt;br /&gt;
putnpc2 float, float, oldstring;&lt;br /&gt;
                                putnpc2(float,float,string);&lt;br /&gt;
reflectarrow float;&lt;br /&gt;
                                reflectarrow(float);&lt;br /&gt;
removearrow float;&lt;br /&gt;
                                removearrow(float);&lt;br /&gt;
removebomb float;&lt;br /&gt;
                                removebomb(float);&lt;br /&gt;
removecompus;&lt;br /&gt;
                                removecompus();&lt;br /&gt;
removeexplo float;&lt;br /&gt;
                                removeexplo(float);&lt;br /&gt;
removehorse float;&lt;br /&gt;
                                removehorse(float);&lt;br /&gt;
rmeoveitem float;&lt;br /&gt;
                                removeitem(float)&lt;br /&gt;
removestring oldstring, oldstring;&lt;br /&gt;
                                removestring(string,string);&lt;br /&gt;
removetiledefs oldstring;&lt;br /&gt;
                                removetiledefs(string);&lt;br /&gt;
replaceani oldstring, oldstring;&lt;br /&gt;
                                replaceani(string,string);&lt;br /&gt;
replacestring oldstring, float, oldstring;&lt;br /&gt;
                                replacestring(string,float,string);&lt;br /&gt;
resetfocus;&lt;br /&gt;
                                resetfocus();&lt;br /&gt;
savelog oldstring;&lt;br /&gt;
                                savelog(string);&lt;br /&gt;
savelog2 oldstring, oldstring;&lt;br /&gt;
                                savelog2(string,string);&lt;br /&gt;
say float;&lt;br /&gt;
                                say(float);&lt;br /&gt;
say2 oldstring;&lt;br /&gt;
                                say2(string);&lt;br /&gt;
sendrpgmessage oldstring;&lt;br /&gt;
                                sendrpgmessage(string);&lt;br /&gt;
sendpm oldstring;&lt;br /&gt;
                                sendpm(string);&lt;br /&gt;
sendtonc oldstring;&lt;br /&gt;
                                sendtonc(string);&lt;br /&gt;
sendtorc oldstring;&lt;br /&gt;
                                sendtorc(string);&lt;br /&gt;
serverwarp oldstring;&lt;br /&gt;
                                serverwarp(string);&lt;br /&gt;
set oldstring;&lt;br /&gt;
                                set(string);&lt;br /&gt;
setani oldstring, oldstring;&lt;br /&gt;
                                setani(string,string);&lt;br /&gt;
setarray float, float;&lt;br /&gt;
                                setarray(var,float);&lt;br /&gt;
setbeltcolor oldstring;&lt;br /&gt;
                                setbeltcolor(string);&lt;br /&gt;
setbow oldstring;&lt;br /&gt;
                                setbow(string);&lt;br /&gt;
setcharani oldstring, oldstring;&lt;br /&gt;
                                setcharani(string,string);&lt;br /&gt;
setchargender oldstring;&lt;br /&gt;
                                setchargender(string);&lt;br /&gt;
setcharprop oldstring, oldstring;&lt;br /&gt;
                                string = string;&lt;br /&gt;
setcoatcolor oldstring;&lt;br /&gt;
                                setcoatcolor(string);&lt;br /&gt;
setcoloreffect float, float, float, float;&lt;br /&gt;
                                setcoloreffect(float,float,float,float);&lt;br /&gt;
setcursor float;&lt;br /&gt;
                                setcursor(float);&lt;br /&gt;
setcurcor2 oldstring;&lt;br /&gt;
                                setcursor2(string);&lt;br /&gt;
seteffect float, float, float, float;&lt;br /&gt;
                                seteffect(float,float,float,float);&lt;br /&gt;
seteffectmode float;&lt;br /&gt;
                                seteffectmode(float);&lt;br /&gt;
setfocus float, float;&lt;br /&gt;
                                setfocus(float,float);&lt;br /&gt;
setgender oldstring;&lt;br /&gt;
                                setgender(string);&lt;br /&gt;
sethead oldstring;&lt;br /&gt;
                                sethead(string);&lt;br /&gt;
setlevel oldstring;&lt;br /&gt;
                                setlevel(string);&lt;br /&gt;
setlevel2 oldstring, float, float;&lt;br /&gt;
                                setlevel2(string,float,float);&lt;br /&gt;
setmap oldstring, oldstring, float, float;&lt;br /&gt;
                                setmap(string,string,float,float);&lt;br /&gt;
setminimap oldstring, oldstring, float, float;&lt;br /&gt;
                                setminimap(string,string,float,float);&lt;br /&gt;
setmusicvolume float, float;&lt;br /&gt;
                                setmusicvolume(float,float);&lt;br /&gt;
setimg oldstring;&lt;br /&gt;
                                setimg(string);&lt;br /&gt;
setimgpart oldstring, float, float, float, float;&lt;br /&gt;
                                setimgpart(string,float,float,float,float);&lt;br /&gt;
setletters oldstring;&lt;br /&gt;
                                setletters(string);&lt;br /&gt;
setplayerdir oldstring;&lt;br /&gt;
                                setplayerdir(string);&lt;br /&gt;
setplayerprop oldstring, oldstring;&lt;br /&gt;
                                string = string;&lt;br /&gt;
setpm oldstring;&lt;br /&gt;
                                setpm(string);&lt;br /&gt;
setshape float, float, float;&lt;br /&gt;
                                setshape(float,float,float);&lt;br /&gt;
setshape2 float, float, float;&lt;br /&gt;
                                setshape2(float,float,float);&lt;br /&gt;
setshield oldstring, float;&lt;br /&gt;
                                setshield(string,float);&lt;br /&gt;
setshoecolor oldstring;&lt;br /&gt;
                                setshoecolor(string);&lt;br /&gt;
setshootparams oldstring;&lt;br /&gt;
                                setshootparams(string);&lt;br /&gt;
setskincolor oldstring;&lt;br /&gt;
                                setskincolor(string);&lt;br /&gt;
setsleevecolor oldstring;&lt;br /&gt;
                                setsleevecolor(string);&lt;br /&gt;
setstring oldstring, oldstring;&lt;br /&gt;
                                setstring(string,string);&lt;br /&gt;
setsword oldstring, float;&lt;br /&gt;
                                setsword(string,float);&lt;br /&gt;
seturllevel oldstring;&lt;br /&gt;
                                seturllevel(string);&lt;br /&gt;
setz float, float, float, float, float, float, float, float;&lt;br /&gt;
                                setz(float,float,float,float,float,float,float,float);&lt;br /&gt;
setzoomeffect float;&lt;br /&gt;
                                setzoomeffect(float);&lt;br /&gt;
shoot float, float, float, float, float, float, oldstring, oldstring;&lt;br /&gt;
                                shoot(float,float,float,float,float,float,string,string);&lt;br /&gt;
shootarrow float;&lt;br /&gt;
                                shootarrow(float);&lt;br /&gt;
shootball;&lt;br /&gt;
                                shootball();&lt;br /&gt;
shootfireball float;&lt;br /&gt;
                                shootfireball(float);&lt;br /&gt;
shootfireblast float;&lt;br /&gt;
                                shootfireblast(float);&lt;br /&gt;
shootnuke float;&lt;br /&gt;
                                shootnuke(float);&lt;br /&gt;
show;&lt;br /&gt;
                                show();&lt;br /&gt;
showani float, float, float, float, oldstring;&lt;br /&gt;
                                showani(float,float,float,float,string);&lt;br /&gt;
showani2 float, float, float, float, float, oldstring;&lt;br /&gt;
                                showani2(float,float,float,float,float,string);&lt;br /&gt;
showcharacter;&lt;br /&gt;
                                showcharacter();&lt;br /&gt;
showfile oldstring;&lt;br /&gt;
                                showfile(string);&lt;br /&gt;
showimg float, oldstring, float, float;&lt;br /&gt;
                                showimg(float,string,float,float);&lt;br /&gt;
showimg2 float, oldstring, float, float, float;&lt;br /&gt;
                                showimg2(float,string,float,float,float);&lt;br /&gt;
showlocal;&lt;br /&gt;
                                showlocal();&lt;br /&gt;
&lt;br /&gt;
showpoly float, float;&lt;br /&gt;
                                showpoly(float,array);&lt;br /&gt;
showpoly2 float, float;&lt;br /&gt;
                                showpoly2(float,array);&lt;br /&gt;
showstats float;&lt;br /&gt;
                                showstats(float);&lt;br /&gt;
showtext float, float, float, oldstring, oldstring, oldstring;&lt;br /&gt;
                                showtext(float,float,float,string,string,string);&lt;br /&gt;
showtext2 float, float, float, float, oldstring, oldstring, oldstring;&lt;br /&gt;
                                showtext2(float,float,float,float,string,string,string);&lt;br /&gt;
sleep float;&lt;br /&gt;
                                sleep(float);&lt;br /&gt;
spyfire float, float;&lt;br /&gt;
                                spyfire(float,float);&lt;br /&gt;
stopmidi;&lt;br /&gt;
                                stopmidi();&lt;br /&gt;
stopsound oldstring;&lt;br /&gt;
                                stopsound(string);&lt;br /&gt;
take oldstring;&lt;br /&gt;
                                take(string);&lt;br /&gt;
take2 float;&lt;br /&gt;
                                take2(float);&lt;br /&gt;
takehorse float;&lt;br /&gt;
                                takehorse(float);&lt;br /&gt;
takeplayercarry;&lt;br /&gt;
                                takeplayercarry();&lt;br /&gt;
takeplayerhorse;&lt;br /&gt;
                                takeplayerhorse();&lt;br /&gt;
throwcarry;&lt;br /&gt;
                                throwcarry();&lt;br /&gt;
timereverywhere;&lt;br /&gt;
                                timereverywhere();&lt;br /&gt;
timershow;&lt;br /&gt;
                                timershow();&lt;br /&gt;
toinventory oldstring;&lt;br /&gt;
                                toinventory(string);&lt;br /&gt;
tokenize oldstring;&lt;br /&gt;
                                tokens = string.tokenize();&lt;br /&gt;
tokenize2 oldstring, oldstring;&lt;br /&gt;
                                tokens = string.tokenize(&amp;quot; ,&amp;quot; @ string);&lt;br /&gt;
toweapons oldstring;&lt;br /&gt;
                                toweapons(string);&lt;br /&gt;
triggeraction float, float, oldstring, oldstring;&lt;br /&gt;
                                triggeraction(float,float,string,string);&lt;br /&gt;
unfreezeplayer;&lt;br /&gt;
                                unfreezeplayer();&lt;br /&gt;
unset oldstring;&lt;br /&gt;
                                unset(string);&lt;br /&gt;
updateboard float, float, float, float;&lt;br /&gt;
                                updateboard(float,float,float,float);&lt;br /&gt;
updateterrain;&lt;br /&gt;
                                updateterrain();&lt;br /&gt;
wraptext float, oldstring, oldstring;&lt;br /&gt;
                                tokens = wraptext(float,&amp;quot; ,&amp;quot; @ string,string);&lt;br /&gt;
wraptext2 float, float, oldstring, oldstring;&lt;br /&gt;
                                tokens = wraptext2(float,float,&amp;quot; ,&amp;quot; @ string,string);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Supported old string operations ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
These old string operators can be used in string parameters&lt;br /&gt;
for the old commands, also you can use them directly as operators, e.g.&lt;br /&gt;
#c = &amp;quot;hello&amp;quot;&lt;br /&gt;
is actually doing&lt;br /&gt;
player.chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#a            player.account&lt;br /&gt;
#a(float)     players[float].account&lt;br /&gt;
#m            player.ani&lt;br /&gt;
              ani&lt;br /&gt;
#m(float)     players[float].ani&lt;br /&gt;
#K(float)     char(float)&lt;br /&gt;
#8            player.bodyimg&lt;br /&gt;
              bodyimg&lt;br /&gt;
#8(float)     players[float].bodyimg&lt;br /&gt;
#c            player.chat&lt;br /&gt;
              chat&lt;br /&gt;
#c(float)     players[float].chat&lt;br /&gt;
#C0           player.colors[0]&lt;br /&gt;
              colors[0]&lt;br /&gt;
#C0(float)    players[float].colors[0]&lt;br /&gt;
#C1           player.colors[1]&lt;br /&gt;
              colors[1]&lt;br /&gt;
#C1(float)    players[float].colors[1]&lt;br /&gt;
#C2           player.colors[2]&lt;br /&gt;
              colors[2]&lt;br /&gt;
#C2(float)    players[float].colors[2]&lt;br /&gt;
#C3           player.colors[3]&lt;br /&gt;
              colors[3]&lt;br /&gt;
#C3(float)    players[float].colors[3]&lt;br /&gt;
#C4           player.colors[4]&lt;br /&gt;
              colors[4]&lt;br /&gt;
#C4(float)    players[float].colors[4]&lt;br /&gt;
#C5           player.colors[5]&lt;br /&gt;
              colors[5]&lt;br /&gt;
#C5(float)    players[float].colors[5]&lt;br /&gt;
#D            downloadfile()&lt;br /&gt;
#E            emoticonchar()&lt;br /&gt;
#e(float,float,oldstring)&lt;br /&gt;
              string.substring(float,float)&lt;br /&gt;
#g            player.guild&lt;br /&gt;
              guild&lt;br /&gt;
#g(float)     players[float].guild&lt;br /&gt;
#3            player.headimg&lt;br /&gt;
              headimg&lt;br /&gt;
#3(float)     players[float].headimg&lt;br /&gt;
#5            player.horseimg&lt;br /&gt;
              horseimg&lt;br /&gt;
#5(float)     players[float].horseimg&lt;br /&gt;
#k(float)     keyname(float)&lt;br /&gt;
#L            player.level&lt;br /&gt;
#I(oldstring,float)&lt;br /&gt;
              getstring(string)[float]&lt;br /&gt;
#n            player.nick&lt;br /&gt;
              nick&lt;br /&gt;
#n(float)     players[float].nick&lt;br /&gt;
#f            image&lt;br /&gt;
#f(float)     npcs[float].image&lt;br /&gt;
#F            level&lt;br /&gt;
#p(float)     params[float]&lt;br /&gt;
#P(float)     player.attr[float]&lt;br /&gt;
              attr[float]&lt;br /&gt;
#P(float_1,float_2)&lt;br /&gt;
              players[float_2].attr[float_1]&lt;br /&gt;
#P1           player.attr[1]&lt;br /&gt;
              attr[1]&lt;br /&gt;
#P1(float)    players[float].attr[1]&lt;br /&gt;
#P2           player.attr[2]&lt;br /&gt;
              attr[2]&lt;br /&gt;
#P2(float)    players[float].attr[2]&lt;br /&gt;
#P3           player.attr[3]&lt;br /&gt;
              attr[3]&lt;br /&gt;
#P3(float)    players[float].attr[3]&lt;br /&gt;
#P4           player.attr[4]&lt;br /&gt;
              attr[4]&lt;br /&gt;
#P4(float)    players[float].attr[4]&lt;br /&gt;
#P5           player.attr[5]&lt;br /&gt;
              attr[5]&lt;br /&gt;
#P5(float)    players[float].attr[5]&lt;br /&gt;
#P6           player.attr[6]&lt;br /&gt;
              attr[6]&lt;br /&gt;
#P6(float)    players[float].attr[6]&lt;br /&gt;
#P7           player.attr[7]&lt;br /&gt;
              attr[7]&lt;br /&gt;
#P7(float)    players[float].attr[7]&lt;br /&gt;
#P8           player.attr[8]&lt;br /&gt;
              attr[8]&lt;br /&gt;
#P8(float)    players[float].attr[8]&lt;br /&gt;
#P9           player.attr[9]&lt;br /&gt;
              attr[9]&lt;br /&gt;
#P9(float)    players[float].attr[9]&lt;br /&gt;
#R(oldstring) string.random()&lt;br /&gt;
#2            player.shieldimg&lt;br /&gt;
              shieldimg&lt;br /&gt;
#2(float)     players[float].shieldimg&lt;br /&gt;
#s(oldstring) getstring(string)&lt;br /&gt;
#1            player.swordimg&lt;br /&gt;
              swordimg&lt;br /&gt;
#1(float)     players[float].swordimg&lt;br /&gt;
#S            player.sword.script&lt;br /&gt;
#t(float)     tokens[float]&lt;br /&gt;
#T(oldstring) string.trim()&lt;br /&gt;
#v(float)     float&lt;br /&gt;
#W            player.weapon.image&lt;br /&gt;
#W(float)     weapons[float].image&lt;br /&gt;
#w            player.weapon.name&lt;br /&gt;
#w(float)     weapons[float].name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Compatibility note:&lt;br /&gt;
When you use the command setcharprop then the first parameter&lt;br /&gt;
is handled differently: instead of changing 'player.chat' it&lt;br /&gt;
is changing 'chat', the chat text of the npc. So 'setcharprop #c,hello'&lt;br /&gt;
would be translated into&lt;br /&gt;
chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
while 'setplayerprop #c,hello' is translated into&lt;br /&gt;
player.chat = &amp;quot;hello&amp;quot;&lt;br /&gt;
In the list above both possibilities are listed.&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6687</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6687"/>
		<updated>2006-03-28T20:35:22Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Excaliber's Scripting Guide''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics, and I find other GS2 guides hard to follow.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First, I would like to quickly point out the 'if' statement. Some guides go into this a lot, but it's actually quite simple. The if statement is a very important part of scripting. It's what allows the NPC to make choices. The code withing the brackests of an if statement will only execute if the statement is true. Also, there is a catchall statement you can use, else. If the if statement is not true, the else will exectue it's script, other wise it is ignored. &lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.a=1;&lt;br /&gt;
}&lt;br /&gt;
if(this.a==1) &lt;br /&gt;
//always use '==' for comparasons, NEVER just '=' as '=' is for assignments&lt;br /&gt;
{&lt;br /&gt;
  this.b=2;&lt;br /&gt;
}&lt;br /&gt;
else if(this.a==2) //will only execute if first is false, AND this.a==2&lt;br /&gt;
{&lt;br /&gt;
  this.b=3;&lt;br /&gt;
}&lt;br /&gt;
else //catch all if above 2 statements are false&lt;br /&gt;
{&lt;br /&gt;
  this.b=4;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, in the above example, this.b will always be 2, however, it's the format that's important.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(statement)&lt;br /&gt;
else if(statement)&lt;br /&gt;
else if(statement //may be used many times&lt;br /&gt;
else //catch all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, back to serverside and clientside scripts:&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onTouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time+=1;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
Now, you may have noticed this line in the bad script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a 'for' loop. There are many types of loops, however the foor loop isn't the easiers to learn first. Therefore, I will show you the 'while loop' first.&lt;br /&gt;
The while loop executes whatever is held within it's brackets as lond as the statement within it is true. The while loop is just like an if statement, but you cannot use else with a with statement.&lt;br /&gt;
format:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
with(statments)&lt;br /&gt;
{&lt;br /&gt;
  //commands&lt;br /&gt;
}&lt;br /&gt;
//if statment is still true, it will loop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
here's a script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.size=10;&lt;br /&gt;
}&lt;br /&gt;
while(this.size&amp;lt;=20) //while this.size is less than or equal to 20&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
  //as the story is retold....&lt;br /&gt;
  sleep(.5);&lt;br /&gt;
  this.size=this.size+1;&lt;br /&gt;
  //increment the size&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script will run through the loop until this.size is equal or greater than 20.&lt;br /&gt;
Some important things to know:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if(a==b) means if a is equal to b&lt;br /&gt;
if(a&amp;lt;b) means if a is less than b&lt;br /&gt;
if(a&amp;gt;b) means if a is greater than b&lt;br /&gt;
if(a&amp;lt;=b) means if a is less than or equal to be&lt;br /&gt;
if(a&amp;gt;=b) means if a is greater than or equal to be&lt;br /&gt;
a++      is the same as a=a+1&lt;br /&gt;
a--      is the same as a=a-1&lt;br /&gt;
a+=b    means a=a+b&lt;br /&gt;
a-=b    means a=a-b&lt;br /&gt;
a*=b    means a=a*b (multiplied by b)&lt;br /&gt;
a/=b    means a=a/b&lt;br /&gt;
++a     is just like a, but it will add to a before anything else in the line, &lt;br /&gt;
         this is not important to know now&lt;br /&gt;
--a     just like ++a, but with subtraction&lt;br /&gt;
a%b     Modulus, basically, its a/b and th remainder is the output &lt;br /&gt;
        for example 10%3=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These may be helpfull in loops, or in any other ration expressios you may use. (Hell, it's important for all scripting!)&lt;br /&gt;
Now, recall this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  chat=&amp;quot;The fish was &amp;quot; @this.size@ &amp;quot; centimeters long!&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output for this is: The fish was (size here) centimeters long!&lt;br /&gt;
The script NEED to know where a variable is, so if you want to put it in between a string you surround it with the '@' symbol. Or if it's at the end, you only put the '@' at the beggining of the variable. The variable and the '@' do NOT go in the quotes. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  chat=&amp;quot;Well hi there, &amp;quot; @player.account@ &amp;quot; I like your sword, &amp;quot; @player.swordimg;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This would display the player's account, and sword image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6686</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6686"/>
		<updated>2006-03-28T16:29:28Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Excaliber's Scripting Guide''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onTouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
 //for loops, use this. it works only for this NPC&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time+=1;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6685</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6685"/>
		<updated>2006-03-28T16:27:51Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Excaliber's Scripting Guide''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onTouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++)&lt;br /&gt;
 //WHY use server for this???&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); &lt;br /&gt;
//WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(.05);&lt;br /&gt;
//will cause a loop through the timeout, sending action &lt;br /&gt;
//to serverside TOO quickly, AND while the server is &lt;br /&gt;
//still working on the last action. This WILL cause the &lt;br /&gt;
//server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
A better version:&lt;br /&gt;
&amp;lt;pre&amp;gt;function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  //setshape is needed for all level NPCs triggeractions&lt;br /&gt;
  //this setsit to a square of tiles 32 pix by 32 pix&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  server.time+=1;&lt;br /&gt;
  //no need for incredible accuracy&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;);&lt;br /&gt;
  settimer(1);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will execute the script less often, however, it still is an unlimited loop. Don't have too many of these NPCs, or you could have problems!&lt;br /&gt;
&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6684</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6684"/>
		<updated>2006-03-28T16:23:28Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Excaliber's Scripting Guide''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;This is a secure message!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onTouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    chat=&amp;quot;Yup, this is still secure, yay!&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea. &lt;br /&gt;
Serverisde timeouts=bad idea.&lt;br /&gt;
You shouldn't send to many actions to serverside, especially if you do so quickly. You should always limit the serverside timeouts, and the amount of time between actions to the server from client should be spaced out. Also, you should never have a timeout shorter than .05 on serverside, though it is possible, please do not do it. Dark Rival has had problems in the ast regarding serverside loops, however these have ben fixed.&lt;br /&gt;
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
}&lt;br /&gt;
function onActiontime()&lt;br /&gt;
{&lt;br /&gt;
  for(server.i=0;server.i&amp;lt;5;server.i++) //WHY use server for this???&lt;br /&gt;
  {&lt;br /&gt;
    sleep(.01); //WAY to short of a sleep time for the server&lt;br /&gt;
   }   &lt;br /&gt;
    server.time+=.1;&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  settimer(.05); //minimum clientside timeout&lt;br /&gt;
}&lt;br /&gt;
function onTimeout()&lt;br /&gt;
{&lt;br /&gt;
  trigegraction(x,y,&amp;quot;time&amp;quot;,&amp;quot;time&amp;quot;;&lt;br /&gt;
  settimer(.05);//will cause a loop through the timeout, sending action to serverside TOO quickly, AND while the server is still working on the last action. This WILL cause the server to crash.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!&lt;br /&gt;
&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6683</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6683"/>
		<updated>2006-03-28T16:14:31Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Excaliber's Scripting Guide''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
A secure script example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    //banking script for withdraw/depositing here&lt;br /&gt;
    //what, you expected a free script?&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
By putting the checks on serverside, you disable a hackers ability to send an action from their client. So, this script is much more secure, and can only be accessed by the specified account (Excaliber7388 in this case). Dark Rival does these checks serverside as well, but we also apply a different method, to avoid having too much serverside script time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  this.account=&amp;quot;Excaliber7388&amp;quot;;&lt;br /&gt;
  setshape 1,32,32;&lt;br /&gt;
  chat=&amp;quot;Excaliber's Chest&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
function onTouched()&lt;br /&gt;
{&lt;br /&gt;
  if(player.account==this.account)&lt;br /&gt;
  {&lt;br /&gt;
    //banking script for withdraw/depositing here&lt;br /&gt;
    //what, you expected a free script?&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  triggeraction(x,y,&amp;quot;Touched&amp;quot;,&amp;quot;Touched&amp;quot;;//no params needed&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This script will take up more time, but the playertouchsme check is clientside. Would this help much? Probably not, in fact, sending the action in this case would probably create more lag than having the script serverside. However, if a large portion of the script is serverside, and can be moved to clientside without risking security, it may be a good idea.&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6682</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6682"/>
		<updated>2006-03-28T16:05:40Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Excaliber's Scripting Guide''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//this is a note&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
*/&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function onCreated()&lt;br /&gt;
{&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
{&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6664</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6664"/>
		<updated>2006-03-24T16:29:23Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shape, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, pets, games, lotteries, casino games, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, lotery, pets, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Excaliber's Scripting Guide''' ==&lt;br /&gt;
I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics.&lt;br /&gt;
&lt;br /&gt;
Starting:&lt;br /&gt;
&lt;br /&gt;
Level NPCs:&lt;br /&gt;
&lt;br /&gt;
A level NPC is an npc that functions in a specific level. These are the most common on most servers. They are also a very important part of developement.&lt;br /&gt;
&lt;br /&gt;
A script:&lt;br /&gt;
&lt;br /&gt;
//this is a note&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
this is also a note, these help make scripts more clear&lt;br /&gt;
&lt;br /&gt;
this type of note can go on as longe as it's inclosed&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
//#CLIENTSIDE&lt;br /&gt;
&lt;br /&gt;
//This tells the computer that the following&lt;br /&gt;
&lt;br /&gt;
//script will be on the players client, &lt;br /&gt;
&lt;br /&gt;
//as opposed to the server, this is very important.&lt;br /&gt;
&lt;br /&gt;
function onPlayertouchesme()&lt;br /&gt;
&lt;br /&gt;
//this checks if the player has touched the NPC&lt;br /&gt;
&lt;br /&gt;
{ // starting bracket&lt;br /&gt;
&lt;br /&gt;
  message(&amp;quot;Hey!&amp;quot;); //displays a message above the NPC&lt;br /&gt;
&lt;br /&gt;
}//closing bracket&lt;br /&gt;
&lt;br /&gt;
The above script checks to see if the event, playertouchsme is true, then acts on what is in the bracket. It is important to include this clientside, because too many serverside scripts can cause problems for an NPC server, however thay are more secure. If you wanted to do the last script serverside, you would omit the //#CLIENTSIDE , and add the shape to the NPC:&lt;br /&gt;
&lt;br /&gt;
function onCreated()&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
  setshape(1,32,32);&lt;br /&gt;
&lt;br /&gt;
  setimg(&amp;quot;block.png&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//img can also be done in the box above the script&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
function onPlayertouchsme()&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
  message(&amp;quot;You made a serverside script!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary.&lt;br /&gt;
&lt;br /&gt;
I will add more over time.&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6658</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6658"/>
		<updated>2006-03-22T16:23:32Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shap, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, mini games, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Neu, (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6657</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6657"/>
		<updated>2006-03-22T13:11:34Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''How to become a good staff member''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shap, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, mini games, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Burning Ice, burningicic678 (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and become a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6656</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6656"/>
		<updated>2006-03-22T13:11:02Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Hiring!''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shap, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, mini games, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Burning Ice, burningicic678 (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
== '''How to become a good staff member'''==&lt;br /&gt;
ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [http://forums.graalonline.com]is a great place to do this.&lt;br /&gt;
The forums aren't just good for LATs, however, they provide help on scripting, ganis, and gfx. It's a great place to learn, and ebcome a part of the Graal community. I suggest to all current DR staff, and to all potential staff, to take advantage of the forums, Graal Bible, and any other resources they can find to become better developers. If you want to become an Events Team member, or a GP, I suggest asking other Events/GPs on multiple servers about their jobs, what they have to do, and how they became staff. Play on the server a lot, follow all the rules on that server, and play events. Really, this goes for all possitions as well. Get to know the server before you apply. Dark Rival, and the rest of Graal for that matter, is always looking for more developers, and more staff. It's not to hard to learn, so get a jump on it now! I hope to see you as staff on Dark Rival in the future!&lt;br /&gt;
-Excaliber Owner/Creator of Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6655</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6655"/>
		<updated>2006-03-22T13:05:08Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Play Now:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shap, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, mini games, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
Join in on the action!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Burning Ice, burningicic678 (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6654</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6654"/>
		<updated>2006-03-22T13:04:21Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Play Now:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shap, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, mini games, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Burning Ice, burningicic678 (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6653</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6653"/>
		<updated>2006-03-22T13:03:23Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld will be replaced by a larger one soon. It will have more of a square shap, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, mini games, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is much more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Burning Ice, burningicic678 (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6652</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6652"/>
		<updated>2006-03-22T13:02:26Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Jobs:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The currentoverworld will be replaced by a larger one soon. It will have more of a square shap, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, mini games, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Burning Ice, burningicic678 (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
&lt;br /&gt;
-Wood chopping&lt;br /&gt;
 &lt;br /&gt;
-Fighting&lt;br /&gt;
 &lt;br /&gt;
-Gardening&lt;br /&gt;
 &lt;br /&gt;
-Bounty Hunting&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6651</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6651"/>
		<updated>2006-03-22T13:01:34Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The currentoverworld will be replaced by a larger one soon. It will have more of a square shap, allowing players to roam Dark Rival a bit more. It will also have many more secrets than the current overworld. Eventually, there will be 3 active overworlds, for the three parts of the Dark Rival storyline. We are currently adding features to DR now. Including longer quests for rare items, more exclusive items and games, Auction House, marketplace, and more! There may be some small bugs, if you have any trouble, use the in game bug report system (found in the Player System weapon, under systems), or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
We are currently making the switch to GS2, and I have added new features that make use of this engine, including a better playersystem, better tailor system, and nore. Eventually, all of Dark Rival will take advantage of this new engine.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, and the server is now for V4 only (due to the growing number of GS2 scripts). We are also currently adding new weapons and features. Like a new larger quests, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, mini games, and more!&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having around 400 levels to well over 1000 now, and it's STILL growing! Dark Rival remains to be one of the fastest growing servers around! Dark Rival also has some of the most unique elements, including a storyline, weapons, and the general feel that Dark Rival brings to Graal. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. DR offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, and will soon be replaced by an even larger overworld. This is actually the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Burning Ice, burningicic678 (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Soon to come'''&lt;br /&gt;
-Wood chopping&lt;br /&gt;
-Fighting&lt;br /&gt;
-Gardening&lt;br /&gt;
-Bounty Hunting&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6631</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6631"/>
		<updated>2006-03-17T23:31:18Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Hiring!''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld of Dark Rival is nearly complete. (There will be 3). We are currently adding features to it now. Including longer quests for rare items, more exclusive items and games,Auction House and more! There may be some small bugs, if you have any trouble, use the in game bug report system, or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, made the server compatable for V4 and we are currently adding new weapons and features. Like a new large quest, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, and more! We are also working on becoming a GS2 only server. V2 and V4 are allowed to play here, however for the time being, V2 is suggested for full gameplay (for lighting effects, day/night, map, and gmap, use V2).&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having only 400+ levels to over 1000 now, and it's STILL growing! Dark Rival also has some of the most unique storyline, weapons, and general feel. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. It offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Burning Ice, burningicic678 (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6630</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6630"/>
		<updated>2006-03-17T23:30:54Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''Hiring!:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld of Dark Rival is nearly complete. (There will be 3). We are currently adding features to it now. Including longer quests for rare items, more exclusive items and games,Auction House and more! There may be some small bugs, if you have any trouble, use the in game bug report system, or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, made the server compatable for V4 and we are currently adding new weapons and features. Like a new large quest, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, and more! We are also working on becoming a GS2 only server. V2 and V4 are allowed to play here, however for the time being, V2 is suggested for full gameplay (for lighting effects, day/night, map, and gmap, use V2).&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having only 400+ levels to over 1000 now, and it's STILL growing! Dark Rival also has some of the most unique storyline, weapons, and general feel. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. It offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Burning Ice, burningicic678 (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalobnline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6629</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6629"/>
		<updated>2006-03-17T23:30:42Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld of Dark Rival is nearly complete. (There will be 3). We are currently adding features to it now. Including longer quests for rare items, more exclusive items and games,Auction House and more! There may be some small bugs, if you have any trouble, use the in game bug report system, or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, made the server compatable for V4 and we are currently adding new weapons and features. Like a new large quest, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, and more! We are also working on becoming a GS2 only server. V2 and V4 are allowed to play here, however for the time being, V2 is suggested for full gameplay (for lighting effects, day/night, map, and gmap, use V2).&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having only 400+ levels to over 1000 now, and it's STILL growing! Dark Rival also has some of the most unique storyline, weapons, and general feel. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. It offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
Burning Ice, burningicic678 (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Hiring!:''' ==&lt;br /&gt;
&lt;br /&gt;
We are hiring LATs, NATs, GATs, Events, and Gps.&lt;br /&gt;
The application is here: http://darkrivalobnline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
	<entry>
		<id>https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6583</id>
		<title>Worlds/Dark Rival</title>
		<link rel="alternate" type="text/html" href="https://graalonline.net/index.php?title=Worlds/Dark_Rival&amp;diff=6583"/>
		<updated>2006-03-14T02:42:01Z</updated>

		<summary type="html">&lt;p&gt;Excaliber7388: /* '''News:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png&lt;br /&gt;
&lt;br /&gt;
[[Image:main.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
The current overworld of Dark Rival is nearly complete. (There will be 3). We are currently adding features to it now. Including longer quests for rare items, more exclusive items and games,Auction House and more! There may be some small bugs, if you have any trouble, use the in game bug report system, or e-mail Excaliber (the owner) at excaliber7388@yahoo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''News:''' ==&lt;br /&gt;
[[Image:events_out.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
Dark Rival is trying out for the hosted tab. Wish us luck!&lt;br /&gt;
We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one.&lt;br /&gt;
NEW markets! Now players can sell or auction their items. have fun with it ^_^.&lt;br /&gt;
Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy!&lt;br /&gt;
The outfit viewer has now been added, please report any bugs you encounter.&lt;br /&gt;
We have recently added more events, made the server compatable for V4 and we are currently adding new weapons and features. Like a new large quest, rpg style weapons, telescope, CTF, lazer tag, mini games, 3D games and events, nations, instruments, RPG elements, and more! We are also working on becoming a GS2 only server. V2 and V4 are allowed to play here, however for the time being, V2 is suggested for full gameplay (for lighting effects, day/night, map, and gmap, use V2).&lt;br /&gt;
&lt;br /&gt;
== '''About:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival first went online July 27th 2005. From there it grew from having only 400+ levels to over 1000 now, and it's STILL growing! Dark Rival also has some of the most unique storyline, weapons, and general feel. RPG elements will also soon be added, in the prequel and sequel, as well as weapon skills in the current game. It offers plenty of jobs, skills, quests, and mysteries for the player to solve. It plays like a classic server, but is more complex. Dark Rival will continue to grow, hopefully, you can be a part of it!&lt;br /&gt;
[[Image:pic_darkrivalgui.png|thumb|center|175px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Story:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dark Rival is basically a three part story, played out on three different overworlds. So far, only one of these overworlds is near completion, the middle part of the story. You play as yourself in the first part, taking over for a hero who has disapeared. Then you enter a flashback, and play as the old hero, finding out more about the plot. Finally, you team up to defeat the 'Dark Rival' in the final part, introducing new ways of playing graal. After that, it's up to the players to see what direction Dark Rival will go in, as they have to 'rebuild' the world after Ceverous (the Dark Rival) is defeated, and there will be a power struggle for control of the world, as 2 nations fight for control. It's going to be a very realistic, time and player based server, and I hope you can be a part of it!&lt;br /&gt;
&lt;br /&gt;
== '''Play Now:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow this link to play Dark Rival now!&lt;br /&gt;
&lt;br /&gt;
graal://Dark Rival&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Website:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com&lt;br /&gt;
&lt;br /&gt;
'''Staff application (we need LATs NATs and GATs):'''&lt;br /&gt;
&lt;br /&gt;
http://darkrivalonline.tripod.com/id9.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current staff:''' ==&lt;br /&gt;
Admins:&lt;br /&gt;
&lt;br /&gt;
Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com&lt;br /&gt;
&lt;br /&gt;
336,Vima (Co/manager)&lt;br /&gt;
&lt;br /&gt;
SaCReD, Mrswhoopie (LAT Admin)&lt;br /&gt;
&lt;br /&gt;
Burning Ice, burningicic678 (Events Admin)&lt;br /&gt;
&lt;br /&gt;
Shad, xshadx (GP Chief)&lt;br /&gt;
&lt;br /&gt;
John, silverice (GAT Admin)&lt;br /&gt;
&lt;br /&gt;
Sam, lisia (FAQ Admin)&lt;br /&gt;
&lt;br /&gt;
== '''Jobs:''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Fishing'''&lt;br /&gt;
-fish using two different rods to earn money.&lt;br /&gt;
[[Image:fishing_pic.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Mining'''&lt;br /&gt;
-mine up loose rock, then search through the piles to find minerals&lt;br /&gt;
[[Image:pic_mining.png|thumb|left|150px]]&lt;br /&gt;
&lt;br /&gt;
'''Shoveling'''&lt;br /&gt;
-search the ground for money, this can only be done on soft grass&lt;br /&gt;
[[Image:shoveling_pic.png|thumb|right|150px]]&lt;/div&gt;</summary>
		<author><name>Excaliber7388</name></author>
	</entry>
</feed>