summaryrefslogtreecommitdiff
path: root/npc/034-4
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-04-28 11:01:17 -0300
committerJesusaves <cpntb1@ymail.com>2022-04-28 11:01:17 -0300
commit0e0e24f5222e3a536bf33f960e7a3a99f4b00eb6 (patch)
tree3dff821b8e70017818aa91aeffa4e7e8c975a751 /npc/034-4
parent694626591f8c2ed6484ef2c911fc78a6ef7117a0 (diff)
downloadserverdata-0e0e24f5222e3a536bf33f960e7a3a99f4b00eb6.tar.gz
serverdata-0e0e24f5222e3a536bf33f960e7a3a99f4b00eb6.tar.bz2
serverdata-0e0e24f5222e3a536bf33f960e7a3a99f4b00eb6.tar.xz
serverdata-0e0e24f5222e3a536bf33f960e7a3a99f4b00eb6.zip
Incomplete code
Diffstat (limited to 'npc/034-4')
-rw-r--r--npc/034-4/exit.txt43
1 files changed, 40 insertions, 3 deletions
diff --git a/npc/034-4/exit.txt b/npc/034-4/exit.txt
index a20664099..3a6c5dfba 100644
--- a/npc/034-4/exit.txt
+++ b/npc/034-4/exit.txt
@@ -7,6 +7,7 @@
034-4,144,82,0 script #GeminiFExit NPC_HIDDEN,0,0,{
OnWumpus:
+ GeminiCheck();
// TODO FIXME: Instead of 75% chance, a Wumpus Egg only on first victory
if (any(true, true, true, false))
getitem WumpusEgg, 1;
@@ -17,7 +18,13 @@ OnWumpus:
end;
OnTouch:
- // if not (quest) end;
+ GeminiCheck();
+ // Only the party leader go ahead
+ if (strcharinfo(0) != getpartyleader(getcharid(1))) {
+ mesq l("%s has the key.", getpartyleader(getcharid(1)));
+ close;
+ }
+
// Create maze and populate (From 45x45 to 60x60)
CreateMaze(IOT_CHAR, MAZE_SIZE_M | MAZE_SIZE_G);
.@mx=getmapinfo(MAPINFO_SIZE_X, MAZE_MAP$)-20;
@@ -142,9 +149,39 @@ OnTouch:
setunitdata(.@mob, UDT_DMOTION, 50);
// Defeating the boss yields a bonus
- InitMaze(7200);
+ .@old$=getmap();
+ .@p=getcharid(1);
+ InitMaze(7200, false);
+ sleep2(500);
+ dispbottom l("It was a trap! We must escape!");
+ $@VALIA_MAP$[.@p]=getmap();
+ partytimer(.@old$, 2000, "#GeminiFExit::OnSick", .@p);
+ sleep2(2000);
+ @forced_sick$ = getmap();
+ doevent "#DungeonCore::OnSick";
+ end;
+
+OnSick:
+ .@p=getcharid(1);
+ MAZE_MAP$ = $@VALIA_MAP$[.@p];
+ // Find random, warpable coordinates
+ .@e=0; .@x=0; .@y=0;
+ .@mx=50;
+ .@my=50;
+ do {
+ .@x = rand2(20, .@mx);
+ .@y = rand2(20, .@my);
+ .@e += 1;
+ if (.@e > 30) {
+ consolebug("Too many failures at Maze \"%s\"! Trying anyway!", MAZE_MAP$);
+ break;
+ }
+ } while (!checknpccell(MAZE_MAP$, .@x, .@y, cell_chkpass));
+
+ warp MAZE_MAP$, .@x, .@y;
+ sleep2(500);
dispbottom l("It was a trap! We must escape!");
- sleep2(2500);
+ sleep2(2000);
@forced_sick$ = getmap();
doevent "#DungeonCore::OnSick";
end;