View difference between Paste ID: Ybw0TCKf and A6j8Bhq5
SHOW: | | - or go back to the newest paste.
1
local config = {
2
	time = 60,
3
	arvorescut = {2767, 2768, 2785, 2786, 2708},
4
	residuos = 6219,
5
	Madeira = {0, 1, 2, 3, 4, 5, 6},
6
	messages = {"cuting", "Cortando", "tak tak tak"},
7
}
8
9
function onUse(cid, item, frompos, item2, topos) -- By Lancellott @junior2b
10
11
	if not isInArray(config.arvorescut, item2.itemid) then
12
		doPlayerSendTextMessage(cid, 27, "You only can cut threes!")
13
			return true
14
		end
15
16
	doCreatureSay(cid, config.messages[math.random(#config.messages)], TALKTYPE_ORANGE_1)
17
		doSendMagicEffect(getCreaturePosition(cid), 3)
18
			doTransformItem(item2.uid, config.residuos[math.random(#config.residuos)])
19
				doPlayerAddItem (cid, 5901, config.Madeira[math.random(#config.Madeira)])
20
					
21
				doSendAnimatedText(getCreaturePosition(cid), "CUTED!", math.random(1, 255))
22-
					addEvent(doCreateItem, time*60*1000, item2.itemid, 1, getThingPos(item2.uid))
22+
				addEvent(doCreateItem, config.time*60*1000, item2.itemid, 1, getThingPos(item2.uid))
23-
						return true
23+
					return true
24-
					end
24+
				end