Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Online script behavior and how strings work online (https://forums.graalonline.com/forums/showthread.php?t=11757)

dragoonvenganc 09-13-2001 10:21 AM

Online script behavior and how strings work online
 
Ok is there a turorial or someone nice enough to expalain how strings and variables work online and about client side stuff.

Example if i set a string to a persons account and set it to 20 and then set the same string to some one else where it them equals 15..
would it change the first one to 15.. or are they completely seperate from each other...
say i set a string to like setstring houseower,dragoonvengance
when the owner changed owners.. would this only affect the owner and there fore everytime someone entered i would have to setstring for them so it would work for them and be equal to dragoonvenganc

and also.. ahh if you are going to help me thank you

Ok if someone enters a level and done something then a timeout is set say to 200 they leave the level.. and then come back in before the timeout would of reached 0.. is it still couting down.. and keeping track of timeout even if noone is on the level like all the script is thinking when no one is on the level..

this is all online i am talking about

thank u

Dragoon Vengance

Falcor 09-14-2001 02:23 AM

Re: Online script behavior and how strings work online
 
Quote:

Originally posted by dragoonvenganc
Ok is there a turorial or someone nice enough to expalain how strings and variables work online and about client side stuff.

Example if i set a string to a persons account and set it to 20 and then set the same string to some one else where it them equals 15..

Serverside actions that edit clinetside stuff direct there actions at the current player. Or whoever is triggering the action to take place unless told otherwise.

Quote:

Ok if someone enters a level and done something then a timeout is set say to 200 they leave the level.. and then come back in before the timeout would of reached 0.. is it still couting down.. and keeping track of timeout even if noone is on the level like all the script is thinking when no one is on the level..
On a server without NPCs Server. the timeout stops (asumingly) and the script freezes (pruseumably).
i havnt really been around non-p2p scripts in a long time so its hard to sayh how the NPC reacts when there is no one there but im pretty sure the script freezes where it is.

On an NPC server howerver thre need not be any player online or in the level for that matter since NPCs server is that "
"Person" persay that is everywhere and yet nowhere allowing the NPCs to do supertasic things like WARP and Run Server-side or Clinetside and things of the like.

dragoonvenganc 09-14-2001 09:31 AM

Thanx
 
Ok i understand the second part thanx.. but the first one let me refraze it.

I think this is how action thing works..
ok if you do not specify . server or client side..
does it go auto to client side.. or server.. and

Some one trigers action and it sets a string and its client side only they have that string... and if some one elses trigers action and it checks to see if they have that string they will not unless they are the person that has that string .. am i right

Like you set a player house owner.. that string will have to be server side right.. and what are the commands for server and client side variables

like
//#clientside.. makes all following script client side right
and
//#serverside ... makes it server side.. right

and not sure but..
does this just make the variable and not the script what ever
like.. setstring client.hello,yes; only the trigger has this string right

and setstring server.hello,yes; everyone will have right...
lol lots of questions

and for server side you do not have to have npc server right

Falcor 09-15-2001 02:20 AM

Re: Thanx
 
Woaw... That just blew my mind....

there is no //#SERVERSIDE command

But like take your time and rephrase what you said its confusing to my widdle bwain

dragoonvenganc 09-19-2001 09:03 PM

Ok sorry..

i think i know now.. but is there server side when you do not have npc server..

and

if not specified.. is the script serverside or client.. side..

how do you make some thing serverside
server.variblename

is that how...

dragoonvenganc 09-20-2001 09:10 PM

Please anyone
 
Please anyone answer.. possible faldor.. thanx alot ...

dragoonvenganc 09-21-2001 08:41 PM

:( Can some one please answer..:(

BocoC 09-21-2001 08:50 PM

I really couldn't understand that, but I will give it a go.
Non-npcserver PW's are entirely clientside-like
If not specified, I think it goes into the player's account.

I might be wrong on this, but I think that by specifying a string client.whatever, the string goes to the client and they can modify it clientside. Not sure though. I dun really understand client.strings and normal strings.

Triggeraction only works on the player it triggers.

Also, when you //#CLIENTSIDE a script, the following piece of script is only sent to the player. Everything that happens after a //#CLIENTSIDE command is NOT sent back to the server, so any variable changes, (except client.strings, I think) aren't sent back to the server, nor are any npc re-positions (npc movements) or actions. Basically, if you //#CLIENTSIDE an npc, and tell it to change it's X and Y, only you will see the X and Y change, not anybody else, because the npc didn't send it's new coordinates back to the server.

I hope that big mess helped in any way.

dragoonvenganc 09-21-2001 08:56 PM

Ok..
 
So if you do not have a npc server.
Everything is client side.


With no npc server... is there anyway to do. um
if (playersays(set price 33) && strequals(#s(client.job),Lumberjack){setstring server.lumberprice,33}

is there anyway to give this to everybody

that is not exact script that is just a 5 second me typing an example..

dragoonvenganc 09-24-2001 09:27 AM

Please i tried to simpifly it..


All times are GMT +2. The time now is 10:34 PM.

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