• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Orange tree giving orange's

Ataro

Member
Joined
Oct 28, 2010
Messages
689
Reaction score
19
Location
Netherlands
Hey here is a script for getting Oranges on using orange tree
I have not tested it yet!

orangetree.lua
Code:
function onUse(cid, item, frompos, item2, topos)
            doTransformItem(item.uid,4008)
            doPlayerAddItem(cid,2675,math.random(5))
            doDecayItem(item.uid)
      return 1 
end


Actions.xml
Code:
<action itemid="4006" script="orangetree.lua" />

added random orange amount and removed itemid check
Also: Tabbed it right
 
Last edited:
You don't need to check the item id (if item.itemid) since its registered.
 
Would it be better though to add a random amount of oranges?
like:
Lua:
doPlayerAddItem(cid,2675,math.random(1,5))

But I think this script sure will help some people!
 
i saw your like, thanks
i am thinking i will try to become scripter
but my fantasy and imagination is bad
does someone have an idea for a script that isnt here already
 
remove the "end" before return 1, you prolly forget after removing the check.
Also, I like return true more but that won't affect the script. :D
 
i saw your like, thanks
i am thinking i will try to become scripter
but my fantasy and imagination is bad
does someone have an idea for a script that isnt here already
A cave that has an entrance that only opens every 2 hours and closes in 15 mins, you can stay in it and hunt, but once you go out you can't go back in, and it announces "The forsaken cave has opened!" and "The forsaken cave has closed!"
 
A cave that has an entrance that only opens every 2 hours and closes in 15 mins, you can stay in it and hunt, but once you go out you can't go back in, and it announces "The forsaken cave has opened!" and "The forsaken cave has closed!"
Gave me a slight hard on
 
Back
Top