Ir para conteúdo
  • Cadastre-se

Posts Recomendados

40 minutos atrás, samlecter disse:

 

Primeiramente, informo que não fui eu quem criou o sistema e nem a explicação, créditos no final.

 

O que eu fiz então?

R: Adaptei algumas coisas, exemplo: com o original a Cd Bar não aparecia nos pokemons com addon, adaptei para que apareçam e trouxe pro TK pois achei em outro lugar!

 

 

OBS: Sei que já existe alguns posts sobre o assunto aki, mas quando procurei pra por no meu ot, todos eram incompletos apenas com o script pra por no actions e a tag no actions.xml  :facepalm:

 

OBS²: A única coisa que não funciona nesse sistema é que caso o pokemon tenha fly/surf/ride, não aparece o addon deles enquanto estiver no fly/surf/ride, não sei como por para aparecer, então se alguém souber, ficaria grato se ensinasse ( possuo a sprite do pokemon com addon usando fly/surf/ride,  só não sei como por ^^ )

 

 

 

A Alteração feita para que a Cd Bar apareça foi feita no goback.lua e some functions.lua , já estará o correto na explicação abaixo!

 

Vamos Lá !

 

Em Data/actions e Actions.xml adiciona isto:


<action itemid="IdAddon;IdAddon" event="script" value="Addon.lua"/>

 

Em IdAddon Coloca os ids dos items dos addons! ai para adicionar mais ids é só colocar o ";" Ou seja aquele negocio verde, e depois colocar o ID Ficando:IdAddon;IdAddon;IdAddon e por ai vai
 
Ai Em Data/actions/scripts cria um arquivo lua Chamado "Addon" e Dentro Dele Adiciona Isto:


function onUse(cid, item, fromPosition, itemEx, toPosition)
                local addons = {
                [12593] = {pokemon= "Electabuzz" , looktype = 1482}, --xxxx = id do item do addon --- "Scyther" = nome do pokemon --- looktype = 1 é o looktype do pokemon com addon
                [12925] = {pokemon= "Alakazam" , looktype = 1471}, --xxxx = id do item do addon --- "Scyther" = nome do pokemon --- looktype = 1 é o looktype do pokemon com addon
               }
 
                if #getCreatureSummons(cid) > 0 then
                                doPlayerSendCancel(cid, "Please back your pokemon.")
                                return false
                end     
                local numero = addons[item.itemid].looktype
 
                local pb = getPlayerSlotItem(cid, 8).uid
                local pk = addons[item.itemid].pokemon
 
                if getItemAttribute(pb,"poke") ~= pk then
                                doPlayerSendCancel(cid, "Sorry, you can't use this addon on this poke.")
                return false
                end
 
                if getItemAttribute(pb,"addon") < 1 then
                                doRemoveItem(item.uid, 1)
                                doPlayerSendTextMessage(cid, 27, "Congratulations! Now your pokemon will use the addon.")
                                doSetItemAttribute(pb,"addon",numero)
                                return true
                end     
 
return true
end

 

 Para adicionar um Novo Addon é só Adicionar esta tag:


[ItemID] = {pokemon= "NomeDoPoke" , looktype = IdDaOutfit},

 

EM ItemID, troca pelo id do addon
em pokemon troca NomeDoPoke, pelo Nome Do Pokémon que vai ser adicionado o Addon
Em looktype, troca IdDaOutfit, pelo looktype do pokémon com addon!
 
Em Goback.lua
 
Procure Por:


else
 
    doPlayerSendCancel(cid, "This pokemon is fainted.")
 
end

 

E Adiciona Em cima de Else Isto:


local pk = getCreatureSummons(cid)[1]
                local pb = getPlayerSlotItem(cid, 8).uid
                local look = getItemAttribute(pb,"addon")
                if not look then
                                doSetItemAttribute(pb,"addon",0) 

                end
                if look > 0 then
                                doSetCreatureOutfit(pk, {lookType = look}, -1)

                end

 

Em Catch system.lua Procura Por:


doItemSetAttribute(item, "description", description)

Em baixo adicione isto:


doItemSetAttribute(item, "addon", 0)

 

Em Some Functions.lua Procure Por:


unLock(item.uid)

Da Enter Duas Vezes e Adiciona isto:


local pk = getCreatureSummons(cid)[1]
local pb = getPlayerSlotItem(cid, 8).uid
local look = getItemAttribute(pb,"addon")
if not look then
doSetItemAttribute(pb,"addon",0)

end
if look > 0 then
doSetCreatureOutfit(pk, {lookType = look}, -1)

end

 

Pronto! Sistema de Addon Funcionando Perfeitamente Caso Coloque Tudo Certinho! 
 
Caso Queira uma Addon Box... Façam isto:
 
Em Actions.xml Adiciona Isto:


<action itemid="12595" event="script" value="addonbox.lua"/>

 

E Em Data/Actions/Scripts Cria um Arquivo Lua Chamado "addonbox" e Adiciona Isto Dentro Dele:


function onUse(cid, item, frompos, item2, topos, pos)
 
local addons = {12593,12889}
local randomChance = math.random(1, 49)
 
if item2.itemid == 12595 then
doSendMagicEffect(getCreaturePosition(cid), 28)
doRemoveItem(item2.uid, 1)
doPlayerAddItem(cid, addons[randomChance], 1)
doPlayerSendTextMessage(cid, 27, "Você ganhou um Addon!")
return true
 
end
end

Pronto Addon Box Adicionada!

 

 

Créditos 

 

 

Pokémon X Rain Pelo Sistema de Addon
Summer Slyer (Zet0N0Murmurou)

Drazyn12391

E Eu ^^ 

 

 

 

 

 

 

 

 

 

 

 

