diff options
Diffstat (limited to 'world/map/npc')
-rw-r--r-- | world/map/npc/009-7/battlemaster.txt | 2 | ||||
-rw-r--r-- | world/map/npc/009-7/core.txt | 11 | ||||
-rw-r--r-- | world/map/npc/009-7/debug.txt | 9 | ||||
-rw-r--r-- | world/map/npc/009-7/mapflags.txt | 1 | ||||
-rw-r--r-- | world/map/npc/functions/global_event_handler.txt | 1 |
5 files changed, 18 insertions, 6 deletions
diff --git a/world/map/npc/009-7/battlemaster.txt b/world/map/npc/009-7/battlemaster.txt index 33eb04d0..c7316913 100644 --- a/world/map/npc/009-7/battlemaster.txt +++ b/world/map/npc/009-7/battlemaster.txt @@ -58,7 +58,7 @@ function|script|fightclub_GoBack L_GoBack: set DUELS, DUELS &~ $@DuelPvpBit; warp "009-7", 39, 37; - gmcommand "@alive"; + heal MaxHp, MaxSp; message strcharinfo(0), "Thank you for participating!"; return; } diff --git a/world/map/npc/009-7/core.txt b/world/map/npc/009-7/core.txt index b8439b03..ccbec25a 100644 --- a/world/map/npc/009-7/core.txt +++ b/world/map/npc/009-7/core.txt @@ -235,9 +235,9 @@ function|script|fightclub_Victory function|script|fightclub_DestroyMe { set @Duel_Fighter, 0; + setpvpchannel @previous_channel; sc_end 132; sc_end 14; sc_end 37; sc_end 185; sc_end 194; sc_end 195; sc_end 196; sc_end 197; sc_end 198; sc_end 199; // remove effects - heal -Hp, 0; // doing @killer is unreliable - gmcommand "@alive"; // refill hp/mana + heal MaxHp, MaxSp; // refill hp/mana if(getmap() == "009-7") warp "009-7", rand($@fightclub_x1, $@fightclub_x2), rand(($@fightclub_y1 - 2), ($@fightclub_y1 - 3)); return; } @@ -303,6 +303,7 @@ function|script|fightclub_StartUp setarray $@Duel_Queue_Red$, ""; cleararray $@Duel_Queue_Red$, "", ($@Duel_QueueLimit + 1); set $@Duel_TotalTime, 0; + set $@Duel_Channel, 20; if($fightclub_enabled) set $fightclub_enabled, 0; // this var moved to $SANGUINE // DUELS flags below set $@DuelPvpBit, (1 << 1); @@ -435,7 +436,7 @@ function|script|fightclub_enter { set @Duel_Fighter, 1; warp "009-7", rand($@fightclub_x1,$@fightclub_x2), rand($@fightclub_y1,$@fightclub_y2); - gmcommand "@alive"; // ensure that you can't duel wih a corpse + heal MaxHp, MaxSp; // ensure that you can't duel wih a corpse sc_end 132; sc_end 14; sc_end 37; sc_end 185; sc_end 194; sc_end 195; sc_end 196; sc_end 197; sc_end 198; sc_end 199; // remove effects message strcharinfo(0), "Get Ready."; addtimer ($@Duel_TimeBeforeStart * 1000), "#FightClubUtils::OnBecomeKiller"; // call fightclub_enter_killer in 3 seconds @@ -445,8 +446,8 @@ function|script|fightclub_enter // ** called 3 seconds after a player enters the ring function|script|fightclub_enter_killer { - gmcommand "@killable"; - gmcommand "@killer"; // add both killable and killer so if one doesn't kick in, the other (hopefully) will + if(getpvpflag(0) != $@Duel_Channel) set @previous_channel, getpvpflag(0); + setpvpchannel $@Duel_Channel; message strcharinfo(0), "GO !"; return; } diff --git a/world/map/npc/009-7/debug.txt b/world/map/npc/009-7/debug.txt index f5283898..cd75a342 100644 --- a/world/map/npc/009-7/debug.txt +++ b/world/map/npc/009-7/debug.txt @@ -19,6 +19,7 @@ L_Menu: mes "##3$##0Duel_LastDuel: ##7" + $Duel_LastDuel + "##0"; mes "---"; mes "##2@##0Duel_Fighter: ##7" + @Duel_Fighter + "##0"; + mes "pvp channel: ##7" + getpvpflag(0) + "##0"; next; menu "toggle|Toggle $Duel_Enabled", L_DuelEnabled, @@ -31,6 +32,7 @@ L_Menu: "edit|Set $@Duel_PlayerQueueLimit", L_PlayerQueueLimit, "edit|Set $@Duel_PlayerQueueTimeOut", L_PlayerQueueTimeOut, "edit|Set $Duel_LastDuel", L_LastDuel, + "edit|Set pvp channel", L_Channel, "toggle|Toggle @Duel_Fighter", L_DuelFighter, "toggle|Toggle killer state", L_Killer, "toggle|Toggle killable state", L_Killable, @@ -127,6 +129,13 @@ L_LastDuel: next; goto L_Restart; +L_Channel: + mes "range: 0~32767"; + input @chn; + if(@last > 32767) goto L_OutOfRange; + setpvpchannel @chn; + goto L_Menu; + L_OutOfRange: mes "Value out of range or empty."; goto L_Menu; diff --git a/world/map/npc/009-7/mapflags.txt b/world/map/npc/009-7/mapflags.txt index 9fdd3a99..b0589894 100644 --- a/world/map/npc/009-7/mapflags.txt +++ b/world/map/npc/009-7/mapflags.txt @@ -1,2 +1,3 @@ 009-7|mapflag|noteleport 009-7|mapflag|monster_noteleport +009-7|mapflag|nopvp diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt index cf331060..45efcaae 100644 --- a/world/map/npc/functions/global_event_handler.txt +++ b/world/map/npc/functions/global_event_handler.txt @@ -39,5 +39,6 @@ L_Fightclub_Die: goto L_End; L_End: + if(getpvpflag(0) == $@Duel_Channel) setpvpflag @previous_channel; end; } |