diff options
-rw-r--r-- | npc/001-13/main.txt | 15 | ||||
-rw-r--r-- | npc/commands/event.txt | 6 | ||||
-rw-r--r-- | npc/functions/event.txt | 1 |
3 files changed, 17 insertions, 5 deletions
diff --git a/npc/001-13/main.txt b/npc/001-13/main.txt index fe52bfbd5..cdb295ddf 100644 --- a/npc/001-13/main.txt +++ b/npc/001-13/main.txt @@ -5,6 +5,7 @@ // Controls boss raid showdown (Freeyorp Event System - Boss Raid) function script FYRaid_Select { + .@abort = getarg(0, false); if ($EVENT$ != "Raid") return; sleep2(100); // Anti-flood protection: Hold execution for 100ms mes l("Current Boss: %s", $RAIDING_BOSS$); @@ -35,6 +36,8 @@ function script FYRaid_Select { } } } + if (.@abort) + return; next; setarray .@opt$, l("Cancel"), -1; freeloop(true); @@ -197,8 +200,16 @@ OnClose: deltimer("sBossRaid::OnPump"); deltimer("sBossRaid::OnTimeout"); sleep2(500); - teleporthome(); - end; + if (@aurora_map$ != "" && @aurora_x && @aurora_y) { + warp @aurora_map$, @aurora_x, @aurora_y; + @aurora_map$=""; + @aurora_x=0; + @aurora_y=0; + } else { + teleporthome(); + } + FYRaid_Select(true); // Formally close the raid session + close; } 001-13 mapflag zone MMO diff --git a/npc/commands/event.txt b/npc/commands/event.txt index 969de4791..abf585f7a 100644 --- a/npc/commands/event.txt +++ b/npc/commands/event.txt @@ -551,9 +551,9 @@ OnEffect: if (.@id >= 0) { if ($FYRAID_TIME[.@id] > gettimetick(2) && $FYRAID_HP[.@id] > 0) { - teleporthome(); - dispbottom l("Talk to Soul Menhir to start."); - end; + getmapxy(@aurora_map$, @aurora_x, @aurora_y, 0); + callfunc("FYRaid_Select"); + close; } // Boss expired or already defeated - ignore } diff --git a/npc/functions/event.txt b/npc/functions/event.txt index bf4aab9a6..8ffbe6125 100644 --- a/npc/functions/event.txt +++ b/npc/functions/event.txt @@ -70,6 +70,7 @@ OnCleanUp: - script sDreamTower NPC_HIDDEN,{ OnWarpTo: if ($EVENT$ != "Tower") end; + if (!playerattached()) end; if (!countitem(EventDreamTicket)) end; // Reset progress |