Bau que vende pokemon

Pokemon x Fire
em Actions e Talkactions

Pokemon x Fire

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 16/01/17Posts: 17

Vai no actions crie um arquivo .lua chamado BauV e cole isso \/

Spoiler

local btype = "normal"
local pokemon = "Charizard" -- NOME DO POKEMON

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

if doPlayerRemoveItem(cid, 2160, 100) then -- ITEM E QUANTIDADE DO ITEM
   doPlayerSendTextMessage(cid, 18, "Parabéns Voce Comprou Seu Pokemon \n By Pokemon X Ice")
else
   doPlayerSendCancel(cid, "Você precisa de 100 notas azul")
return true
end

if pokemon == "" then return true end
   addPokeToPlayer(cid, pokemon, 0, nil, btype, true)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você recebeu seu Pokemon Parabéns!")
return true
end

 

tag:

Spoiler

<action actionid="55555" event="script" value="BauV.lua"/>

 

 

By Pokemon X Fire

KaboFlow

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 04/07/17Posts: 434
Em 24/09/2017 em 19:53, Pokemon x Fire disse:

Vai no actions crie um arquivo .lua chamado BauV e cole isso \/

  Ocultar conteúdo

local btype = "normal"
local pokemon = "Charizard" -- NOME DO POKEMON

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

if doPlayerRemoveItem(cid, 2160, 100) then -- ITEM E QUANTIDADE DO ITEM
   doPlayerSendTextMessage(cid, 18, "Parabéns Voce Comprou Seu Pokemon \n By Pokemon X Ice")
else
   doPlayerSendCancel(cid, "Você precisa de 100 notas azul")
return true
end

if pokemon == "" then return true end
   addPokeToPlayer(cid, pokemon, 0, nil, btype, true)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você recebeu seu Pokemon Parabéns!")
return true
end

 

tag:

  Ocultar conteúdo

<action actionid="55555" event="script" value="BauV.lua"/>

 

 

By Pokemon X Fire

 

 

[21/02/2021 07:35:28] [Error - Action Interface] 
[21/02/2021 07:35:28] data/actions/scripts/Trocar Pokemons/trocar.lua:onUse
[21/02/2021 07:35:28] Description: 
[21/02/2021 07:35:28] data/actions/scripts/Trocar Pokemons/trocar.lua:14: attempt to call global 'addPokeToPlayer' (a nil value)
[21/02/2021 07:35:29] stack traceback:
[21/02/2021 07:35:29]     data/actions/scripts/Trocar Pokemons/trocar.lua:14: in function <data/actions/scripts/Trocar Pokemons/trocar.lua:4>