diff options
Diffstat (limited to 'server/scripts/evol_script_commands.txt')
-rw-r--r-- | server/scripts/evol_script_commands.txt | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/server/scripts/evol_script_commands.txt b/server/scripts/evol_script_commands.txt index 2af03cb..9f5b57b 100644 --- a/server/scripts/evol_script_commands.txt +++ b/server/scripts/evol_script_commands.txt @@ -1009,3 +1009,82 @@ Return false if id is not instance id. Example: .instid = 1; mes(str(isinstance(.instid)); + + + + +--------------------------------------- +//===================================== +// TMW2 Custom Script Commands +//===================================== +--------------------------------------- + +*getguildinfo(<guild id>); + +Records in mapreg info about a guild. The array Index is the Guild ID. +This command is meant to be used in GvG setup, where you might need the data from +several guilds at once and it is better to have them saved to memory. + +Upon executing this, + +$@guildinfo_lvl[] is a global temporary array which contains the guild level + +$@guildinfo_avg[] is a global temporary array which contains the average player + level within a guild. + +$@guildinfo_exp[] says the current guild EXP. It's a hack and will be removed. + +$@guildinfo_nxp[] says the EXP needed to lvl up. It's a hack and will be removed. + +Returns 0 on failure. + +--------------------------------------- +*getguildlvl(<guild id>); +*getguildavg(<guild id>); +*getguildexp(<guild id>); +*getguildnxp(<guild id>); + +Basically the same as getguildinfo(), but doesn't saves to mapreg, instead, +returns the value. This is meant to be the most widely used by NPC scripts. + +Returns -1 on failure. + +--------------------------------------- + +*setguildrole(guild id, gpos id, gperm id, exp tax, role name); + +This does what ManaPlus will eventually feature, allowing to change a guild role. +All parameters are required. +--------------------------------------- + +*getguildmember(<guild id>{, <type>}); + +This command will find all members of a specified guild and returns their names +(or character id or account id depending on the value of "type") into an array +of temporary global variables. + +Upon executing this, + +$@guildmembername$[] is a global temporary string array which contains all the + names of these guild members. + (only set when type is 0 or not specified) + +$@guildmembercid[] is a global temporary number array which contains the + character id of these guild members. + (only set when type is 1) + +$@guildmemberaid[] is a global temporary number array which contains the + account id of these guild members. + (only set when type is 2) + +$@guildmembercount is the number of guild members that were found. + +$@guildmemberpos[] is the position ID of every member found. + +The guild members will be found regardless of whether they are online or offline. +Note that the names come in no particular order. + +Be sure to use $@guildmembercount to go through this array, and not +getarraysize(), because it is not cleared between runs of getguildmember(). + +For usage examples, see getpartymember(). |