UID5612
阅读权限110
威望 点
积分8947
注册时间2010-6-27
最后登录1970-1-1
听众
收听
升级
  100%
|
发表于 2010-7-4 15:46:54
|
显示全部楼层
---------------------------------------
\\
2,2.- Guild-related commands
\\
---------------------------------------
*getguildname(<guild id>)
This function returns a guild's name given an ID number. If there is no such
guild, "null" will be returned;
// Would print what ever guild 10007 is, in my case this would return "AlcoROhics"
mes "The guild "+GetGuildName(10007)+" are all nice people.";
// This will do the same as above:
set @var,10007;
mes "We have some friends in "+GetGuildName(@var)+", you know.";
This is used all over the WoE controlling scripts. You could also use it for a
guild-based event.
---------------------------------------
*getguildmaster(<guild id>)
This function return the name of the master of the guild which has the specified
ID number. If there is no such guild, "null" will be returned.
// Would return the guild master of guild 10007, whatever that might be.
// In this example it would return "MissDjax" cause she owns "AlcoROhics" (10007)
mes getguildmaster(10007)+" runs "+getguildname(10007);
Can be used to check if the character is the guildmaster of the specified guild.
Maybe you want to make a room only guildmasters can enter:
set @GID,getcharid(2);
if(@GID==0) goto L_NoGuild;
if(strcharinfo(0)==getguildmaster(@GID)) goto L_GuildMaster;
mes "Sorry you don't own the guild you are in";
close;
L_NoGuild:
mes "Sorry you are not in a guild";
close;
L_GuildMaster:
mes "Welcome guild master of "+GetGuildName(@GID);
close;
---------------------------------------
*getguildmasterid(<guild id>)
This function will return the character ID number of the guildmaster of the
guild specified by the ID. 0 if the character is not a guildmaster of any guild.
---------------------------------------
*getcastlename("<map name>")
This function returns the name of the castle when given the map name for that
castle. The data is read from 'db/castle_db.txt'.
---------------------------------------
*getcastledata("<map name>",<type of data>)
*setcastledata "<map name>",<type of data>,<value>;
This function returns the castle ownership information for the castle referred
to by it's map name. Castle information stored in 'save\castle.txt' for the TXT
version of the server and in 'guild_castle' table for the SQL version.
Valid types of data are:
0 - Will make the map server request the castle data from the char server, and
always return 0. This, apparently, will also cause indirectly the execution
of an 'OnAgitInit:' event mentioned at the beginning of this document.
1 - Guild ID
2 - Castle Economy score.
3 - Castle Defence score.
4 - Number of times the economy was invested in today.
5 - Number of times the defence was invested in today.
9 - Will return 1 if a Kafra was hired for this castle, 0 otherwise.
10 - Is 1 if the 1st guardian is present (Soldier Guardian)
11 - Is 1 if the 2nd guardian is present (Soldier Guardian)
12 - Is 1 if the 3rd guardian is present (Soldier Guardian)
13 - Is 1 if the 4th guardian is present (Archer Guardian)
14 - Is 1 if the 5th guardian is present (Archer Guardian)
15 - Is 1 if the 6th guardian is present (Knight Guardian)
16 - Is 1 if the 7th guardian is present (Knight Guardian)
17 - Is 1 if the 8th guardian is present (Knight Guardian)
18-25 types of data will return current hit point values for guardians 1-8
respectively.
The 'setcastledata' command will behave identically, but instead of returning
values for the specified types of accessible data, it will alter them and cause
them to be sent to the char server for storage. Data type of 0 won't do
anything, obviously.
---------------------------------------
*getgdskilllv(<guild id>,<skill id>)
*getgdskilllv(<guild id>,"<skill name>")
This function returns the level of the skill <skill id> of the guild <guild id>.
If the guild does not have that skill, 0 is returned.
If the guild does not exist, -1 is returned.
Refer to 'db/skill_db.txt' for the full list of skills. (GD_* are guild skills)
---------------------------------------
*requestguildinfo <guild id>,"<event label>";
This command requests the guild data from the char server and merrily continues
with the execution. Whenever the guild information becomes available (which
happens instantly if the guild information is already in memory, or later, if it
isn't and the map server has to wait for the char server to reply) it will run
the specified event as in a 'doevent' call.
---------------------------------------
*getmapguildusers <mapname>,<guild id>;
Returns the amount of persons from the given guild that are on the given map.
Example(s):
//Will set the @persons variable to the amount of persons from the guild
//which ID's = 10 and are at prontera.
set @persons,getMapGuildUsers "prontera",10;
---------------------------------------
//
2,2.- End of guild-related commands
//
---------------------------------------
似乎没有....requestguildinfo不知道有没有那个... |
|