poopsiedoodle
Gibe moni plos
Can someone make me a script to use a willow (ID: 2702) to get a Special Flask (ID: 8205) that can be done only once per player?
Last edited:
<action uniqueid="9898" event="script" value="willow.lua" />
local storage = 9898
local itemids = 8205
local sirion = getPlayerStorageValue(cid,storage)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if sirion == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a special flask.")
doPlayerAddItem(cid,itemids,1)
setPlayerStorageValue(cid,storage,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
return true
end
LUA:local cyko = { storage = 9999, --add unsuded storage reward = 8205--itemid as reward } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid,cyko.storage) == -1 then doPlayerAddItem(cid,cyko.reward,1) doPlayerSendTextMessage(cid,25,"You have found a special flask.") setPlayerStorageValue(cid,cyko.storage, 1) else doPlayerSendTextMessage(cid,25,"The willow is empty.") end return true end
local cyko = {
storage = 9999, --add unsuded storage
reward = 8205--itemid as reward
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,cyko.storage) == -1 then
doPlayerAddItem(cid,cyko.reward,1)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a special flask.")
setPlayerStorageValue(cid,cyko.storage, 1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "The willow is empty.")
end
return true
end
local cyko = {
storage = 9999, --add unsuded storage
reward = 8205--itemid as reward
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,cyko.storage) == -1 then
doPlayerAddItem(cid,cyko.reward,1)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a special flask.")
setPlayerStorageValue(cid,cyko.storage, 1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "The willow is empty.")
end
return true
end