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

Woodcuting - need change

Flyckks

New Member
Joined
Jul 28, 2012
Messages
23
Reaction score
1
Location
Brazil
Hello everybody.

I need some change in a script that isnt working.


Here it goes:

arvores = {2700, 2701} -- Possível adicionar mais IDs.
local arvmorta = {2719, 2701} -- Possível adicionar mais IDs.
local chance = math.random(1,10)
local addID = {9805} -- Possível adicionar mais IDs.

function onUse(cid, item, frompos, item2, topos)
if isInArray(arvores, item2.itemid) then
if chance == 1 then
doPlayerAddItem(cid,addID[math.random(1,#addID)],1)
doSendMagicEffect(topos,12)
doTransformItem(item2.uid, arvmorta[math.random(1, #arvmorta)])
doPlayerSendTextMessage(cid,22,"Você cortou um pedaço de madeira!")
elseif chance == 2 then
doRemoveItem(item.uid,1)
doCreatureAddHealth(cid, -20)
doPlayerSendTextMessage(cid,22,"Seu machado quebrou e você se machucou.")
else
doPlayerSendTextMessage(cid,22,"Nada aconteceu.")
return TRUE
end
end


It will have 7 Tree ids, 7 dead tree ids, and 7 wood ids
 
Back
Top