mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-10-14 14:44:55 +02:00
introduce djinns and postman questpass
This commit is contained in:
26
data/actions/scripts/misc/djinn_quest_pass.lua
Normal file
26
data/actions/scripts/misc/djinn_quest_pass.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
local greenDjinnItem = 6549
|
||||
local blueDjinnItem = 6551
|
||||
|
||||
function onUse(player, item, fromPosition, target, toPosition)
|
||||
if player:getStorageValue(278) > 1 then
|
||||
player:sendTextMessage(MESSAGE_INFO_DESCR, "You have already finished one of the djinn quest or your quest is in-progress.")
|
||||
return true
|
||||
end
|
||||
|
||||
if item:getId() == greenDjinnItem then
|
||||
player:setStorageValue(278, 3)
|
||||
player:setStorageValue(286, 3)
|
||||
player:setStorageValue(287, 3)
|
||||
player:setStorageValue(288, 3)
|
||||
elseif item:getId() == blueDjinnItem then
|
||||
player:setStorageValue(278, 2)
|
||||
player:setStorageValue(280, 2)
|
||||
player:setStorageValue(281, 2)
|
||||
player:setStorageValue(282, 2)
|
||||
player:setStorageValue(283, 3)
|
||||
end
|
||||
|
||||
item:getPosition():sendMagicEffect(3)
|
||||
item:remove()
|
||||
return true
|
||||
end
|
22
data/actions/scripts/misc/postman_quest_pass.lua
Normal file
22
data/actions/scripts/misc/postman_quest_pass.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
function onUse(player, item, fromPosition, target, toPosition)
|
||||
if player:getStorageValue(250) == 5 then
|
||||
player:sendTextMessage(MESSAGE_INFO_DESCR, "You have already finished The Postman Missions.")
|
||||
return true
|
||||
end
|
||||
|
||||
player:setStorageValue(227, 6)
|
||||
player:setStorageValue(228, 3)
|
||||
player:setStorageValue(229, 4)
|
||||
player:setStorageValue(230, 21)
|
||||
player:setStorageValue(231, 3)
|
||||
player:setStorageValue(233, 11)
|
||||
player:setStorageValue(234, 8)
|
||||
player:setStorageValue(242, 2)
|
||||
player:setStorageValue(244, 3)
|
||||
player:setStorageValue(245, 3)
|
||||
player:setStorageValue(250, 5)
|
||||
|
||||
item:getPosition():sendMagicEffect(CONST_ME_SOUND_GREEN)
|
||||
item:remove()
|
||||
return true
|
||||
end
|
Reference in New Issue
Block a user