Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

toda vez que uso esse item da script da esse erro na distro

 

erro

[12/08/2014 11:48:49] [Error - Action Interface] 
[12/08/2014 11:48:49] data/actions/scripts/Shiny stone.lua:onUse
[12/08/2014 11:48:50] Description: 
[12/08/2014 11:48:50] (luaDoItemSetAttribute) Item not found
 
[12/08/2014 11:48:50] [Error - Action Interface] 
[12/08/2014 11:48:50] data/actions/scripts/Shiny stone.lua:onUse
[12/08/2014 11:48:50] Description: 
[12/08/2014 11:48:50] (luaDoItemSetAttribute) Item not found
 
[12/08/2014 11:48:50] [Error - Action Interface] 
[12/08/2014 11:48:50] data/actions/scripts/Shiny stone.lua:onUse
[12/08/2014 11:48:50] Description: 
[12/08/2014 11:48:50] data/actions/scripts/Shiny stone.lua:32: attempt to index local 'getShinyPokeballs' (a nil value)
[12/08/2014 11:48:50] stack traceback:
[12/08/2014 11:48:50]  data/actions/scripts/Shiny stone.lua:32: in function <data/actions/scripts/Shiny stone.lua:13>
 

 

script

local evo = {
                          
["Charizard"] = {"Shiny Charizard", 1},
}
local balls = {
[2394] = {newBall = 2394},
[2391] = {newBall = 2391},
[2393] = {newBall = 2393},
[2392] = {newBall = 2392},
[12617] = {newBall = 12617},
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
   if isMonster(itemEx.uid) and getCreatureMaster(itemEx.uid) == cid then
          local monster = getCreatureName(itemEx.uid)
          if evo[monster] then  
                 if getPlayerItemCount(cid, item.itemid) >= evo[monster][2] then
                    doPlayerSendTextMessage(cid, 27, "Parabens! Seu "..getPokeName(itemEx.uid).." evoluiu para "..evo[monster][1].."!")
                    local health, maxHealth = getCreatureHealth(itemEx.uid), getCreatureMaxHealth(itemEx.uid)
                    doSendMagicEffect(getThingPos(itemEx.uid), 18)
                    doRemoveCreature(itemEx.uid)
                    doPlayerRemoveItem(cid, item.itemid, evo[monster][2]-1)
                    doRemoveItem(item.uid, 1)
                    doSummonMonster(cid,evo[monster][1])
                    local pokeball = getPlayerSlotItem(cid, 8)
                    doItemSetAttribute(pokeball.uid, "poke", evo[monster][1])
                    doItemSetAttribute(pokeball.uid, "level", pokes[evo[monster][1]].level)
                    doItemSetAttribute(ball, "hp", 1)
                    doItemSetAttribute(ball, "happy", 110)
                    local pk = getCreatureSummons(cid)[1]
                    local getShinyPokeballs = balls[getPlayerSlotItem(cid, 8).itemid]
                    doTransformItem(getPlayerSlotItem(cid, 8).uid, getShinyPokeballs.newBall)
                    adjustStatus(pk, pokeball.uid, true, false, true)
                    return TRUE
                 else
                    return doPlayerSendTextMessage(cid, 27, "Voce precisa de pelo menos ".. evo[monster][2] .." stones para faze-lo vira shiny!")
                 end
          end
end
return FALSE
end

up


up

Resolvido por Orochi Elf

Ir para solução
  • Respostas 14
  • Visualizações 457
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Postado
  • Autor
  Em 14/08/2014 em 14:33, diarmaint disse:

Posta o script da sua Shiny Stone.

Já está no tópico 

local evo = {
                          
["Charizard"] = {"Shiny Charizard", 1},
}
local balls = {
[2394] = {newBall = 2394},
[2391] = {newBall = 2391},
[2393] = {newBall = 2393},
[2392] = {newBall = 2392},
[12617] = {newBall = 12617},
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
   if isMonster(itemEx.uid) and getCreatureMaster(itemEx.uid) == cid then
          local monster = getCreatureName(itemEx.uid)
          if evo[monster] then  
                 if getPlayerItemCount(cid, item.itemid) >= evo[monster][2] then
                    doPlayerSendTextMessage(cid, 27, "Parabens! Seu "..getPokeName(itemEx.uid).." evoluiu para "..evo[monster][1].."!")
                    local health, maxHealth = getCreatureHealth(itemEx.uid), getCreatureMaxHealth(itemEx.uid)
                    doSendMagicEffect(getThingPos(itemEx.uid), 18)
                    doRemoveCreature(itemEx.uid)
                    doPlayerRemoveItem(cid, item.itemid, evo[monster][2]-1)
                    doRemoveItem(item.uid, 1)
                    doSummonMonster(cid,evo[monster][1])
                    local pokeball = getPlayerSlotItem(cid, 8)
                    doItemSetAttribute(pokeball.uid, "poke", evo[monster][1])
                    doItemSetAttribute(pokeball.uid, "level", pokes[evo[monster][1]].level)
                    doItemSetAttribute(ball, "hp", 1)
                    doItemSetAttribute(ball, "happy", 110)
                    local pk = getCreatureSummons(cid)[1]
                    local getShinyPokeballs = balls[getPlayerSlotItem(cid, 8).itemid]
                    doTransformItem(getPlayerSlotItem(cid, 8).uid, getShinyPokeballs.newBall)
                    adjustStatus(pk, pokeball.uid, true, false, true)
                    return TRUE
                 else
                    return doPlayerSendTextMessage(cid, 27, "Voce precisa de pelo menos ".. evo[monster][2] .." stones para faze-lo vira shiny!")
                 end
          end
end
return FALSE

end
Postado

Me fala quais são os itens desses id's 

Mostrar conteúdo oculto

local balls = {

[2394] = {newBall = 2394},
[2391] = {newBall = 2391},
[2393] = {newBall = 2393},
[2392] = {newBall = 2392},
[12617] = {newBall = 12617},

vou tentar te ajudar se não conseguir pego o script de outro servidor.

Editado por diarmaint (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.6k

Informação Importante

Confirmação de Termo