na parte >>> de golback nao entendi como assim encima de else  nao entende

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Editado por eliaszinho (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
1 minuto atrás, eliaszinho disse:

 

Em cima do Else, ficando assim

 

local pk = getCreatureSummons(cid)[1]
                local pb = getPlayerSlotItem(cid, 8).uid
                local look = getItemAttribute(pb,"addon")
                if not look then
                                doSetItemAttribute(pb,"addon",0) 

                end
                if look > 0 then
                                doSetCreatureOutfit(pk, {lookType = look}, -1)


                   end

               
                else      -- Em cima do else
               

 

 

 

Link para o post
Compartilhar em outros sites

Cara, Vc colocou 3 nick diferentes meus! Atualiza está parte:

Summer Slyer (Zet0N0Murmurou)
Drazyn12391

Para isto:

Drazyn1291(Zet0N0Murmurou)

Eu não fiz nada neste código! apenas baixei um PDA e sai procurando tudo que tinha as tags de addon! Ele agora só tá faltando atualizar a outfit para quando tiver com fly, ride, surf e tals... mas parabéns, conseguio resolver um problemão pros leks!

wq3bBzt.png
Pokémon Dust Evolution
 
É aonde começa sua nova aventura!! 

 

Facebook

 
Verifique Atualizações

 

Link para o post
Compartilhar em outros sites
10 horas atrás, Drazyn1291 disse:

Cara, Vc colocou 3 nick diferentes meus! Atualiza está parte:


Summer Slyer (Zet0N0Murmurou)
Drazyn12391

Para isto:


Drazyn1291(Zet0N0Murmurou)

Eu não fiz nada neste código! apenas baixei um PDA e sai procurando tudo que tinha as tags de addon! Ele agora só tá faltando atualizar a outfit para quando tiver com fly, ride, surf e tals... mas parabéns, conseguio resolver um problemão pros leks!

Opa, beleza vou editar aki ^^ 

Mas você procurou, conseguiu e compartilhou, já ajuda muita gente.

 

Sobre as quando estiver em fly, surf e ride, procurei ontem o dia todo e não consegui encontrar, vou continuar pesquisando, caso eu descubra edito aki, se você conseguir tem como me passar ou então comentar aki ? Ah você sabe como troca pra quando usar uma skill? 

Exemplo: Meu scyther está com addon, ok

dai ele usa a passiva counter helix, e fica sem o addon, eu possuo a sprite dele usando essa passiva com o addon mas não sei onde por isso :/

10 minutos atrás, zFaeLL disse:

O meu goback não tem doPlayerSendCancel '-', e agora ?

Procure manualmente pelo goback.lua da pasta \data\actions\scripts

 

Você deve estar procurando no goback errado, existe 1 na pasta actions\scripts e um na creaturescripts\scripts

 

 

 

No goback.lua certo, vá até o final e terá uma parte assim:

 

else
 
    doPlayerSendCancel(cid, "This pokemon is fainted.")
 
end

 

 

Em cima desse else coloca isso:

 

local pk = getCreatureSummons(cid)[1]
                local pb = getPlayerSlotItem(cid, 8).uid
                local look = getItemAttribute(pb,"addon")
                if not look then
                                doSetItemAttribute(pb,"addon",0) 

                end
                if look > 0 then
                                doSetCreatureOutfit(pk, {lookType = look}, -1)

                end

 

Depois é só seguir o tutorial, qualquer coisa me avisa ^^ 

 

 

Link para o post
Compartilhar em outros sites

Valeu Oww Funcionou.

Mais como sou um admin que evita qualquer erro quando uso o addon vai normal funciona mais da esse erro no goback:

Spoiler

[09/12/2015 11:50:30] [Error - Action Interface] 
[09/12/2015 11:50:30] data/actions/scripts/goback.lua:onUse
[09/12/2015 11:50:30] Description: 
[09/12/2015 11:50:30] data/actions/scripts/goback.lua:209: attempt to compare number with nil
[09/12/2015 11:50:30] stack traceback:
[09/12/2015 11:50:30]     data/actions/scripts/goback.lua:209: in function <data/actions/scripts/goback.lua:10>

 

Link para o post
Compartilhar em outros sites
8 minutos atrás, zFaeLL disse:

Valeu Oww Funcionou.

Mais como sou um admin que evita qualquer erro quando uso o addon vai normal funciona mais da esse erro no goback:

  Ocultar conteúdo

[09/12/2015 11:50:30] [Error - Action Interface] 
[09/12/2015 11:50:30] data/actions/scripts/goback.lua:onUse
[09/12/2015 11:50:30] Description: 
[09/12/2015 11:50:30] data/actions/scripts/goback.lua:209: attempt to compare number with nil
[09/12/2015 11:50:30] stack traceback:
[09/12/2015 11:50:30]     data/actions/scripts/goback.lua:209: in function <data/actions/scripts/goback.lua:10>

 

 Posta o goback.lua 

Link para o post
Compartilhar em outros sites

Ta ai:

Spoiler

local EFFECTS = {
    --[OutfitID] = {Effect}
    ["Magmar"] = 35,   
    ["Jynx"] = 17,          --alterado v1.5
    ["Shiny Jynx"] = 17, 
    ["Piloswine"] = 205,  --alterado v1.8
    ["Swinub"] = 205,   
}

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

if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end

if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 
or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 5700) >= 1  then    --alterado v1.9 <<
   return true                                                                                                                        
end

local ballName = getItemAttribute(item.uid, "poke")
local btype = getPokeballType(item.itemid)
local usando = pokeballs[btype].use

local effect = pokeballs[btype].effect
    if not effect then
        effect = 21
    end
    
unLock(item.uid) --alterado v1.8

if item.itemid == usando then                           

    if getPlayerStorageValue(cid, 990) == 1 then -- GYM
        doPlayerSendCancel(cid, "You can't return your pokemon during gym battles.")
    return true
    end
    if #getCreatureSummons(cid) > 1 and getPlayerStorageValue(cid, 212124) <= 0 then     --alterado v1.6
       if getPlayerStorageValue(cid, 637501) == -2 or getPlayerStorageValue(cid, 637501) >= 1 then  
          BackTeam(cid)       
       end
    end   
    if #getCreatureSummons(cid) == 2 and getPlayerStorageValue(cid, 212124) >= 1 then
       doPlayerSendCancel(cid, "You can't do that while is controling a mind")
       return true     --alterado v1.5
    end
    if #getCreatureSummons(cid) <= 0 then
        if isInArray(pokeballs[btype].all, item.itemid) then
            doTransformItem(item.uid, pokeballs[btype].off)
            doItemSetAttribute(item.uid, "hp", 0)
            doPlayerSendCancel(cid, "This pokemon is fainted.")
            return true
        end
    end

    local cd = getCD(item.uid, "blink", 30)
    if cd > 0 then
       setCD(item.uid, "blink", 0)
    end
    
    local z = getCreatureSummons(cid)[1]

    if getCreatureCondition(z, CONDITION_INVISIBLE) and not isGhostPokemon(z) then
       return true
    end
    doReturnPokemon(cid, z, item, effect)

elseif item.itemid == pokeballs[btype].on then

    if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then
        doPlayerSendCancel(cid, "You must put your pokeball in the correct place!")
    return TRUE
    end

    local thishp = getItemAttribute(item.uid, "hp")

    if thishp <= 0 then
        if isInArray(pokeballs[btype].all, item.itemid) then
            doTransformItem(item.uid, pokeballs[btype].off)
            doItemSetAttribute(item.uid, "hp", 0)
            doPlayerSendCancel(cid, "This pokemon is fainted.")
            return true
        end
    end

    local pokemon = getItemAttribute(item.uid, "poke")

    if not pokes[pokemon] then
    return true
    end

----------------------- Sistema de nao poder carregar mais que 3 pokes lvl baixo e + q 1 poke de lvl medio/alto ---------------------------------
if not isInArray({5, 6}, getPlayerGroupId(cid)) then
   local balls = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid)
   local low = {}
   local lowPokes = {"Rattata", "Caterpie", "Weedle", "Oddish", "Pidgey", "Paras", "Poliwag", "Bellsprout", "Magikarp", "Hoppip", "Sunkern"}
   if #balls >= 1 then
      for _, uid in ipairs(balls) do
          local nome = getItemAttribute(uid, "poke")
          if not isInArray(lowPokes, pokemon) and nome == pokemon then
             return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry two pokemons equals!")
          else
             if nome == pokemon then
                table.insert(low, nome)
             end
          end
      end
   end
if #low >= 3 then
   return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry more than three pokemons equals of low level!")
