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:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local willow = 2702
local flask = 8205
if doPlayerRemoveItem(cid, willow, 1) then
doPlayerAddItem(uid, flask)
end
return true
end
i am busy so i wrote the script in the theardso if there any errors tell me , and if that what you want tell me too
Here We Are
LUA:function onUse(cid, item, fromPosition, itemEx, toPosition) local willow = 2702 local flask = 8205 if doPlayerRemoveItem(cid, willow, 1) then doPlayerAddItem(uid, flask) end return true end
<action actionid="2000" event="script" value="willow.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
function onUse(cid, item, fromPosition, itemEx, toPosition)
local willow = 2702
local flask = 8205
if doPlayerRemoveItem(cid, willow, 1) then
doPlayerAddItem(uid, flask)
doPlayerSendTextMessage(cid,65,"You Have Special Flask Now.")
end
return true
end
<action itemid="ITEMID" event="script" value="here.lua"/>