summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-12-19 02:43:55 -0200
committerJesusaves <cpntb1@ymail.com>2018-12-19 02:43:55 -0200
commit315c44d494b9a603b8a7e6f3997ce38ebcf70027 (patch)
tree0cfde0d72445ea55fba1c582482678d5ad086dda
parent37184fc6a3f8a6f3ed0c8c6f90b1438330d6d18b (diff)
downloadserverdata-315c44d494b9a603b8a7e6f3997ce38ebcf70027.tar.gz
serverdata-315c44d494b9a603b8a7e6f3997ce38ebcf70027.tar.bz2
serverdata-315c44d494b9a603b8a7e6f3997ce38ebcf70027.tar.xz
serverdata-315c44d494b9a603b8a7e6f3997ce38ebcf70027.zip
Attempt to spawn mobs at Novice Heroes Hold (but not yet at other levels)
-rw-r--r--npc/018-2-2/main.txt68
-rw-r--r--npc/functions/instances.txt40
2 files changed, 88 insertions, 20 deletions
diff --git a/npc/018-2-2/main.txt b/npc/018-2-2/main.txt
index 05d73e89d..753c831a1 100644
--- a/npc/018-2-2/main.txt
+++ b/npc/018-2-2/main.txt
@@ -21,5 +21,73 @@ OnPlayerCycle:
// Continue the execution
addtimer(500, "#HH_CONTROLLER01::OnPlayerCycle");
end;
+
+// Initialize Variables. Remember this causes a search for On<Difficulty><SeqNumber>. And keep same number or CRASH
+OnInit:
+ // Novice
+ setarray .Novice_Mobs, AngryScorpion,CaveMaggot,MagicGoblin,ViciousSquirrel,AngryBat,RedSlime,AngryRedScorpion,Bandit,Skeleton,GreenSlime,
+ BlueSlime,LavaSlime,RedMushroom,RobinBandit,AngryYellowSlime,OldSnake,GrassSnake,BlackSlime;
+ setarray .Novice_Ammo, 40, 40, 40, 50, 40, 80, 20, 20, 10, 90,
+ 30, 30, 25, 10, 40, 10, 15, 50;
+
+ end;
+
+// Respawn Arrays (Manual)
+OnNovice0:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[0]), .Novice_Mobs[0], .Novice_Ammo[0], "#HH_CONTROLLER01::OnNovice0"; end;
+OnNovice1:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[1]), .Novice_Mobs[1], .Novice_Ammo[1], "#HH_CONTROLLER01::OnNovice1"; end;
+OnNovice2:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[2]), .Novice_Mobs[2], .Novice_Ammo[2], "#HH_CONTROLLER01::OnNovice2"; end;
+OnNovice3:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[3]), .Novice_Mobs[3], .Novice_Ammo[3], "#HH_CONTROLLER01::OnNovice3"; end;
+OnNovice4:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[4]), .Novice_Mobs[4], .Novice_Ammo[4], "#HH_CONTROLLER01::OnNovice4"; end;
+OnNovice5:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[5]), .Novice_Mobs[5], .Novice_Ammo[5], "#HH_CONTROLLER01::OnNovice5"; end;
+OnNovice6:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[6]), .Novice_Mobs[6], .Novice_Ammo[6], "#HH_CONTROLLER01::OnNovice6"; end;
+OnNovice7:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[7]), .Novice_Mobs[7], .Novice_Ammo[7], "#HH_CONTROLLER01::OnNovice7"; end;
+OnNovice8:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[8]), .Novice_Mobs[8], .Novice_Ammo[8], "#HH_CONTROLLER01::OnNovice8"; end;
+OnNovice9:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[9]), .Novice_Mobs[9], .Novice_Ammo[9], "#HH_CONTROLLER01::OnNovice9"; end;
+OnNovice10:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[10]), .Novice_Mobs[10], .Novice_Ammo[10], "#HH_CONTROLLER01::OnNovice10"; end;
+OnNovice11:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[11]), .Novice_Mobs[11], .Novice_Ammo[11], "#HH_CONTROLLER01::OnNovice11"; end;
+OnNovice12:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[12]), .Novice_Mobs[12], .Novice_Ammo[12], "#HH_CONTROLLER01::OnNovice12"; end;
+OnNovice13:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[13]), .Novice_Mobs[13], .Novice_Ammo[13], "#HH_CONTROLLER01::OnNovice13"; end;
+OnNovice14:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[14]), .Novice_Mobs[14], .Novice_Ammo[14], "#HH_CONTROLLER01::OnNovice14"; end;
+OnNovice15:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[15]), .Novice_Mobs[15], .Novice_Ammo[15], "#HH_CONTROLLER01::OnNovice15"; end;
+OnNovice16:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[16]), .Novice_Mobs[16], .Novice_Ammo[16], "#HH_CONTROLLER01::OnNovice16"; end;
+OnNovice17:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[17]), .Novice_Mobs[17], .Novice_Ammo[17], "#HH_CONTROLLER01::OnNovice17"; end;
+OnNovice18:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[18]), .Novice_Mobs[18], .Novice_Ammo[18], "#HH_CONTROLLER01::OnNovice18"; end;
+OnNovice19:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[19]), .Novice_Mobs[19], .Novice_Ammo[19], "#HH_CONTROLLER01::OnNovice19"; end;
+OnNovice20:
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[20]), .Novice_Mobs[20], .Novice_Ammo[20], "#HH_CONTROLLER01::OnNovice20"; end;
+
+
+// Controls logic for each instance
+OnInstanceInit:
+ //if (instance_mapname("0018-2-2"))
+ // HH_NOVICE
+ if (instance_id() == $@HHMD_INSTID1) {
+ freeloop(true);
+ for (.@i=0;.@i<getarraysize(.Novice_Mobs);.@i++) {
+ areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[.@i]), .Novice_Mobs[.@i], .Novice_Ammo[.@i], "#HH_CONTROLLER01::OnNovice"+.@i;
+ }
+ freeloop(false);
+ }
+ end;
}
diff --git a/npc/functions/instances.txt b/npc/functions/instances.txt
index 9b07b3e63..521e1a90e 100644
--- a/npc/functions/instances.txt
+++ b/npc/functions/instances.txt
@@ -63,31 +63,31 @@ OnInstRestart:
/* Heroes Hold Main Dungeon */
- .HHMD_INSTID = instance_create("018-2-2@HHMD1", 0, IOT_NONE);
- instance_attachmap("018-2-2", .HHMD_INSTID, 0, "018-2-1@No");
- instance_set_timeout(1000000, 1000000, .HHMD_INSTID);
- instance_init(.HHMD_INSTID);
-
- .HHMD_INSTID = instance_create("018-2-2@HHMD2", 0, IOT_NONE);
- instance_attachmap("018-2-2", .HHMD_INSTID, 0, "018-2-1@In");
- instance_set_timeout(1000000, 1000000, .HHMD_INSTID);
- instance_init(.HHMD_INSTID);
-
- .HHMD_INSTID = instance_create("018-2-2@HHMD4", 0, IOT_NONE);
- instance_attachmap("018-2-2", .HHMD_INSTID, 0, "018-2-1@Ad");
- instance_set_timeout(1000000, 1000000, .HHMD_INSTID);
- instance_init(.HHMD_INSTID);
-
- .HHMD_INSTID = instance_create("018-2-2@HHMD8", 0, IOT_NONE);
- instance_attachmap("018-2-2", .HHMD_INSTID, 0, "018-2-1@Ex");
- instance_set_timeout(1000000, 1000000, .HHMD_INSTID);
- instance_init(.HHMD_INSTID);
+ $@HHMD_INSTID1 = instance_create("018-2-2@HHMD1", 0, IOT_NONE);
+ instance_attachmap("018-2-2", $@HHMD_INSTID1, 0, "018-2-1@No");
+ instance_set_timeout(1000000, 1000000, $@HHMD_INSTID1);
+ instance_init($@HHMD_INSTID1);
+
+ $@HHMD_INSTID2 = instance_create("018-2-2@HHMD2", 0, IOT_NONE);
+ instance_attachmap("018-2-2", $@HHMD_INSTID2, 0, "018-2-1@In");
+ instance_set_timeout(1000000, 1000000, $@HHMD_INSTID2);
+ instance_init($@HHMD_INSTID2);
+
+ $@HHMD_INSTID4 = instance_create("018-2-2@HHMD4", 0, IOT_NONE);
+ instance_attachmap("018-2-2", $@HHMD_INSTID4, 0, "018-2-1@Ad");
+ instance_set_timeout(1000000, 1000000, $@HHMD_INSTID4);
+ instance_init($@HHMD_INSTID4);
+
+ $@HHMD_INSTID8 = instance_create("018-2-2@HHMD8", 0, IOT_NONE);
+ instance_attachmap("018-2-2", $@HHMD_INSTID8, 0, "018-2-1@Ex");
+ instance_set_timeout(1000000, 1000000, $@HHMD_INSTID8);
+ instance_init($@HHMD_INSTID8);
end;
OnMinute18:
OnMinute47:
- if (!isinstance(.HURNS_INSTID) || !isinstance(.NIVAL_INSTID) || !isinstance(.HHMD_INSTID))
+ if (!isinstance(.HURNS_INSTID) || !isinstance(.NIVAL_INSTID) || !isinstance($@HHMD_INSTID1))
donpcevent("#GlobalInstanceCore::OnInstRestart");
end;