diff options
Diffstat (limited to 'npc/032-3/episode.txt')
-rw-r--r-- | npc/032-3/episode.txt | 292 |
1 files changed, 287 insertions, 5 deletions
diff --git a/npc/032-3/episode.txt b/npc/032-3/episode.txt index e88951a92..1d8ad24cc 100644 --- a/npc/032-3/episode.txt +++ b/npc/032-3/episode.txt @@ -8,15 +8,20 @@ end; OnTouch: .@q = (getq(LoFQuest_EPISODE) == 15 ? getq2(LoFQuest_EPISODE) : 99); - if (getq(LoFQuest_EPISODE) > 15 || .@q >= 2) + // No more passage if quest > 15 + if (getq(LoFQuest_EPISODE) == 15 && .@q >= 2) warp "032-4", 40, 74; else dispbottom l("This door is locked."); end; +OnInstanceInit: + disablenpc instance_npcname(.name$); + end; + OnInit: + if (instance_id() >= 0) end; // The Green Arena - // monster("032-3", 28, 25, "Arena", GreenDragon, 1); monster("032-3", 46, 25, "Arena", GreenDragon, 1); monster("032-3", 64, 19, "Arena", GreenDragon, 1); @@ -66,8 +71,285 @@ OnInit: end; } -// Switches at fancy tiles -// Triggering warps player and spawn monsters -// Close the gate? +032-3,121,85,0 script Central Switch#EP NPC_SWITCH_OFFLINE,{ + .@m$ = getmap(); + if (mobcount(.@m$, "all")) { + dispbottom l("Clear the arena to leave!"); + end; + } + setnpcdisplay instance_npcname(.name$), NPC_SWITCH_ONLINE; + sleep2(1000); + warp "032-3", 121, 86; + setnpcdisplay instance_npcname(.name$), NPC_SWITCH_OFFLINE; + .@q = (getq(LoFQuest_EPISODE) == 15 ? getq2(LoFQuest_EPISODE) : 99); + if (.@q != 1) end; + if (@ep_id) + setq3 LoFQuest_EPISODE, getq3(LoFQuest_EPISODE) | @ep_id; + @ep_id=0; + if (getq3(LoFQuest_EPISODE) == 15) + setq LoFQuest_EPISODE, getq(LoFQuest_EPISODE), 2, 0; + end; + +OnInit: + disablenpc .name$; + end; +OnInstanceInit: + .distance=2; + end; +} + +032-3,118,82,0 script Green Switch#EP NPC_SWITCH_OFFLINE,{ + .@q = (getq(LoFQuest_EPISODE) == 15 ? getq2(LoFQuest_EPISODE) : 99); + if (.@q != 1) end; + .@x = getq3(LoFQuest_EPISODE); + if (.@x & 1) { dispbottom l("I have already completed this arena."); end; } + mesc l("This switch controls one of the four dungeons."); + mesc l("All four Dungeons must be completed."); + mes ""; + mesc l("Anyone within this rug will be teleported."); + mesc l("Time limit: 10 minutes"), 3; + mes ""; + mesc l("Do you want to begin the %s Dungeon?", l("Green")), 1; + if (askyesno() == ASK_NO) { closeclientdialog; close; } + closeclientdialog; + setnpcdisplay .name$, NPC_SWITCH_ONLINE; + .@mapn$="epar@"+getcharid(0); + if (instanceowner(@episode) == getcharid(3)) { + instance_set_timeout(605, 605, @episode); + } else { + @episode = instance_create("Episode Arena "+getcharid(0), getcharid(3), IOT_CHAR); + if (@episode < 0) { + mesc l("You cannot begin this now, try again later."), 1; + @episode = 0; + close; + } + instance_attachmap("032-3", @episode, false, .@mapn$); + instance_set_timeout(900, 900, @episode); + instance_init(@episode); + } + sleep2(3000); + if (!playerattached()) end; + monster(.@mapn$, 28, 27, "Arena", GreenDragon, 1); + monster(.@mapn$, 46, 27, "Arena", GreenDragon, 1); + monster(.@mapn$, 64, 21, "Arena", GreenDragon, 1); + monster(.@mapn$, 78, 21, "Arena", GreenDragon, 1); + monster(.@mapn$, 64, 45, "Arena", GreenDragon, 1); + monster(.@mapn$, 78, 45, "Arena", GreenDragon, 1); + monster(.@mapn$, 102, 21, "Arena", GreenDragon, 1); + monster(.@mapn$, 112, 21, "Arena", GreenDragon, 1); + monster(.@mapn$, 102, 45, "Arena", GreenDragon, 1); + monster(.@mapn$, 112, 45, "Arena", GreenDragon, 1); + areatimer("032-3", 112, 76, 119, 83, 10, "Green Switch#EP::OnSet"); + sleep2(50); + areawarp("032-3", 112, 76, 119, 83, .@mapn$, 32, 32, 41, 41); + setnpcdisplay .name$, NPC_SWITCH_OFFLINE; + sleep2(100); + close; + +OnSet: + @ep_id=1; + end; + +OnInit: + .distance=2; + end; +OnInstanceInit: + disablenpc instance_npcname(.name$); + end; +} + + + + + +032-3,124,82,0 script Blue Switch#EP NPC_SWITCH_OFFLINE,{ + .@q = (getq(LoFQuest_EPISODE) == 15 ? getq2(LoFQuest_EPISODE) : 99); + if (.@q != 1) end; + .@x = getq3(LoFQuest_EPISODE); + if (.@x & 2) { dispbottom l("I have already completed this arena."); end; } + mesc l("This switch controls one of the four dungeons."); + mesc l("All four Dungeons must be completed."); + mes ""; + mesc l("Anyone within this rug will be teleported."); + mesc l("Time limit: 10 minutes"), 3; + mes ""; + mesc l("Do you want to begin the %s Dungeon?", l("Blue")), 1; + if (askyesno() == ASK_NO) { closeclientdialog; close; } + closeclientdialog; + setnpcdisplay .name$, NPC_SWITCH_ONLINE; + .@mapn$="epar@"+getcharid(0); + if (instanceowner(@episode) == getcharid(3)) { + instance_set_timeout(605, 605, @episode); + } else { + @episode = instance_create("Episode Arena "+getcharid(0), getcharid(3), IOT_CHAR); + if (@episode < 0) { + mesc l("You cannot begin this now, try again later."), 1; + @episode = 0; + close; + } + instance_attachmap("032-3", @episode, false, .@mapn$); + instance_set_timeout(900, 900, @episode); + instance_init(@episode); + } + sleep2(3000); + if (!playerattached()) end; + monster(.@mapn$, 130, 21, "Arena", Moonshroom, 1); + monster(.@mapn$, 140, 21, "Arena", Moonshroom, 1); + monster(.@mapn$, 164, 21, "Arena", Moonshroom, 1); + monster(.@mapn$, 178, 21, "Arena", Moonshroom, 1); + monster(.@mapn$, 196, 27, "Arena", Moonshroom, 1); + monster(.@mapn$, 214, 27, "Arena", Moonshroom, 1); + monster(.@mapn$, 130, 45, "Arena", Moonshroom, 1); + monster(.@mapn$, 140, 45, "Arena", Moonshroom, 1); + monster(.@mapn$, 164, 45, "Arena", Moonshroom, 1); + monster(.@mapn$, 178, 45, "Arena", Moonshroom, 1); + areatimer("032-3", 123, 76, 130, 83, 10, "Blue Switch#EP::OnSet"); + sleep2(50); + areawarp("032-3", 123, 76, 130, 83, .@mapn$, 200, 32, 210, 41); + setnpcdisplay .name$, NPC_SWITCH_OFFLINE; + sleep2(100); + close; + +OnSet: + @ep_id=2; + end; + +OnInit: + .distance=2; + end; +OnInstanceInit: + disablenpc instance_npcname(.name$); + end; +} + + + + + + +032-3,118,88,0 script Yellow Switch#EP NPC_SWITCH_OFFLINE,{ + .@q = (getq(LoFQuest_EPISODE) == 15 ? getq2(LoFQuest_EPISODE) : 99); + if (.@q != 1) end; + .@x = getq3(LoFQuest_EPISODE); + if (.@x & 4) { dispbottom l("I have already completed this arena."); end; } + mesc l("This switch controls one of the four dungeons."); + mesc l("All four Dungeons must be completed."); + mes ""; + mesc l("Anyone within this rug will be teleported."); + mesc l("Time limit: 10 minutes"), 3; + mes ""; + mesc l("Do you want to begin the %s Dungeon?", l("Yellow")), 1; + if (askyesno() == ASK_NO) { closeclientdialog; close; } + closeclientdialog; + setnpcdisplay .name$, NPC_SWITCH_ONLINE; + .@mapn$="epar@"+getcharid(0); + if (instanceowner(@episode) == getcharid(3)) { + instance_set_timeout(605, 605, @episode); + } else { + @episode = instance_create("Episode Arena "+getcharid(0), getcharid(3), IOT_CHAR); + if (@episode < 0) { + mesc l("You cannot begin this now, try again later."), 1; + @episode = 0; + close; + } + instance_attachmap("032-3", @episode, false, .@mapn$); + instance_set_timeout(900, 900, @episode); + instance_init(@episode); + } + sleep2(3000); + if (!playerattached()) end; + monster(.@mapn$, 64, 108, "Arena", JackO, 1); + monster(.@mapn$, 78, 108, "Arena", JackO, 1); + monster(.@mapn$, 102, 108, "Arena", JackO, 1); + monster(.@mapn$, 112, 108, "Arena", JackO, 1); + monster(.@mapn$, 28, 126, "Arena", JackO, 1); + monster(.@mapn$, 46, 126, "Arena", JackO, 1); + monster(.@mapn$, 64, 132, "Arena", JackO, 1); + monster(.@mapn$, 78, 132, "Arena", JackO, 1); + monster(.@mapn$, 102, 132, "Arena", JackO, 1); + monster(.@mapn$, 112, 132, "Arena", JackO, 1); + areatimer("032-3", 112, 87, 119, 94, 10, "Yellow Switch#EP::OnSet"); + sleep2(50); + areawarp("032-3", 112, 87, 119, 94, .@mapn$, 32, 131, 42, 140); + setnpcdisplay .name$, NPC_SWITCH_OFFLINE; + sleep2(100); + close; + +OnSet: + @ep_id=4; + end; + +OnInit: + .distance=2; + end; +OnInstanceInit: + disablenpc instance_npcname(.name$); + end; +} + + + + + + +032-3,124,88,0 script Red Switch#EP NPC_SWITCH_OFFLINE,{ + .@q = (getq(LoFQuest_EPISODE) == 15 ? getq2(LoFQuest_EPISODE) : 99); + if (.@q != 1) end; + .@x = getq3(LoFQuest_EPISODE); + if (.@x & 8) { dispbottom l("I have already completed this arena."); end; } + mesc l("This switch controls one of the four dungeons."); + mesc l("All four Dungeons must be completed."); + mes ""; + mesc l("Anyone within this rug will be teleported."); + mesc l("Time limit: 10 minutes"), 3; + mes ""; + mesc l("Do you want to begin the %s Dungeon?", l("Red")), 1; + if (askyesno() == ASK_NO) { closeclientdialog; close; } + closeclientdialog; + setnpcdisplay .name$, NPC_SWITCH_ONLINE; + .@mapn$="epar@"+getcharid(0); + if (instanceowner(@episode) == getcharid(3)) { + instance_set_timeout(605, 605, @episode); + } else { + @episode = instance_create("Episode Arena "+getcharid(0), getcharid(3), IOT_CHAR); + if (@episode < 0) { + mesc l("You cannot begin this now, try again later."), 1; + @episode = 0; + close; + } + instance_attachmap("032-3", @episode, false, .@mapn$); + instance_set_timeout(900, 900, @episode); + instance_init(@episode); + } + sleep2(3000); + if (!playerattached()) end; + monster(.@mapn$, 130, 108, "Arena", GoboBear, 1); + monster(.@mapn$, 140, 108, "Arena", GoboBear, 1); + monster(.@mapn$, 164, 108, "Arena", GoboBear, 1); + monster(.@mapn$, 178, 108, "Arena", GoboBear, 1); + monster(.@mapn$, 196, 126, "Arena", GoboBear, 1); + monster(.@mapn$, 214, 126, "Arena", GoboBear, 1); + monster(.@mapn$, 130, 132, "Arena", GoboBear, 1); + monster(.@mapn$, 140, 132, "Arena", GoboBear, 1); + monster(.@mapn$, 164, 132, "Arena", GoboBear, 1); + monster(.@mapn$, 178, 132, "Arena", GoboBear, 1); + areatimer("032-3", 123, 87, 130, 94, 10, "Red Switch#EP::OnSet"); + sleep2(50); + areawarp("032-3", 123, 87, 130, 94, .@mapn$, 200, 131, 210, 140); + setnpcdisplay .name$, NPC_SWITCH_OFFLINE; + sleep2(100); + close; + +OnSet: + @ep_id=8; + end; + +OnInit: + .distance=2; + end; +OnInstanceInit: + disablenpc instance_npcname(.name$); + end; +} |