Hello, i create one script about the tibiarl quest but i have one problem i latest storage (if getPlayerStorageValue == 2) he doesn't work, i dont have idea because dont work..
- - - Updated - - -
Works 1
Wroks 2
Fail 2
LUA:
local function changeBack(Pos)
doTransformItem(getTileItemById(Pos, 8633).uid, 8635)
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(itemEx.itemid == 8635) then
if getPlayerStorageValue(cid,62340) == -1 then
doPlayerSendTextMessage(cid, 21, "Suddenly a guard jumps at you from behind")
doSummonMonster('Deepling Guard', toPosition)
doTransformItem(itemEx.uid, 8633)
setPlayerStorageValue(cid, 62340, 1)
else
doPlayerSendTextMessage(cid,21,"Continue your mission")
end
elseif(itemEx.itemid == 8633) then
if getPlayerStorageValue(cid,62340) == 1 then
doPlayerSendTextMessage(cid,21,"You gathered nothing more than some small chips at red gem.")
setPlayerStorageValue(cid, 62340, (getPlayerStorageValue(cid, 62340) + 1))
else
doPlayerSendTextMessage(cid,21,"You\'re not allowed")
end
elseif(itemEx.itemid == 8633) then
if getPlayerStorageValue(cid,62340) == 2 then
doPlayerSendTextMessage(cid,21,"With considerable effort you manage to knock a largely unscathed rough gem out of the rocks.")
doPlayerAddItem(cid,15565,1)
addEvent(changeBack, 10000, toPosition)
setPlayerStorageValue(cid, 62340, (getPlayerStorageValue(cid, 62340) + 1))
else
doPlayerSendTextMessage(cid,21,"You\'re not allowed")
end
end
end
- - - Updated - - -
Works 1
Wroks 2
Fail 2