From 840f4fbd5b7704f3482f384a14145e6baa2071ea Mon Sep 17 00:00:00 2001 From: WibbenZ Date: Sun, 5 Mar 2017 20:11:47 +0100 Subject: [PATCH] Fixes and updates regarding the post man quest --- data/XML/quests.xml | 12 ++++++------ data/actions/actions.xml | 1 + .../scripts/quests/postman/waldosPostHorn.lua.lua | 10 ++++++++++ data/items/items.xml | 3 ++- data/npc/scripts/Kevin.lua | 9 +++++---- 5 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 data/actions/scripts/quests/postman/waldosPostHorn.lua.lua diff --git a/data/XML/quests.xml b/data/XML/quests.xml index a952216..c4c87ce 100644 --- a/data/XML/quests.xml +++ b/data/XML/quests.xml @@ -962,12 +962,12 @@ - - - - - - + + + + + + diff --git a/data/actions/actions.xml b/data/actions/actions.xml index 236d9df..5c19718 100644 --- a/data/actions/actions.xml +++ b/data/actions/actions.xml @@ -309,6 +309,7 @@ + diff --git a/data/actions/scripts/quests/postman/waldosPostHorn.lua.lua b/data/actions/scripts/quests/postman/waldosPostHorn.lua.lua new file mode 100644 index 0000000..e62be52 --- /dev/null +++ b/data/actions/scripts/quests/postman/waldosPostHorn.lua.lua @@ -0,0 +1,10 @@ +function onUse(player, item, fromPosition, target, toPosition, isHotkey) + if player:getStorageValue(Storage.postman.Mission08) == 1 then + player:setStorageValue(Storage.postman.Mission08, 2) + player:addItem(2332, 1) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You found Waldo's posthorn.") + else + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'The dead human is empty.') + end + return true +end diff --git a/data/items/items.xml b/data/items/items.xml index 610dc57..9451e97 100644 --- a/data/items/items.xml +++ b/data/items/items.xml @@ -2950,7 +2950,8 @@ - + + diff --git a/data/npc/scripts/Kevin.lua b/data/npc/scripts/Kevin.lua index e886510..d7640ff 100644 --- a/data/npc/scripts/Kevin.lua +++ b/data/npc/scripts/Kevin.lua @@ -4,8 +4,8 @@ NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end -function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end -function onThink() npcHandler:onThink() end +function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end +function onThink() npcHandler:onThink() end local function getPlayerBones(cid) local player = Player(cid) @@ -21,6 +21,7 @@ local function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end + local player = Player(cid) if msgcontains(msg, "mission") then if player:getStorageValue(Storage.postman.Mission01) < 1 then @@ -120,7 +121,7 @@ local function creatureSayCallback(cid, type, msg) npcHandler:say("Good! Finally, find the technomancer Brodrosch and travel with him to the Isle of Cormaya. After this passage report back to me here. Understood?", cid) npcHandler.topic[cid] = 7 elseif npcHandler.topic[cid] == 7 then - npcHandler:say("Ok, remember: the Tibian mail service puts trust in you! Don't fail and report back soon. Just tell me about your {MISSION}.", cid) + npcHandler:say("Ok, remember: the Tibian mail service puts trust in you! Don't fail and report back soon. Just tell me about your {mission}.", cid) player:setStorageValue(Storage.postman.Mission01, 1) npcHandler.topic[cid] = 0 elseif npcHandler.topic[cid] == 8 then @@ -195,7 +196,7 @@ local function creatureSayCallback(cid, type, msg) player:addItem(2078, 1) npcHandler.topic[cid] = 0 elseif npcHandler.topic[cid] == 25 then - npcHandler:say("So listen well. Behind the lower left door you will find a bag. The letters in the bag are for none other than Santa Claus! Deliver them to his house on the isle of Vega, USE thebag on his mailbox and report back here.", cid) + npcHandler:say("So listen well. Behind the lower left door you will find a bag. The letters in the bag are for none other than Santa Claus! Deliver them to his house on the isle of Vega, {use} thebag on his mailbox and report back here.", cid) player:setStorageValue(Storage.postman.Mission09, 1) npcHandler.topic[cid] = 0 elseif npcHandler.topic[cid] == 26 then