• 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!

Use willow to get special flask

poopsiedoodle

Gibe moni plos
Joined
Nov 23, 2011
Messages
2,452
Reaction score
580
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:
hehehe WTF.. he asked him to talk in English and he can't speak English

- - - Updated - - -

Cyko i test your script it work's fine lol.

- - - Updated - - -

Hey that what have i made to script

in my action.xml
i add this line
<action actionid="2222" event="script" value="willow.lua"/>
under this line
<action uniqueid="30015" event="script" value="quests/annihilator.lua"/>

and in my script folder
i add 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

and in my map
i add actionid 2222 to willow(2702)
come with photo

action in game must be as in script
93045918.jpg

and this when i right click on tree
61784371.jpg

and this if i try to use it again it's empty
57238448.jpg

so script work's fine

NOTE --- All Right Reserve To Cyko
 
Last edited:
I'm using the script, I set actionID to 2222, and it still doesn't work.

bug_zps212222f3.png
 
If someone makes a script for you and it doesn't seems to work the way you want, always give a full explanation what you did.
How you added it in the xml, the lua script you added with the name, how you added it in the map, what happens when you use it and what kind of errors you get.

Else there is no way for people to know what's wrong.
 
Oh My God -.-
IF IT NO WORK SO PROBLEM WITH YOU
HERE WE ARE
In your actions/actions.xml paste the following code:
XML:
	<action uniqueid="9898" event="script" value="willow.lua" />

Now In your actions/scripts create file name willow.lua and paste the following:
Lua:
local storage = 9898
local item = 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,item,1)
   			setPlayerStorageValue(cid,storage,1)
   		else
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
	end
   	return 1
end

now go to your willow and make on it uniqueid = 9898

IT SHOULD WORK.
 
There is no use to help him, if he cant follow even simple instructions and between what kind of server do you even use?
 
@poopsiedoodle
how is cyko's script never work?
u have something wrong in your mind
after my full explain with pics it's still not work..
OMG !!!

@Siron
your help is useless
he can't understand the simple way lol
so we are waste our time

@Cyko
your script work's fine
so it's {poopsiedoodle} problem
anyway we thank you for waste your time.
 
This
If someone makes a script for you and it doesn't seems to work the way you want, always give a full explanation what you did.
How you added it in the xml, the lua script you added with the name, how you added it in the map, what happens when you use it and what kind of errors you get.

Else there is no way for people to know what's wrong.

The floor doesn't have effect on this script.
 
Limos .. You're right
how we can fix it if he didn't even say the error
i show him the simple way to make script work and also i tested it
and he still saying it's not work
but what kind of error he got ? i think he wanna us imagine the error xD
 
The id you used in the tree should be the same as the one you used in actions.xml, so if you use uniqueid 2222 in actions.xml then add uniqueid 2222 in the tree (if you want to use the script for more trees then use actionid, but actionid 200 isn't needed if you are already using an uniqueid).
Also Mystic Spirit doesn't use event and value but just script, as you can see in the other lines.
 
Last edited:
Back
Top