Graal Forums  

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

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, 02:40 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Hrm, if you can't trust your staff not to delete all of a player's attributes, should that person really be staff on your server?
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #15  
Old 04-19-2006, 05:11 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
player.clientr.variable
thanks! i will try it out.

one of the downsides of the internet in general, and interactions with other people, is that there are no physical consequences to being a jackass.
of all the time's i've been a server admin or higher on graal in the past 5 years or more, of the 50 to 75 people that have been my staff, and of those who i thought i could trust with rw levels/* rights, about 25% of them turned out to suprise me by deleting levels and hacking whichever server it was.

So spread out having anything from your levels deleted, to your account locked out of a server that you paid for and the hacker refusing to give it back to you, essentially the bastard stealing your money (happened last year, issue was quckly resolved) thus over a half decade and up to 18 different people shocking you by becoming traitors and theives, and you learn to hold everyones actions under a magnifying glass and be quite stingy with what rights you give people.

so now i:
1. always make backups at least once a month
2. watch out for people who ask to be co-owner whom i never even hired or heard of
3. tend to ignore people who constantly ask to be staff, have submitted their work, and its not up to par, but they still ask, and they piss and moan about not being staff
4. give propper thanks to the staff i have and watch closely if they ask for more to do at their current staff level, or how often they ask for more rights weighed against how much they have shown themselves to be dedicated to the success of the server
5. check with the people on the servers that person who this person says they worked for and see what kind of fellow this applicant is
Reply With Quote
Reply


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 04:47 PM.


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