Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-17-2011, 01:16 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Mark Sir Link View Post
in the onActionServerside portion of the script you should be verifying that the player who sent the trigger is actually someone you expect it to be, IE

if(player.account in serveroptions.staff.tokenize(","))
You should check player.communityname, not player.account, since for some reason Stefan decided that the new accounts have to have their community name in the staff list.
__________________
Reply With Quote
  #2  
Old 08-17-2011, 01:52 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by cbk1994 View Post
You should check player.communityname, not player.account, since for some reason Stefan decided that the new accounts have to have their community name in the staff list.
Would it be practical to check for both?
__________________
Reply With Quote
  #3  
Old 08-17-2011, 03:37 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by Emera View Post
Would it be practical to check for both?
maybe since servers mostly still have the accounts.
PHP Code:
if(player.account in serveroptions.staff.tokenize(",") || player.communityname in serveroptions.staff.tokenize(",")) 
__________________
MEEP!
Reply With Quote
  #4  
Old 08-17-2011, 07:19 PM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
Quote:
Originally Posted by callimuc View Post
maybe since servers mostly still have the accounts.
PHP Code:
if(player.account in serveroptions.staff.tokenize(",") || player.communityname in serveroptions.staff.tokenize(",")) 
the only time a communityname wouldn't return the proper value (I think this is still the case) is if a new Graal####### account hasn't set a community name.

I guess you could do

if( ((player.communityname.length() > 0) ? player.communityname : player.account) in severoptions.staff.tokenize(","))

to prevent incorrectly formatted staff lists that might have an empty value somewhere from returning true for players that haven't set their community name.
Reply With Quote
  #5  
Old 08-17-2011, 09:40 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Emera View Post
Would it be practical to check for both?
There's no reason to. All you really need to check for is the community name. Players with old accounts will have their account as their community name.
__________________
Reply With Quote
  #6  
Old 08-17-2011, 09:53 PM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
Quote:
Originally Posted by cbk1994 View Post
There's no reason to. All you really need to check for is the community name. Players with old accounts will have their account as their community name.
on Unholy Nation I was checking exclusively for community names and stumbled into the same problem I posted about with an improperly formatted staff list.

Granted, I couldn't actually find any instances of an empty entry in the array but it was still returning true when I checked player.communityname in the array.

each array member -

PHP Code:
[Manager]
Absolut_Crono
[Admin]
Flares
[Dev_Admin]
Mark Sir Link
KevDoh
[NAT_Admin]
[
Scripting_Team]
Toxen
Deas_Voice
devilsknite1
MysticalDragon
thatdwarf
ApothiX
Hezzy002
Switch
zeldaguardian
[Graphics]
Blazeik
JeffNightVale
[Levels_Admin]
shyguy2
[Levels_Team]
javierkid
Dr_Doctor
Hostility
27Chris1
snoop413
HolySerenity
[FAQ]
Kamakaze
Samurai_X2689
Dread
ranmalrac1
Hosaun
[Gani_Team]
dark_mater_s
[Events_Team]
Jello
Elite3
four_swords
Unknown_Prophecy
KaidaChan
warcraft1111
maxi123
GracefulCharity
BrutaL
Timez
Battousai90290
larenaz19
babyx
[Graal_Police]
CertifiedGangsta252
Okilian
dubby230
nightslayer317
Hiro
taylor
ssgohan87
MooseInATree
weeway
[Developer]
Bane
SwimChao
Gamerkid7
[SFX]
[
Uploader]
Door
[Unholy_Radio]
[
The_Man]
_Zelph
[ET_Dev_Admin]
Starfire2001
[ET_Dev]
Akios
[Global]
Skyld
[ENDSTAFF
Reply With Quote
  #7  
Old 08-17-2011, 10:19 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Mark Sir Link View Post
on Unholy Nation I was checking exclusively for community names and stumbled into the same problem I posted about with an improperly formatted staff list.

Granted, I couldn't actually find any instances of an empty entry in the array but it was still returning true when I checked player.communityname in the array.
Good point. I wish Stefan would just fix community names.
__________________
Reply With Quote
  #8  
Old 08-17-2011, 11:23 PM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
Quote:
Originally Posted by cbk1994 View Post
Good point. I wish Stefan would just fix community names.
I guess servers could try to force it on players by disconnecting them if their community name is null and using the shared admin function thing but I doubt Stefan would approve or appreciate it.

I didn't even think it would be problematic initially until all of a sudden I see RC get flooded with players warning each other.
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:49 PM.


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