public class 0900_Battleground_Commands extends Object
=============================== |0900.- Battleground commands.| ===============================
| 构造器和说明 |
|---|
0900_Battleground_Commands() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
areapercentheal()
areapercentheal "<map name>",<x1>,<y1>,<x2>,<y2>,<hp>,<sp>;
Restores a percentage of the maximum HP/SP of players within a defined area.
|
void |
bg_create()
bg_create("<map name>",<x>,<y>{,"<On Quit Event>","<On Death Event>"});
Creates an instance of battleground battle group that can be used with other battleground commands.
|
void |
bg_destroy()
bg_destroy <Batte Group>;
Destroys the Battle Group created for that battle ground.
|
void |
bg_get_data()
bg_get_data(<Battle Group>,<type>);
Retrieves data related to given Battle Group.
|
void |
bg_getareausers()
bg_getareausers(<Battle Group>,"<map name>",<x0>,<y0>,<x1>,<y1>);
Retrieves the amount of players belonging to the given Battle Group on the given
map within the specified rectangular area.
|
void |
bg_join()
bg_join(<battle group>,{"<map name>",{<x>,<y>{,<char id>}});
Adds an attached player or <char id> if specified to an existing battleground group.
|
void |
bg_leave()
bg_leave {<char_id>};
Removes attached player from their Battle Group.
|
void |
bg_monster_set_team()
bg_monster_set_team <GID>,<Battle Group>;
This command will change the allegiance if a monster in a battle ground.
|
void |
bg_monster()
bg_monster <Battle Group>,"<map name>",<x>,<y>,"<name to show>",<mob id>,"<event label>";
bg_monster(<Battle Group>,"<map name>",<x>,<y>,"<name to show>",<mob id>,"<event label>");
Similar to the 'monster' command.
|
void |
bg_team_setxy()
bg_team_setxy <Battle Group ID>,<x>,<y>;
Updates the respawn point of the given Battle Group to x,y on the same map.
|
void |
bg_updatescore()
bg_updatescore "<map name>",<Guillaume Score>,<Croix Score>;
This command will force the update of the displayed scoreboard.
|
void |
bg_warp()
bg_warp <Battle Group>,"<map name>",<x>,<y>;
Similar to the 'warp' command.
|
void |
waitingroom2bg_single()
waitingroom2bg_single(<battle group>,{"<map name>",<x>,<y>{,"<npc name>"}});
Adds the first waiting player from the chat room of the given NPC to an existing battleground group.
|
void |
waitingroom2bg()
waitingroom2bg("<map name>",<x>,<y>,{"<On Quit Event>","<On Death Event>"{,"<NPC Name>"}});
<map name>,<x>,<y> refer to where the "respawn" base is, where the player group will respawn when they die.
|
waitingroom2bg_single(<battle group>,{"<map name>",<x>,<y>{,"<npc name>"}});
Adds the first waiting player from the chat room of the given NPC to an existing battleground group.
The player will also be warped to the default spawn point of the battle group or to the specified coordinates <x> and <y> on the given <map>.
waitingroom2bg("<map name>",<x>,<y>,{"<On Quit Event>","<On Death Event>"{,"<NPC Name>"}});
<map name>,<x>,<y> refer to where the "respawn" base is, where the player group will respawn when they die.
<On Quit Event> refers to an NPC label that attaches to the character and is run when they relog. (Optional)
<On Death Event> refers to an NPC label that attaches to the character and is run when they die. (Optional)
If "-" is supplied for <map name> then the player will not automatically respawn after the 1 second delay.
This allows for better manipulation of <On Death Event>. The player will have to be warped to desired location
at the end of <On Death Event>.
Unlike the prior command, the latter will attach a GROUP in a waiting room to the battleground, and
sets the array $@arenamembers[0] where 0 holds the IDs of the first group, and 1 holds the IDs of the second.
If the optional NPC Name parameter is left out, the waiting room of the current NPC is used.
Example:
// Battle Group will be referred to as $@KvM01BG_id1, and when they die, respawn at bat_c01,52,129.
set $@KvM01BG_id1, waitingroom2bg("bat_c01",52,129,"KvM01_BG::OnGuillaumeQuit","KvM01_BG::OnGuillaumeDie");
end;
bg_create("<map name>",<x>,<y>{,"<On Quit Event>","<On Death Event>"});
Creates an instance of battleground battle group that can be used with other battleground commands.
<map name>,<x>,<y> refer to where the "respawn" base is, where the player group will respawn when they die.
<On Quit Event> refers to an NPC label that attaches to the character and is run when they relog. (Optional)
<On Death Event> refers to an NPC label that attaches to the character and is run when they die. (Optional)
If "-" is supplied for <map name> then the player will not automatically respawn after the 1 second delay.
This allows for better manipulation of <On Death Event>. The player will have to be warped to desired location
at the end of <On Death Event>.
Returns battle group ID on success. Returns 0 on failure.
bg_join(<battle group>,{"<map name>",{<x>,<y>{,<char id>}});
Adds an attached player or <char id> if specified to an existing battleground group. The player will also be warped to the default spawn point of the battle group or to the specified coordinates <x> and <y> on the given <map>.
Returns true on success. Returns false on failure.
bg_team_setxy <Battle Group ID>,<x>,<y>;
Updates the respawn point of the given Battle Group to x,y on the same map. <Battle Group ID> can be retrieved using getcharid(4).
Example:
bg_team_setxy getcharid(4),56,212;
mapannounce "bat_a01", "Group [1] has taken the work shop, and will now respawn there.",bc_map,"0xFFCE00";
end;
bg_warp <Battle Group>,"<map name>",<x>,<y>;
Similar to the 'warp' command.
Places all members of <Battle Group> at the specified map and coordinates.
Example:
//place the battle group one for Tierra Gorge at starting position.
bg_warp $@TierraBG1_id1,"bat_a01",352,342;
end;
bg_monster <Battle Group>,"<map name>",<x>,<y>,"<name to show>",<mob id>,"<event label>";
bg_monster(<Battle Group>,"<map name>",<x>,<y>,"<name to show>",<mob id>,"<event label>");
Similar to the 'monster' command.
Spawns a monster with allegiance to the given Battle Group.
Does not allow for the summoning of multiple monsters.
Monsters are similar to those in War of Emperium, in that the specified Battle Group is considered friendly.
Example:
// It can be used in two different ways.
bg_monster $@TierraBG1_id2,"bat_a01",167,50,"Food Depot",1910,"Feed Depot#1::OnMyMobDead";
end;
// Alternatively, you can set an ID for the monster using "set".
// This becomes useful when used with the command below.
set $@Guardian_3, bg_monster($@TierraBG1_id2,"bat_a01",268,204,"Guardian",1949,"NPCNAME::OnMyMobDead");
end;
bg_monster_set_team <GID>,<Battle Group>;
This command will change the allegiance if a monster in a battle ground.
GID can be set when spawning the monster via the 'bg_monster' command.
Example:
end;
OnEnable:
mapannounce "A guardian has been summoned for Battle Group 2!",bc_map,"0xFFCE00";
set $@Guardian, bg_monster($@BG_2,"bat_a01",268,204,"Guardian",1949,"NPCNAME::OnMyMobDead");
initnpctimer;
end;
OnTimer1000:
stopnpctimer;
mapannounce "Erm, sorry about that! This monster was meant for Battle Group 1.",bc_map,"0xFFCE00";
bg_monster_set_team $@Guardian, $@BG_1;
end;
bg_leave {<char_id>};
Removes attached player from their Battle Group.
bg_destroy <Batte Group>;
Destroys the Battle Group created for that battle ground.
areapercentheal "<map name>",<x1>,<y1>,<x2>,<y2>,<hp>,<sp>;
Restores a percentage of the maximum HP/SP of players within a defined area.
This is primarily used in battleground scripts, but is not limited to them.
Example:
areapercentheal "bat_a01",52,208,61,217,100,100;
end;
bg_get_data(<Battle Group>,<type>);
Retrieves data related to given Battle Group. Type can be one of the following:
0 - Amount of players currently belonging to the group.
1 - Store GID of players in <Battle Group> in a temporary global array $@arenamembers
and returns amount of players currently belonging to the group.
bg_getareausers(<Battle Group>,"<map name>",<x0>,<y0>,<x1>,<y1>);
Retrieves the amount of players belonging to the given Battle Group on the given
map within the specified rectangular area.
bg_updatescore "<map name>",<Guillaume Score>,<Croix Score>;
This command will force the update of the displayed scoreboard.
It is only usable when the map is defined as a Type 2 Battleground:
mapflag <map name> battleground 2
Copyright © 工程的初始时间(可选)–2019. All rights reserved.