I would like to know how I do for those who use one scroll do not use the other, these two scrolls have the storages of the quest.
tfs0.4
tfs0.4
Lua:
function onUse(cid, item, itemEx, toPosition)
local pos = getCreaturePosition(cid)
if (getTilePzInfo(getPlayerPosition(cid)) == TRUE) then
if getPlayerStorageValue(cid, 101149) == -1 then
doPlayerSendTextMessage(cid, 22, "You already have permission to use the Green Djinn!")
else
doRemoveItem(item.uid, 1)
doSendMagicEffect(getCreaturePosition(cid), 14)
setPlayerStorageValue(cid, 9032, 8)
setPlayerStorageValue(cid, 100061, 1)
setPlayerStorageValue(cid, 100064, 14)
setPlayerStorageValue(cid,100159, 6)
setPlayerStorageValue(cid,100099, 1)
setPlayerStorageValue(cid,11152, 1) -- nao poder falar umar
doPlayerSendTextMessage(cid, 22, "You just received permission to use the Green Djinn!")
end
else
doPlayerSendTextMessage(cid, 22, "You can only use this item inside protection zone!")
end
return true
end
Lua:
function onUse(cid, item, itemEx, toPosition)
local pos = getCreaturePosition(cid)
if (getTilePzInfo(getPlayerPosition(cid)) == TRUE) then
if getPlayerStorageValue(cid, 101150) == 1 then
doPlayerSendTextMessage(cid, 22, "You already have permission to use the Green Djinn!")
else
doRemoveItem(item.uid, 1)
doSendMagicEffect(getCreaturePosition(cid), 14)
setPlayerStorageValue(cid, 10159, 1) -- porta storage
setPlayerStorageValue(cid, 10160, 1) -- lagrima agua
setPlayerStorageValue(cid,11153, 1) -- lampada
setPlayerStorageValue(cid, 100159, 6)
setPlayerStorageValue(cid, 100061, 1)
setPlayerStorageValue(cid, 100062, 12)
setPlayerStorageValue(cid, 100032, -1) -- alesar,yaman storage
setPlayerStorageValue(cid,101149, 1) -- nao poder falar umar
doPlayerSendTextMessage(cid, 22, "You just received permission to use the Green Djinn!")
end
else
doPlayerSendTextMessage(cid, 22, "You can only use this item inside protection zone!")
end
return true
end