summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-09-24 14:00:07 -0300
committerJesusaves <cpntb1@ymail.com>2021-09-24 14:00:07 -0300
commit5f016bfc703ccb139b80b6f82e966c9d5be670ec (patch)
tree5845fe95302361bee7cd8c8f49ab66e30f316c16 /npc
parentfd1fa65e17bef8c4c79264054a664d768bb870ab (diff)
downloadserverdata-5f016bfc703ccb139b80b6f82e966c9d5be670ec.tar.gz
serverdata-5f016bfc703ccb139b80b6f82e966c9d5be670ec.tar.bz2
serverdata-5f016bfc703ccb139b80b6f82e966c9d5be670ec.tar.xz
serverdata-5f016bfc703ccb139b80b6f82e966c9d5be670ec.zip
Boss Raid is now working. First event is scheduled to happen in late November.
Diffstat (limited to 'npc')
-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;