summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/001-13/main.txt22
-rw-r--r--npc/functions/aurora.txt5
-rw-r--r--npc/functions/hub.txt4
3 files changed, 22 insertions, 9 deletions
diff --git a/npc/001-13/main.txt b/npc/001-13/main.txt
index eeb44d3c2..fe52bfbd5 100644
--- a/npc/001-13/main.txt
+++ b/npc/001-13/main.txt
@@ -21,12 +21,12 @@ function script FYRaid_Select {
getitem EventNaftalin, FYRAID_LV;
}
// Time is running out
- if (gettimetick(2) < $FYRAID_TIME[.@id]) {
+ else if (gettimetick(2) < $FYRAID_TIME[.@id]) {
mesc l("You found a Level %d %s!", FYRAID_LV, $RAIDING_BOSS$), 2;
mesc l("Time left: %s", FuzzyTime($FYRAID_TIME[.@id])), 1;
}
// Time has expired - free for next boss
- if (gettimetick(2) > $FYRAID_TIME[.@id]) {
+ else if (gettimetick(2) > $FYRAID_TIME[.@id]) {
mesc l("The boss you discovered has ran away!");
$FYRAID_LV[.@id] = 0;
$FYRAID_HP[.@id] = 0;
@@ -47,7 +47,7 @@ function script FYRaid_Select {
.@hp=$FYRAID_HP[.@i];
.@lv=$FYRAID_LV[.@i];
.@on=$FYRAID_OWNER[.@i];
- array_push(.@opt$, (.@on == getcharid(3) ? "##B" : "") + l("Level %d (%s HP) (Found by %s)", .@lv, .@hp, strcharinfo(0, l("offline player"), .@on)) + (.@on == getcharid(3) ? "##b" : ""));
+ array_push(.@opt$, (.@on == getcharid(3) ? "**" : "") + l("Level %d (%s HP) (Found by %s)", .@lv, .@hp, strcharinfo(0, l("offline player"), .@on)) + (.@on == getcharid(3) ? "**" : ""));
array_push(.@opt$, str(.@i));
}
freeloop(false);
@@ -76,7 +76,7 @@ function script FYRaid_Select {
instance_attachmap("001-13", .@inst, false, .@mp$);
// Recreate the boss
- .@lv = $FYRAID_HP[.@i];
+ .@lv = $FYRAID_LV[.@i];
.@mob=monster(.@mp$, 47, 33, $RAIDING_BOSS$, WanderingShadow, 1, "sBossRaid::OnBossDie");
setunitdata(.@mob, UDT_LEVEL, min(.@lv * 10, 200));
setunitdata(.@mob, UDT_STR, .@lv * 4);
@@ -173,13 +173,20 @@ OnTimeout:
.@new = getunitdata(@mb, UDT_HP);
goto OnClose;
+// What a noob, you died!
+OnDie:
+ dispbottom l("Killed in action!");
+ .@new = getunitdata(@mb, UDT_HP);
+ goto OnClose;
+
// Warp you back
OnClose:
.@old = $FYRAID_HP[@id];
- .@dmg = .@new - .@old;
+ .@dmg = .@old - .@new;
+ debugmes "Old %d New %d Damage %d", .@old, .@new, .@dmg;
// Damage Bonus
- if (.@dmg / 1000 > 1)
- getitem EventNaftalin, .@dmg / 1000;
+ if (.@dmg / 2000 > 1)
+ getitem EventNaftalin, .@dmg / 2000;
// Record new HP info and give you rewards
$FYRAID_HP[@id] = .@new;
@@ -188,6 +195,7 @@ OnClose:
// Send you back
deltimer("sBossRaid::OnPump");
+ deltimer("sBossRaid::OnTimeout");
sleep2(500);
teleporthome();
end;
diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt
index 03e5ce195..fe8139dfc 100644
--- a/npc/functions/aurora.txt
+++ b/npc/functions/aurora.txt
@@ -449,8 +449,9 @@ function script FYE_Raid {
// Never found a boss before, so assign some place for you
if (.@id < 0) {
- FYRAID_LV += 1;
- .@id=array_push($FYRAID_OWNER, getcharid(3));
+ FYRAID_LV = 1;
+ array_push($FYRAID_OWNER, getcharid(3));
+ .@id = array_find($FYRAID_OWNER, getcharid(3));
}
// Assign the boss stats
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index 57bcd915a..2839a8d64 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -215,6 +215,10 @@ function script HUB_Logout {
setq1 HurnscaldQuest_Sagratha, 3;
setq3 HurnscaldQuest_Sagratha, 0;
}
+ // Died or logged out during a Boss Raid event
+ if (compare(.@mapa$, "fyrb")) {
+ doevent "sBossRaid::OnDie";
+ }
// Died or logged out during Yeti King Fight
if (getq(HurnscaldQuest_Celestia) > 1)
setq HurnscaldQuest_Celestia, 1;