end   
end
---------------------------------------------------------------------------------------------------------------------------------------------------

    local x = pokes[pokemon]
    local boost = getItemAttribute(item.uid, "boost") or 0

    if getPlayerLevel(cid) < (x.level+boost) then
       doPlayerSendCancel(cid, "You need level "..(x.level+boost).." to use this pokemon.")
       return true
    end
    
    ---------------------------- Sistema pokes de clan --------------------------------------
    local shinysClan = {
    ["Shiny Fearow"] = {4, "Wingeon"},
    ["Shiny Flareon"] = {1, "Volcanic"},
    ["Shiny Vaporeon"] = {2, "Seavel"}, 
    ["Shiny Jolteon"] = {9, "Raibolt"},
    ["Shiny Hypno"] = {7, "Psycraft"},           
    ["Shiny Golem"] = {3, "Orebound"},
    ["Shiny Vileplume"] = {8, "Naturia"},
    ["Shiny Nidoking"] = {5, "Malefic"},
    ["Shiny Hitmontop"] = {6, "Gardestrike"},   --alterado v1.4
    }
    
    if shinysClan[pokemon] and (getPlayerGroupId(cid) < 4 or getPlayerGroupId(cid) > 6) then  --alterado v1.9 \/
       if getPlayerClanNum(cid) ~= shinysClan[pokemon][1] then
          doPlayerSendCancel(cid, "You need be a member of the clan "..shinysClan[pokemon][2].." to use this pokemon!")
          return true   
       elseif getPlayerClanRank(cid) ~= 5 then
          doPlayerSendCancel(cid, "You need be atleast rank 5 to use this pokemon!")
          return true
       end
    end
    --------------------------------------------------------------------------------------

    doSummonMonster(cid, pokemon)

    local pk = getCreatureSummons(cid)[1]
    if not isCreature(pk) then return true end
    
    ------------------------passiva hitmonchan------------------------------
    if isSummon(pk) then                                                  --alterado v1.8 \/
       if pokemon == "Shiny Hitmonchan" or pokemon == "Hitmonchan" then
          if not getItemAttribute(item.uid, "hands") then
             doSetItemAttribute(item.uid, "hands", 0)
          end
          local hands = getItemAttribute(item.uid, "hands")
          doSetCreatureOutfit(pk, {lookType = hitmonchans[pokemon][hands].out}, -1)
       end
    end
    -------------------------------------------------------------------------
    ---------movement magmar, jynx-------------
    if EFFECTS[getCreatureName(pk)] then             
       markPosEff(pk, getThingPos(pk))
       sendMovementEffect(pk, EFFECTS[getCreatureName(pk)], getThingPos(pk))  
    end
    --------------------------------------------------------------------------      

    if getCreatureName(pk) == "Ditto" or getCreatureName(pk) == "Shiny Ditto" then --edited

        local left = getItemAttribute(item.uid, "transLeft")
        local name = getItemAttribute(item.uid, "transName")

        if left and left > 0 then
            setPlayerStorageValue(pk, 1010, name)
            doSetCreatureOutfit(pk, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1)
            addEvent(deTransform, left * 1000, pk, getItemAttribute(item.uid, "transTurn"))
            doItemSetAttribute(item.uid, "transBegin", os.clock())
        else
            setPlayerStorageValue(pk, 1010, getCreatureName(pk) == "Ditto" and "Ditto" or "Shiny Ditto")     --edited
        end
    end

    if isGhostPokemon(pk) then doTeleportThing(pk, getPosByDir(getThingPos(cid), math.random(0, 7)), false) end

    doCreatureSetLookDir(pk, 2)

    adjustStatus(pk, item.uid, true, true, true)
    doAddPokemonInOwnList(cid, pokemon)

    doTransformItem(item.uid, item.itemid+1)

    local pokename = getPokeName(pk) --alterado v1.7 

    local mgo = gobackmsgs[math.random(1, #gobackmsgs)].go:gsub("doka", pokename)
    doCreatureSay(cid, mgo, TALKTYPE_SAY)
    
    doSendMagicEffect(getCreaturePosition(pk), effect)
    
    if useOTClient then
       doPlayerSendCancel(cid, '12//,show') --alterado v1.7
    end
local pk = getCreatureSummons(cid)[1]
                local pb = getPlayerSlotItem(cid, 8).uid
                local look = getItemAttribute(pb,"addon")
                if not look then
                                doSetItemAttribute(pb,"addon",0) 

                end
                if look > 0 then
                                doSetCreatureOutfit(pk, {lookType = look}, -1)


                   end

               
                else

    doPlayerSendCancel(cid, "This pokemon is fainted.")

end

    if useKpdoDlls then
        doUpdateMoves(cid)
    end
return true
end

 

Link para o post
Compartilhar em outros sites
6 minutos atrás, zFaeLL disse:

Ta ai:

  Mostrar conteúdo oculto

local EFFECTS = {
    --[OutfitID] = {Effect}
    ["Magmar"] = 35,   
    ["Jynx"] = 17,          --alterado v1.5
    ["Shiny Jynx"] = 17, 
    ["Piloswine"] = 205,  --alterado v1.8
    ["Swinub"] = 205,   
}

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

if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end

if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 
or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 5700) >= 1  then    --alterado v1.9 <<
   return true                                                                                                                        
end

local ballName = getItemAttribute(item.uid, "poke")
local btype = getPokeballType(item.itemid)
local usando = pokeballs[btype].use

local effect = pokeballs[btype].effect
    if not effect then
        effect = 21
    end
    
unLock(item.uid) --alterado v1.8

if item.itemid == usando then                           

    if getPlayerStorageValue(cid, 990) == 1 then -- GYM
        doPlayerSendCancel(cid, "You can't return your pokemon during gym battles.")
    return true
    end
    if #getCreatureSummons(cid) > 1 and getPlayerStorageValue(cid, 212124) <= 0 then     --alterado v1.6
       if getPlayerStorageValue(cid, 637501) == -2 or getPlayerStorageValue(cid, 637501) >= 1 then  
          BackTeam(cid)       
       end
    end   
    if #getCreatureSummons(cid) == 2 and getPlayerStorageValue(cid, 212124) >= 1 then
       doPlayerSendCancel(cid, "You can't do that while is controling a mind")
       return true     --alterado v1.5
    end
    if #getCreatureSummons(cid) <= 0 then
        if isInArray(pokeballs[btype].all, item.itemid) then
            doTransformItem(item.uid, pokeballs[btype].off)
            doItemSetAttribute(item.uid, "hp", 0)
            doPlayerSendCancel(cid, "This pokemon is fainted.")
            return true
        end
    end

    local cd = getCD(item.uid, "blink", 30)
    if cd > 0 then
       setCD(item.uid, "blink", 0)
    end
    
    local z = getCreatureSummons(cid)[1]

    if getCreatureCondition(z, CONDITION_INVISIBLE) and not isGhostPokemon(z) then
       return true
    end
    doReturnPokemon(cid, z, item, effect)

elseif item.itemid == pokeballs[btype].on then

    if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then
        doPlayerSendCancel(cid, "You must put your pokeball in the correct place!")
    return TRUE
    end

    local thishp = getItemAttribute(item.uid, "hp")

    if thishp <= 0 then
        if isInArray(pokeballs[btype].all, item.itemid) then
            doTransformItem(item.uid, pokeballs[btype].off)
            doItemSetAttribute(item.uid, "hp", 0)
            doPlayerSendCancel(cid, "This pokemon is fainted.")
            return true
        end
    end

    local pokemon = getItemAttribute(item.uid, "poke")

    if not pokes[pokemon] then
    return true
    end

----------------------- Sistema de nao poder carregar mais que 3 pokes lvl baixo e + q 1 poke de lvl medio/alto ---------------------------------
if not isInArray({5, 6}, getPlayerGroupId(cid)) then
   local balls = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid)
   local low = {}
   local lowPokes = {"Rattata", "Caterpie", "Weedle", "Oddish", "Pidgey", "Paras", "Poliwag", "Bellsprout", "Magikarp", "Hoppip", "Sunkern"}
   if #balls >= 1 then
      for _, uid in ipairs(balls) do
          local nome = getItemAttribute(uid, "poke")
          if not isInArray(lowPokes, pokemon) and nome == pokemon then
             return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry two pokemons equals!")
          else
             if nome == pokemon then
                table.insert(low, nome)
             end
          end
      end
   end
if #low >= 3 then
   return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry more than three pokemons equals of low level!")
