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

Rake Action Help

Blackcody

RiseOfTibia Owner
Joined
Aug 31, 2008
Messages
136
Reaction score
1
this is the idea

You Use The Rake To Go From Grass To Dirt
Then you Use The Hoe To Go From Dirt To Plantable Soil
Lua:
Rake Id = 2549
Hoe Id = 2552
Grass Id = 106, 103, 101
Dirt Id = 804
Plantable Soil Id = 806
Seeds Id = 7732


The Rake Code That Should Transform The Grass To Dirt
Lua:
local id = {106, 103, 101}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if itemid == 2549 and item.itemid == id  then 
		doTransformItem(id, 804)
end
Or Something Like That
 
Last edited:
I looked up Herbalism and found a couple links that might help you out.
Code:
[URL]http://otland.net/f163/mod-professions-system-99754/[/URL]
Code:
[URL]http://otland.net/f16/script-does-not-work-106353/[/URL]
 
Lua:
local actionId = 9000

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(isInArray({106, 103, 101}, itemEx.itemid) and item.itemid == 2549) then
		doTransformItem(itemEx.uid, 804)
		doItemSetAttribute(itemEx.uid, "aid", actionId)
		doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_POFF)
	elseif(itemEx.itemid == 804 and itemEx.actionid == actionId and item.itemid == 2552) then
		doTransformItem(itemEx.uid, 806)
		doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_POFF)
	elseif(itemEx.itemid == 806 and itemEx.actionid == actionId and item.itemid == 7732) then
		pos = {x = getThingPos(itemEx.uid).x, y = getThingPos(itemEx.uid).y, z = getThingPos(itemEx.uid).z, stackpos = 1}
		doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_POFF)
		doRemoveItem(item.uid, 1)
		doCreateItem(2737, 1, pos)
		addEvent(doTransformItem, 20 * 1000, getTileItemById(getThingPos(itemEx.uid), 2737).uid, 2738)
		addEvent(doTransformItem, 20 * 1000, getTileItemById(getThingPos(itemEx.uid), 2738).uid, 2739)
	end
	return true
end
 
Back
Top