UHU, dei uma pesquisada e esse eh o 1° sistema de lumberjack daki
bem, eh assim, 1° eu kero fala q nao eh ainda 100% completo, mas ja funciona legal, eu ainda nao adicionei o sistema para destruir as arvores apos serem cortadas e tbm nao fiz para todas as arvores, mas apenas para a maioria das que vc encontra porai.
Ele corta arvores!
mas vam la...
1° -- Crie um arquivo de texto na pasta data\actions\scripts
dentro desse arquivo coloke o seguinte:
function onUse(cid, item, frompos, item2, topos)
if item2.itemid == 2700 then
rand = math.random(1,15)
if rand == 1 then
doPlayerAddItem(cid,5901,1)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou uma madeira!")
elseif rand == 2 then
doPlayerAddItem(cid,5901,2)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou duas madeiras!")
elseif rand == 3 then
doPlayerAddItem(cid,5901,3)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou tres madeiras!")
elseif rand == 4 then
doSummonCreature("Bat", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Um morcego o atacou!")
elseif rand == 5 then
doSummonCreature("Snake", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Uma cobra estava na arvore.")
elseif rand == 6 then
doSummonCreature("Rabbit", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou um coelho.")
elseif rand == 7 then
doRemoveItem(item.uid,1)
doPlayerSendTextMessage(cid,22,"Seu axe quebrou.")
elseif rand >= 8 or 11 then
doTransformItem(item2.uid,5901)
doPlayerSendTextMessage(cid,22,"A árvore se esgotou.")
elseif rand >= 12 or 15 then
doPlayerSendTextMessage(cid,22,"Nada aconteceu.")
end
end
if item2.itemid == 2701 then
rand = math.random(1,15)
if rand == 1 then
doPlayerAddItem(cid,5901,1)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou uma madeira!")
elseif rand == 2 then
doPlayerAddItem(cid,5901,2)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou duas madeiras!")
elseif rand == 3 then
doPlayerAddItem(cid,5901,3)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou tres madeiras!")
elseif rand == 4 then
doSummonCreature("Bat", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Um morcego o atacou!")
elseif rand == 5 then
doSummonCreature("Snake", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Uma cobra estava na arvore.")
elseif rand == 6 then
doSummonCreature("Rabbit", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou um coelho.")
elseif rand == 7 then
doRemoveItem(item.uid,1)
doPlayerSendTextMessage(cid,22,"Seu axe quebrou.")
elseif rand >= 8 or 11 then
doTransformItem(item2.uid,5901)
doPlayerSendTextMessage(cid,22,"A árvore se esgotou.")
elseif rand >= 12 or 15 then
doPlayerSendTextMessage(cid,22,"Nada aconteceu.")
end
end
if item2.itemid == 2702 then
rand = math.random(1,15)
if rand == 1 then
doPlayerAddItem(cid,5901,1)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou uma madeira!")
elseif rand == 2 then
doPlayerAddItem(cid,5901,2)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou duas madeiras!")
elseif rand == 3 then
doPlayerAddItem(cid,5901,3)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou tres madeiras!")
elseif rand == 4 then
doSummonCreature("Bat", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Um morcego o atacou!")
elseif rand == 5 then
doSummonCreature("Snake", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Uma cobra estava na arvore.")
elseif rand == 6 then
doSummonCreature("Rabbit", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou um coelho.")
elseif rand == 7 then
doRemoveItem(item.uid,1)
doPlayerSendTextMessage(cid,22,"Seu axe quebrou.")
elseif rand >= 8 or 11 then
doTransformItem(item2.uid,5901)
doPlayerSendTextMessage(cid,22,"A árvore se esgotou.")
elseif rand >= 12 or 15 then
doPlayerSendTextMessage(cid,22,"Nada aconteceu.")
end
end
if item2.itemid == 2703 then
rand = math.random(1,15)
if rand == 1 then
doPlayerAddItem(cid,5901,1)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou uma madeira!")
elseif rand == 2 then
doPlayerAddItem(cid,5901,2)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou duas madeiras!")
elseif rand == 3 then
doPlayerAddItem(cid,5901,3)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou tres madeiras!")
elseif rand == 4 then
doSummonCreature("Bat", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Um morcego o atacou!")
elseif rand == 5 then
doSummonCreature("Snake", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Uma cobra estava na arvore.")
elseif rand == 6 then
doSummonCreature("Rabbit", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou um coelho.")
elseif rand == 7 then
doRemoveItem(item.uid,1)
doPlayerSendTextMessage(cid,22,"Seu axe quebrou.")
elseif rand >= 8 or 11 then
doTransformItem(item2.uid,5901)
doPlayerSendTextMessage(cid,22,"A árvore se esgotou.")
elseif rand >= 12 or 15 then
doPlayerSendTextMessage(cid,22,"Nada aconteceu.")
end
end
if item2.itemid == 2704 then
rand = math.random(1,15)
if rand == 1 then
doPlayerAddItem(cid,5901,1)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou uma madeira!")
elseif rand == 2 then
doPlayerAddItem(cid,5901,2)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou duas madeiras!")
elseif rand == 3 then
doPlayerAddItem(cid,5901,3)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou tres madeiras!")
elseif rand == 4 then
doSummonCreature("Bat", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Um morcego o atacou!")
elseif rand == 5 then
doSummonCreature("Snake", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Uma cobra estava na arvore.")
elseif rand == 6 then
doSummonCreature("Rabbit", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou um coelho.")
elseif rand == 7 then
doRemoveItem(item.uid,1)
doPlayerSendTextMessage(cid,22,"Seu axe quebrou.")
elseif rand >= 8 or 11 then
doTransformItem(item2.uid,5901)
doPlayerSendTextMessage(cid,22,"A árvore se esgotou.")
elseif rand >= 12 or 15 then
doPlayerSendTextMessage(cid,22,"Nada aconteceu.")
end
end
if item2.itemid == 2705 then
rand = math.random(1,15)
if rand == 1 then
doPlayerAddItem(cid,5901,1)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou uma madeira!")
elseif rand == 2 then
doPlayerAddItem(cid,5901,2)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou duas madeiras!")
elseif rand == 3 then
doPlayerAddItem(cid,5901,3)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou tres madeiras!")
elseif rand == 4 then
doSummonCreature("Bat", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Um morcego o atacou!")
elseif rand == 5 then
doSummonCreature("Snake", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Uma cobra estava na arvore.")
elseif rand == 6 then
doSummonCreature("Rabbit", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou um coelho.")
elseif rand == 7 then
doRemoveItem(item.uid,1)
doPlayerSendTextMessage(cid,22,"Seu axe quebrou.")
elseif rand >= 8 or 11 then
doTransformItem(item2.uid,5901)
doPlayerSendTextMessage(cid,22,"A árvore se esgotou.")
elseif rand >= 12 or 15 then
doPlayerSendTextMessage(cid,22,"Nada aconteceu.")
end
end
if item2.itemid == 2706 then
rand = math.random(1,15)
if rand == 1 then
doPlayerAddItem(cid,5901,1)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou uma madeira!")
elseif rand == 2 then
doPlayerAddItem(cid,5901,2)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou duas madeiras!")
elseif rand == 3 then
doPlayerAddItem(cid,5901,3)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou tres madeiras!")
elseif rand == 4 then
doSummonCreature("Bat", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Um morcego o atacou!")
elseif rand == 5 then
doSummonCreature("Snake", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Uma cobra estava na arvore.")
elseif rand == 6 then
doSummonCreature("Rabbit", topos)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"Você achou um coelho.")
elseif rand == 7 then
doRemoveItem(item.uid,1)
doPlayerSendTextMessage(cid,22,"Seu axe quebrou.")
elseif rand >= 8 or 11 then
doTransformItem(item2.uid,5901)
doPlayerSendTextMessage(cid,22,"A árvore se esgotou.")
elseif rand >= 12 or 15 then
doPlayerSendTextMessage(cid,22,"Nada aconteceu.")
end
end
return 1
end
[/b]
Numeros: 2700,2701,2702,2703,2704,2705,2706 : ID das arvores possiveis de usar o machado
Numeros: 5901,5901,5901 etc.. : ID da madeira
OK, agora salve como lumberjack.lua
agora abra o arquivo actions.xml na pasta data\actions
e adicione a linha:
<action itemid="2386" script="lumberjack.lua"/>
2386: ID do machado, no me caso eu usei o axe (akele q dropa de orc)
lumberjack.lua: nome do script
agora eh so abrir o server e se divertir
olha, se vcs kiserem editar, fikem a vontade, so nun tirem os creditos
Creditos:95% Coyote
5% Eu