end   
end
---------------------------------------------------------------------------------------------------------------------------------------------------

    local x = pokes[pokemon]
    local boost = getItemAttribute(item.uid, "boost") or 0

    if getPlayerLevel(cid) < (x.level+boost) then
       doPlayerSendCancel(cid, "You need level "..(x.level+boost).." to use this pokemon.")
       return true
    end
    
    ---------------------------- Sistema pokes de clan --------------------------------------
    local shinysClan = {
    ["Shiny Fearow"] = {4, "Wingeon"},
    ["Shiny Flareon"] = {1, "Volcanic"},
    ["Shiny Vaporeon"] = {2, "Seavel"}, 
    ["Shiny Jolteon"] = {9, "Raibolt"},
    ["Shiny Hypno"] = {7, "Psycraft"},           
    ["Shiny Golem"] = {3, "Orebound"},
    ["Shiny Vileplume"] = {8, "Naturia"},
    ["Shiny Nidoking"] = {5, "Malefic"},
    ["Shiny Hitmontop"] = {6, "Gardestrike"},   --alterado v1.4
    }
    
    if shinysClan[pokemon] and (getPlayerGroupId(cid) < 4 or getPlayerGroupId(cid) > 6) then  --alterado v1.9 \/
       if getPlayerClanNum(cid) ~= shinysClan[pokemon][1] then
          doPlayerSendCancel(cid, "You need be a member of the clan "..shinysClan[pokemon][2].." to use this pokemon!")
          return true   
       elseif getPlayerClanRank(cid) ~= 5 then
          doPlayerSendCancel(cid, "You need be atleast rank 5 to use this pokemon!")
          return true
       end
    end
    --------------------------------------------------------------------------------------

    doSummonMonster(cid, pokemon)

    local pk = getCreatureSummons(cid)[1]
    if not isCreature(pk) then return true end
    
    ------------------------passiva hitmonchan------------------------------
    if isSummon(pk) then                                                  --alterado v1.8 \/
       if pokemon == "Shiny Hitmonchan" or pokemon == "Hitmonchan" then
          if not getItemAttribute(item.uid, "hands") then
             doSetItemAttribute(item.uid, "hands", 0)
          end
          local hands = getItemAttribute(item.uid, "hands")
          doSetCreatureOutfit(pk, {lookType = hitmonchans[pokemon][hands].out}, -1)
       end
    end
    -------------------------------------------------------------------------
    ---------movement magmar, jynx-------------
    if EFFECTS[getCreatureName(pk)] then             
       markPosEff(pk, getThingPos(pk))
       sendMovementEffect(pk, EFFECTS[getCreatureName(pk)], getThingPos(pk))  
    end
    --------------------------------------------------------------------------      

    if getCreatureName(pk) == "Ditto" or getCreatureName(pk) == "Shiny Ditto" then --edited

        local left = getItemAttribute(item.uid, "transLeft")
        local name = getItemAttribute(item.uid, "transName")

        if left and left > 0 then
            setPlayerStorageValue(pk, 1010, name)
            doSetCreatureOutfit(pk, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1)
            addEvent(deTransform, left * 1000, pk, getItemAttribute(item.uid, "transTurn"))
            doItemSetAttribute(item.uid, "transBegin", os.clock())
        else
            setPlayerStorageValue(pk, 1010, getCreatureName(pk) == "Ditto" and "Ditto" or "Shiny Ditto")     --edited
        end
    end

    if isGhostPokemon(pk) then doTeleportThing(pk, getPosByDir(getThingPos(cid), math.random(0, 7)), false) end

    doCreatureSetLookDir(pk, 2)

    adjustStatus(pk, item.uid, true, true, true)
    doAddPokemonInOwnList(cid, pokemon)

    doTransformItem(item.uid, item.itemid+1)

    local pokename = getPokeName(pk) --alterado v1.7 

    local mgo = gobackmsgs[math.random(1, #gobackmsgs)].go:gsub("doka", pokename)
    doCreatureSay(cid, mgo, TALKTYPE_SAY)
    
    doSendMagicEffect(getCreaturePosition(pk), effect)
    
    if useOTClient then
       doPlayerSendCancel(cid, '12//,show') --alterado v1.7
    end
local pk = getCreatureSummons(cid)[1]
                local pb = getPlayerSlotItem(cid, 8).uid
                local look = getItemAttribute(pb,"addon")
                if not look then
                                doSetItemAttribute(pb,"addon",0) 

                end
                if look > 0 then
                                doSetCreatureOutfit(pk, {lookType = look}, -1)


                   end

               
                else

    doPlayerSendCancel(cid, "This pokemon is fainted.")

end

    if useKpdoDlls then
        doUpdateMoves(cid)
    end
return true
end

 

Aki também aparece a mesma coisa ao usar o addon, porem não interfere em nada, acho que isso acontece, pq fiz uma alteração, para não aparecer esse erro teria que adicionar 2 linhas, return false e return true, porém ao fazer isso, a Cd Bar não ia aparecer no pokemon com addon

Link para o post
Compartilhar em outros sites

Não sei porque reiniciei server  e tar a dar isso

[09/12/2015 12:30:56] [Error - Action Interface] 
[09/12/2015 12:30:56] data/actions/scripts/addon.lua:onUse
[09/12/2015 12:30:56] Description: 
[09/12/2015 12:30:56] data/actions/scripts/addon.lua:23: attempt to compare nil with number
[09/12/2015 12:30:56] stack traceback:
[09/12/2015 12:30:56]     data/actions/scripts/addon.lua:23: in function <data/actions/scripts/addon.lua:1>

Link para o post
Compartilhar em outros sites
45 minutos atrás, zFaeLL disse:

Não sei porque reiniciei server  e tar a dar isso

[09/12/2015 12:30:56] [Error - Action Interface] 
[09/12/2015 12:30:56] data/actions/scripts/addon.lua:onUse
[09/12/2015 12:30:56] Description: 
[09/12/2015 12:30:56] data/actions/scripts/addon.lua:23: attempt to compare nil with number
[09/12/2015 12:30:56] stack traceback:
[09/12/2015 12:30:56]     data/actions/scripts/addon.lua:23: in function <data/actions/scripts/addon.lua:1>

Está funcionando normalmente? eses numeros ai: 23,1 são as linhas, olha o addon.lua e vê se ta correto, olha a linha 1 e 23 em especial, vê se nn apagou algo como uma virgula ou uma letra

 

Link para o post
Compartilhar em outros sites
44 minutos atrás, samlecter disse:

Está funcionando normalmente? eses numeros ai: 23,1 são as linhas, olha o addon.lua e vê se ta correto, olha a linha 1 e 23 em especial, vê se nn apagou algo como uma virgula ou uma letra

 

não, é que quando tento usar addon não funfa só depois que tira e bota ele na pokeball mais valeu ai ja arrumei REP ++

Link para o post
Compartilhar em outros sites

coloka o goback ae pra mim 

 

 

 

local EFFECTS = {
    --[OutfitID] = {Effect}
    ["Magmar"] = 35,   
    ["Jynx"] = 17,          --alterado v1.5
    ["Shiny Jynx"] = 17, 
    ["Piloswine"] = 205,  --alterado v1.8
    ["Swinub"] = 205,   
}

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

if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end

if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 
or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 5700) >= 1  then    --alterado v1.9 <<
   return true                                                                                                                        
end

local ballName = getItemAttribute(item.uid, "poke")
local btype = getPokeballType(item.itemid)
local usando = pokeballs[btype].use

local effect = pokeballs[btype].effect
    if not effect then
        effect = 21
    end
    
unLock(item.uid) --alterado v1.8

if item.itemid == usando then                           

    if getPlayerStorageValue(cid, 990) == 1 then -- GYM
        doPlayerSendCancel(cid, "Você não pode retornar seu Pokémon durante uma batalha de ginásio.")
    return true
    end
    if #getCreatureSummons(cid) > 1 and getPlayerStorageValue(cid, 212124) <= 0 then     --alterado v1.6
       if getPlayerStorageValue(cid, 637501) == -2 or getPlayerStorageValue(cid, 637501) >= 1 then  
          BackTeam(cid)       
       end
    end   
    if #getCreatureSummons(cid) == 2 and getPlayerStorageValue(cid, 212124) >= 1 then
       doPlayerSendCancel(cid, "You can't do that while is controling a mind")
       return true     --alterado v1.5
    end
    if #getCreatureSummons(cid) <= 0 then
        if isInArray(pokeballs[btype].all, item.itemid) then
            doTransformItem(item.uid, pokeballs[btype].off)
            doItemSetAttribute(item.uid, "hp", 0)
            doPlayerSendCancel(cid, "Seu Pokémon desmaiou.")
            return true
        end
    end

    local cd = getCD(item.uid, "blink", 30)
    if cd > 0 then
       setCD(item.uid, "blink", 0)
    end
    
    local z = getCreatureSummons(cid)[1]

    if getCreatureCondition(z, CONDITION_INVISIBLE) and not isGhostPokemon(z) then
       return true
    end
    doReturnPokemon(cid, z, item, effect)

elseif item.itemid == pokeballs[btype].on then

    if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then
        doPlayerSendCancel(cid, "Coloque a Pokébola no slot correto!")
    return TRUE
    end

    local thishp = getItemAttribute(item.uid, "hp")

    if thishp <= 0 then
        if isInArray(pokeballs[btype].all, item.itemid) then
            doTransformItem(item.uid, pokeballs[btype].off)
            doItemSetAttribute(item.uid, "hp", 0)
            doPlayerSendCancel(cid, "Seu Pokémon desmaiou.")
            return true
        end
    end

    local pokemon = getItemAttribute(item.uid, "poke")

    if not pokes[pokemon] then
    return true
    end

----------------------- Sistema de nao poder carregar mais que 3 pokes lvl baixo e + q 1 poke de lvl medio/alto ---------------------------------
if not isInArray({5, 6}, getPlayerGroupId(cid)) then
   local balls = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid)
   local low = {}
   local lowPokes = {"Rattata", "Caterpie", "Weedle", "Oddish", "Pidgey", "Paras", "Poliwag", "Bellsprout", "Magikarp", "Hoppip", "Sunkern"}
   if #balls >= 1 then
      for _, uid in ipairs(balls) do
          local nome = getItemAttribute(uid, "poke")
          if not isInArray(lowPokes, pokemon) and nome == pokemon then
             return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry two pokemons equals!")
          else
             if nome == pokemon then
                table.insert(low, nome)
             end
          end
      end
   end
