Creation/Dev/Clientside: Difference between revisions

From Graal Bible
No edit summary
(replacing outdated docu with new from Clientside article)
 
(7 intermediate revisions by 6 users not shown)
Line 1: Line 1:
'''IMPORANT MESSAGE TO UNIXMAD AND GRAALONLINE:'''
[[Category:Scripting Reference]]
==Intro==
Clientside scripts are done on your '''client'''. This means that clientside scripts do not cause server lag, but are also easily hackable. [[Serverside]] is the opposite, and is done on the [[NPC-Server]].


Aslong as the Playerworld Administration Team and the Global Scripting Team is still around, we will continue to attack Graal. After reading several threads about the two it seems the players agree with us on how they both are not needed and only cause problems for playerworlds. So aslong as those two global staff groups remain and the people in them, Graal will face an endless war that will harm itself.
==Variables==
Variables that can be set clientside (for the player) are variables that start with player.client. When scripting, the '''player.''' is not usually included. '''client.''' variables can be edited either [[Serverside]] or Clientside. Since these variables can be edited on Clientside, they can be changed using almost any memory editor.


We have put both of those in our demands for unixmad that we upload everytime we attack a server. JellyFish has also told unixmad that he will only leave graal if he gets rid of those 2 groups.
==Scripting==
Scripts run on Clientside happen '''only to the player'''. If you were to show an image on Clientside, it would not show up to other players (unless the index is below 200). The advantages of Clientside scripting are that there is no server lag, GUIs are possible ([[Creation/Dev/Script/Client/GuiControls_List|Gui Controls]] and showimg), and it applies to only one player (try writing a serverside system script).


- The Anti-Unixmad.com Team
==Example==
 
An example of a clientside script would start with '''//#CLIENTSIDE'''. The code follows this.
www.anti-unixmad.com
<pre>
//#CLIENTSIDE
function onCreated()
{
  player.chat = "This is a Clientside script!";
  callFunction();
}
function callFunction()
{
  say2( "Congratulations, you just called a function!" );
}
</pre>

Latest revision as of 10:17, 25 April 2010

Intro

Clientside scripts are done on your client. This means that clientside scripts do not cause server lag, but are also easily hackable. Serverside is the opposite, and is done on the NPC-Server.

Variables

Variables that can be set clientside (for the player) are variables that start with player.client. When scripting, the player. is not usually included. client. variables can be edited either Serverside or Clientside. Since these variables can be edited on Clientside, they can be changed using almost any memory editor.

Scripting

Scripts run on Clientside happen only to the player. If you were to show an image on Clientside, it would not show up to other players (unless the index is below 200). The advantages of Clientside scripting are that there is no server lag, GUIs are possible (Gui Controls and showimg), and it applies to only one player (try writing a serverside system script).

Example

An example of a clientside script would start with //#CLIENTSIDE. The code follows this.

//#CLIENTSIDE
function onCreated()
{
  player.chat = "This is a Clientside script!";
  callFunction();
}
function callFunction()
{
  say2( "Congratulations, you just called a function!" );
}