summaryrefslogtreecommitdiff
path: root/npc/026-7
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2023-10-13 18:07:18 -0300
committerJesusaves <cpntb1@ymail.com>2023-10-13 18:07:18 -0300
commit6ce40295dc78d2422c5e318ec99c98ae75a464cc (patch)
treec5f72c03779e234599d6bca9e5cb59337ac07585 /npc/026-7
parent791366f6fa95f6fadfb18427643104e27b15110a (diff)
downloadserverdata-6ce40295dc78d2422c5e318ec99c98ae75a464cc.tar.gz
serverdata-6ce40295dc78d2422c5e318ec99c98ae75a464cc.tar.bz2
serverdata-6ce40295dc78d2422c5e318ec99c98ae75a464cc.tar.xz
serverdata-6ce40295dc78d2422c5e318ec99c98ae75a464cc.zip
The Boss Chamber traps (moved from boss map)
Diffstat (limited to 'npc/026-7')
-rw-r--r--npc/026-7/boss.txt55
1 files changed, 55 insertions, 0 deletions
diff --git a/npc/026-7/boss.txt b/npc/026-7/boss.txt
index 14ed25a2a..4f282695b 100644
--- a/npc/026-7/boss.txt
+++ b/npc/026-7/boss.txt
@@ -5,6 +5,10 @@
// The Impregnable Fortress Control Files - Boss Chamber - Final Showdown
026-7,39,34,0 script Impregnable#B7F NPC_HIDDEN,{
+ function _moveNpc;
+ end;
+
+OnInit:
end;
// Maybe not OnTouch, but OnSit?
@@ -15,6 +19,21 @@ OnTouch:
dispbottom l("The throne is cursed, only the Monster King may seat on it.");
end;
+function _moveNpc {
+ // Try to warp randomly, up to 30 attempts
+ .@e=0;
+ .@mx=getmapinfo(MAPINFO_SIZE_X, getarg(0))-20;
+ .@my=getmapinfo(MAPINFO_SIZE_Y, getarg(0))-20;
+ do {
+ if (.@e >= 30)
+ break;
+ .npc_x = rand2(20, .@mx);
+ .npc_y = rand2(20, .@my);
+ .@e+=1;
+ } while (!checknpccell(getarg(0), .npc_x, .npc_y, cell_chkpass));
+ return;
+} // _moveNpc
+
// Controls the Event
OnBegin:
end;
@@ -50,3 +69,39 @@ OnVictory:
}
+
+// Room Traps, only against players
+026-7,0,0,0 script #MKBossTrap01 NPC_TRAP_ONLINE,0,0,{
+ end;
+
+OnTouch:
+OnTouchNPC:
+ WorldHeartTrap();
+ sleep(500); // Wait 500ms for animation
+ setnpcdisplay .name$, NPC_TRAP_ONLINE;
+ // Move the trap away after it disarms (up to 30 attempts)
+
+OnInit:
+ .@e=0;
+ do {
+ if (.@e >= 30)
+ break;
+ .@x = rand2(21, 60);
+ .@y = rand2(21, 60);
+ .@e+=1;
+ } while (!checknpccell("026-6", .@x, .@y, cell_chkpass));
+ movenpc .name$, .@x, .@y;
+ end;
+}
+
+// Create more traps
+026-7,0,0,0 duplicate(#MKBossTrap01) #MKBossTrap02 NPC_TRAP,0,0
+026-7,0,0,0 duplicate(#MKBossTrap01) #MKBossTrap03 NPC_TRAP,0,0
+026-7,0,0,0 duplicate(#MKBossTrap01) #MKBossTrap04 NPC_TRAP,0,0
+026-7,0,0,0 duplicate(#MKBossTrap01) #MKBossTrap05 NPC_TRAP,0,0
+026-7,0,0,0 duplicate(#MKBossTrap01) #MKBossTrap06 NPC_TRAP,0,0
+026-7,0,0,0 duplicate(#MKBossTrap01) #MKBossTrap07 NPC_TRAP,0,0
+026-7,0,0,0 duplicate(#MKBossTrap01) #MKBossTrap08 NPC_TRAP,0,0
+026-7,0,0,0 duplicate(#MKBossTrap01) #MKBossTrap09 NPC_TRAP,0,0
+026-7,0,0,0 duplicate(#MKBossTrap01) #MKBossTrap10 NPC_TRAP,0,0
+