if #low >= 3 then
   return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry more than three pokemons equals of low level!")
end   
end
---------------------------------------------------------------------------------------------------------------------------------------------------

    local x = pokes[pokemon]
    local boost = getItemAttribute(item.uid, "boost") or 0

    if getPlayerLevel(cid) < (x.level+boost) then
       doPlayerSendCancel(cid, "You need level "..(x.level+boost).." to use this pokemon.")
       return true
    end
    
    ---------------------------- Sistema pokes de clan --------------------------------------
    local shinysClan = {
    ["Shiny Fearow"] = {4, "Wingeon"},
    ["Shiny Flareon"] = {1, "Volcanic"},
    ["Shiny Vaporeon"] = {2, "Seavel"}, 
    ["Shiny Jolteon"] = {9, "Raibolt"},
    ["Shiny Hypno"] = {7, "Psycraft"},           
    ["Shiny Golem"] = {3, "Orebound"},
    ["Shiny Vileplume"] = {8, "Naturia"},
    ["Shiny Nidoking"] = {5, "Malefic"},
    ["Shiny Hitmontop"] = {6, "Gardestrike"},   --alterado v1.4
    }
    
    if shinysClan[pokemon] and (getPlayerGroupId(cid) < 4 or getPlayerGroupId(cid) > 6) then  --alterado v1.9 \/
       if getPlayerClanNum(cid) ~= shinysClan[pokemon][1] then
          doPlayerSendCancel(cid, "You need be a member of the clan "..shinysClan[pokemon][2].." to use this pokemon!")
          return true   
       elseif getPlayerClanRank(cid) ~= 5 then
          doPlayerSendCancel(cid, "You need be atleast rank 5 to use this pokemon!")
          return true
       end
    end
    --------------------------------------------------------------------------------------

    doSummonMonster(cid, pokemon)

    local pk = getCreatureSummons(cid)[1]
    if not isCreature(pk) then return true end
    
    ------------------------passiva hitmonchan------------------------------
    if isSummon(pk) then                                                  --alterado v1.8 \/
       if pokemon == "Shiny Hitmonchan" or pokemon == "Hitmonchan" then
          if not getItemAttribute(item.uid, "hands") then
             doSetItemAttribute(item.uid, "hands", 0)
          end
          local hands = getItemAttribute(item.uid, "hands")
          doSetCreatureOutfit(pk, {lookType = hitmonchans[pokemon][hands].out}, -1)
       end
    end
    -------------------------------------------------------------------------
    ---------movement magmar, jynx-------------
    if EFFECTS[getCreatureName(pk)] then             
       markPosEff(pk, getThingPos(pk))
       sendMovementEffect(pk, EFFECTS[getCreatureName(pk)], getThingPos(pk))  
    end
    --------------------------------------------------------------------------      

    if getCreatureName(pk) == "Ditto" or getCreatureName(pk) == "Shiny Ditto" then --edited

        local left = getItemAttribute(item.uid, "transLeft")
        local name = getItemAttribute(item.uid, "transName")

        if left and left > 0 then
            setPlayerStorageValue(pk, 1010, name)
            doSetCreatureOutfit(pk, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1)
            addEvent(deTransform, left * 1000, pk, getItemAttribute(item.uid, "transTurn"))
            doItemSetAttribute(item.uid, "transBegin", os.clock())
        else
            setPlayerStorageValue(pk, 1010, getCreatureName(pk) == "Ditto" and "Ditto" or "Shiny Ditto")     --edited
        end
    end

    if isGhostPokemon(pk) then doTeleportThing(pk, getPosByDir(getThingPos(cid), math.random(0, 7)), false) end

    doCreatureSetLookDir(pk, 2)

    adjustStatus(pk, item.uid, true, true, true)
    doAddPokemonInOwnList(cid, pokemon)

    doTransformItem(item.uid, item.itemid+1)

    local pokename = getPokeName(pk) --alterado v1.7 

    local mgo = gobackmsgs[math.random(1, #gobackmsgs)].go:gsub("doka", pokename)
    doCreatureSay(cid, mgo, TALKTYPE_SAY)
    
    doSendMagicEffect(getCreaturePosition(pk), effect)
    
    if useOTClient then
       doPlayerSendCancel(cid, '12//,show') --alterado v1.7
    end
    
else

    doPlayerSendCancel(cid, "Seu Pokémon desmaiou.")

end

    if useKpdoDlls then
        doUpdateMoves(cid)
    end
return true
end

Link para o post
Compartilhar em outros sites
11 minutos atrás, eliaszinho disse:

coloka o goback ae pra mim 

 

 

 

local EFFECTS = {
    --[OutfitID] = {Effect}
    ["Magmar"] = 35,   
    ["Jynx"] = 17,          --alterado v1.5
    ["Shiny Jynx"] = 17, 
    ["Piloswine"] = 205,  --alterado v1.8
    ["Swinub"] = 205,   
}

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

if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end

if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 
or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 5700) >= 1  then    --alterado v1.9 <<
   return true                                                                                                                        
end

local ballName = getItemAttribute(item.uid, "poke")
local btype = getPokeballType(item.itemid)
local usando = pokeballs[btype].use

local effect = pokeballs[btype].effect
    if not effect then
        effect = 21
    end
    
unLock(item.uid) --alterado v1.8

if item.itemid == usando then                           

    if getPlayerStorageValue(cid, 990) == 1 then -- GYM
        doPlayerSendCancel(cid, "Você não pode retornar seu Pokémon durante uma batalha de ginásio.")
    return true
    end
    if #getCreatureSummons(cid) > 1 and getPlayerStorageValue(cid, 212124) <= 0 then     --alterado v1.6
       if getPlayerStorageValue(cid, 637501) == -2 or getPlayerStorageValue(cid, 637501) >= 1 then  
          BackTeam(cid)       
       end
    end   
    if #getCreatureSummons(cid) == 2 and getPlayerStorageValue(cid, 212124) >= 1 then
       doPlayerSendCancel(cid, "You can't do that while is controling a mind")
       return true     --alterado v1.5
    end
    if #getCreatureSummons(cid) <= 0 then
        if isInArray(pokeballs[btype].all, item.itemid) then
            doTransformItem(item.uid, pokeballs[btype].off)
            doItemSetAttribute(item.uid, "hp", 0)
            doPlayerSendCancel(cid, "Seu Pokémon desmaiou.")
            return true
        end
    end

    local cd = getCD(item.uid, "blink", 30)
    if cd > 0 then
       setCD(item.uid, "blink", 0)
    end
    
    local z = getCreatureSummons(cid)[1]

    if getCreatureCondition(z, CONDITION_INVISIBLE) and not isGhostPokemon(z) then
       return true
    end
    doReturnPokemon(cid, z, item, effect)

elseif item.itemid == pokeballs[btype].on then

    if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then
        doPlayerSendCancel(cid, "Coloque a Pokébola no slot correto!")
    return TRUE
    end

    local thishp = getItemAttribute(item.uid, "hp")

    if thishp <= 0 then
        if isInArray(pokeballs[btype].all, item.itemid) then
            doTransformItem(item.uid, pokeballs[btype].off)
            doItemSetAttribute(item.uid, "hp", 0)
            doPlayerSendCancel(cid, "Seu Pokémon desmaiou.")
            return true
        end
    end

    local pokemon = getItemAttribute(item.uid, "poke")

    if not pokes[pokemon] then
    return true
    end

----------------------- Sistema de nao poder carregar mais que 3 pokes lvl baixo e + q 1 poke de lvl medio/alto ---------------------------------
if not isInArray({5, 6}, getPlayerGroupId(cid)) then
   local balls = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid)
   local low = {}
   local lowPokes = {"Rattata", "Caterpie", "Weedle", "Oddish", "Pidgey", "Paras", "Poliwag", "Bellsprout", "Magikarp", "Hoppip", "Sunkern"}
   if #balls >= 1 then
      for _, uid in ipairs(balls) do
          local nome = getItemAttribute(uid, "poke")
          if not isInArray(lowPokes, pokemon) and nome == pokemon then
             return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry two pokemons equals!")
          else
             if nome == pokemon then
                table.insert(low, nome)
             end
          end
      end
   end
