Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   make TServerPlayer vars read only (https://forums.graalonline.com/forums/showthread.php?t=134260502)

Mark Sir Link 09-10-2010 09:51 AM

make TServerPlayer vars read only
 
I think it might be highly beneficial to be able to allow a server to make the default TServerPlayer vars such as hearts, fullhearts, arrows, darts, AP, etc read only except for defined NPCs/Weapons/Classes.

Would then allow the server to make a class or something that players could be joined to to handle healing, adjusting arrows and stuff (which is personally preferable because doing so would allow easier changes to custom vars later on should defaults be replaced with something custom)

Would also allow for easier logging to weed out abusive scripts by logging time, level, player, and what called it via callstack

xAndrewx 09-10-2010 06:33 PM

I don't see the point? If you wanted you could do custom functions to represent the same thing (if that's what you're going for...)

HTML Code:

public function onHealPlayer(amount) {
  this.hearts += temp.amount;
  triggerclient("weapon", "weaponname", "updateHP", temp.amount);
}
public function onAddMoney(amount) {
  this.rupees += temp.amount;
  //yada
}


fowlplay4 09-10-2010 06:49 PM

Quote:

Originally Posted by xAndrewx (Post 1600015)
I don't see the point? If you wanted you could do custom functions to represent the same thing (if that's what you're going for...)

The 'major' point is to protect the server from rogue LATs and other malicious behavior by locking the modification of a variable to a certain script. So only your class script could make changes to it. Would also force the scripter to use a certain API instead of a direct call.

I'd personally want something like this to go even further and be able to lock variables like.. clientr.item.* and so on.

I.e:

protectedvariables=player.rupees,"playerfunctions_ money,-MoneySystem"

Mark Sir Link 09-10-2010 09:28 PM

Quote:

Originally Posted by xAndrewx (Post 1600015)
I don't see the point?

Quote:

Originally Posted by fowlplay4 (Post 1600017)
The 'major' point is to protect the server from rogue LATs and other malicious behavior by locking the modification of a variable to a certain script.

bingo, the thing about using functions is more of a secondary suggestion of mine that obviously that doesn't need to be handled by a change to the server or client, but that I feel would make sense for servers to start doing as a matter of convenience to themselves and any new scripters they may hire

xAndrewx 09-10-2010 09:31 PM

ahhh- makes sense. suppport++

thanks :)

MrOmega 09-11-2010 04:01 AM

Quote:

Originally Posted by fowlplay4 (Post 1600017)
The 'major' point is to protect the server from rogue LATs and other malicious behavior by locking the modification of a variable to a certain script. So only your class script could make changes to it. Would also force the scripter to use a certain API instead of a direct call.

I'd personally want something like this to go even further and be able to lock variables like.. clientr.item.* and so on.

I.e:

protectedvariables=player.rupees,"playerfunctions_ money,-MoneySystem"

Rogue Lats... Well, for one you should always maintain good contact and relation with all your staff. Secondly if your log everything properly you can find these rogue lats and ban them accordingly. I can see it be put into graal in the future, but really I see no point, just bad lazy staff.

12171217 09-11-2010 04:37 AM

Levels for guild houses should always be checked in a text editor before being uploaded; UN always has problems with stuff being uploaded due to thanks to lazy staff.

EDIT: I'll leave the typo, it's funny. I hate when people talk to me when I'm typing something on my phone, but I hate it even more when someone else has to halt our conversation to answer a text; so generally I try to split my conversation into two; and I'm pretty damn good at it. But not this time.

fowlplay4 09-11-2010 06:12 AM

Quote:

Originally Posted by MrOmega (Post 1600106)
Rogue Lats... Well, for one you should always maintain good contact and relation with all your staff. Secondly if your log everything properly you can find these rogue lats and ban them accordingly. I can see it be put into graal in the future, but really I see no point, just bad lazy staff.

Well yeah but it's a lot nicer/comforting to prevent something completely than to play damage control later should something slip through the cracks. It's also a lot easier to log one way out then multiple.

MrOmega 09-11-2010 09:04 AM

Quote:

Originally Posted by fowlplay4 (Post 1600128)
Well yeah but it's a lot nicer/comforting to prevent something completely than to play damage control later should something slip through the cracks. It's also a lot easier to log one way out then multiple.

Hmm I see some purpose now, still mainly a problem with lazy lats :p

xXziroXx 09-11-2010 02:34 PM

Quote:

Originally Posted by MrOmega (Post 1600106)
Rogue Lats... Well, for one you should always maintain good contact and relation with all your staff. Secondly if your log everything properly you can find these rogue lats and ban them accordingly. I can see it be put into graal in the future, but really I see no point, just bad lazy staff.

Quote:

Originally Posted by MrOmega (Post 1600147)
Hmm I see some purpose now, still mainly a problem with lazy lats :p

You can't ever have worked on a 100+ player server. Both Zodiac and Maloria had extremely huge issues with LAT's creating unlegit items simply by figuring out player flags etc. or asking former scripters and whatnot.

Mark Sir Link 09-11-2010 08:54 PM

I will probably post a generic class in the NPC Forum later that has functions for adjusting default player vars which will be a good starting point for anyone hoping to adopt such a system

Mark Sir Link 01-04-2011 08:09 AM

bump

cbk1994 01-04-2011 12:29 PM

As a former Era manager, this would have been extremely useful.

Inverness 01-04-2011 05:47 PM

Fear tactics might be useful in this case too. Notify all LATs that any abuse like what you're talking about would result in an immediate and permanent ban.

Fulg0reSama 01-04-2011 06:12 PM

Quote:

Originally Posted by Inverness (Post 1620298)
Fear tactics might be useful in this case too. Notify all LATs that any abuse like what you're talking about would result in an immediate and permanent ban.

If you think about it a little bit you'll realize maybe this will work on approximately 40% of those who follow like sheeps, About 30% will question the random proclaimation and 30% will ignore it.

It's a good start but it may need a little more constructiong upon before actually wanting to use this as an idea :S


All times are GMT +2. The time now is 02:43 PM.

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