SaintSeiya
New Member
- Joined
- Jan 3, 2015
- Messages
- 27
- Reaction score
- 0
Hi guys, I tried to make a script that makes sugar oat.
After clicking on Bunch of Sugar cane, click on Use With and choose bunch of wheat and it will make Sugar Oat.
Then, those 2 items will make sugar oat = (13939)
Sugar Oat (13939) = Bunch of Sugar cane (5467) + Bunch of wheat (2694)
That's what I have (data/actions/sugaroat.lua) , i don't know what else can I do :/
Line in actions.xml
After clicking on Bunch of Sugar cane, click on Use With and choose bunch of wheat and it will make Sugar Oat.
Then, those 2 items will make sugar oat = (13939)
Sugar Oat (13939) = Bunch of Sugar cane (5467) + Bunch of wheat (2694)
That's what I have (data/actions/sugaroat.lua) , i don't know what else can I do :/
Code:
function onUse()
local player = Player(cid)
local useItem = Item(item)
local targetItem = Item(itemEx)
if targetItem:getId() == 5467 then
useItem:remove()
targetItem:remove()
player:addItem(13939, 1)
end
Line in actions.xml
Code:
<action itemid="2694" script="other/sugaroat.lua"/>