Ir para conteúdo

(Resolvido)[Pedido]Algum scripter para min ajuda nesse script

Featured Replies

Postado
  • Autor

pokedexlib.lua

function getMoveDexDescr(pokemon, number)
    if not pokemon then 
        return ""
    elseif not movestable[pokemon] then
        return "Nao tem esse ataque \n"
    end
    local moves = {
        [1] = movestable[pokemon].move1,
        [2] = movestable[pokemon].move2,
        [3] = movestable[pokemon].move3,
        [4] = movestable[pokemon].move4,
        [5] = movestable[pokemon].move5,
        [6] = movestable[pokemon].move6,
        [7] = movestable[pokemon].move7,
        [8] = movestable[pokemon].move8,
        [9] = movestable[pokemon].move9,
        [10] = movestable[pokemon].move10,
    }
    if not moves[number] then
        return print("move"..number.." isn't a valid move on "..pokemon..".")
    end
    local movement = moves[number]
    local name, level, cooldown, target = movement.name, movement.level, movement.cd, movement.target
    if target == 1 then
        target = "Sim"
    else
        target = "Nao"
    end
    return "\n >Nome:"..name.."\n >Level:"..level.."\n >Tempo:"..cooldown.."\n >Alvo:"..target.." \n"
end
function getEvoPoke(name)
local kev = pokevo[name]
local nomepk = name
local qstones = pokevo[name].count
local id1 = tonumber(kev.stoneid)
local id2 = tonumber(kev.stoneid2)
local nomestone1= getItemNameById(id1)
local nomestone2= getItemNameById(id2)
local st =""
st = ""..nomepk.." Evoluir para "..kev.evolution.." \n"
st = st.."level:"..kev.level.." \n"
if kev.stoneid2 == 0 then
st = st.."Stone:"..nomestone1.." \n"
else
st = st.."Stones:"..nomestone1.." e "..nomestone2.." \n"
end
st = st.."Quantidade de stones:"..qstones.." \n"
st = st..""
return st
end

function getHabilidade(name)
local hab = ""
if isInArray(ridepoke, name) == true then
hab =hab.. "Ride \n"
else
hab =hab.. ""
end
if isInArray(flypoke, name) == true then
hab =hab.. "Fly \n"
else
hab =hab.. ""
end
if isInArray(rocksmashpoke, name) == true then
hab =hab.. "Rocksmash \n"
else
hab =hab.. ""
end
if isInArray(digpoke, name) == true then
hab =hab.. "Dig \n"
else
hab =hab.. ""
end
if isInArray(cutpoke, name) == true then
hab =hab.. "Cut \n"
else
hab =hab.. ""
end
if isInArray(blinkpoke, name) == true then
hab =hab.. "Blink \n"
else
hab =hab.. ""
end
if isInArray(darkportalpoke, name) == true then
hab =hab.. "Darkportal \n"
else
hab =hab.. ""
end
if isInArray(lightpoke, name) == true then
hab =hab.. "Light \n"
else
hab =hab.. ""
end
hab = hab..""
return hab
end

function doShowPokedex(pokemon)
local v = foto
local nome = pokemon
local tolevel = pokes[pokemon].level
local txt = ""
if not pokemon then 
return doPlayerSendCancel(cid, "Esse pokemon nao tem cadastro na pokedex") 
end
txt = "Nome:"..nome.."\n"
txt = txt.."Level:"..tolevel.."\n"
txt = txt.."Tipo: \n"
txt = txt.."Evolucoes: \n"
txt = txt..""..getEvoPoke(pokemon)..""
txt = txt..">>>Ataques<<< \n"
if getCreatureName(pokemon) == "Ditto" then
txt = txt.."Nenhum ataque"
else
txt = txt..">M1< \n"
txt = txt..""..getMoveDexDescr(pokemon,1)..""
txt = txt..">M2< \n"
txt = txt..""..getMoveDexDescr(pokemon,2)..""
txt = txt..">M3< \n"
txt = txt..""..getMoveDexDescr(pokemon,3)..""
txt = txt..">M4< \n"
txt = txt..""..getMoveDexDescr(pokemon,4)..""
txt = txt..">M5< \n"
txt = txt..""..getMoveDexDescr(pokemon,5)..""
txt = txt..">M6< \n"
txt = txt..""..getMoveDexDescr(pokemon,6)..""
txt = txt..">M7< \n"
txt = txt..""..getMoveDexDescr(pokemon,7)..""
txt = txt..">M8< \n"
txt = txt..""..getMoveDexDescr(pokemon,8)..""
txt = txt..">M9< \n"
txt = txt..""..getMoveDexDescr(pokemon,9)..""
txt = txt..">M10< \n"
txt = txt..""..getMoveDexDescr(pokemon,10)..""
end
txt = txt.."Habilidades: \n"
txt = txt..""..getHabilidade(pokemon)..""

return txt
end
 

  • Respostas 11
  • Visualizações 429
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Supondo que a tabela movestable estivesse assim: local movestable = {     ["Bulbasaur"] = {         move1 = {name = "Razor Leaf", level = 20, cd = 7, target = 1},     }, } refiz sua função da seguin

Postado

Mude a função para esta:

function getEvoPoke(name)
    local kev = pokevo[name]
    if kev then
        local qstones = kev.count
        local id1 = tonumber(kev.stoneid)
        local id2 = tonumber(kev.stoneid2)
        local nomestone1 = getItemNameById(id1)
        local nomestone2 = getItemNameById(id2)
        local st = ""
        st = ""..name.." Evoluir para "..kev.evolution.." \n"
        st = st.."level:"..kev.level.." \n"
        if kev.stoneid2 == 0 then
            st = st.."Stone:"..nomestone1.." \n"
        else
            st = st.."Stones:"..nomestone1.." e "..nomestone2.." \n"
        end
        st = st.."Quantidade de stones:"..qstones.." \n"
        return st
    end
end

Provavelmente você está usando-a num pokémon que não está configurado na tabela pokevo.

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

não respondo pms solicitando suporte em programação/scripting

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