Skip to content

Commit

Permalink
Merge pull request LandSandBoat#6069 from LSB-jamesbradleym/Acting-in…
Browse files Browse the repository at this point in the history
…-Good-Faith-Fix-QM

[Quest] Acting in Good Faith - random qm1 spawn on 4 possible braziers
  • Loading branch information
zach2good authored Oct 3, 2024
2 parents c125060 + c1dee27 commit 4f08efd
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/quests/windurst/Acting_in_Good_Faith.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
-----------------------------------
-- !addquest 2 64
-- Gantineux : !pos -83 -9 3 238
-- qm1 : !pos -17 0 59 195 (I-10)
-- Eperdur : !pos 129 -6 96 231
-- QM1 : !pos -460.85, -1.5, 425.14 (D-5)
-- : !pos -24.10, -9.303, 258.993 (I-7)
-- : !pos -19.624,-1.631,60.368 (I-10)
-- : !pos 256.757, -20.489, 335.920 (M-6)
-----------------------------------
local eldiemeID = zones[xi.zone.THE_ELDIEME_NECROPOLIS]
-----------------------------------
Expand Down Expand Up @@ -88,6 +91,8 @@ quest.sections =
[50] = function(player, csid, option, npc)
player:messageSpecial(eldiemeID.text.SPIRIT_INCENSE_EMITS_PUTRID_ODOR, xi.ki.SPIRIT_INCENSE)
player:delKeyItem(xi.ki.SPIRIT_INCENSE)

npc:setPos(unpack(eldiemeID.npc.QM1_POS[math.random(1, 4)])) -- move QM1 randomly on quest completion
end,
},
},
Expand Down
11 changes: 11 additions & 0 deletions scripts/zones/The_Eldieme_Necropolis/IDs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ zones[xi.zone.THE_ELDIEME_NECROPOLIS] =
UNCANNY_SENSATION = 11609, -- You are assaulted by an uncanny sensation.
COMMON_SENSE_SURVIVAL = 11643, -- It appears that you have arrived at a new survival guide provided by the Adventurers' Mutual Aid Network. Common sense dictates that you should now be able to teleport here from similar tomes throughout the world.
},

mob =
{
CWN_CYRFF = GetFirstID('Cwn_Cyrff'),
Expand All @@ -71,6 +72,7 @@ zones[xi.zone.THE_ELDIEME_NECROPOLIS] =
APPARATUS_ELEMENTAL = 17576271,
NAMORODO = GetFirstID('Namorodo'),
},

npc =
{
GATE_OFFSET = GetFirstID('_5f1'),
Expand All @@ -79,6 +81,15 @@ zones[xi.zone.THE_ELDIEME_NECROPOLIS] =
TREASURE_COFFER = GetFirstID('Treasure_Coffer'),
SARCOPHAGUS_OFFSET = GetFirstID('Sarcophagus'),
CANDLE_OFFSET = GetFirstID('_5fu'),
QM1 = GetFirstID('qm1'),

QM1_POS =
{
{ -460.85, -1.5, 425.14 }, -- D-5.
{ -24.10, -9.303, 258.993 }, -- I-7.
{ -19.624, -1.631, 60.368 }, -- I-10.
{ 256.757, -20.489, 335.920 }, -- M-6.
},
},
}

Expand Down
8 changes: 8 additions & 0 deletions scripts/zones/The_Eldieme_Necropolis/Zone.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
-----------------------------------
-- Zone: The Eldieme Necropolis (195)
-----------------------------------
local eldiemeID = zones[xi.zone.THE_ELDIEME_NECROPOLIS]
-----------------------------------
---@type TZone
local zoneObject = {}

zoneObject.onInitialize = function(zone)
xi.treasure.initZone(zone)

-- Give the Acting in Good Faith ??? a random spawn
local qm1 = GetNPCByID(eldiemeID.npc.QM1)
if qm1 then
qm1:setPos(unpack(eldiemeID.npc.QM1_POS[math.random(1, 4)]))
end
end

zoneObject.onZoneIn = function(player, prevZone)
Expand Down

0 comments on commit 4f08efd

Please sign in to comment.