diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-08-29 22:03:34 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-08-29 22:03:34 -0300 |
commit | 3114643fabfde05ee7e559535bfa1c0ea9259b2e (patch) | |
tree | ac12f412511ea52d0c7bd9bce9dd8b212bf92c36 /npc | |
parent | d5fa07b8ae66f886340ca61f5d5f5cfc8dab5aa8 (diff) | |
download | serverdata-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')
-rw-r--r-- | npc/018-6-1/_import.txt | 1 | ||||
-rw-r--r-- | npc/018-6-1/main.txt | 98 |
2 files changed, 99 insertions, 0 deletions
diff --git a/npc/018-6-1/_import.txt b/npc/018-6-1/_import.txt index de446a263..2770c1ae4 100644 --- a/npc/018-6-1/_import.txt +++ b/npc/018-6-1/_import.txt @@ -2,3 +2,4 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/018-6-1/_mobs.txt", "npc/018-6-1/_warps.txt", +"npc/018-6-1/main.txt", 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; + +} + + + + |