Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Getting rights from global guilds? (https://forums.graalonline.com/forums/showthread.php?t=134264479)

Cubical 09-05-2011 01:31 AM

Getting rights from global guilds?
 
Is it possible to see what rights and rank people have in global guilds?

Admins 09-05-2011 02:24 AM

Hmmm it could be possible to add some sendtext/onReceiveText thing for that, would need what exactly you need (like a function prototype)

Mark Sir Link 09-05-2011 03:06 AM

if you're going so far as to ask for a function prototype, would be neat to have

TServerPlayer.isInGuild(str) - return boolean
TServerPlayer.getGuildRank() - return int for current guild
TServerPlayer.getGuildRankName() - return string for current guild
TServerPlayer.getGuildNick() - return string for current guild

being able to retrieve rights seems a bit dubious unless functions or sendtext functionality is added to allow for players to add guild members from within the game but exposing that seems sort of dangerous

cbk1994 09-05-2011 03:16 AM

Quote:

Originally Posted by Mark Sir Link (Post 1667082)
TServerPlayer.getGuildRank() - return int for current guild
TServerPlayer.getGuildRankName() - return string for current guild
TServerPlayer.getGuildNick() - return string for current guild

Why for the current guild? Why not just have them accept the guild as a parameter?

Also,

TServerPlayer.getGuilds() - returns array of the names of the player's guilds

DustyPorViva 09-05-2011 03:22 AM

Quote:

Originally Posted by Mark Sir Link (Post 1667082)
TServerPlayer.isInGuild(str) - return boolean
TServerPlayer.getGuildRank() - return int for current guild
TServerPlayer.getGuildRankName() - return string for current guild
TServerPlayer.getGuildNick() - return string for current guild
s

These already exist in sendtext() form I think. You'd have to do a little searching though.

Mark Sir Link 09-05-2011 03:43 AM

Quote:

Originally Posted by cbk1994 (Post 1667084)
Why for the current guild? Why not just have them accept the guild as a parameter?

Also,

TServerPlayer.getGuilds() - returns array of the names of the player's guilds

I was thinking the same thing but ideally would like it if it defaulted to the current guild if the parameter is null.

@Dusty, I think those all exist in the sendtext("lister", "checkinguild") return, but as far as getting rank goes, you can only get the integer rank value and not the string name for it.

IE,
PHP Code:

sendText("lister""checkinguild", {"Mark Sir Link""Azite"}); 

returns
PHP Code:

"Mark Sir Link",Azite,Kevin,10 


Mark Sir Link 09-05-2011 07:45 AM

Also, on the topic of adding things to gettext/sendtext/onreceivetext, can an event be added for script updates similar to onLevelFileUpdated?

In lieu of being able to explicitly state what scripts can execute what commands, this would be useful at the least for detecting any sort of behavior that servers might want to prevent


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

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