Ir para conteúdo

Featured Replies

Postado

Eae galera blz?

Bom é o seguinte, eu gostaria de que ao invés de usar o held na pokeball para os status do held ir para o pokemon você já usasse direto no seu pokemon.

Tá aqui o script

 

 

 

local heldTable = {
-- X --
[13414] = {attribute = "heldx", ident = 1}, -- Defense 1
[13415] = {attribute = "heldx", ident = 2}, -- Defense 2
[13416] = {attribute = "heldx", ident = 3}, -- Defense 3
[13417] = {attribute = "heldx", ident = 4}, -- Defense 4
[13418] = {attribute = "heldx", ident = 5}, -- Defense 5
[13419] = {attribute = "heldx", ident = 6}, -- Defense 6
[13420] = {attribute = "heldx", ident = 7}, -- Defense 7
[13392] = {attribute = "heldx", ident = 8}, -- Attack 1
[13393] = {attribute = "heldx", ident = 9}, -- Attack 2
[13394] = {attribute = "heldx", ident = 10}, -- Attack 3
[13395] = {attribute = "heldx", ident = 11}, -- Attack 4
[13396] = {attribute = "heldx", ident = 12}, -- Attack 5
[13397] = {attribute = "heldx", ident = 13}, -- Attack 6
[13398] = {attribute = "heldx", ident = 14}, -- Attack 7
[13458] = {attribute = "heldx", ident = 15}, -- Return 1
[13459] = {attribute = "heldx", ident = 16}, -- Return 2
[13460] = {attribute = "heldx", ident = 17}, -- Return 3
[13461] = {attribute = "heldx", ident = 18}, -- Return 4
[13462] = {attribute = "heldx", ident = 19}, -- Return 5
[13463] = {attribute = "heldx", ident = 20}, -- Return 6
[13464] = {attribute = "heldx", ident = 21}, -- Return 7
[13445] = {attribute = "heldx", ident = 22}, -- Hellfire 1
[13446] = {attribute = "heldx", ident = 23}, -- Hellfire 2 
[13447] = {attribute = "heldx", ident = 24}, -- Hellfire 3
[13448] = {attribute = "heldx", ident = 25}, -- Hellfire 4 
[13449] = {attribute = "heldx", ident = 26}, -- Hellfire 5
[13489] = {attribute = "heldx", ident = 27}, -- Hellfire 6
[13450] = {attribute = "heldx", ident = 28}, -- Hellfire 7
[13465] = {attribute = "heldx", ident = 29}, -- Poison 1
[13466] = {attribute = "heldx", ident = 30}, -- Poison 2
[13467] = {attribute = "heldx", ident = 31}, -- Poison 3
[13468] = {attribute = "heldx", ident = 32}, -- Poison 4
[13469] = {attribute = "heldx", ident = 33}, -- Poison 5
[13470] = {attribute = "heldx", ident = 34}, -- Poison 6
[13471] = {attribute = "heldx", ident = 35}, -- Poison 7
[13399] = {attribute = "heldx", ident = 36}, -- Boost 1
[13400] = {attribute = "heldx", ident = 37}, -- Boost 2
[13401] = {attribute = "heldx", ident = 38}, -- Boost 3
[13402] = {attribute = "heldx", ident = 39}, -- Boost 4
[13403] = {attribute = "heldx", ident = 40}, -- Boost 5
[13404] = {attribute = "heldx", ident = 41}, -- Boost 6
[13405] = {attribute = "heldx", ident = 42}, -- Boost 7
-- Y -- 
[13472] = {attribute = "heldy", ident = 1}, -- Regeneration 1
[13473] = {attribute = "heldy", ident = 2}, -- Regeneration 2
[13474] = {attribute = "heldy", ident = 3}, -- Regeneration 3
[13475] = {attribute = "heldy", ident = 4}, -- Regeneration 4
[13476] = {attribute = "heldy", ident = 5}, -- Regeneration 5
[13477] = {attribute = "heldy", ident = 6}, -- Regeneration 6
[13478] = {attribute = "heldy", ident = 7}, -- Regeneration 7
[13482] = {attribute = "heldy", ident = 8}, -- Cure 1 
[13483] = {attribute = "heldy", ident = 9}, -- Cure 2
[13484] = {attribute = "heldy", ident = 10}, -- Cure 3
[13485] = {attribute = "heldy", ident = 11}, -- Cure 4
[13486] = {attribute = "heldy", ident = 12}, -- Cure 5
[13487] = {attribute = "heldy", ident = 13}, -- Cure 6
[13488] = {attribute = "heldy", ident = 14}, -- Cure 7
}

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

if not isPokeball(item2.itemid) or #getCreatureSummons(cid) > 0 then return false end
if not heldTable[item.itemid] then return false end

local held = heldTable[item.itemid]
local pokemon = getItemAttribute(cid, "poke")
local heldname = getItemInfo(item.itemid).name

doSetItemAttribute(item2.uid, held.attribute, held.ident)
doRemoveItem(item.uid, 1)
doSendMagicEffect(getThingPos(cid), 14)
sendMsgToPlayer(cid, 27, "Your "..pokename.." has gained a "..heldname..".")
return true
end

 

 

Agradeço desde já :grin:

Editado por DkHenzo (veja o histórico de edições)

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo