Ir para conteúdo

RatPok

Membro
  • Registro em

  • Última visita

  1. Foundation5 começou a seguir RatPok
  2. Está surgindo algum erro? Se sim coloque-o aqui. Você tem o código disponível? Se tiver publique-o aqui: Create_pokeball.lua function onSay(player, words, param) if not player:getGroup():getAccess() then return true end if player:getAccountType() < ACCOUNT_TYPE_GOD then return false end local split = param:split(",") local name = split[1] local monsterType = MonsterType(name) if not monsterType then player:sendCancelMessage("Pokemon not found.") return false end name = firstToUpper(name) local level = tonumber(split[2]) if level == nil then level = 1 end local boost = tonumber(split[3]) if boost == nil then boost = 0 end local love = tonumber(split[4]) if love == nil then love = 0 end local tera = tonumber(split[5]) if tera == nil then tera = 0 end local nature = split[6] if nature == nil then nature = 0 end local result = player:addItem(26661, 1, false, 1, CONST_SLOT_BACKPACK) if result ~= nil then local baseHealth = monsterType:getMaxHealth() local maxHealth = math.floor(baseHealth * statusGainFormula(player:getLevel(), level, boost, love)) result:setSpecialAttribute("pokeName", name) result:setSpecialAttribute("pokeLevel", level) result:setSpecialAttribute("pokeBoost", 0) result:setSpecialAttribute("pokeLove", love) result:setSpecialAttribute("pokeExperience", getNeededExp(level)) result:setSpecialAttribute("pokeMaxHealth", maxHealth) result:setSpecialAttribute("pokeHealth", maxHealth) result:setSpecialAttribute("teraType", tera) if nature ~= 0 then result:setSpecialAttribute("nature", firstToUpper(nature)) end result:setSpecialAttribute("evhp", 0) result:setSpecialAttribute("evatk", 0) result:setSpecialAttribute("evdef", 0) result:setSpecialAttribute("evpoints", 0) result:setSpecialAttribute("evkills", 0) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) player:refreshPokemonBar({}, {}) return true else player:sendCancelMessage("Backpack full.") end return false end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
  3. RatPok reagiu a uma resposta no tópico: Erro ao Usar um Pokemon atraves da Pokebar
  4. Mt obg, retirei o print e o erro foi corrigido!
  5. Qual o motivo deste tópico? Estou tendo esse erro ao utilizar a Pokebar: Lua Script Error: [TalkAction Interface] data/talkactions/scripts/usesummon.lua:onSay data/talkactions/scripts/usesummon.lua:4: attempt to index global 'ball' (a nil value) stack traceback: [C]: in function '__index' data/talkactions/scripts/usesummon.lua:4: in function <data/talkactions/scripts/usesummon.lua:3> Você tem o código disponível? Se tiver publique o aqui: Usesummons.lua: function onSay(player, words, param) print("Tentando invocar Pokémon com a ball ID: " .. ball:getId()) if player:isSummonBlocked() then return false end if doReleaseSummon(player:getId(), player:getPosition(), balls[ballKey].effectRelease, true, balls[ballKey].missile) then ball:transform(balls[ballKey].usedOff) ball:setSpecialAttribute("isBeingUsed", 1) else player:sendTextMessage(MESSAGE_STATUS_SMALL, "Não foi possível usar este Pokémon.") ball:setSpecialAttribute("isBeingUsed", 0) -- Reseta o status da ball para garantir que possa ser usada novamente end local index = tonumber(param) if not index then return false end local exhaust = Condition(CONDITION_EXHAUST_WEAPON) if player:isDuelingWithNpc() then exhaust:setParameter(CONDITION_PARAM_TICKS, 10000) else exhaust:setParameter(CONDITION_PARAM_TICKS, 1000) end if player:getCondition(CONDITION_EXHAUST_WEAPON) then player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_YOUAREEXHAUSTED)) return false end local pokeballs = player:getPokeballs() local ball = pokeballs[index] -- local ball = player:getSpecialStorage("pokes")[index] if not ball then print("WARNING! Player " .. player:getName() .. " had problems trying to use pokebar: selected ball not found.") player:refreshPokemonBar({}, {}) return false end if player:canReleaseSummon(ball:getSummonLevel(), ball:getSummonBoost(), ball:getSummonOwner()) then if hasSummons(player) then local usingBall = player:getUsingBall() if not usingBall then print("WARNING! Player " .. player:getName() .. " had problems trying to use pokebar: doRemoveSummon.") player:refreshPokemonBar({}, {}) return false end if usingBall:getId() == ball:getId() then local usingBallKey = getBallKey(usingBall:getId()) doRemoveSummon(player:getId(), balls[usingBallKey].effectRelease, false, true, balls[usingBallKey].missile) usingBall:transform(balls[usingBallKey].usedOn) player:addCondition(exhaust) return false end local usingBallKey = getBallKey(usingBall:getId()) doRemoveSummon(player:getId(), balls[usingBallKey].effectRelease, false, true, balls[usingBallKey].missile) usingBall:transform(balls[usingBallKey].usedOn) player:addCondition(exhaust) end local ballKey = getBallKey(ball:getId()) ball:transform(balls[ballKey].usedOff) ball:setSpecialAttribute("isBeingUsed", 1) doReleaseSummon(player:getId(), player:getPosition(), balls[ballKey].effectRelease, true, balls[ballKey].missile) player:addCondition(exhaust) end return false end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
  6. RatPok se registrou na comunidade
  7. Opa, tem Discord pra trocar uma ideia comigo sobre uns bugs do server Ou se quiser me adicione> (ratpoker)

Informação Importante

Confirmação de Termo