Ir para conteúdo

Yan Oliveira

Moderador
  • Total de itens

    2221
  • Registro em

  • Última visita

  • Dias Ganhos

    60

Tudo que Yan Oliveira postou

  1. Tenta fazer o seguinte procedimento: Abre o executar (Windows + R) e digita: %appdata% Depois procure pela pasta do Remere's, apague ela. E por fim, abra o Remere's e importa todos os monstros/npc do seu server e tenta abrir o mapa. Eu tive esse problema com a versão do remere's, pois nas base de poketibia que eu uso, trabalha com versão extendida ou transparência. Tem que ver seu sua base trabalha com essas versões e se seu remere's tem suporte a elas.
  2. Qual Shield ele não entrega? Da erro na distro? Qual o ID desse shield ?
  3. Olá, essa não é a área correta. O certo seria na seção de suporte de scripts: https://www.xtibia.com/forum/forum/1253-scripts/ Sobre seu problema, precisa postar o shop.lua e a tag dele no globalaevents.xml.
  4. Tente remover a virgula no final da função doCreateMonster. Tente assim: local config = { name = "Scarlett Etzel", pos = {x = 33396, y = 32641, z = 6}, time = 20 } function onThink(interval, lastExecution) doCreateMonster(config.name, config.pos) broadcastMessage("O "..config.name.." apareceu, voce tem "..config.time.." para mata-lo", MESSAGE_STATUS_CONSOLE_ORANGE) addEvent(function() local creature = getCreatureByName(config.name) if creature ~= nil and not isPlayer(creature) then doRemoveCreature(getTopCreature(getCreaturePosition(creature)).uid) end end, config.time*60*2000) return true end Teste e avise se funcionou ou se continua com erro.
  5. Configurou certinho no item editor para que esse item seja usável?
  6. Olá, vá em Data/Globalevents/scripts e crie o arquivo recebe_item.lua e adicione o seguinte código dentro: local id_item = 2160 -- ID DO ITEM AQUI local quantidade = 100 -- QUANTIDADE DO ITEM local players = {} function onThink(interval, lastExecution) for i, j in ipairs(getPlayersOnline()) do players[i] = j end for i = 1, #players do doSendMagicEffect(getThingPos(players[i]), 27) doPlayerAddItem(players[i], id_item, quantidade) doPlayerSendTextMessage(players[i], 27, "Congratulations to be 1 hour online! Do you received an item.") end return true end Agora em Data/Globalevents abra o globalevents.xml e adicione a tag: <globalevent name="item" interval="3600" script="recebe_item.lua"/> Lembrando que em interval é o tempo em segundos, então como quer 1 hora, já deixei com 3600 segundos (1 hora), caso queira alterar o tempo, só mudar o valor ali. Deixei para ganhar 1 item somente, mas caso queira uma lista de itens e que ganhe de forma aleatória, só me falar que eu altero. Testei aqui e funcionou, mas teste e me fale se deu certo.
  7. De nada que isso ?. Sobre a função, qual base poketibia você usa? E você pretende usar horas para reutilizar o item? Se for somente minutos, eu consigo fazer uma função simples. Mas se quer horas, dependendo sua base, tem função pronta já.
  8. Por nada! Posso ajudar sim, pode me mandar mensagem privada. Mas também é interessante postar sua dúvida no fórum para caso alguém tenha a mesma dúvida, pode ver a solução.
  9. Substitua seu código por esse: local minutos = 15 -- COLOQUE AQUI A QUANTIDADE DE MINUTOS function onUse(cid, item, fromPosition, item2, toPosition) local storage_time = 42350 if isPlayer(cid) then if getPlayerStorageValue(cid, storage_time) <= os.time() then doSummonCreature("Caterpie", getCreaturePosition(cid)) doSendMagicEffect(getCreaturePosition(cid), 29) doRemoveItem(item.uid, 1) doCreatureSay(cid,"Cuidado! Pokemon Muito Perigosos apareceram do Nada OMG.", TALKTYPE_ORANGE_1) setPlayerStorageValue(cid, storage_time, os.time() + minutos * 60) return true else doPlayerSendTextMessage(cid, 27, "You need to wait " ..minutos.. " minutes to use this item again.") return true end return true end return true end Eu testei aqui e funcionou, deixei uma variável no começo do código para alterar os minutos para o valor que quer, por padrão está 15 como pediu. Testa e me fala, se quiser também que conta certinho os minutos restante posso criar uma função, ou se quiser deixar genérico assim também está pronto.
  10. Mas testou? Deu certo?
  11. Sua dúvida foi resolvida?
  12. Você não especificou a quantidade exata que quer, então substitua o código por esse: local hp_quantidade = 50000 -- COLOQUEI AQUI A QUANTIDADE DE HP function doHealOverTime(cid, div, turn, effect) --alterado v1.6 peguem o script todo!! if not isCreature(cid) then return true end if turn <= 0 or (getCreatureHealth(cid) == getCreatureMaxHealth(cid)) or getPlayerStorageValue(cid, 173) <= 0 then setPlayerStorageValue(cid, 173, -1) return true end local hp = math.floor(hp_quantidade) doCreatureAddHealth(cid, hp) if math.floor(turn/10) == turn/10 then doSendMagicEffect(getThingPos(cid), effect) end addEvent(doHealOverTime, 100, cid, div, turn - 1, effect) end local potions = { [1456] = {effect = 13, div = 235}, --super potion [1451] = {effect = 13, div = 330}, --great potion [384] = {effect = 12, div = 550}, --ultra potion [385] = {effect = 14, div = 750}, --hyper potion [392] = {effect = 14, div = 900}, --full restore [667] = {effect = 14, div = 1200}, --full restore [668] = {effect = 14, div = 1350}, --full restore [669] = {effect = 14, div = 1600}, --full restore [670] = {effect = 14, div = 1710}, --full restore [671] = {effect = 14, div = 2280}, --full restore } function onUse(cid, item, frompos, item2, topos) local pid = getThingFromPosWithProtect(topos) if not isSummon(pid) or getCreatureMaster(pid) ~= cid then return doPlayerSendCancel(cid, "You can only use potions on your own Pokemons!") end if getCreatureHealth(pid) == getCreatureMaxHealth(pid) then return doPlayerSendCancel(cid, "This pokemon is already at full health.") end if getPlayerStorageValue(pid, 173) >= 1 then return doPlayerSendCancel(cid, "This pokemon is already under effects of potions.") end if getPlayerStorageValue(cid, 52481) >= 1 then return doPlayerSendCancel(cid, "You can't do that while a duel.") end if getPlayerStorageValue(cid, 990) >= 1 then doPlayerSendCancel(cid, "You can't use rpotion during gym battles.") return true end doCreatureSay(cid, "".. getCreatureName(pid)..", take this potion!", TALKTYPE_MONSTER) doSendMagicEffect(getThingPos(pid), 0) setPlayerStorageValue(pid, 173, 1) doRemoveItem(item.uid, 1) local a = potions[item.itemid] doHealOverTime(pid, a.div, 100, a.effect) return true end E na primeira linha na variável hp_quantidade troque o valor pelo desejado. Teste e me fale.
  13. Já testou em outro slot de item no Object Builder? Tem que tomar cuidado porque alguns slots livres são para scripts usarem como invisível mesmo. Um tempo atrás eu tinha adicionado uma outfit em um slot "livre" e aquele slot era usado para deixar invisível quando usava Team Slice do Scyther, ai quando usava depois que adicionei outfit, ficava addon do homem-aranha que eu adicionei ?. Testa em outro e vê se não aparece também. Edit: Pelo que vi, o fundo da sprite não é transparente, e lembro que vi uma vez que se não for transparente ou rosa ele não funciona no cliente. Pode ser isso.
  14. Você diz um tempo para usar novamente correto? E quer quanto tempo para reusar?
  15. Só para entender melhor, resetar você diz remover todos os donos e seus itens das houses? Porque precisa ver direitinho o que você quer para não fazer burrada, ainda mais se tem servidor online.
  16. Você não testou certo, pois eu testei aqui com o seu próprio script sem alterar nada e deu certo, confira: Pode ver que sumonei 1 Gengar e já nasceu como Mega, você não alterou a chance certo. Substitua seu script do spawn.lua por esse: local shinys = {""} local raros = {"Lucario", "Gyarados", "Gengar", "Blaziken", "Blastoise", "Beedrill", "Alakazam", "Charizard"} local function MegaName(cid) if isCreature(cid) then if string.find(tostring(getCreatureName(cid)), "Mega") then local newName = tostring(getCreatureName(cid)):match("Mega (.*)") doCreatureSetNick(cid, newName) if isMonster(cid) then doSetCreatureDropLoot(cid, true) end end end end local function doSetRandomGender(cid) if not isCreature(cid) then return true end if isSummon(cid) then return true end local gender = 0 local name = getCreatureName(cid) if not newpokedex[name] then return true end local rate = newpokedex[name].gender if rate == 0 then gender = 3 elseif rate == 500 then gender = 4 elseif rate == -1 then gender = 0 elseif math.random(1, 500) <= rate then gender = 4 else gender = 3 end doCreatureSetSkullType(cid, gender) end local function doMega(cid) if isCreature(cid) then if isSummon(cid) then return true end if getPlayerStorageValue(cid, 74469) >= 1 then return true end if getPlayerStorageValue(cid, 22546) >= 1 then return true end if isNpcSummon(cid) then return true end if getPlayerStorageValue(cid, 637500) >= 1 then return true end --alterado v1.9 if isInArray(megas, getCreatureName(cid)) then --alterado v1.9 \/ chance = 1000 --1% chance elseif isInArray(raros, getCreatureName(cid)) then --n coloquem valores menores que 0.1 !! chance = 1000 --1% chance else return true end if math.random(1, 500) <= chance*10 then doSendMagicEffect(getThingPos(cid), 18) local name, pos = "Mega ".. getCreatureName(cid), getThingPos(cid) doRemoveCreature(cid) local shi = doCreateMonster(name, pos, false) setPlayerStorageValue(shi, 74469, 1) else setPlayerStorageValue(cid, 74469, 1) end --/\ else return true end end function onSpawn(cid) registerCreatureEvent(cid, "Experience") registerCreatureEvent(cid, "GeneralConfiguration") registerCreatureEvent(cid, "DirectionSystem") registerCreatureEvent(cid, "CastSystem") if isSummon(cid) then registerCreatureEvent(cid, "SummonDeath") return true end addEvent(doMega, 10, cid) addEvent(MegaName, 15, cid) addEvent(adjustWildPoke, 5, cid) return true end E teste, verá que vai funcionar.
  17. Yan Oliveira

    Bug NPC GYM

    Na condicional if estava com 1 igual. Testa assim: ------------------------------ FUNÇÃO LOCAL selfAttackCrature() --------------------------- local function selfAttackCreature() if #getCreatureSummons(getNpcCid()) > 0 and not isCreature(getCreatureTarget(getCreatureSummons(getNpcCid())[1])) then local list = getSpectators(getCreaturePosition(getNpcCid()), 7, 7, false) for i=0, table.getn(list) do local _target = list[i] if(_target ~= 0) then if isPlayer(_target) and not getTileInfo(getThingPos(_target)).protection then if #getCreatureSummfighting == falseons(_target) > 0 then doMonsterSetTarget(getCreatureSummons(getNpcCid())[1], getCreatureSummons(_target)[1]) setPlayerStorageValue(getCreatureSummons(getNpcCid())[1], 99856201, getNpcCid()) else fighting = false end target = _target break end end end end end ----------------------------------------------------- CÓDIGO ----------------------------------------------------- local focus = 0 local max_distance = 8 local talk_start = 0 local conv = 0 local fighting = false local challenger = 0 local afk_limit_time = 300 -- seconds local afk_time = 0 -- don't change local battle_turn = 1 -- don't change local challenger_turn = 0 -- don't change local pokemons = { {name = "Alakazam", optionalLevel = 400, sex = SEX_MALE, nick = "", ball = "normal"}, {name = "Shiny Hypno", optionalLevel = 400, sex = SEX_MALE, nick = "", ball = "normal"}, {name = "Mr. Mime", optionalLevel = 400, sex = SEX_FEMALE, nick = "", ball = "normal"}, {name = "Porygon", optionalLevel = 400, sex = SEX_FEMALE, nick = "", ball = "normal"}, {name = "Espeon", optionalLevel = 400, sex = SEX_FEMALE, nick = "", ball = "normal"}, } local function doSummonGymPokemon(npc) local this = npc if #getCreatureSummons(this) >= 1 or focus == 0 then return true end local it = pokemons[battle_turn] doSummonMonster(this, it.name) local summon = getCreatureSummons(this)[1] local balleffect = pokeballs["normal"].effect if it.ball and pokeballs[it.ball] then balleffect = pokeballs[it.ball].effect end doSendMagicEffect(getThingPos(summon), balleffect) setPlayerStorageValue(summon, 10000, balleffect) setPlayerStorageValue(summon, 10001, gobackmsgs[math.random(#gobackmsgs)].back:gsub("doka", it.nick ~= "" and it.nick or it.name)) setPlayerStorageValue(summon, 1007, it.nick ~= "" and it.nick or it.name) doSetMonsterGym(summon, focus) addEvent(adjustWildPoke, 15, summon, it.optionalLevel) local name = it.nick ~= "" and it.nick or getCreatureName(this).."s "..it.name doCreatureSay(this, gobackmsgs[math.random(#gobackmsgs)].go:gsub("doka", getPlayerStorageValue(summon, 1007)), 1) fighting = true battle_turn = battle_turn + 1 end local function doWinDuel(cid, npc) if not isCreature(cid) then return true end local this = npc local a = gymbadges[getCreatureName(this)] + 8 doCreatureSay(npc, "You won the duel! Congratulations, take this "..getItemNameById(a - 8).." as a prize.", 1) local b = getPlayerItemById(cid, true, a) if b.uid > 0 then doTransformItem(b.uid, b.itemid - 8) end doPlayerSendCancel(cid, "#getBadges# "..getCreatureName(this).." "..getPlayerItemCount(cid, gymbadges[getCreatureName(this)])) end function onCreatureSay(cid, type, msg) 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 focus = cid talk_start = os.clock() conv = 1 selfSay("Hello "..getCreatureName(cid)..", my name is Sabrina and I'm Saffron's Gym Leader. How may I help you?") return true end if isDuelMsg(msg) and conv == 1 and focus == cid then --if getPlayerItemCount(cid, gymbadges[getCreatureName(getThis())]) >= 1 then -- selfSay("You have already won my Marsh Badge, maybe some other day we can fight.") -- focus = 0 --return true --end if not hasPokemon(cid) then selfSay("To battle agains't a gym leader you need pokemons.") return true end selfSay("You are challenging me to a battle. It will be a "..#pokemons.." 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!") return true end if msgcontains(msg, 'bye') and focus == cid then selfSay('Bye and do your best trainer!') setPlayerStorageValue(focus, 990, -1) focus = 0 return true end end local afk_warning = false function onThink() --doSendAnimatedText(getThingPos(getThis()), getCreatureName(getThis()), 215) if focus == 0 then selfTurn(2) fighting = false challenger = 0 challenger_turn = 0 battle_turn = 1 afk_time = 0 afk_warning = false if #getCreatureSummons(getThis()) >= 1 then setPlayerStorageValue(getCreatureSummons(getThis())[1], 1006, 0) doCreatureAddHealth(getCreatureSummons(getThis())[1], -getCreatureMaxHealth(getCreatureSummons(getThis())[1])) end return true else if not isCreature(focus) then focus = 0 return true end if fighting then talk_start = os.clock() if not isCreature(getCreatureTarget(getThis())) then if #getCreatureSummons(challenger) >= 1 then if getCreatureOutfit(getCreatureSummons(challenger)[1]).lookType ~= 2 then --alterado v1.6 selfAttackCreature() challenger_turn = challenger_turn + 1 afk_time = 0 end else afk_time = afk_time + 0.5 end end if afk_time > afk_limit_time then setPlayerStorageValue(focus, 990, -1) focus = 0 selfSay("I have waited too long, come back when you are ready!") return true end if not afk_warning and afk_time > afk_limit_time / 2 then selfSay("Where's your pokemon? Let's fight!") afk_warning = true end if #getCreatureSummons(getThis()) == 0 then if battle_turn > #pokemons then addEvent(doWinDuel, 1000, focus, getThis()) setPlayerStorageValue(focus, 990, -1) focus = 0 return true end addEvent(doSummonGymPokemon, 1000, getThis()) end if not hasPokemon(challenger) or challenger_turn >= 7 or challenger_turn > #pokemons then selfSay("You lost our duel! Maybe some other time you'll defeat me.") setPlayerStorageValue(focus, 990, -1) focus = 0 return true end end local npcpos = getThingPos(getThis()) local focpos = getThingPos(focus) if npcpos.z ~= focpos.z then setPlayerStorageValue(focus, 990, -1) focus = 0 selfSay("Bye then.") return true end if (os.clock() - talk_start) > 30 then selfSay("Good bye and keep training!") setPlayerStorageValue(focus, 990, -1) focus = 0 end if getDistanceToCreature(focus) > max_distance then setPlayerStorageValue(focus, 990, -1) focus = 0 return true end local dir = doRedirectDirection(getDirectionTo(npcpos, focpos)) selfTurn(dir) end return true end
  18. E qual vai ser a condição para ele parar de receber o item? Até quando ele vai receber?
  19. Você diz resetar as house no banco de dados ou comando para resetar com server online?
  20. Yan Oliveira

    Posiçao do efeito

    Testa e veja se funciona assim: function dropEffect(pos, eff, n) if n > 0 then pos.x, pos.y = pos.x +1, pos.y +1 doSendMagicEffect(pos, eff) addEvent(dropEffect, 1000, pos, eff, n-1) end end if count > 0 then if isStone(item.id) then dropEffect(pos, stoneDropEff, 1) return true end if isInArray(specialDropList, item.id) then dropEffect(pos, specialDropEff, 1) elseif isInArray(specialDropList2, item.id) then dropEffect(pos, specialDrop2Eff, 1) elseif isOrb(item.id) then dropEffect(pos, orbDropEff, 1) end
  21. Yan Oliveira

    Bug NPC GYM

    @BrunoMaciel Coloquei a função local selfAttackCrature que o nociam mandou, teste o código: ------------------------------ FUNÇÃO LOCAL selfAttackCrature() --------------------------- local function selfAttackCreature() if #getCreatureSummons(getNpcCid()) > 0 and not isCreature(getCreatureTarget(getCreatureSummons(getNpcCid())[1])) then local list = getSpectators(getCreaturePosition(getNpcCid()), 7, 7, false) for i=0, table.getn(list) do local _target = list[i] if(_target ~= 0) then if isPlayer(_target) and not getTileInfo(getThingPos(_target)).protection then if #getCreatureSummfighting = falseons(_target) > 0 then doMonsterSetTarget(getCreatureSummons(getNpcCid())[1], getCreatureSummons(_target)[1]) setPlayerStorageValue(getCreatureSummons(getNpcCid())[1], 99856201, getNpcCid()) else fighting = false end target = _target break end end end end end ----------------------------------------------------- CÓDIGO ----------------------------------------------------- local focus = 0 local max_distance = 8 local talk_start = 0 local conv = 0 local fighting = false local challenger = 0 local afk_limit_time = 300 -- seconds local afk_time = 0 -- don't change local battle_turn = 1 -- don't change local challenger_turn = 0 -- don't change local pokemons = { {name = "Alakazam", optionalLevel = 400, sex = SEX_MALE, nick = "", ball = "normal"}, {name = "Shiny Hypno", optionalLevel = 400, sex = SEX_MALE, nick = "", ball = "normal"}, {name = "Mr. Mime", optionalLevel = 400, sex = SEX_FEMALE, nick = "", ball = "normal"}, {name = "Porygon", optionalLevel = 400, sex = SEX_FEMALE, nick = "", ball = "normal"}, {name = "Espeon", optionalLevel = 400, sex = SEX_FEMALE, nick = "", ball = "normal"}, } local function doSummonGymPokemon(npc) local this = npc if #getCreatureSummons(this) >= 1 or focus == 0 then return true end local it = pokemons[battle_turn] doSummonMonster(this, it.name) local summon = getCreatureSummons(this)[1] local balleffect = pokeballs["normal"].effect if it.ball and pokeballs[it.ball] then balleffect = pokeballs[it.ball].effect end doSendMagicEffect(getThingPos(summon), balleffect) setPlayerStorageValue(summon, 10000, balleffect) setPlayerStorageValue(summon, 10001, gobackmsgs[math.random(#gobackmsgs)].back:gsub("doka", it.nick ~= "" and it.nick or it.name)) setPlayerStorageValue(summon, 1007, it.nick ~= "" and it.nick or it.name) doSetMonsterGym(summon, focus) addEvent(adjustWildPoke, 15, summon, it.optionalLevel) local name = it.nick ~= "" and it.nick or getCreatureName(this).."s "..it.name doCreatureSay(this, gobackmsgs[math.random(#gobackmsgs)].go:gsub("doka", getPlayerStorageValue(summon, 1007)), 1) fighting = true battle_turn = battle_turn + 1 end local function doWinDuel(cid, npc) if not isCreature(cid) then return true end local this = npc local a = gymbadges[getCreatureName(this)] + 8 doCreatureSay(npc, "You won the duel! Congratulations, take this "..getItemNameById(a - 8).." as a prize.", 1) local b = getPlayerItemById(cid, true, a) if b.uid > 0 then doTransformItem(b.uid, b.itemid - 8) end doPlayerSendCancel(cid, "#getBadges# "..getCreatureName(this).." "..getPlayerItemCount(cid, gymbadges[getCreatureName(this)])) end function onCreatureSay(cid, type, msg) 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 focus = cid talk_start = os.clock() conv = 1 selfSay("Hello "..getCreatureName(cid)..", my name is Sabrina and I'm Saffron's Gym Leader. How may I help you?") return true end if isDuelMsg(msg) and conv == 1 and focus == cid then --if getPlayerItemCount(cid, gymbadges[getCreatureName(getThis())]) >= 1 then -- selfSay("You have already won my Marsh Badge, maybe some other day we can fight.") -- focus = 0 --return true --end if not hasPokemon(cid) then selfSay("To battle agains't a gym leader you need pokemons.") return true end selfSay("You are challenging me to a battle. It will be a "..#pokemons.." 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!") return true end if msgcontains(msg, 'bye') and focus == cid then selfSay('Bye and do your best trainer!') setPlayerStorageValue(focus, 990, -1) focus = 0 return true end end local afk_warning = false function onThink() --doSendAnimatedText(getThingPos(getThis()), getCreatureName(getThis()), 215) if focus == 0 then selfTurn(2) fighting = false challenger = 0 challenger_turn = 0 battle_turn = 1 afk_time = 0 afk_warning = false if #getCreatureSummons(getThis()) >= 1 then setPlayerStorageValue(getCreatureSummons(getThis())[1], 1006, 0) doCreatureAddHealth(getCreatureSummons(getThis())[1], -getCreatureMaxHealth(getCreatureSummons(getThis())[1])) end return true else if not isCreature(focus) then focus = 0 return true end if fighting then talk_start = os.clock() if not isCreature(getCreatureTarget(getThis())) then if #getCreatureSummons(challenger) >= 1 then if getCreatureOutfit(getCreatureSummons(challenger)[1]).lookType ~= 2 then --alterado v1.6 selfAttackCreature() challenger_turn = challenger_turn + 1 afk_time = 0 end else afk_time = afk_time + 0.5 end end if afk_time > afk_limit_time then setPlayerStorageValue(focus, 990, -1) focus = 0 selfSay("I have waited too long, come back when you are ready!") return true end if not afk_warning and afk_time > afk_limit_time / 2 then selfSay("Where's your pokemon? Let's fight!") afk_warning = true end if #getCreatureSummons(getThis()) == 0 then if battle_turn > #pokemons then addEvent(doWinDuel, 1000, focus, getThis()) setPlayerStorageValue(focus, 990, -1) focus = 0 return true end addEvent(doSummonGymPokemon, 1000, getThis()) end if not hasPokemon(challenger) or challenger_turn >= 7 or challenger_turn > #pokemons then selfSay("You lost our duel! Maybe some other time you'll defeat me.") setPlayerStorageValue(focus, 990, -1) focus = 0 return true end end local npcpos = getThingPos(getThis()) local focpos = getThingPos(focus) if npcpos.z ~= focpos.z then setPlayerStorageValue(focus, 990, -1) focus = 0 selfSay("Bye then.") return true end if (os.clock() - talk_start) > 30 then selfSay("Good bye and keep training!") setPlayerStorageValue(focus, 990, -1) focus = 0 end if getDistanceToCreature(focus) > max_distance then setPlayerStorageValue(focus, 990, -1) focus = 0 return true end local dir = doRedirectDirection(getDirectionTo(npcpos, focpos)) selfTurn(dir) end return true end OBS: Eu não testei, apenas inseri a função que o amigo mandou para ver se soluciona o problema. Teste e veja se funciona, se der certo, dê rep+ para o @nociam
  22. Vai ter que postar o arquivo pokemonsmoves.lua inteiro para eu dar uma olhada, porque pelo que vi no script ali ele usa outras funções do arquivo.
  23. Está durando quanto tempo o efeito do move?
  24. Se clica no npc ele fica com fight condition?
  25. Yan Oliveira

    Double Exp

    Bom vamos lá, ficou meio confuso seu pedido. Você mandou um script de item, mas você quer que double exp seja através de item ou pode ser de outra forma? E quanto tempo vai durar? E quando mandar código ou scripts, coloque dentro de spoiler ou da tag código para ficar mais legível.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...