bem eu tentei de varias formar aki e deu no mesmo....nada. eu copiei o action dos pokes iniciais vem os tres junto e ja que n entendo quase nd de script n pude separar vou colocar tudo aki entao, vc n pode tipo, usar isso de base e criar uma action pra o fazer o outro poke?
function onUse(cid, item, frompos, item2, topos)
local hp = 800
if item.uid == 2222 then
queststatus = getPlayerStorageValue(cid,8749)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Charmander.")
local ball1 = doPlayerAddItem(cid,2527,1)
doPlayerAddItem(cid,2160,1)
doPlayerAddItem(cid,2149,50)
doItemSetAttribute(ball1, "aid", hp)
setPlayerStorageValue(cid,8749,1)
else
doPlayerSendTextMessage(cid,22,"Voce ja pegou seu pokemon.")
end
elseif item.uid == 6666 then
queststatus = getPlayerStorageValue(cid,8749)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Bulbasaur.")
doPlayerAddItem(cid,2149,50)
doPlayerAddItem(cid,2160,1)
local ball2 = doPlayerAddItem(cid,2526,1)
doItemSetAttribute(ball2, "aid", hp)
setPlayerStorageValue(cid,8749,1)
else
doPlayerSendTextMessage(cid,22,"Voce ja pegou seu pokemon.")
end
elseif item.uid == 7777 then
queststatus = getPlayerStorageValue(cid,8749)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Squirtle.")
local ball3 = doPlayerAddItem(cid,2522,1)
doPlayerAddItem(cid,2160,1)
doPlayerAddItem(cid,2149,50)
doItemSetAttribute(ball3, "aid", hp)
setPlayerStorageValue(cid,8749,1)
else
doPlayerSendTextMessage(cid,22,"Voce ja pegou seu pokemon.")
end
else
return 0
end
return 1
end