Pegar cherrys nos bushs com machete e no use, com random...
em actions.xml coloque
<action itemid="2785" script="bush.lua" />
se o id for 7.5 deve mudar o id...
e em bush.lua coloque
function onUse(cid, item, frompos, item2, topos)rand = math.random(1,100)
repo = getPlayerName(cid)
if item.itemid == 2785 and rand < 20 then
doTransformItem(item.uid,2786)
doPlayerAddItem(cid,2677,3)
doPlayerSendTextMessage(cid,22,"Whoho, I'm so lucky, I got three blueberries.")
doPlayerSendTextMessage(cid,22,"hum... I think I could get more blueberries using a machete.")
print("JLS ::Player got three blueberries:",repo)
else if rand > 20 and rand < 50 then
doTransformItem(item.uid,2786)
doPlayerAddItem(cid,2677,2)
doPlayerSendTextMessage(cid,22,"mmm... Not bad at all, I got two blueberries.")
doPlayerSendTextMessage(cid,22,"hum... I think I could get more blueberries using a machete.")
print("JLS ::Player got two blueberries:",repo)
else if rand > 50 and rand < 80 then
doTransformItem(item.uid,2786)
doPlayerAddItem(cid,2677,1)
doPlayerSendTextMessage(cid,22,"I managed to get a blueberry.")
doPlayerSendTextMessage(cid,22,"hum... I think I could get more blueberries using a machete.")
print("JLS ::Player got a blueberry:",repo)
else if rand > 80 and rand < 100 then
doTransformItem(item.uid,2786)
doPlayerSendTextMessage(cid,22,"Damn, I'm so unlucky.")
print("JLS ::Player haven't got any blueberry:",repo)
end
return 1
end
end
end
end
com a machete vc pode pegar 4 a 5 blueberrys e adicionar skill de sworde em machete.lua coloque
if item2.itemid == 2785 and rand < 35 thendoTransformItem(item2.uid,2786)
doPlayerAddItem(cid,2677,5)
doPlayerAddSkillTry(cid,2,1)
doPlayerSendTextMessage(cid,22,"Oh! That's much better, I got 5 blueberries.")
elseif item2.itemid == 2785 and rand > 35 then
doTransformItem(item2.uid,2786)
doPlayerAddItem(cid,2677,4)
doPlayerAddSkillTry(cid,2,1)
doPlayerSendTextMessage(cid,22,"Oh! That's much better, I got 4 blueberries.")
else
return 0
end
só adicione isso o q ja tinha deixa neh, mas bota antes dos outros ends pra nao terminar a action neh xP
fonte: ######