Ir para conteúdo

Posts Recomendados

Queria saber um tutorial ou mesmo um script pronto de forjar equips, aquele esquema da bigorna e o martelinho que no fogo pode criar um equip. Eu ja tenho o sistema de mineraçao mas queria saber o de forjar tambem. agradeço ai desde já.

detalhe do ot: 8.1

Editado por Funnies
Link para o comentário
https://xtibia.com/forum/topic/101540-forjar-equips/
Compartilhar em outros sites

  • 2 weeks later...

seguinte, vou colocar um script, interpretacoes a conta de vcs:

 

function onUse(cid,pos,item,frompos,topos)

 

 

-- SISTEMA DE FORJA FEITO POR _FERRARI_ ( THE_FAITHLESS@HOTMAIL.COM) NENHUMA POSTAGEM ESTÁ AUTORIZADA.

 

 

local hammer = 1234 -- COLOCAR ID DO MARTELO A SER USADO AQUI

local itemtopos = {x=123,y=123,z=7,stackpos=1} -- ALTERAR X Y E Z, STACKPOS NAO (RESULTADO DA FORJA)

local recipeitemsposition1 = {x=123,y=123,z=7,stackpos=1} -- ALTERAR X Y E Z (ITEM MAIS EMBAIXO DA RECEITA)

local recipeitemsposition2 = {x=123,y=123,z=7,stackpos=2}

local recipeitemsposition3 = {x=123,y=123,z=7,stackpos=3}

local recipeitemsposition4 = {x=123,y=123,z=7,stackpos=4}

local recipeitemsposition5 = {x=123,y=123,z=7,stackpos=5} -- TODAS AS POSICOES DE RECIPEITEM DEVEM ESTAR IGUAIS, FORA STACKPOS

 

 

if item.itemid == getThingfromPos(repcipeitemsposition5) then

local forgechance = math.random(1,5) -- CHANCE DE 20% DE FALHA

if forgechance == 1 then

doPlayerSendTextMessage(cid,22,"Aww, you failed to forge it!")

doRemoveItem(recipeitemsposition1,1000)

doRemoveItem(recipeitemsposition2,1000)

doRemoveItem(recipeitemsposition3,1000)

doRemoveItem(recipeitemsposition4,1000)

doRemoveItem(recipeitemsposition5,1000)

else

 

