Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Server (https://forums.graalonline.com/forums/forumdisplay.php?f=14)
-   -   NPC Server Questions (https://forums.graalonline.com/forums/showthread.php?t=29340)

kittygirl765 05-17-2002 07:26 AM

NPC Server Questions
 
Okay, I need to ask a couple of npc server questions b/c i'm converting non p2p npcs to the npc server kinda server side scripts. I scripted for the npc server b4, but it was a way long time ago and i dont remember every detail about the differences between client/server side.

1) If I set a this.variable from the client side part of a script, will the server side part of the script be able to read what I wrote to it?

2) If I change an npc's x/y coordinates from client side, will the npc coordinates be changed globally?

3) Can client.strings be changed from client side?

4) Does triggeraction server side to client side work now?

Saga2001 05-17-2002 07:41 AM

Re: NPC Server Questions
 
1) If I set a this.variable from the client side part of a script, will the server side part of the script be able to read what I wrote to it?

yes.

2) If I change an npc's x/y coordinates from client side, will the npc coordinates be changed globally?

no you ave to change it serverside, use triggeraction.

3) Can client.strings be changed from client side?

yes

4) Does triggeraction server side to client side work now?

no

kittygirl765 05-17-2002 07:56 AM

thanx past austin =)

ohh, and can client side weapons read or change client.strings too?

Neonight 05-17-2002 08:04 AM

Quote:

Originally posted by kittygirl765
thanx past austin =)

ohh, and can client side weapons read or change client.strings too?


Jagen:
yes

Yakuna2001 05-18-2002 12:39 AM

Re: Re: NPC Server Questions
 
Quote:

Originally posted by Kaimetsu


No.



Doubtful. I don't think it'll even let you change them from the clientside.



Yep.



Hmm. Depends. Not to a specific client, but you can do a triggeraction on where they are and they'll get it.

i love how u gave an opposite answer to everything saga said nearly o_O :rolleyes:

Gohan43331 05-18-2002 12:51 AM

Quote:

Originally posted by kittygirl765
thanx past austin =)

ohh, and can client side weapons read or change client.strings too?

Another question on the other end of the spectrum:
Can client weapons access (read-only) server-string/vars?

screen_name 05-18-2002 01:11 AM

database npcs and level npcs are the only things able to edit server.strings

is this true?

Gohan43331 05-18-2002 03:27 AM

Quote:

Originally posted by Kaimetsu
serverr.strings / server.strings.
Utterly confused now...

For example: Client system checks a server-string for it's player's account name and if that player's account name is in that server string, it does something to the player... Which should I use? I would guess serverr but i've never heard of it...

Gohan43331 05-18-2002 04:14 AM

Danke ;D

*goes to fix the system*

screen_name 05-18-2002 06:17 AM

serverr.strings??

what in the world are these kai?

screen_name 05-18-2002 06:22 AM

well, hmmm


one more question


if you read from serverr.string, will it get the value from server.string??

or is the serverr.string a seperate string all together

screen_name 05-19-2002 01:34 AM

Quote:

Originally posted by Kaimetsu


It's a completely different string. There'd be no point if they were the same.

thanks

that helps a lot easier to access the time ;)

i wish i would've known about these earlier

kittygirl765 05-19-2002 10:50 PM

If I touched this npc that's on an npc server, would the message say "blah blah", or would it be blank? I really don't get what you mean by serverr.strings, and i nevcer heard of it =P, so i'm liek making a test thingy

NPC Code:

if(playerenters) {
setshape 1,32,32;
}
if(playertouchsme) {
setstring server.red,Blah Blah;
}
//#CLIENTSIDE
if(playerenters||timeout) {
message serverr.red;
timeout=0.05;
}


screen_name 05-20-2002 01:00 AM

try this

NPC Code:

if (created) {
setshape 1,32,32;
}
if (actionTest) {
setstring serverr.random,#v(int(random(10,101))/10);
}
//#CLIENTSIDE
if (playertouchsme) {
triggeraction x,y,Test;
message #v(serverr.random);
}


screen_name 05-20-2002 07:01 PM

true true, sorry didnt think about that

;)


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

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