This repository has been archived by the owner on Dec 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'prince-hopper' into canary
- Loading branch information
Showing
9 changed files
with
173 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,38 @@ | ||
----------------------------------- | ||
-- Area: Aht Urhgan Whitegate | ||
-- NPC: Maudaal | ||
-- Standard Info NPC | ||
----------------------------------- | ||
|
||
local ID = require("scripts/zones/Aht_Urhgan_Whitegate/IDs") | ||
require("scripts/globals/npc_util") | ||
|
||
function onTrade(player,npc,trade) | ||
end | ||
|
||
function onTrigger(player,npc) | ||
player:startEvent(240) | ||
local princeAndHopperStatus = player:getQuestStatus(AHT_URHGAN,tpz.quest.id.ahtUrhgan.THE_PRINCE_AND_THE_HOPPER) | ||
if princeAndHopperStatus == QUEST_AVAILABLE then | ||
player:startEvent(889) | ||
elseif princeAndHopperStatus == QUEST_ACCEPTED and player:getCharVar("princeandhopper") == 6 then | ||
player:startEvent(890) | ||
else | ||
player:startEvent(240) | ||
end | ||
end | ||
|
||
function onEventUpdate(player,csid,option) | ||
end | ||
|
||
function onEventFinish(player,csid,option) | ||
if csid == 889 and option == 2 then | ||
player:addQuest(AHT_URHGAN,tpz.quest.id.ahtUrhgan.THE_PRINCE_AND_THE_HOPPER) | ||
player:setCharVar("princeandhopper", 1) | ||
elseif csid == 890 then | ||
npcUtil.completeQuest( | ||
player, | ||
AHT_URHGAN, | ||
tpz.quest.id.ahtUrhgan.THE_PRINCE_AND_THE_HOPPER, | ||
{item = 16270, var = "princeandhopper"} | ||
) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
----------------------------------- | ||
-- Area: Mamook | ||
-- Mob: Mikilulu | ||
-- ToAU Quest: Prince and the Hopper | ||
----------------------------------- | ||
|
||
function onMobSpawn(mob) | ||
mob:setUnkillable(true) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
----------------------------------- | ||
-- Area: Mamook | ||
-- Mob: Poroggo Casanova | ||
-- ToAU Quest: Prince and the Hopper | ||
----------------------------------- | ||
local ID = require("scripts/zones/Mamook/IDs") | ||
|
||
function onMobSpawn(mob) | ||
end | ||
|
||
function onMobDeath(mob, player, isKiller) | ||
if player:getQuestStatus(AHT_URHGAN, tpz.quest.id.ahtUrhgan.THE_PRINCE_AND_THE_HOPPER) == QUEST_ACCEPTED and player:getCharVar("princeandhopper") == 4 then | ||
player:setCharVar("princeandhopper", 5) | ||
end | ||
for i = ID.mob.POROGGO_CASANOVA + 1, ID.mob.POROGGO_CASANOVA + 5 do | ||
DespawnMob(i) | ||
end | ||
end | ||
|
||
function onMobDespawn(mob) | ||
for i = ID.mob.POROGGO_CASANOVA + 1, ID.mob.POROGGO_CASANOVA + 5 do | ||
DespawnMob(i) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
----------------------------------- | ||
-- Area: Mamook | ||
-- NPC: Toads Footprint | ||
-- !pos 5.9660 42.7575 -100.5741 | ||
----------------------------------- | ||
local ID = require("scripts/zones/Mamook/IDs") | ||
require("scripts/globals/npc_util") | ||
|
||
function onTrade(player,npc,trade) | ||
end | ||
|
||
function onTrigger(player, npc) | ||
local princeandhopper = player:getCharVar("princeandhopper") | ||
if princeandhopper == 3 then | ||
player:startEvent(223) | ||
elseif princeandhopper == 4 then | ||
local mobs = | ||
{ | ||
ID.mob.MIKILULU, | ||
ID.mob.MIKIRURU, | ||
ID.mob.NIKILULU, | ||
ID.mob.MIKILURU, | ||
ID.mob.MIKIRULU, | ||
ID.mob.POROGGO_CASANOVA, | ||
} | ||
if npcUtil.popFromQM(player, npc, mobs, {hide = 1}) then | ||
player:messageSpecial(ID.text.DRAWS_NEAR) | ||
end | ||
elseif princeandhopper == 5 then | ||
player:startEvent(225) | ||
end | ||
end | ||
|
||
function onEventUpdate(player,csid,option) | ||
end | ||
|
||
function onEventFinish(player,csid,option) | ||
if csid == 223 then | ||
player:setCharVar("princeandhopper", 4) | ||
elseif csid == 225 then | ||
player:setCharVar("princeandhopper", 6) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
----------------------------------- | ||
-- Area: Mamook | ||
-- NPC: Toads Footprint | ||
-- !pos -42.9248 5.9847 -100.2972 | ||
----------------------------------- | ||
local ID = require("scripts/zones/Mamook/IDs") | ||
|
||
function onTrade(player,npc,trade) | ||
end | ||
|
||
function onTrigger(player, npc) | ||
local princeandhopper = player:getCharVar("princeandhopper") | ||
if princeandhopper == 2 then | ||
player:startEvent(222) | ||
end | ||
end | ||
|
||
function onEventUpdate(player,csid,option) | ||
end | ||
|
||
function onEventFinish(player,csid,option) | ||
if csid == 222 then | ||
player:setCharVar("princeandhopper", 3) | ||
player:startEvent(227) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters