Worlds/Dark Rival: Difference between revisions

From Graal Bible
Line 125: Line 125:
   if(player.account==this.account)
   if(player.account==this.account)
   {
   {
     //banking script for withdraw/depositing here
     chat="This is a secure message!";
    //what, you expected a free script?
   }
   }
}
}
Line 142: Line 141:
   if(player.account==this.account)
   if(player.account==this.account)
   {
   {
     //banking script for withdraw/depositing here
     chat="Yup, this is still secure, yay!";
    //what, you expected a free script?
   }
   }
}
}
Line 152: Line 150:
}
}
</pre>
</pre>
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.
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.  
Serverisde timeouts=bad idea.
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.
Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:
<pre>
function onCreated()
{
  setshape 1,32,32;
}
function onActiontime()
{
  for(server.i=0;server.i<5;server.i++) //WHY use server for this???
  {
    sleep(.01); //WAY to short of a sleep time for the server
  } 
    server.time+=.1;
}
//#CLIENTSIDE
function onCreated()
{
  settimer(.05); //minimum clientside timeout
}
function onTimeout()
{
  trigegraction(x,y,"time","time";
  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.
}
</pre>
If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!
 
I will add more over time.
I will add more over time.



Revision as of 12:23, 28 March 2006

http://img208.imageshack.us/img208/7503/darkrivalnamething5gd.png

Main.png

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


News:

Events out.png

Dark Rival is trying out for the hosted tab. Wish us luck! We're currently working on a new overworld/gmap. It will be bigger and better looking than the last one. 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. NEW markets! Now players can sell or auction their items. have fun with it ^_^. Now there are 3 different 'camera' modes, chase, 'player' and the normal one. Enjoy! The outfit viewer has now been added, please report any bugs you encounter. 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!

About:

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!

Pic darkrivalgui.png


Story:

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!

Play Now:

Follow this link to play Dark Rival now!

Join in on the action!

graal://Dark Rival

Website:

http://darkrivalonline.tripod.com

Staff application (we need LATs NATs and GATs):

http://darkrivalonline.tripod.com/id9.html


Current staff:

Admins:

Excaliber, Excaliber7388 (Owner/Manager): excaliber7388@yahoo.com

336,Vima (Co/manager)

Neu, (Events Admin)

Shad, xshadx (GP Chief)

John, silverice (GAT Admin)

Sam, lisia (FAQ Admin)

Hiring!

We are hiring LATs, NATs, GATs, Events, and Gps. The application is here: http://darkrivalonline.tripod.com/id9.html

How to become a good staff member

ALWAYS practice your skills. If yo're an LAT, look at levels other players have made the Graal forums, [1]is a great place to do this. 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! -Excaliber Owner/Creator of Dark Rival

Excaliber's Scripting Guide

I'm hoping this allows people to learn how to script a bit easier, I believe all staff should know some scripting basics.

Starting:

Level NPCs:

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.

A script:

//this is a note
/*

this is also a note, these help make scripts more clear
this type of note can go on as longe as it's inclosed
*/
//#CLIENTSIDE
//This tells the computer that the following
//script will be on the players client, 
//as opposed to the server, this is very important.
function onPlayertouchesme()
//this checks if the player has touched the NPC
{ // starting bracket
  message("Hey!"); //displays a message above the NPC
}//closing bracket

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:

function onCreated()
{
  setshape(1,32,32);
  setimg("block.png");
//img can also be done in the box above the script
}
function onPlayertouchsme()
{
  message("You made a serverside script!");
}

This takes a bit longer than clientside commands, and it takes up serverside script time, however, for secure actions, it may be necessary. A secure script example:

function onCreated()
{
  this.account="Excaliber7388";
  setshape 1,32,32;
  chat="Excaliber's Chest";
}
function onPlayertouchsme()
{
  if(player.account==this.account)
  {
    chat="This is a secure message!";
  }
}

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:

function onCreated()
{
  this.account="Excaliber7388";
  setshape 1,32,32;
  chat="Excaliber's Chest";
}
function onTouched()
{
  if(player.account==this.account)
  {
    chat="Yup, this is still secure, yay!";
  }
}
//#CLIENTSIDE
function onPlayertouchsme()
{
  triggeraction(x,y,"Touched","Touched";//no params needed
}

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. Serverisde timeouts=bad idea. 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. Here are two examples of serverside scripts, the first it [b]VERY[/b] bad, the second is more productive:

function onCreated()
{
  setshape 1,32,32;
}
function onActiontime()
{
  for(server.i=0;server.i<5;server.i++) //WHY use server for this???
  {
    sleep(.01); //WAY to short of a sleep time for the server
   }   
    server.time+=.1;
}
//#CLIENTSIDE
function onCreated()
{
  settimer(.05); //minimum clientside timeout
}
function onTimeout()
{
  trigegraction(x,y,"time","time";
  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.
}

If you put the above script on a server, say goodbye to your NPC server, because it will crach pretty quickly!

I will add more over time.

Jobs:

Fishing -fish using two different rods to earn money.

Fishing pic.png

Mining -mine up loose rock, then search through the piles to find minerals

Pic mining.png

Shoveling -search the ground for money, this can only be done on soft grass

Shoveling pic.png

Soon to come

-Wood chopping

-Fighting

-Gardening

-Bounty Hunting