summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-01-25 23:00:41 -0300
committerJesusaves <cpntb1@ymail.com>2022-01-25 23:00:41 -0300
commit799907c78c0cc894229ee6eb2e14b694cb6b030d (patch)
tree2a72a995985aef90d9cd9e3990c9efb3a066a49e
parent60d280005b0624eb594bbfc07022442f03f7c71f (diff)
downloadserverdata-799907c78c0cc894229ee6eb2e14b694cb6b030d.tar.gz
serverdata-799907c78c0cc894229ee6eb2e14b694cb6b030d.tar.bz2
serverdata-799907c78c0cc894229ee6eb2e14b694cb6b030d.tar.xz
serverdata-799907c78c0cc894229ee6eb2e14b694cb6b030d.zip
Improve a bit boss raid by polishing the rough edges at Soul Menhir code
-rw-r--r--npc/001-13/main.txt15
-rw-r--r--npc/commands/event.txt6
-rw-r--r--npc/functions/event.txt1
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