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

[ACTION] doTransformItem, doCreateItem question

Lopaskurwa

Well-Known Member
Joined
Oct 6, 2017
Messages
936
Solutions
2
Reaction score
57
Hello,
so i have really simple script which works like this You press on tree(use) it transforms that tree to another object and creates item so basically this script blueberry bush you press use you take those blueberrys from the tree, but i dont know how to reset it back after one hours so its like grows back.

Code:
function onUse(cid, item, frompos, item2, topos)
     bluebushid = 14480 -- Itemid of the blueberry bush
      bushid =  14481      -- Itemid of the empty bush
     blueberryid = 2677 -- Itemid of blueberries
   
     doTransformItem(item.uid, bushid)
     doCreateItem(blueberryid, 3, frompos)
     doDecayItem(item.uid)
end

So once you press use it wont go back to 14480 so i want to make after like one hour it goes back to 14480 and you can take those blueberries again so basically you can repeat same action after one hour

TFS 1.2
 
Solution
You put "decayto=id" and "duration" attribute to your empty bush item in items.xml.
Check out how blueberry bushes are registered and compare.
You put "decayto=id" and "duration" attribute to your empty bush item in items.xml.
Check out how blueberry bushes are registered and compare.
 
Solution
Back
Top