mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-10-13 22:34:53 +02:00
finish nargor island quest
This commit is contained in:
28
data/actions/scripts/meriana_quest/pirate_map.lua
Normal file
28
data/actions/scripts/meriana_quest/pirate_map.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
local maps = {
|
||||
[17528] = "You have successfully read plan A.",
|
||||
[17529] = "You have successfully read plan B.",
|
||||
[17530] = "You have successfully read plan C."
|
||||
}
|
||||
|
||||
function onUse(player, item, fromPosition, target, toPosition)
|
||||
local mapActionId = item:getActionId()
|
||||
local map = maps[mapActionId]
|
||||
if not map then
|
||||
return false
|
||||
end
|
||||
|
||||
local playerPosition = player:getPosition()
|
||||
if player:getStorageValue(17520) < 8 then
|
||||
player:say("You shouldn't touch these maps because someone might see you.", TALKTYPE_MONSTER_SAY, false, 0, playerPosition)
|
||||
return true
|
||||
end
|
||||
|
||||
if player:getStorageValue(mapActionId) ~= 1 then
|
||||
player:say(map, TALKTYPE_MONSTER_SAY, false, 0, playerPosition)
|
||||
player:setStorageValue(mapActionId, 1)
|
||||
else
|
||||
player:say("You have already read this map.", TALKTYPE_MONSTER_SAY, false, 0, playerPosition)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
10
data/actions/scripts/meriana_quest/tortoise_egg.lua
Normal file
10
data/actions/scripts/meriana_quest/tortoise_egg.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
function onUse(player, item, fromPosition, target, toPosition)
|
||||
if player:getStorageValue(17526) < os.time() then
|
||||
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a tortoise egg from Nargor.")
|
||||
player:setStorageValue(17526, os.time() + 24 * 60 * 60) -- 24 hour
|
||||
player:addItem(6125,1)
|
||||
else
|
||||
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You shoud not take any more today.")
|
||||
end
|
||||
return true
|
||||
end
|
@@ -1,4 +1,10 @@
|
||||
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
||||
if player:getStorageValue(17520) == 5 and target.itemid == 5601 then
|
||||
player:setStorageValue(17520, 6)
|
||||
toPosition:sendMagicEffect(CONST_ME_FIREAREA)
|
||||
return true
|
||||
end
|
||||
|
||||
local random = math.random(10)
|
||||
if random >= 4 then --success 6% chance
|
||||
if target.itemid == 5465 then --Burn Sugar Cane
|
||||
|
Reference in New Issue
Block a user