Ir para conteúdo

kaleudd

Conde
  • Total de itens

    729
  • Registro em

  • Última visita

  • Dias Ganhos

    6

Tudo que kaleudd postou

  1. Irei testar. Zipter,existe alguma tag para botar em actions.xml ?
  2. Pior que nao tenho e na conheço nenhum parecido a nao ser do script que a pxg usa,o player usar x item na pokeball do pokemon ai o pokemon ganha a abilidade de fly e ao dar fly ele tenha x outfit
  3. Gostaria de um script que ao usar X Item,meu Pokemon iria ganhar fly permanentemente,igual os baloes da pxg no raichu e shiny Raichu Exemplo Ao usar x item -o item sumisse da pokebag. o player usar x item na pokeball do pokemon ai o pokemon ganha a abilidade de fly e ao dar fly ele tenha x outfit permanente! @EDIT Se puder ajudar,deixei os arquivos aqui zipter,se puder adaptar,eu nao intendo muito sobre adapta-los! itens.rar
  4. Estou usando essa Script de Addon = http://www.xtibia.co...s-pokemons-151/ Porém ele funfa normalmente,mais quando solto ele,ele fica com addon tudo certinho,porem ele fica sem nenhum attack,não aparece o Cooldown Bar iguais os diversos outros pokemons funfam normalmente,menos os que eu uso a addon,eles ficam sem Moves. Rep³+³ para quem ajudar;
  5. Tema: Pokemon Render/Stock: Cidade moderna Tamanho: 1500 x 1029 Tipografia: Background Para meu OTClient! Preferência: Pokémon System UP
  6. estou usando este addon system http://www.xtibia.com/forum/topic/194023-download-addons-pokemons-151/
  7. Gostaria que alguem completase essa imagen com Pokémon System ''Pokémon System'' Obg! Link da imagen = http://wall.alphacoders.com/big.php?i=276503 e se puder tirar as letras brancas ao lado superior direito,iria ficar grato!!
  8. Tamanho: 851x315 (tamanho de uma capa normal de facebook) Tema: Pokémon Mega Evolução Pedido: Capa para facebook Tipografia: Pokémon System
  9. OLa,bem estou com um problema no addon system que achei,é o seguinte,ele funciona de boa ao usar item talz,porem unico problema é que a Cdbar dos attacks somen,dai ele fica sem nenhum attack ESTOU USANDO ESSE SCRIPT funcionou Quase que perfeitamente. Não consegui configurar a cod bar para funcionar com o addon (se usar o addon todos os moves somen,ele fica sem). Alguem saberia como fazer? Em actions.xml adicione a seguinte tag: <action itemid="xxxx" event="script" value="addons.lua"/> Sendo, xxxx o id do item que vai dar o addon. addons.lua function onUse(cid, item, fromPosition, itemEx, toPosition) local addons = { [xxxx] = {pokemon= "Scyther" , looktype = 510}, --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 Na action do goback, no finalzinho antes de else doPlayerSendCancel(cid, "This pokemon is fainted.") end Coloque: local pk = getCreatureSummons(cid)[1] local pb = getPlayerSlotItem(cid, 8).uid local look = getItemAttribute(pb,"addon") if not look then doSetItemAttribute(pb,"addon",0) return false end if look > 0 then doSetCreatureOutfit(pk, {lookType = look}, -1) return true end Agora em data/lib/catch system.lua Depois de: doItemSetAttribute(item, "description", description) Coloque: doItemSetAttribute(item, "addon", 0) Depois em data/talkactions/scripts/createpokeball.lua depois de: doItemSetAttribute(item, "description", "Contains a "..name..".") Coloque: doItemSetAttribute(item, "addon", 0) UP URGENTEEEEEEEEEE UPPP
  10. Bem gostaria da Spell de Iron Body do Bronzong Indentico a esse =http://www.xtibia.com/forum/topic/235078-pedido-heavy-slam-e-passiva-iron-body/ Porem gostaria que ele fosse uma Spell,como assim? R:Gostaria que ele fosse um efeito usavel no m1 á m12 e não uma passive,apos o player usar essa spell o bronzong fica 5 segundos sem tomar dano e ele ganha uma outfit nesses 5 segundos,apos o termino da spell a outfit some e ele volta ao normal,obg! UP!
  11. quantos pokemons o player terá que emfrentar para ganhar desse npc? e digita aqui os nomes dos pokemons que esse player tera que enfrentar.
  12. Por acaso voce não tem algum npc do script de npc de ginasio,tipo vai em data>npc e procura por Sabrina ou Brock e caso tiver poste o .lua de algum deles. Vá em data>npc>scripts>Brock.lua E poste aqui.
  13. Acho que é algum problema nao compativel com script,bem,voce tem algum npc de ginasio que possa me mandar para eu adaptar para voce,algum npc da sua base,para nao ocorrer mais erros!!
  14. Vai em data>Npc crie um arquivo xml e adicione isso <?xml version="1.0" encoding="UTF-8"?> <npc name="NOME_DO_NPC" script="NOME_DO_ARQUIVO.lua" walkinterval="350000" floorchange="0" speed="0" lookdir="2"> <health now="150" max="150"/> <look type="LOOKTYPE_DO_NPC" head="91" body="114" legs="86" feet="0"/> <parameters> </parameters> </npc> Depois va em data>npc>script Crie um arquivo.lua e adicione isso dentro. local prize_id = XXXX -- id do item que vai ganhar 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 pokemons = { {name = "NOME_DO_POKE1", optionalLevel = 90, sex = SEX_MALE, nick = "", ball = "super"}, --NOME_DO_POKE----Leve do poke=quanto maior mais forte.---Sex_Male ou Sex_Female---- e a ball-SUPER=-ULTRA-GREAT-SAFFARI-MASTER {name = "NOME_DO_POKE1", optionalLevel = 90, sex = SEX_MALE, nick = "", ball = "super"}, --NOME_DO_POKE----Leve do poke=quanto maior mais forte.---Sex_Male ou Sex_Female---- e a ball-SUPER=-ULTRA-GREAT-SAFFARI-MASTER {name = "NOME_DO_POKE1", optionalLevel = 90, sex = SEX_MALE, nick = "", ball = "super"}, --NOME_DO_POKE----Leve do poke=quanto maior mais forte.---Sex_Male ou Sex_Female---- e a ball-SUPER=-ULTRA-GREAT-SAFFARI-MASTER {name = "NOME_DO_POKE1", optionalLevel = 90, sex = SEX_MALE, nick = "", ball = "super"}, --NOME_DO_POKE----Leve do poke=quanto maior mais forte.---Sex_Male ou Sex_Female---- e a ball-SUPER=-ULTRA-GREAT-SAFFARI-MASTER } 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 doPlayerAddItem(cid, prize_id, 1) doCreatureSay(npc, "You won the duel! Congratulations, take this "..getItemNameById(prize_id).." as a prize.", 1) 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)..", diga {duel} para acabarmos logo com isso") 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("Solte seu pokemon para comecarmos a batalha.") 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("Era melhor sevoce tivesse ficado fora do meu caminho!") 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(getCreatureSummons(challenger)[1]) 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("Fraco!Ja esperava isso de viajantes desse tipo!") 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
  15. Valeu amigo,voce resolveu meu caso,obg!
  16. Salve,gostaria de saber onde edito as posiçao das city do meu script de teleport do /h do pokemon Base:PDA 1.2 Meu Script: local config = { premium = true, -- se precisa ser premium account (true or false) battle = true -- se precisa estar sem battle (true). Se colocar false, poderá usar teleport no meio de batalhas } local places = { [1] = {name = "Celadon", id = 1}, [2] = {name = "Saffron", id = 2}, [3] = {name = "Cerulean", id = 3}, [4] = {name = "Lavender", id = 4}, [5] = {name = "Vermilion", id = 5}, [6] = {name = "Fuchsia", id = 6}, [7] = {name = "Cinnabar", id = 7}, [8] = {name = "Viridian", id = 9}, [9] = {name = "Pewter", id = 10}, [10] = {name = "Pallet Town", id = 12}, [11] = {name = "Azalea", id = 13}, [12] = {name = "Cianwood", id = 14}, [13] = {name = "Olivine", id = 15}, [14] = {name = "Goldenrod", id = 16}, [15] = {name = "Violet", id = 18}, [16] = {name = "Outland North", id = 20}, [17] = {name = "Outland South", id = 21}, [18] = {name = "Outland East", id = 19}, [19] = {name = "Rod", id = 22}, } function onSay(cid, words, param) if #getCreatureSummons(cid) == 0 then doPlayerSendCancel(cid, "You need a pokemon to use teleport.") return true end if not isInArray(specialabilities["teleport"], getCreatureName(getCreatureSummons(cid)[1])) then return 0 end if getPlayerStorageValue(cid, 22545) == 1 then --golden arena doPlayerSendCancel(cid, "You can't do that while the golden arena!") return true end if getPlayerStorageValue(cid, 212124) >= 1 then --alterado v2.6 return doPlayerSendCancel(cid, "You can't do it with a pokemon with mind controlled!") end if getPlayerStorageValue(cid, 52480) >= 1 then return doPlayerSendCancel(cid, "You can't do it while a duel!") --alterado v2.6 end if getPlayerStorageValue(cid, 6598754) == 1 or getPlayerStorageValue(cid, 6598755) == 1 then return doPlayerSendCancel(cid, "You can't do it while in the PVP Zone!") --alterado v2.7 end if exhaustion.get(cid, 180) and exhaustion.get(cid, 180) > 0 then local tempo = exhaustion.get(cid, 180) or 0 local min = math.floor(tempo) doPlayerSendCancel(cid, "Your pokemon is tired, wait "..getStringmytempo(tempo).." to teleport again.") return true end if config.premium and not isPremium(cid) then doPlayerSendCancel(cid, "Only premium members are allowed to use teleport.") return true end if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "Your pokemon can't concentrate during battles.") return true end if (param == '') then local str = "" str = str .. "Places to go :\n\nHouse\n" for a = 1, #places do str = str..""..places[a].name.."\n" end doShowTextDialog(cid, 7416, str) return true end local item = getPlayerSlotItem(cid, 8) local nome = getPokeballName(item.uid) local summon = getCreatureSummons(cid)[1] local lastppos = getThingPos(cid) local lastspos = getThingPos(summon) local telepos = {} local myplace = "" local townid = 0 local citySto = 0 --alterado v2.7 if string.lower(param) == "house" then if not getHouseByPlayerGUID(getPlayerGUID(cid)) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You don't own a house.") return true end telepos = getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid))) myplace = "our home" else for x = 1, #places do if string.find(string.lower(places[x].name), string.lower(param)) then townid = places[x].id myplace = places[x].name citySto = places[x].sto or -1 --alterado v2.7 end end if myplace == "" then doPlayerSendCancel(cid, "That place doesn't exist.") return true end if isInArray({"Outland North", "Outland South", "Outland East"}, myplace) then if getPlayerLevel(cid) < 150 then doPlayerSendTextMessage(cid, 27, "You need level 150 to enter in Outland.") return true end end end if myplace ~= "" and townid > 0 then telepos = getTownTemplePosition(townid) end if getDistanceBetween(getThingPos(cid), telepos) <= 15 then doPlayerSendCancel(cid, "You are too near to the place you want to go!") return true end doSendMagicEffect(getThingPos(summon), 29) doSendMagicEffect(getThingPos(cid), 29) doTeleportThing(cid, telepos, false) local pos2 = getClosestFreeTile(cid, getPosByDir(getThingPos(cid), SOUTH)) doTeleportThing(summon, pos2, false) doSendMagicEffect(getThingPos(cid), 29) doCreatureSay(cid, ""..nome..", teleport to "..myplace.."!", TALKTYPE_MONSTER) doCreatureSay(cid, ""..nome..", teleport to "..myplace.."!", TALKTYPE_MONSTER, false, 0, lastppos) doCreatureSay(summon, "TELEPORT!", TALKTYPE_MONSTER) doCreatureSay(summon, "TELEPORT!", TALKTYPE_MONSTER, false, 0, lastspos) doCreatureSetLookDir(cid, SOUTH) doCreatureSetLookDir(summon, SOUTH) doSendMagicEffect(getThingPos(summon), CONST_ME_TELEPORT) exhaustion.set(cid, 180, 180) if isInArray({"Outland North", "Outland South", "Outland East"}, myplace) then setPlayerStorageValue(cid, 31040, 1) else setPlayerStorageValue(cid, 31040, -1) end return true end
  17. kaleudd

    Npc de ginasio

    Muito obrigado,funciono 100%!
  18. Script para o pokemon do player ser atacado,pois essa script só o player está tomando dano,e quero que o pokemon e o player tomen dano,obg. -- config by uotl£ -- distancia contando os quadros no chao ate chegar a parede resumo tamanho do raio -- lado_raio 1 ->> 2 <<-- 3 / \ 4 | -- | \ / effect = efeito pos = posição dano = porcentagem do dano local config = { {effect = 15,pos = {x = 1091, y = 997, z = 7},distancia = 3,dano = 100,lado_raio = 1}, {effect = 15,pos = {x = 1091, y = 970, z = 7},distancia = 3,dano = 100,lado_raio = 1}, {effect = 15,pos = {x = 1091, y = 979, z = 7},distancia = 3,dano = 100,lado_raio = 1}, {effect = 15,pos = {x = 1084, y = 988, z = 7},distancia = 3,dano = 100,lado_raio = 4}, } -- config by uotl£ function onThink(cid, interval, lastExecution) atirador () return true end function atirador () for sinal, valor in pairs(config) do for i = 1,valor.distancia do if valor.lado_raio == 1 then doSendMagicEffect({x = valor.pos.x+i, y = valor.pos.y, z = valor.pos.z},valor.effect) check = {x = valor.pos.x+i, y = valor.pos.y, z = valor.pos.z,stackpos=255} elseif valor.lado_raio == 2 then doSendMagicEffect({x = valor.pos.x-i, y = valor.pos.y, z = valor.pos.z},valor.effect) check = {x = valor.pos.x-i, y = valor.pos.y, z = valor.pos.z,stackpos=255} elseif valor.lado_raio == 3 then doSendMagicEffect({x = valor.pos.x, y = valor.pos.y-i, z = valor.pos.z},valor.effect) check = {x = valor.pos.x, y = valor.pos.y-i, z = valor.pos.z,stackpos=255} elseif valor.lado_raio == 4 then doSendMagicEffect({x = valor.pos.x, y = valor.pos.y+i, z = valor.pos.z},valor.effect) check = {x = valor.pos.x, y = valor.pos.y+i, z = valor.pos.z,stackpos=255} end tmp = getThingFromPos(check) if(tmp.uid ~= 0) then if isPlayer(tmp.uid) then -- se quer que attack os bichos usa esse "if isCreature(tmp.uid) then" p = (getCreatureMaxHealth(tmp.uid)/100)*valor.dano doCreatureAddHealth(tmp.uid, -p) doSendAnimatedText(getCreaturePosition(tmp.uid), math.ceil (p),145) end end end end end
  19. Salve! Bem estou montando uma quest,e preciso que ao player derrotar esse npc ele de um item. Obs:Peguei a script de um Lider de ginasio e modifiquei sómente os pokemons e as falas,mais quando eu derroto o npc ele da Insignia,mais eu quero que ele de um X item.Obg 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 pokemons = { {name = "Clone Blastoise", optionalLevel = 100, sex = SEX_MALE, nick = "", ball = "super"}, {name = "Clone Charizard", optionalLevel = 100, sex = SEX_MALE, nick = "", ball = "super"}, {name = "Clone Gengar", optionalLevel = 100, sex = SEX_MALE, nick = "", ball = "super"}, {name = "Clone Venusaur", optionalLevel = 100, sex = SEX_MALE, nick = "", ball = "super"}, } 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 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("Olhe so "..getCreatureName(cid)..", mais um viajante fracassado,voce veio aqui por vontade propria,mais para sair sera obrigado a seguir minhas regras,diga {duel} para acabarmos logo com isso") 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("Solte seu pokemon para comecarmos a batalha.") 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("Era melhor sevoce tivesse ficado fora do meu caminho!") 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(getCreatureSummons(challenger)[1]) 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("Fraco!Ja esperava isso de viajantes desse tipo!") 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
  • Quem Está Navegando   0 membros estão online

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