Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-16-2006, 01:49 AM
Prozac Prozac is offline
one of the good guys
Prozac's Avatar
Join Date: Jan 2006
Posts: 245
Prozac is on a distinguished road
Send a message via AIM to Prozac
adding more player.variables

let's say i want to add another variable to the player
called player.foo
and the value of foo can be any string integer or array.

how would i go about doing this?
and doing this so that the new player attribute can only be modified
from a serverside command?

i imagine it's something about joining a class or a database npc,
could anyone please point me in the right direction?
Reply With Quote
  #2  
Old 04-16-2006, 02:21 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
What is wrong with clientr. and client. flags?
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #3  
Old 04-16-2006, 02:36 AM
Prozac Prozac is offline
one of the good guys
Prozac's Avatar
Join Date: Jan 2006
Posts: 245
Prozac is on a distinguished road
Send a message via AIM to Prozac
client. and clientr. flags could be altered by staff who have edit player attribute rights and if the staff go corrupt, they could change the client and clientr.values even without npc control to cheat or frame other players for cheating.

player.variables would not be changable with rc. for the kind of systems i want to script, i want to know how to make them as secure and hack-proof as i can... if you know the history of some graal playerworlds, i used to run Sanstrata, which aparently in some languages means "please hack me" and i have no desire to go through that hell again.
Reply With Quote
  #4  
Old 04-16-2006, 03:36 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
Take away edit attributes, problem solved.
clientr. is the most hack-proof you can get.

player. variables already exist, but they're just like a global variable attached to the player's client; any NPCs can read them from the clientside.
Or maybe they don't exist, so they take on the characteristics of a variable with no prefix. Who knows?
Reply With Quote
  #5  
Old 04-16-2006, 07:05 AM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
player.somevar are still shown in edit attributes, only they don't have a prefix. They are good for not being distributed to the client.
Reply With Quote
  #6  
Old 04-16-2006, 06:35 PM
Prozac Prozac is offline
one of the good guys
Prozac's Avatar
Join Date: Jan 2006
Posts: 245
Prozac is on a distinguished road
Send a message via AIM to Prozac
perhaps my post was not clear,
i want to create a new player.variable that can only be edited serverside, but read clientside or serverside.
Reply With Quote
  #7  
Old 04-16-2006, 09:47 PM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by Prozac
perhaps my post was not clear,
i want to create a new player.variable that can only be edited serverside, but read clientside or serverside.
And Rick was saying that player.variable will still appear in the flags of a player's attributes. So, you can create them, but they don't necessarily have the functionality that you want.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #8  
Old 04-17-2006, 11:53 AM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
Quote:
Originally Posted by Prozac
perhaps my post was not clear,
i want to create a new player.variable that can only be edited serverside, but read clientside or serverside.
player.clientr.variable is what you want.
Reply With Quote
  #9  
Old 04-17-2006, 04:47 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
I think there should be more flags to be read clientside tho.. like: player.kills / player.deaths somehow can't be read clientside....! Or inside
for ( i: players)
{
would i.clientr.somevar return nothing... sux cuz a lot of triggeractions to do it via serverside, back to clientside would cause lag.. O_o
}
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #10  
Old 04-17-2006, 08:32 PM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
Quote:
Originally Posted by contiga
I think there should be more flags to be read clientside tho.. like: player.kills / player.deaths somehow can't be read clientside....! Or inside
for ( i: players)
{
would i.clientr.somevar return nothing... sux cuz a lot of triggeractions to do it via serverside, back to clientside would cause lag.. O_o
}
clientr variables are not shared with other players.
Reply With Quote
  #11  
Old 04-18-2006, 01:13 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by Rick
clientr variables are not shared with other players.
Are client. variables shared? (Not in a position to test it right now).
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #12  
Old 04-18-2006, 01:59 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
Quote:
Originally Posted by napo_p2p
Are client. variables shared? (Not in a position to test it right now).
No.
Reply With Quote
  #13  
Old 04-19-2006, 04:12 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
The ability to create shared variables would be good.
Reply With Quote
  #14  
Old 04-19-2006, 05:19 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
Quote:
Originally Posted by jake13jake
The ability to create shared variables would be good.
attr[] works gewd.
I have my system hold every player's HP and MP percentage in attr[4], so other players can access it. :O
Reply With Quote
  #15  
Old 04-19-2006, 06:42 PM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Yen
attr[] works gewd.
I have my system hold every player's HP and MP percentage in attr[4], so other players can access it. :O
Yea, I have to store that a player is paused in an attr var, and also the player's spar rating.

I'm probably going to try to save all this inaccessible info into one attr var.
like

player.attr[4]= "rating="@player.rating@"/"@player.ratingd@",paused="@player.paused;

ALTHOUGH, it would be SOO much easier if you could just define public read-only flags in the serverops.

Last edited by jake13jake; 04-19-2006 at 06:56 PM..
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:18 PM.


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