• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Use willow to get special flask

poopsiedoodle

Gibe moni plos
Joined
Nov 23, 2011
Messages
2,457
Reaction score
585
Location
Georgia
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:
Can you be more spefic, the only thing i understood that the willow is like a chest and you open it to get a special flask.
 
i am busy so i wrote the script in the theard :P so 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
 
OMG i smell the bugs!
i am busy so i wrote the script in the theard :P so 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

Here you go:
Actions/actions.xml and paste the line below:
XML:
<action actionid="2000" event="script" value="willow.lua"/>

Actions/scripts and create new lua and name it: "willow.lua" and paste the code below:
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

Enjoy, didn't know what you wanted exactly since you dont explain much. So i guessing.
Just add the actionid on the willow.
 
nah that script which he want i think -.- , why he needs storage , i think its items when he click get another item so i dont think so need storage id
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)
doPlayerSendTextMessage(cid,65,"You Have Special Flask Now.")
end
return true
end

and about the action: if it items use this
XML:
<action itemid="ITEMID" event="script" value="here.lua"/>
 
As limos said, i have no idea that you can carry a tree in the backpack :o

Between, i dont think he ask for actionid, if its inside a backpack.
 
Hey hey

i got what does he mean

u know at real tibia

u use dead tree u got a branch under player

i think he mean when player use tree he find a flask

NOTE -- i mean Zirella Branch Quest ..
 
Last edited:
i think so

because i never see that player can hold the tree in his backpack

hehehe ...
so u are right it's like chest

i told u it's like Zirella Quest at the start of rook

- - - Updated - - -

anyway we have to wait poopsiedoodle
to tell us what does he mean
 
Great then use Cyko's script and about action id
<action actionid="2000" event="script" value="willow.lua"/>

change 2000 to unused action id in ur willow

don't forgot to rep++ cyko
he fix that to you
 
Back
Top