2019-06-19 01:10:15 -04:00
|
|
|
--[[
|
|
|
|
|
2022-01-24 23:49:10 -05:00
|
|
|
RequestQuestJournalCommand Script
|
2019-06-19 01:10:15 -04:00
|
|
|
|
2022-01-24 23:49:10 -05:00
|
|
|
Functions: None
|
2019-06-19 01:10:15 -04:00
|
|
|
|
2022-01-24 23:49:10 -05:00
|
|
|
Notes:
|
2019-06-19 01:10:15 -04:00
|
|
|
|
2022-01-24 23:49:10 -05:00
|
|
|
Fires when the player looks at a quest's journal entry and the map section. Check the quest sheet and quest_marker sheet
|
|
|
|
for valid entries for your quest.
|
|
|
|
|
|
|
|
--]]
|
|
|
|
|
|
|
|
function onEventStarted(player, command, eventType, eventName, questId, mapCode)
|
|
|
|
local quest = player:GetQuest(questId);
|
2019-06-19 01:10:15 -04:00
|
|
|
|
2022-01-24 23:49:10 -05:00
|
|
|
if (quest ~= nil) then
|
|
|
|
if (mapCode == nil) then
|
|
|
|
-- Get Quest Journal Data
|
|
|
|
local journalInfo = quest:GetJournalInformation();
|
|
|
|
player:SendDataPacket("requestedData", "qtdata", quest:GetQuestId(), quest:GetSequence(), unpack(journalInfo));
|
|
|
|
else
|
|
|
|
-- Get Quest Map Data
|
|
|
|
local mapMarkers = quest:GetJournalMapMarkerList();
|
|
|
|
player:SendDataPacket("requestedData", "qtmap", quest:GetQuestId(), unpack(mapMarkers));
|
|
|
|
end
|
2019-06-19 01:10:15 -04:00
|
|
|
end
|
|
|
|
|
2022-01-24 23:49:10 -05:00
|
|
|
player:EndEvent();
|
2019-06-19 01:10:15 -04:00
|
|
|
end
|