Olá pessoal, entao eu estou enfrentando um bug, como bem provavel que esteja acontecendo com outros tambem.. é assim, os npcs de GYM - DUEL - BATTLE estão summonando os pokemons hora com tal força e HP hora com outro.. Exemplo: eu configuro no script "OptionalLevel = 400", até ai tudo certo, quando vou testar, eu chamo battle, hi, battle, yes ele summona o pokemon e vem com a força de acordo com o optional level.. ai acabou a batalha, eu vou batalhar novamente com ele, ele summona o pokemon de acordo com o level comum que é configurado em configurations..
se alguem puder ajudar por favor.. logo abaixo segue o exemplo de um script, agradeço desde já ! ^^
local focus = 0
local max_distance = 8
local talk_start = 0
local conv = 0
local fighting = false
local challenger = 0
local afk_limit_time = 30-- seconds
local afk_time = 0-- don't change
local battle_turn = 1-- don't change
local challenger_turn = 0-- don't change
----------------------------------
local sto = 759848
----------------------------------
local function doSummonGymPokemon(npc)
local this = npc
if #getCreatureSummons(this) >= 1 or focus == 0 then return true end
{name = "Tyrogue", OptionalLevel = 100, sex = SEX_MALE, nick = "", ball = "normal"},
},
storage = 0,
msg = "Hello "..getCreatureName(cid)..", my name is ".. getNpcName().." i'm a member of the fighter tower. How may I help you?"
},
["Chun Li"] = {
pokemon = {
{name = "Primeape", OptionalLevel = 150, sex = SEX_FEMALE, nick = "", ball = "great"},
},
storage = 1,
msg = "Hello "..getCreatureName(cid)..", my name is ".. getNpcName().." i'm a member of the fighter tower. How may I help you?"
},
["Van Damme"] = {
pokemon = {
{name = "Machoke", OptionalLevel = 160, sex = SEX_FEMALE, nick = "", ball = "normal"},
},
storage = 2,
msg = "Hello "..getCreatureName(cid)..", my name is ".. getNpcName().." i'm a member of the fighter tower. How may I help you?"
},
["Mai Shiranui"] = {
pokemon = {
{name = "Capoeira Hitmontop", OptionalLevel = 170, sex = SEX_MALE, nick = "", ball = "super"},
},
storage = 3,
msg = "Hello "..getCreatureName(cid)..", my name is ".. getNpcName().." i'm a member of the fighter tower. How may I help you?"
},
["Jet Li"] = {
pokemon = {
{name = "Taekwondo Hitmonlee", OptionalLevel = 180, sex = SEX_MALE, nick = "", ball = "great"},
},
storage = 4,
msg = "Hello "..getCreatureName(cid)..", my name is ".. getNpcName().." i'm a member of the fighter tower. How may I help you?"
},
["Jackie Chan"] = {
pokemon = {
{name = "Boxer Hitmonchan", OptionalLevel = 190, sex = SEX_MALE, nick = "", ball = "super"},
},
storage = 5,
msg = "Hello "..getCreatureName(cid)..", my name is ".. getNpcName().." i'm a member of the fighter tower. How may I help you?"
},
["Chuck Norris"] = {
pokemon = {
{name = "Undefeated Machamp", OptionalLevel = 240, sex = SEX_MALE, nick = "", ball = "ultra"},
},
storage = 6,
msg = "Hello "..getCreatureName(cid)..", my name is ".. getNpcName().." i'm the master of the fighter tower. Nobody can defeat me! How may I help you?"
},
}
theNpc = Npcs[getNpcName()]
local msg = string.lower(msg)
------------------------------------------
if focus == cid then
talk_start = os.clock()
end
if msgcontains(msg, 'hi') and focus == 0 and getDistanceToCreature(cid) <= 4 then
if getPlayerStorageValue(cid, sto) == -1 then setPlayerStorageValue(cid, sto, 0) end
if getPlayerStorageValue(cid, sto) ~= theNpc.storage then
selfSay("What? I don't have nothing to talk with you! Good bye!")
focus = 0
return true
end
focus = cid
talk_start = os.clock()
conv = 1
selfSay(theNpc.msg)
return true
end
if isDuelMsg(msg) and conv == 1 and focus == cid then
if not hasPokemon(cid) then
selfSay("To battle agains't me you need pokemons.")
return true
end
selfSay("You are challenging me to a battle. It will be a "..#theNpc.pokemon.." pokemon limit battle, let's start?")
conv = 2
return true
end
if isConfirmMsg(msg) and conv == 2 and focus == cid then
challenger = focus
setPlayerStorageValue(cid, 990, 1)
selfSay("Yea, let's fight!")
talk_start = os.clock()
addEvent(doSummonGymPokemon, 850, getThis())
conv = 3
return true
end
if isNegMsg(msg) and conv == 2 and focus == cid then
focus = 0
selfSay("It is better for you to refuse a battle against me!")
info
Grupo: Barão
Registrado: 28/12/11
Posts: 233
Reputação: +3
Olá pessoal, entao eu estou enfrentando um bug, como bem provavel que esteja acontecendo com outros tambem.. é assim, os npcs de GYM - DUEL - BATTLE estão summonando os pokemons hora com tal força e HP hora com outro..
Exemplo: eu configuro no script "OptionalLevel = 400", até ai tudo certo, quando vou testar, eu chamo battle, hi, battle, yes ele summona o pokemon e vem com a força de acordo com o optional level.. ai acabou a batalha, eu vou batalhar novamente com ele, ele summona o pokemon de acordo com o level comum que é configurado em configurations..
se alguem puder ajudar por favor.. logo abaixo segue o exemplo de um script, agradeço desde já ! ^^
local focus = 0
'-' alguem ? :x
Editado Março 18 por Wiisht