diff options
Diffstat (limited to 'npc/018-2-2')
-rw-r--r-- | npc/018-2-2/main.txt | 116 |
1 files changed, 55 insertions, 61 deletions
diff --git a/npc/018-2-2/main.txt b/npc/018-2-2/main.txt index 7df95edb5..0769a2545 100644 --- a/npc/018-2-2/main.txt +++ b/npc/018-2-2/main.txt @@ -69,9 +69,51 @@ OnInit: } freeloop(false); + initnpctimer; end; -// Respawn Arrays (Manual) + + +// Controls logic for each instance +OnTimer7000: + stopnpctimer; + debugmes "Heroes Hold Monsters: Initializing"; + + // HH_Novice + 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); + + // HH_INTERMEDIARY + freeloop(true); + for (.@i=0;.@i<getarraysize(.Interm_Mobs);.@i++) { + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[.@i]), .Interm_Mobs[.@i], .Interm_Ammo[.@i], "#HH_CONTROLLER01::OnInterm"+.@i; + } + freeloop(false); + + // HH_ADVANCED + freeloop(true); + for (.@i=0;.@i<getarraysize(.Advanc_Mobs);.@i++) { + areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[.@i]), .Advanc_Mobs[.@i], .Advanc_Ammo[.@i], "#HH_CONTROLLER01::OnAdvanc"+.@i; + } + freeloop(false); + + // HH_EXPERT + freeloop(true); + for (.@i=0;.@i<getarraysize(.Expert_Mobs);.@i++) { + areamonster "018-2-3@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[.@i]), .Expert_Mobs[.@i], .Expert_Ammo[.@i], "#HH_CONTROLLER01::OnExpert"+.@i; + } + freeloop(false); + + // TODO: We still need the main logic for this. I mean, what is the objective on each floor of Master Dungeon? + debugmes "Heroes Hold Monsters: Success"; + end; + + +///////////////////////////////////////////////////////////////////////////////// +// Respawn Arrays (Autogenerated, Python Script at bottom) 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: @@ -251,67 +293,19 @@ OnMaster13: OnMaster14: areamonster "018-2-3", 20, 20, 220, 220, strmobinfo(1, .Master_Mobs[14]), .Master_Mobs[14], .Master_Ammo[14], "#HH_CONTROLLER01::OnMaster14"; end; - -// Controls logic for each instance -OnInstanceInit: - // Nard in Candor is always ID zero. Wait until we start loading HHMD. - if ($@HHMD_INSTID1 == 0) - end; - - //if (instance_mapname("0018-2-2")) - // HH_NOVICE - if (instance_id() == $@HHMD_INSTID1) { - debugmes "+ Init Novice"; - 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); - debugmes "- Init Novice"; - end; - } - // HH_INTERMEDIARY - if (instance_id() == $@HHMD_INSTID2) { - debugmes "+ Init Intermed"; - freeloop(true); - for (.@i=0;.@i<getarraysize(.Interm_Mobs);.@i++) { - areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[.@i]), .Interm_Mobs[.@i], .Interm_Ammo[.@i], "#HH_CONTROLLER01::OnInterm"+.@i; - } - freeloop(false); - debugmes "- Init Intermed"; - end; - } - // HH_ADVANCED - if (instance_id() == $@HHMD_INSTID4) { - debugmes "+ Init Advanced"; - freeloop(true); - for (.@i=0;.@i<getarraysize(.Advanc_Mobs);.@i++) { - areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[.@i]), .Advanc_Mobs[.@i], .Advanc_Ammo[.@i], "#HH_CONTROLLER01::OnAdvanc"+.@i; - } - freeloop(false); - debugmes "- Init Advanced"; - end; - } - // HH_EXPERT - if (instance_id() == $@HHMD_INSTID8) { - debugmes "+ Init Expert"; - freeloop(true); - for (.@i=0;.@i<getarraysize(.Expert_Mobs);.@i++) { - areamonster "018-2-3@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[.@i]), .Expert_Mobs[.@i], .Expert_Ammo[.@i], "#HH_CONTROLLER01::OnExpert"+.@i; - } - freeloop(false); - debugmes "- Init Expert"; - end; - } - - // TODO: We still need the main logic for this. I mean, what is the objective on each floor of Master Dungeon? - end; } /*python -i=0 -while (i < 20): - print('On'+'Novice'+'%d:' % i) - print(' areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[%d]), .Novice_Mobs[%d], .Novice_Ammo[%d], "#HH_CONTROLLER01::OnNovice%d"; end;' % (i,i,i,i)) - i+=1 +df=[('Novice', 21), + ('Intermed', 20), + ('Advanc', 18), + ('Expert', 15), + ('Master', 15)] + +for a in df: + i=0 + while (i < a[1]): + print('On%s%d:' % (a[0], i)) + print(' areamonster "018-2-2@%s", 20, 20, 220, 220, strmobinfo(1, .%s_Mobs[%d]), .%s_Mobs[%d], .%s_Ammo[%d], "#HH_CONTROLLER01::On%s%d"; end;' % (a[0][:1],a[0],i,a[0],i,a[0],i,a[0],i)) + i+=1 */ |