if #low >= 3 then
   return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry more than three pokemons equals of low level!")
end   
end
---------------------------------------------------------------------------------------------------------------------------------------------------

    local x = pokes[pokemon]
    local boost = getItemAttribute(item.uid, "boost") or 0

    if getPlayerLevel(cid) < (x.level+boost) then
       doPlayerSendCancel(cid, "You need level "..(x.level+boost).." to use this pokemon.")
       return true
    end
    
    ---------------------------- Sistema pokes de clan --------------------------------------
    local shinysClan = {
    ["Shiny Fearow"] = {4, "Wingeon"},
    ["Shiny Flareon"] = {1, "Volcanic"},
    ["Shiny Vaporeon"] = {2, "Seavel"}, 
    ["Shiny Jolteon"] = {9, "Raibolt"},
    ["Shiny Hypno"] = {7, "Psycraft"},           
    ["Shiny Golem"] = {3, "Orebound"},
    ["Shiny Vileplume"] = {8, "Naturia"},
    ["Shiny Nidoking"] = {5, "Malefic"},
    ["Shiny Hitmontop"] = {6, "Gardestrike"},   --alterado v1.4
    }
    
    if shinysClan[pokemon] and (getPlayerGroupId(cid) < 4 or getPlayerGroupId(cid) > 6) then  --alterado v1.9 \/
       if getPlayerClanNum(cid) ~= shinysClan[pokemon][1] then
          doPlayerSendCancel(cid, "You need be a member of the clan "..shinysClan[pokemon][2].." to use this pokemon!")
          return true   
       elseif getPlayerClanRank(cid) ~= 5 then
          doPlayerSendCancel(cid, "You need be atleast rank 5 to use this pokemon!")
          return true
       end
    end
    --------------------------------------------------------------------------------------

    doSummonMonster(cid, pokemon)

    local pk = getCreatureSummons(cid)[1]
    if not isCreature(pk) then return true end
    
    ------------------------passiva hitmonchan------------------------------
    if isSummon(pk) then                                                  --alterado v1.8 \/
       if pokemon == "Shiny Hitmonchan" or pokemon == "Hitmonchan" then
          if not getItemAttribute(item.uid, "hands") then
             doSetItemAttribute(item.uid, "hands", 0)
          end
          local hands = getItemAttribute(item.uid, "hands")
          doSetCreatureOutfit(pk, {lookType = hitmonchans[pokemon][hands].out}, -1)
       end
    end
    -------------------------------------------------------------------------
    ---------movement magmar, jynx-------------
    if EFFECTS[getCreatureName(pk)] then             
       markPosEff(pk, getThingPos(pk))
       sendMovementEffect(pk, EFFECTS[getCreatureName(pk)], getThingPos(pk))  
    end
    --------------------------------------------------------------------------      

    if getCreatureName(pk) == "Ditto" or getCreatureName(pk) == "Shiny Ditto" then --edited

        local left = getItemAttribute(item.uid, "transLeft")
        local name = getItemAttribute(item.uid, "transName")

        if left and left > 0 then
            setPlayerStorageValue(pk, 1010, name)
            doSetCreatureOutfit(pk, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1)
            addEvent(deTransform, left * 1000, pk, getItemAttribute(item.uid, "transTurn"))
            doItemSetAttribute(item.uid, "transBegin", os.clock())
        else
            setPlayerStorageValue(pk, 1010, getCreatureName(pk) == "Ditto" and "Ditto" or "Shiny Ditto")     --edited
        end
    end

    if isGhostPokemon(pk) then doTeleportThing(pk, getPosByDir(getThingPos(cid), math.random(0, 7)), false) end

    doCreatureSetLookDir(pk, 2)

    adjustStatus(pk, item.uid, true, true, true)
    doAddPokemonInOwnList(cid, pokemon)

    doTransformItem(item.uid, item.itemid+1)

    local pokename = getPokeName(pk) --alterado v1.7 

    local mgo = gobackmsgs[math.random(1, #gobackmsgs)].go:gsub("doka", pokename)
    doCreatureSay(cid, mgo, TALKTYPE_SAY)
    
    doSendMagicEffect(getCreaturePosition(pk), effect)
    
    if useOTClient then
       doPlayerSendCancel(cid, '12//,show') --alterado v1.7
    end
    
else

    doPlayerSendCancel(cid, "Seu Pokémon desmaiou.")

end

    if useKpdoDlls then
        doUpdateMoves(cid)
    end
return true
end

local EFFECTS = {
    --[OutfitID] = {Effect}
    ["Magmar"] = 35,   
    ["Jynx"] = 17,          --alterado v1.5
    ["Shiny Jynx"] = 17, 
    ["Piloswine"] = 205,  --alterado v1.8
    ["Swinub"] = 205,   
}
function onUse(cid, item, frompos, item2, topos)
if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end
if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 
or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 5700) >= 1  then    --alterado v1.9 <<
   return true                                                                                                                        
end
local ballName = getItemAttribute(item.uid, "poke")
local btype = getPokeballType(item.itemid)
local usando = pokeballs[btype].use
local effect = pokeballs[btype].effect
    if not effect then
        effect = 21
    end
    
unLock(item.uid) --alterado v1.8
if item.itemid == usando then                           
    if getPlayerStorageValue(cid, 990) == 1 then -- GYM
        doPlayerSendCancel(cid, "Você não pode retornar seu Pokémon durante uma batalha de ginásio.")
    return true
    end
    if #getCreatureSummons(cid) > 1 and getPlayerStorageValue(cid, 212124) <= 0 then     --alterado v1.6
       if getPlayerStorageValue(cid, 637501) == -2 or getPlayerStorageValue(cid, 637501) >= 1 then  
          BackTeam(cid)       
       end
    end   
    if #getCreatureSummons(cid) == 2 and getPlayerStorageValue(cid, 212124) >= 1 then
       doPlayerSendCancel(cid, "You can't do that while is controling a mind")
       return true     --alterado v1.5
    end
    if #getCreatureSummons(cid) <= 0 then
        if isInArray(pokeballs[btype].all, item.itemid) then
            doTransformItem(item.uid, pokeballs[btype].off)
            doItemSetAttribute(item.uid, "hp", 0)
            doPlayerSendCancel(cid, "Seu Pokémon desmaiou.")
            return true
        end
    end
    local cd = getCD(item.uid, "blink", 30)
    if cd > 0 then
       setCD(item.uid, "blink", 0)
    end
    
    local z = getCreatureSummons(cid)[1]
    if getCreatureCondition(z, CONDITION_INVISIBLE) and not isGhostPokemon(z) then
       return true
    end
    doReturnPokemon(cid, z, item, effect)
elseif item.itemid == pokeballs[btype].on then
    if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then
        doPlayerSendCancel(cid, "Coloque a Pokébola no slot correto!")
    return TRUE
    end
    local thishp = getItemAttribute(item.uid, "hp")
    if thishp <= 0 then
        if isInArray(pokeballs[btype].all, item.itemid) then
            doTransformItem(item.uid, pokeballs[btype].off)
            doItemSetAttribute(item.uid, "hp", 0)
            doPlayerSendCancel(cid, "Seu Pokémon desmaiou.")
            return true
        end
    end
    local pokemon = getItemAttribute(item.uid, "poke")
    if not pokes[pokemon] then
    return true
    end
----------------------- Sistema de nao poder carregar mais que 3 pokes lvl baixo e + q 1 poke de lvl medio/alto ---------------------------------
if not isInArray({5, 6}, getPlayerGroupId(cid)) then
   local balls = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid)
   local low = {}
   local lowPokes = {"Rattata", "Caterpie", "Weedle", "Oddish", "Pidgey", "Paras", "Poliwag", "Bellsprout", "Magikarp", "Hoppip", "Sunkern"}
   if #balls >= 1 then
      for _, uid in ipairs(balls) do
          local nome = getItemAttribute(uid, "poke")
          if not isInArray(lowPokes, pokemon) and nome == pokemon then
             return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry two pokemons equals!")
          else
             if nome == pokemon then
                table.insert(low, nome)
             end
          end
      end
   end
