Ir para conteúdo

Posts Recomendados

PARA 7.6!

É assim...

Vc cata Pick, usa na pedra, e se você tiver sorte, vai vir pedras preciosas....(Ruby, Emerald, Sapphire, Diamond e Amethyst. Se tiver azar nascerá monstros)

Primeiramente, crie um arquivo chamado picking.lua:

--Pickando pedras e tirando pedras by Rike--

  

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

   pedrapos = {x=topos.x, y=topos.y, z=topos.z}

if item.itemid == 1300 or 1301 or 1302 or 1303 then

sorte = math.random(1,28)

if sorte == 4 then

doSendMagicEffect(topos,3)

doPlayerAddItem(cid,2150,1)

doPlayerSendTextMessage(cid,22,"Wow, an amethyst!")

elseif sorte == 8 then

doSendMagicEffect(topos,3)

doPlayerAddItem(cid,2149,1)

doPlayerSendTextMessage(cid,22,"Wow, an emerald!")

elseif sorte == 12 then

doSendMagicEffect(topos,3)

doPlayerAddItem(cid,2147,1)

doPlayerSendTextMessage(cid,22,"Wow, a ruby!")

elseif sorte == 16 then

doSendMagicEffect(topos,3)

doPlayerAddItem(cid,2146,1)

doPlayerSendTextMessage(cid,22,"Wow, a sapphire!")

elseif sorte == 20 then

doSendMagicEffect(topos,3)

doPlayerAddItem(cid,2145,1)

doPlayerSendTextMessage(cid,22,"Wow, an diamond!")

elseif sorte == 24 then

doSummonCreature('Stone Golem',topos)

elseif sorte == 28 then

doSummonCreature('Gargoyle',topos)

elseif sorte == 2 or 6 or 10 or 14 or 18 or 22 or 26 then

doSendMagicEffect(topos,3)

end

end

  return 1

  end

E depois, no actions.xml coloque:

<action itemid="2553" script="picking.lua" />

Espero que curtam! :)

Flws!

Próxima action(talvez): Making Bread Funfando!

Link para o comentário
https://xtibia.com/forum/topic/14707-pickando-e-ganhando-pedra/
Compartilhar em outros sites

  • 2 weeks later...
kra, eh bom mas tem um problema, pod fz issu em qq lugar , vc skeceu axo q d por o else c naum for as ids citadas

 

 

 

se naum for os ids citados naum vai funcionar

naum precisa du else

mas vc podi acrescentar

else

return 0

Link para o comentário
https://xtibia.com/forum/topic/14707-pickando-e-ganhando-pedra/#findComment-71571
Compartilhar em outros sites

se naum for os ids citados naum vai funcionar

naum precisa du else

mas vc podi acrescentar

else

return 0

 

 

 

olha kra, tipo assim, eu ia pidi ajuda pq eu so um péssimo actions maker,... ond poem o

else

return 0

Link para o comentário
https://xtibia.com/forum/topic/14707-pickando-e-ganhando-pedra/#findComment-71583
Compartilhar em outros sites

ficaria assim:

 

--Pickando pedras e tirando pedras by Rike--    function onUse(cid, item, frompos, item2, topos)   pedrapos = {x=topos.x, y=topos.y, z=topos.z, stackpos=1}   pedra = getThingfromPos(pedrapos)if pedra.itemid == 1300 or 1301 or 1302 or 1303 thensorte = math.random(1,20)if sorte == 4 thendoSendMagicEffect(topos,3)doPlayerAddItem(cid,2150,1)doPlayerSendTextMessage(cid,22,"Wow, an amethyst!")elseif sorte == 8 thendoSendMagicEffect(topos,3)doPlayerAddItem(cid,2149,1)doPlayerSendTextMessage(cid,22,"Wow, an emerald!")elseif sorte == 12 thendoSendMagicEffect(topos,3)doPlayerAddItem(cid,2147,1)doPlayerSendTextMessage(cid,22,"Wow, a ruby!")elseif sorte == 16 thendoSendMagicEffect(topos,3)doPlayerAddItem(cid,2146,1)doPlayerSendTextMessage(cid,22,"Wow, a sapphire!")elseif sorte == 20 thendoSendMagicEffect(topos,3)doPlayerAddItem(cid,2145,1)doPlayerSendTextMessage(cid,22,"Wow, an diamond!")elseif sorte == 24 thendoSummonCreature('Stone Golem',topos)elseif sorte == 28 thendoSummonCreature('Gargoyle',topos)elseif sorte == 2 or 6 or 10 or 14 or 18 or 22 or 26 thendoSendMagicEffect(topos,3)endelsereturn 0end  return 1  end

 

Link para o comentário
https://xtibia.com/forum/topic/14707-pickando-e-ganhando-pedra/#findComment-71650
Compartilhar em outros sites

  • 2 weeks later...
  • 3 weeks later...
  • 3 weeks later...

@Rikezenho

@Colex

Bom o TUTO...

Mas Acho q pra fikar Melhor seria, fikando + dificil:

Para FAzer Isso:

Procure Por:

sorte = math.random(1,28)

---------------------------------------

e Substitua Por:

sorte = math.random(1,Numero)

---------------------------------------

Numero = Numero Que Quiser Maior Que 28 ... Qnto Mais Mais Dificil...

Atenciosamente,

Drakulla

Link para o comentário
https://xtibia.com/forum/topic/14707-pickando-e-ganhando-pedra/#findComment-111408
Compartilhar em outros sites

  • 2 weeks later...
×
×
  • Criar Novo...