GU

pedido ao clicar em bau ganhar mount

Por gusinhi, 07 de abr. de 2016 em Scripts

2
1k
gusinhiG
07 de abril de 2016 às 17:46

alquem sabe como fazer uma bau que ao clicar nele voce ganhe uma certa mount, to quebrando a cabeça aki pra fazer e nao consigo neim encontro um que alguem tenha feito

Editado Abril 7 por gusinhi

miguel223M
12 de abril de 2016 às 00:14

Vamos la:

 

Crie um arquivo chamado mountchest.lua em actions/scripts e adicione:

 

function onUse(cid, item, toPosition, itemEx, fromPosition)

 

if(item.actionid == 12663) then

if getPlayerStorageValue(cid, 13456) <= 0 then

doPlayerAddMount(cid, ID DA MOUNT)

doPlayerSendTextMessage(cid, 22, "Voce recebeu a NOME DA MONTARIA mount. Parabens!")

setPlayerStorageValue(cid, 12456, 1)

else

doPlayerSendTextMessage(cid, 22, "Voce ja abriu este bau, jogador.")

end

end

 

return true

end

 

Em actions.xml, adicione:

 

  <action actionid="12663" script="mountchest.lua"/>