if #low >= 3 then
   return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry more than three pokemons equals of low level!")
end   
end
---------------------------------------------------------------------------------------------------------------------------------------------------
    local x = pokes[pokemon]
    local boost = getItemAttribute(item.uid, "boost") or 0
    if getPlayerLevel(cid) < (x.level+boost) then
       doPlayerSendCancel(cid, "You need level "..(x.level+boost).." to use this pokemon.")
       return true
    end
    
    ---------------------------- Sistema pokes de clan --------------------------------------
    local shinysClan = {
    ["Shiny Fearow"] = {4, "Wingeon"},
    ["Shiny Flareon"] = {1, "Volcanic"},
    ["Shiny Vaporeon"] = {2, "Seavel"}, 
    ["Shiny Jolteon"] = {9, "Raibolt"},
    ["Shiny Hypno"] = {7, "Psycraft"},           
    ["Shiny Golem"] = {3, "Orebound"},
    ["Shiny Vileplume"] = {8, "Naturia"},
    ["Shiny Nidoking"] = {5, "Malefic"},
    ["Shiny Hitmontop"] = {6, "Gardestrike"},   --alterado v1.4
    }
    
    if shinysClan[pokemon] and (getPlayerGroupId(cid) < 4 or getPlayerGroupId(cid) > 6) then  --alterado v1.9 \/
       if getPlayerClanNum(cid) ~= shinysClan[pokemon][1] then
          doPlayerSendCancel(cid, "You need be a member of the clan "..shinysClan[pokemon][2].." to use this pokemon!")
          return true   
       elseif getPlayerClanRank(cid) ~= 5 then
          doPlayerSendCancel(cid, "You need be atleast rank 5 to use this pokemon!")
          return true
       end
    end
    --------------------------------------------------------------------------------------
    doSummonMonster(cid, pokemon)
    local pk = getCreatureSummons(cid)[1]
    if not isCreature(pk) then return true end
    
    ------------------------passiva hitmonchan------------------------------
    if isSummon(pk) then                                                  --alterado v1.8 \/
       if pokemon == "Shiny Hitmonchan" or pokemon == "Hitmonchan" then
          if not getItemAttribute(item.uid, "hands") then
             doSetItemAttribute(item.uid, "hands", 0)
          end
          local hands = getItemAttribute(item.uid, "hands")
          doSetCreatureOutfit(pk, {lookType = hitmonchans[pokemon][hands].out}, -1)
       end
    end
    -------------------------------------------------------------------------
    ---------movement magmar, jynx-------------
    if EFFECTS[getCreatureName(pk)] then             
       markPosEff(pk, getThingPos(pk))
       sendMovementEffect(pk, EFFECTS[getCreatureName(pk)], getThingPos(pk))  
    end
    --------------------------------------------------------------------------      
    if getCreatureName(pk) == "Ditto" or getCreatureName(pk) == "Shiny Ditto" then --edited
        local left = getItemAttribute(item.uid, "transLeft")
        local name = getItemAttribute(item.uid, "transName")
        if left and left > 0 then
            setPlayerStorageValue(pk, 1010, name)
            doSetCreatureOutfit(pk, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1)
            addEvent(deTransform, left * 1000, pk, getItemAttribute(item.uid, "transTurn"))
            doItemSetAttribute(item.uid, "transBegin", os.clock())
        else
            setPlayerStorageValue(pk, 1010, getCreatureName(pk) == "Ditto" and "Ditto" or "Shiny Ditto")     --edited
        end
    end
    if isGhostPokemon(pk) then doTeleportThing(pk, getPosByDir(getThingPos(cid), math.random(0, 7)), false) end
    doCreatureSetLookDir(pk, 2)
    adjustStatus(pk, item.uid, true, true, true)
    doAddPokemonInOwnList(cid, pokemon)
    doTransformItem(item.uid, item.itemid+1)
    local pokename = getPokeName(pk) --alterado v1.7 
    local mgo = gobackmsgs[math.random(1, #gobackmsgs)].go:gsub("doka", pokename)
    doCreatureSay(cid, mgo, TALKTYPE_SAY)
    
    doSendMagicEffect(getCreaturePosition(pk), effect)
    
    if useOTClient then
       doPlayerSendCancel(cid, '12//,show') --alterado v1.7
    end
    
	-- Adicionado \/
	
	local pk = getCreatureSummons(cid)[1]
                local pb = getPlayerSlotItem(cid, 8).uid
                local look = getItemAttribute(pb,"addon")
                if not look then
                                doSetItemAttribute(pb,"addon",0) 

                end
                if look > 0 then
                                doSetCreatureOutfit(pk, {lookType = look}, -1)

                end
	
	
	
-- \/ em cima desse else	
	
else
    doPlayerSendCancel(cid, "Seu Pokémon desmaiou.")
end
    if useKpdoDlls then
        doUpdateMoves(cid)
    end
return true
end

 

Link para o post
Compartilhar em outros sites
  • 1 month later...

Todos os creditos estão errados.
Cacaiu : Por trazer o sistema da addon
Stigal : Por deixar todos na versões compativeis
E isso que você fez tem até no XTIBIA e qualquer um que entende um pouco pode fazer.

E O Fly e Ride é so adicionar uma função, pra cada looktype.

ABÇ...

​Obstaculo Impossível?

Impossível é existir algo Impossível ;) 

 

 

 

 

Confira os Meus Conteúdos ! 

Te ajudei ? REP + E Ficamos KIT ;)

