summaryrefslogtreecommitdiff
path: root/npc/018-6-1/main.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-08-29 22:03:34 -0300
committerJesusaves <cpntb1@ymail.com>2019-08-29 22:03:34 -0300
commit3114643fabfde05ee7e559535bfa1c0ea9259b2e (patch)
treeac12f412511ea52d0c7bd9bce9dd8b212bf92c36 /npc/018-6-1/main.txt
parentd5fa07b8ae66f886340ca61f5d5f5cfc8dab5aa8 (diff)
downloadserverdata-3114643fabfde05ee7e559535bfa1c0ea9259b2e.tar.gz
serverdata-3114643fabfde05ee7e559535bfa1c0ea9259b2e.tar.bz2
serverdata-3114643fabfde05ee7e559535bfa1c0ea9259b2e.tar.xz
serverdata-3114643fabfde05ee7e559535bfa1c0ea9259b2e.zip
Minimal core functions for 018-6-1 Elenium Mines
Diffstat (limited to 'npc/018-6-1/main.txt')
-rw-r--r--npc/018-6-1/main.txt98
1 files changed, 98 insertions, 0 deletions
diff --git a/npc/018-6-1/main.txt b/npc/018-6-1/main.txt
new file mode 100644
index 000000000..cbaed9897
--- /dev/null
+++ b/npc/018-6-1/main.txt
@@ -0,0 +1,98 @@
+// TMW2 Scripts
+// Author:
+// Jesusalva
+// Description:
+// Controls Elenium Mines, specially the instances
+
+// Main Controller for Instanced maps
+018-6-1,0,0,0 script #01861_InstCtrl NPC_HIDDEN,{
+ end;
+
+// Map, x, y, width, height, mob, amount
+function AreaMonsterB {
+ .@m$=getarg(0);
+ .@x1=getarg(1);
+ .@x2=.@x1+getarg(3);
+ .@y1=getarg(2);
+ .@y2=.@y1+getarg(4);
+ .@mi=getarg(5);
+ .@am=getarg(6);
+ areamonster(.@m$, .@x1, .@y1, .@x2, .@y2, strmobinfo(1, .@mi), .@mi, .@am, instance_npcname(.name$)+"::OnKill"+.@mi);
+ return;
+}
+
+// (var, value)
+function SetIfVoid {
+ if (!getarg(0))
+ return getarg(1);
+ return 0;
+}
+
+// Bifs won't respawn
+OnKill1226:
+OnKill1227:
+OnKill1228:
+ end;
+
+// Others: Wait 30 seconds and respawn
+OnKill1178:
+ .@mi=SetIfVoid(.@mi, 1178);
+OnKill1051:
+ .@mi=SetIfVoid(.@mi, 1051);
+OnKill1074:
+ .@mi=SetIfVoid(.@mi, 1074);
+OnKill1123:
+ .@mi=SetIfVoid(.@mi, 1123);
+OnKill1176:
+ .@mi=SetIfVoid(.@mi, 1176);
+OnKill1026:
+ .@mi=SetIfVoid(.@mi, 1026);
+
+ // Common utils
+ getmapxy(.@m$, .@x, .@y, 0);
+ sleep(30000);
+ AreaMonsterB(.@m$, .@x-2, .@y-2, 4, 4, .@mi, 1);
+ end;
+
+OnInstanceInit:
+ // Generate map ID
+ getmapxy(.@m$, .@x, .@y, UNITTYPE_NPC);
+
+ // Bif monsters
+ AreaMonsterB(.@m$, 40, 49, 7, 8, BigEleniumBif, 5);
+ AreaMonsterB(.@m$, 95, 51, 7, 8, BigEleniumBif, 5);
+ AreaMonsterB(.@m$, 145, 83, 6, 5, EleniumBif, 5);
+ AreaMonsterB(.@m$, 62, 86, 6, 5, EleniumBif, 5);
+ AreaMonsterB(.@m$, 65, 130, 6, 5, EleniumBif, 5);
+ AreaMonsterB(.@m$, 125, 158, 6, 5, SmallEleniumBif, 4);
+ AreaMonsterB(.@m$, 129, 183, 6, 5, SmallEleniumBif, 4);
+ AreaMonsterB(.@m$, 34, 181, 5, 5, SmallEleniumBif, 4);
+
+ // Common Monsters
+ AreaMonsterB(.@m$, 80, 172, 54, 25, BlackSlime, 16);
+ AreaMonsterB(.@m$, 89, 167, 54, 25, DarkLizard, 8);
+ AreaMonsterB(.@m$, 96, 103, 56, 29, BlackScorpion, 18);
+ AreaMonsterB(.@m$, 101, 105, 54, 25, MountainSnake, 10);
+ AreaMonsterB(.@m$, 70, 45, 44, 25, WickedMushroom, 14);
+ AreaMonsterB(.@m$, 68, 45, 31, 21, Archant, 7);
+ end;
+
+}
+/////////////////////////////
+018-6-1,83,26,0 script #ToForgottenChamber NPC_SUMMONING_CIRC,0,0,{
+ dispbottom l("It looks dangerous.");
+ end;
+
+OnTouch:
+ Exception("TODO");
+ end;
+
+OnInit:
+ disablenpc .name$;
+ end;
+
+}
+
+
+
+