if (getThingfromPos(recipeitemsposition1) == 1234) and (getThingfromPos(recipeitemsposition2) == 1234) and (getThingfromPos(recipeitemsposition3) == 1234) and (getThingfromPos(recipeitemsposition4) == 1234) and (getThingfromPos(recipeitemsposition5) == 1234 then

doPlayerSendTextMessage(cid,22,"You managed to get something usable in the forge.")

doRemoveItem(recipeitemsposition1,1000)

doRemoveItem(recipeitemsposition2,1000)

doRemoveItem(recipeitemsposition3,1000)

doRemoveItem(recipeitemsposition4,1000)

doRemoveItem(recipeitemsposition5,1000)

doCreateItem(1234,itemtopos,1)

 

 

elseif (getThingfromPos(recipeitemsposition1) == 1234) and (getThingfromPos(recipeitemsposition2) == 1234) and (getThingfromPos(recipeitemsposition3) == 1234) and (getThingfromPos(recipeitemsposition4) == 1234) and (getThingfromPos(recipeitemsposition5) == 1234 then

doPlayerSendTextMessage(cid,22,"You managed to get something usable in the forge.")

doRemoveItem(recipeitemsposition1,1000)

doRemoveItem(recipeitemsposition2,1000)

doRemoveItem(recipeitemsposition3,1000)

doRemoveItem(recipeitemsposition4,1000)

doRemoveItem(recipeitemsposition5,1000)

doCreateItem(1234,itemtopos,1)

 

elseif (getThingfromPos(recipeitemsposition1) == 1234) and (getThingfromPos(recipeitemsposition2) == 1234) and (getThingfromPos(recipeitemsposition3) == 1234) and (getThingfromPos(recipeitemsposition4) == 1234) and (getThingfromPos(recipeitemsposition5) == 1234 then

doPlayerSendTextMessage(cid,22,"You managed to get something usable in the forge.")

doRemoveItem(recipeitemsposition1,1000)

doRemoveItem(recipeitemsposition2,1000)

doRemoveItem(recipeitemsposition3,1000)

doRemoveItem(recipeitemsposition4,1000)

doRemoveItem(recipeitemsposition5,1000)

doCreateItem(1234,itemtopos,1)

 

 

elseif (getThingfromPos(recipeitemsposition1) == 1234) and (getThingfromPos(recipeitemsposition2) == 1234) and (getThingfromPos(recipeitemsposition3) == 1234) and (getThingfromPos(recipeitemsposition4) == 1234) and (getThingfromPos(recipeitemsposition5) == 1234 then

doPlayerSendTextMessage(cid,22,"You managed to get something usable in the forge.")

doRemoveItem(recipeitemsposition1,1000)

doRemoveItem(recipeitemsposition2,1000)

doRemoveItem(recipeitemsposition3,1000)

doRemoveItem(recipeitemsposition4,1000)

doRemoveItem(recipeitemsposition5,1000)

doCreateItem(1234,itemtopos,1)

 

 

elseif (getThingfromPos(recipeitemsposition1) == 1234) and (getThingfromPos(recipeitemsposition2) == 1234) and (getThingfromPos(recipeitemsposition3) == 1234) and (getThingfromPos(recipeitemsposition4) == 1234) and (getThingfromPos(recipeitemsposition5) == 1234 then

doPlayerSendTextMessage(cid,22,"You managed to get something usable in the forge.")

doRemoveItem(recipeitemsposition1,1000)

doRemoveItem(recipeitemsposition2,1000)

doRemoveItem(recipeitemsposition3,1000)

doRemoveItem(recipeitemsposition4,1000)

doRemoveItem(recipeitemsposition5,1000)

doCreateItem(1234,itemtopos,1)

 

 

elseif (getThingfromPos(recipeitemsposition1) == 1234) and (getThingfromPos(recipeitemsposition2) == 1234) and (getThingfromPos(recipeitemsposition3) == 1234) and (getThingfromPos(recipeitemsposition4) == 1234) and (getThingfromPos(recipeitemsposition5) == 1234 then

doPlayerSendTextMessage(cid,22,"You managed to get something usable in the forge.")

doRemoveItem(recipeitemsposition1,1000)

doRemoveItem(recipeitemsposition2,1000)

doRemoveItem(recipeitemsposition3,1000)

doRemoveItem(recipeitemsposition4,1000)

doRemoveItem(recipeitemsposition5,1000)

doCreateItem(1234,itemtopos,1)

 

 

elseif (getThingfromPos(recipeitemsposition1) == 1234) and (getThingfromPos(recipeitemsposition2) == 1234) and (getThingfromPos(recipeitemsposition3) == 1234) and (getThingfromPos(recipeitemsposition4) == 1234) and (getThingfromPos(recipeitemsposition5) == 1234 then

doPlayerSendTextMessage(cid,22,"You managed to get something usable in the forge.")

doRemoveItem(recipeitemsposition1,1000)

doRemoveItem(recipeitemsposition2,1000)

doRemoveItem(recipeitemsposition3,1000)

doRemoveItem(recipeitemsposition4,1000)

doRemoveItem(recipeitemsposition5,1000)

doCreateItem(1234,itemtopos,1)

 

end

end

return 0

end

 

 

1:Todos os ids de item estao escritos como 1234, altere-os.

2:Todas as receitas precisam de 5 itens. Use a criatividade se nao souber alterar o script.

3:Nao foi testado.

4:Sao possiveis sete diferentes receitas de item. Use apenas as sete se nao souber alterar o script.

5:Nao poste em lugar algum.

6:Se nao souber o que esta fazendo, NAO ALTERE DE FORMA ALGUMA O SCRIPT.

7:Siga as instrucoes acima.

8:Mande pm para possiveis erros.

 

:smile_positivo:

Link para o comentário
https://xtibia.com/forum/topic/101540-forjar-equips/#findComment-657659
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...