Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Merge branch 'prince-hopper' into canary
Browse files Browse the repository at this point in the history
  • Loading branch information
ibm2431 committed Apr 17, 2020
2 parents 1688e67 + d7ea334 commit 0931239
Show file tree
Hide file tree
Showing 9 changed files with 173 additions and 41 deletions.
24 changes: 22 additions & 2 deletions scripts/zones/Aht_Urhgan_Whitegate/npcs/Maudaal.lua
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
26 changes: 16 additions & 10 deletions scripts/zones/Mamook/IDs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,26 @@ zones[tpz.zone.MAMOOK] =
{
ZIZZY_ZILLAH_PH =
{
[17043560] = 17043554,
[17043561] = 17043554,
[17043562] = 17043554,
[17043563] = 17043554,
[17043564] = 17043554,
[17043560] = 17043554,
[17043561] = 17043554,
[17043562] = 17043554,
[17043563] = 17043554,
[17043564] = 17043554,
},
FIREDANCE_MAGMAAL_JA_PH =
{
[17043773] = 17043779, -- -201.522 17.209 -363.865
[17043774] = 17043779, -- -206.458 17.525 -373.798
[17043773] = 17043779, -- -201.522 17.209 -363.865
[17043774] = 17043779, -- -206.458 17.525 -373.798
},
GULOOL_JA_JA = 17043875,
CHAMROSH = 17043887,
IRIRI_SAMARIRI = 17043888,
GULOOL_JA_JA = 17043875,
CHAMROSH = 17043887,
IRIRI_SAMARIRI = 17043888,
POROGGO_CASANOVA = 17043881,
MIKILULU = 17043882,
MIKIRURU = 17043883,
NIKILULU = 17043884,
MIKILURU = 17043885,
MIKIRULU = 17043886,
},
npc =
{
Expand Down
9 changes: 9 additions & 0 deletions scripts/zones/Mamook/mobs/Mikilulu.lua
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
24 changes: 24 additions & 0 deletions scripts/zones/Mamook/mobs/Poroggo_Casanova.lua
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
43 changes: 43 additions & 0 deletions scripts/zones/Mamook/npcs/Toads_Footprint1.lua
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
26 changes: 26 additions & 0 deletions scripts/zones/Mamook/npcs/Toads_Footprint2.lua
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
46 changes: 25 additions & 21 deletions scripts/zones/Wajaom_Woodlands/Zone.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,21 @@ function onInitialize(zone)
end;

function onZoneIn(player,prevZone)
local cs = -1;
if (player:getXPos() == 0 and player:getYPos() == 0 and player:getZPos() == 0) then
if (player:getCurrentMission(TOAU) == tpz.mission.id.toau.UNRAVELING_REASON) then
player:setPos(-200.036,-10,79.948,254);
cs = 11;
local cs = -1
if player:getXPos() == 0 and player:getYPos() == 0 and player:getZPos() == 0 then
if player:getCurrentMission(TOAU) == tpz.mission.id.toau.UNRAVELING_REASON then
player:setPos(-200.036,-10,79.948,254)
cs = 11
else
player:setPos(610.542,-28.547,356.247,122);
player:setPos(610.542,-28.547,356.247,122)
end
elseif (player:getCharVar("threemenandaclosetCS") == 2 and prevZone == tpz.zone.AHT_URHGAN_WHITEGATE) then
cs = 510;
elseif player:getCharVar("threemenandaclosetCS") == 2 and prevZone == tpz.zone.AHT_URHGAN_WHITEGATE then
cs = 510
elseif player:getCharVar("princeandhopper") == 1 then
cs = 513
end
return cs;
end;
return cs
end

function onRegionEnter(player,region)
end;
Expand All @@ -49,16 +51,18 @@ end;
function onEventFinish(player,csid,option)
-- printf("Finish CSID: %u",csid);
-- printf("Finish RESULT: %u",option);
if (csid == 510) then
player:setCharVar("threemenandaclosetCS",3);
elseif (csid == 11) then
player:startEvent(21);
elseif (csid == 21) then
player:startEvent(22);
elseif (csid == 22) then
player:completeMission(TOAU,tpz.mission.id.toau.UNRAVELING_REASON);
if csid == 510 then
player:setCharVar("threemenandaclosetCS",3)
elseif csid == 11 then
player:startEvent(21)
elseif csid == 21 then
player:startEvent(22)
elseif csid == 22 then
player:completeMission(TOAU,tpz.mission.id.toau.UNRAVELING_REASON)
player:setTitle(tpz.title.ENDYMION_PARATROOPER);
player:setCharVar("TOAUM40_STARTDAY", 0);
player:addMission(TOAU,tpz.mission.id.toau.LIGHT_OF_JUDGMENT);
player:setCharVar("TOAUM40_STARTDAY", 0)
player:addMission(TOAU,tpz.mission.id.toau.LIGHT_OF_JUDGMENT)
elseif csid == 513 then
player:setCharVar("princeandhopper", 2)
end
end;
end
12 changes: 6 additions & 6 deletions sql/mob_spawn_points.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13886,12 +13886,12 @@ INSERT INTO `mob_spawn_points` VALUES (17043877,'Mamool_Ja_Chamberlain','Mamool
INSERT INTO `mob_spawn_points` VALUES (17043878,'Mamool_Ja_Palatine','Mamool Ja Palatine',56,-295,18,-384,253);
INSERT INTO `mob_spawn_points` VALUES (17043879,'Mamool_Ja_Palatine','Mamool Ja Palatine',56,-295,18,-376,253);
INSERT INTO `mob_spawn_points` VALUES (17043880,'Carpophagous_Puk','Carpophagous Puk',57,0,0,0,0);
INSERT INTO `mob_spawn_points` VALUES (17043881,'Poroggo_Casanova','Poroggo Casanova',58,0,0,0,0);
INSERT INTO `mob_spawn_points` VALUES (17043882,'Mikilulu','Mikilulu',59,0,0,0,0);
INSERT INTO `mob_spawn_points` VALUES (17043883,'Mikiruru','Mikiruru',60,0,0,0,0);
INSERT INTO `mob_spawn_points` VALUES (17043884,'Nikilulu','Nikilulu',61,-37.477,5.704,-98.310,90);
INSERT INTO `mob_spawn_points` VALUES (17043885,'Mikiluru','Mikiluru',62,0,0,0,0);
INSERT INTO `mob_spawn_points` VALUES (17043886,'Mikirulu','Mikirulu',63,0,0,0,0);
INSERT INTO `mob_spawn_points` VALUES (17043881,'Poroggo_Casanova','Poroggo Casanova',58,-42.477,5.904,-98.310,90);
INSERT INTO `mob_spawn_points` VALUES (17043882,'Mikilulu','Mikilulu',59,-42.477,5.904,-101.310,90);
INSERT INTO `mob_spawn_points` VALUES (17043883,'Mikiruru','Mikiruru',60,-40.477,5.804,-101.310,90);
INSERT INTO `mob_spawn_points` VALUES (17043884,'Nikilulu','Nikilulu',61,-46.477,5.804,-101.310,90);
INSERT INTO `mob_spawn_points` VALUES (17043885,'Mikiluru','Mikiluru',62,-47.477,5.804,-98.310,90);
INSERT INTO `mob_spawn_points` VALUES (17043886,'Mikirulu','Mikirulu',63,-49.477,5.990,-100.310,90);
INSERT INTO `mob_spawn_points` VALUES (17043887,'Chamrosh','Chamrosh',64,206,14,-285,249);
INSERT INTO `mob_spawn_points` VALUES (17043888,'Iriri_Samariri','Iriri Samariri',65,-118,7,-80,193);
INSERT INTO `mob_spawn_points` VALUES (17043889,'Wartkin','Wartkin',66,0,0,0,0);
Expand Down
4 changes: 2 additions & 2 deletions sql/npc_list.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5935,8 +5935,8 @@ INSERT INTO `npc_list` VALUES (17044034,'22',' ',0,0.000,0.000,0.000,0,40,40
INSERT INTO `npc_list` VALUES (17044035,'23',' ',0,0.000,0.000,0.000,32768,40,40,0,0,0,2,2051,0x0000340000000000000000000000000000000000,0,'TOAU',1);
INSERT INTO `npc_list` VALUES (17044036,'24',' ',0,0.000,0.000,0.000,0,40,40,0,0,0,2,2051,0x0000340000000000000000000000000000000000,0,'TOAU',1);
INSERT INTO `npc_list` VALUES (17044037,'25',' ',0,0.000,0.000,0.000,0,40,40,0,0,0,2,2051,0x0000340000000000000000000000000000000000,0,'TOAU',1);
INSERT INTO `npc_list` VALUES (17044038,'Toad_s_Footprint','Toad\'s Footprint',0,-42.779,5.968,-100.554,1,40,40,0,0,0,0,3,0x0000340000000000000000000000000000000000,0,'TOAU',1);
INSERT INTO `npc_list` VALUES (17044039,'Toad_s_Footprint','Toad\'s Footprint',0,216.100,-23.818,-102.464,1,40,40,0,0,0,0,3,0x0000340000000000000000000000000000000000,0,'TOAU',1);
INSERT INTO `npc_list` VALUES (17044038,'Toads_Footprint1','Toad\'s Footprint',0,-42.779,5.968,-100.554,1,40,40,0,0,0,0,3,0x0000340000000000000000000000000000000000,0,'TOAU',1);
INSERT INTO `npc_list` VALUES (17044039,'Toads_Footprint2','Toad\'s Footprint',0,216.100,-23.818,-102.464,1,40,40,0,0,0,0,3,0x0000340000000000000000000000000000000000,0,'TOAU',1);
INSERT INTO `npc_list` VALUES (17044040,'Goal_Point','GoalPoint',0,260.190,10.893,-411.359,1,40,40,0,0,0,2,3,0x0000340000000000000000000000000000000000,0,'TOAU',0);
INSERT INTO `npc_list` VALUES (17044041,'Goal_Point','GoalPoint',0,177.507,-15.216,-59.407,1,40,40,0,0,0,2,3,0x0000340000000000000000000000000000000000,0,'TOAU',0);
INSERT INTO `npc_list` VALUES (17044042,'Goal_Point','GoalPoint',0,-268.074,8.543,-255.613,1,40,40,0,0,0,2,3,0x0000340000000000000000000000000000000000,0,'TOAU',0);
Expand Down

0 comments on commit 0931239

Please sign in to comment.