Link para o post
Compartilhar em outros sites
1 hora atrás, Daniel augusto silva disse:

Me ajuda com fly ride e surf

 

...
Não era o picão que entendia de tudo.. " Edge " ué cade? ´-´
 

​Obstaculo Impossível?

Impossível é existir algo Impossível ;) 

 

 

 

 

Confira os Meus Conteúdos ! 

Te ajudei ? REP + E Ficamos KIT ;)

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por Zagaf
      ShowOff Poketibia
       
      Bom a alguns dias atrás eu comecei a reformular um mapa de poketibia que eu baixei (pokexmaster) , ate o momento eu refiz a cidade de saffron.
       
       
       
       
       
    • Por S H I O N
      oiee, estou aqui para disponibilizar uma base bem antiga que achei nos meus arquivos, eu iria apagar ela mais preferi deixar ela aqui para caso alguem queira usar ela para alguma coisa no futuro, pq eu simplesmente peguei em 2018 por ai e nem usei mais pelo o fato de ter muitos bugs e para quem nao entende de script e sistemas ela se torna um pesadelo na vida de alguem, a maioria dos bugs q ela tem da para corrigir muito rapido mais tem uns q sao extremamente dificeis entao um conselho para quem pegar essa base... boa sorte kkkk vc vai precisar de uns meses para tirar os bugs dela mais ela e jogavel ainda. façam um bom uso dela, se caso o cara manjar bem de editar poketibias e tirar bugs e mexer com scripts, para ele vai ser facil tirar esses bugs q tem nela.
      .
      .
      .
      .
      .
      .
      .
      vamos ao que interessa, o download dela vai esta pelo o mediafire e dentro contem o servidor e o client 
      quando baixar e so trocar o ip do servidor e trocar o ip do seu client e pronto.
      .
      .
      .
      .
      .
      .
      vou deixar algumas prints abaixo.
      .
      .
      .
      espero ver um dia essa base online dnv, amava jogar, por isso nao excluir ela
      resolvi deixar aqui, acredito que vao cuidar bem dela. vlw fui.
       
    • Por spotifyy
      Olá, vou tentar não me esticar muito aqui, mas estou mexendo em uma base de poketibia(1098) para estudos
      e provavelmente em algum momento estarei oficialmente lançando.
      Aceito pessoas que também estão em aprendizado e querendo colaborar com o projeto.
      E caso você tenha muito conhecimento na área e queira colaborar também será tão bem vindo/a
      quanto alguém em aprendizado com vontade de evoluir.
       
      Algumas features
       
      >Market Global
      >Poções de XP
      >Gacha stone
      >Boost(+100)
      >Level system
      >Eggs
      >Mapa HUB
      >Eventos diários (PVP/PVE)
      >Outland
      >Shiny Hunts
      >Shiny Box Hunt
      >Area PVP
      e mais algumas outras coisas.
       
       
       
      Caso alguem tenha interesse em integrar o projeto só me chamar no discord que passo as ideias que tenho para o projeto.
       
      Discord: nenep1
       
       
       
       
       
    • Por Baryon
      Boa noite amigos, estou aqui para apresentar meu projeto.
      Estou aqui no intuito de tentar desenvolver um ats baseado em naruto full perspectiva e com uso reduzido de bot, teremos um bot próprio que ira lhe auxiliar na cura e com espaço para 1 magia com finalidade de treino, assim focando que os players possam tentar se divertir jogando na mao tanto a parte pve como pvp do game (oque eu acho mais legal).
      O Servidor ja se encontra com alguns sistema sendo eles:
      ・Passe de batalha
      ・Painel de missoes 
      ・Village war
      ・Sistema de vilas
      ・Bingo book
      ・Autoloot
      ・Ninja procurado
      ・Painel de Dungeons
      ・ World Boss
      Nossas vocaçoes sao divididas em classes sendo elas:
       ・Shooters: Deidara, Gaara, Kankuro, Tenten, Sasori, Konan.
       ・Especialistas: Shikamaru, Nagato, Hashirama, Oonoki, Orochimaru.
       ・Assassinos: Asuma, Madara, Minato, Sasuke, Obito, Kisame.
       ・Suportes: Sakura, Shizune, Ino, Tsunade.
       ・Lutadores: Naruto, Kiba, Chouji, Lee, Neji, Hinata.
             (obs: ja temos por volta de mais 10 personagens "prontos" alem desses com foco em atualizações futuras)
       Atualmente apenas eu e mais uma pessoas estamos desenvolvendo o servidor e ambos trabalham o tempo ou seja nao temos tanto tempo disponivel entao estou em buscas de novas pessoas com certa experiencia para integrar a equipe tenho em mente 4 vagas disponiveis que sao: 1 Mapper, 1 Dev, 1 Designer, 1 Moderador (ficara em contato com a staff e interagindo em nosso discord, ficando por dentro das novidades e no inicio do game ira iniciar como tutor para auxiliar os players).
       Caso alguem tenha interessa em embarcar nessa aventura favor entrar em contato cmg pelo discord 😉 em breve estarei postando mais atualizaçoes do ot aqui!

       Nosso discord: https://discord.gg/pPTkbAnNSV
      Meu contato no discord: baryon1492



    • Por LuisDias
      Olá pessoal! Estamos começando um projeto de desenvolvimento de um servidor de POKETIBIA, ainda bem no início. Gostaria de saber se é possível adicionar sistemas que não estão na base. No caso, a base utilizada será a DASH. Se for possível, gostaria de saber se alguém tem sistemas compatíveis com essa base para disponibilizar, por exemplo o MARKET. Obrigado por toda a ajuda. 
       
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo