você já derrotou a misty antes? só pode derrotar uma vez...
se quiser tirar isso, remova essa parte do misty.lua em data/npc/scripts
if getPlayerStorageValue(cid, ginasios["Misty"].storage) >= 1 then
return true
end
Por GMRaphael, 01 de jul. de 2011 em Archived
você já derrotou a misty antes? só pode derrotar uma vez...
se quiser tirar isso, remova essa parte do misty.lua em data/npc/scripts
if getPlayerStorageValue(cid, ginasios["Misty"].storage) >= 1 then
return true
end
info
Grupo: Campones
Registrado: 27/05/11
Posts: 31
Reputação: +34
Char no Tibia: [PS]Raphael

Brun123 Não Derrotei Ela Não.
Bom Não Tem Nem Como Eu Lutar Com Ela eu Falo (HI) Ela Não Responde.
Mas Se Der Certo Falo.
Editado Julho 2 por GMRaphael
aparece erro no console ?
info
Grupo: Campones
Registrado: 27/05/11
Posts: 31
Reputação: +34
Char no Tibia: [PS]Raphael

Não.
Eu consegui fazer esse sistema funcionar, com o Brock e a Misty no mesmo Script.Mas sempre da erro quando eu to lutando, porque quando eles derrotam um dos meu pokemon eles retira o deles e n fala nada ou fala que eu perdi, ele n espera eu usar todos pokemon da bag )=
14:24 Yuki: Let's fight, Gallade! 14:24 Yuki: hi 14:24 Misty: Bem vindo ao GYM de Cerulean.Meu nome é Misty e sou a lider deste GYM.Gostaria de me desafiar? 14:24 Yuki: sim 14:24 Misty: Vamos lutar Starmie.Eu escolho você!
add msn que eu te passo o que tenho e a gente tenta resolver esse problema...
info
Grupo: Campones
Registrado: 27/05/11
Posts: 31
Reputação: +34
Char no Tibia: [PS]Raphael
Bom Primeiro de Tudo Meu Servidor é (DASH)
Bom Estava Olhando o Forum do Xtibia Quando Encontrei o Script de (Gym Brock) Que Foi Feito Por Brun123.
Gostei do Script e Tentei Fazer Outros (GYM) a Partir do (BROCK), Começei a Fazer, Quando Terminei, e Coloquei o (GYM) no Meu Server o (GYM) Aparece no Server, Mas Quando Falo (Hi) Para Ele, o (GYM) Não Responde.
Bom Passo o Script Abaixo Para Vocês Tentarem Resolver Para Mim. ;(
1º Script: DATA/LIB/ (NOME DO ARQUIVO) gymlib2.lua
funcpokemon = {2531, 2652, 2653, 2654, 2195} -- ID das pokebolas (o pokemon tem que estar vivo nessas IDs) bpslot = CONST_SLOT_BACKPACK --em outros servers, pode ser que seja CONST_SLOT_AMMO o lugar onde fica a backpack no inventory ginasios = { ["Misty"] = { storage = 990, msgdefeat = "You lost! You aren't strong enough yet, don't come back until you get stronger!", msgafk = "Go away if you don't have any pokemons!", msgwin = "Congratulations, you were strong enough to win this battle fairly! Take this Water Badge as reward.", [1] = { msggo = "Lets fight then! I choose you, Starmie!", msgba = "That's enough, Starmie!", pokem = "Misty Starmie", nextp = "Misty Poliwrath"}, [2] = { msggo = "It's your turn, Poliwrath!", msgba = "Come back, Poliwrath!", pokem = "Misty Poliwrath", nextp = "Misty Gyarados"}, [3] = { msggo = "Crush'em, Gyarados!", msgba = "You did well, Gyarados!", pokem = "Misty Gyarados", nextp = "Misty Blastoise"}, [4] = { msggo = "Crush'em, Blastoise!", msgba = "You did well, Blastoise!", pokem = "Misty Blastoise", nextp = "finish"} } } function noPokeAtAll(cid, gympoke, npcname, msgafk) if not isCreature(cid) then return false end if not isCreature(gympoke) then return false end if #getCreatureSummons(cid) == 0 and getPlayerStorageValue(cid, 991) == 0 and getPlayerStorageValue(cid, ginasios[npcname].storage) ~= 2 then setPlayerStorageValue(cid, 991, -1) doCreatureSay(getCreatureByName(npcname), msgafk, 1) doSendMagicEffect(getThingPos(gympoke), 10) setPlayerStorageValue(cid, ginasios[npcname].storage, 0) doRemoveCreature(gympoke) return true end end function gymChecker(cid, duel, nb, npcname) if not isCreature(cid) then return true end if not isCreature(duel) then doSendMagicEffect(getThingPos(cid), 10) doRemoveCreature(cid) return true end if getDistanceBetween(getThingPos(getCreatureByName(npcname)), getThingPos(duel)) >= 8 then doSendMagicEffect(getThingPos(cid), 10) doRemoveCreature(cid) setPlayerStorageValue(duel, ginasios[npcname].storage, 0) return true end if isCreature(duel) and getPlayerStorageValue(duel, 991) == 0 then addEvent(noPokeAtAll, 6000, duel, cid, npcname, ginasios[npcname].msgafk) end if isCreature(duel) and getPlayerStorageValue(duel, 991) == -1 then doSendMagicEffect(getThingPos(cid), 10) doRemoveCreature(cid) setPlayerStorageValue(duel, ginasios[npcname].storage, 0) doCreatureSay(getCreatureByName(npcname), ginasios[npcname].msgdefeat, 1) return true end if isCreature(duel) and not hasPokemon(duel) then setPlayerStorageValue(duel, 991, -1) end if not isCreature(getCreatureTarget(cid)) then if nb == 0 then addEvent(gymChecker, 200, cid, duel, 1, npcname) else doSendMagicEffect(getThingPos(cid), 10) doRemoveCreature(cid) if isCreature(duel) then setPlayerStorageValue(duel, ginasios[npcname].storage, 0) end end return true end addEvent(gymChecker, 1000, cid, duel, 0, npcname) end function hasPokemon(cid) if #getCreatureSummons(cid) >= 1 then return true end if isInArray(funcpokemon, getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid) then return true end local bp = getPlayerSlotItem(cid, bpslot) for cc = 1, #funcpokemon do if #getItemsInContainerById(bp.uid, funcpokemon[cc]) >= 1 then return true end end return false end function doGymBattle(npcname, gympoke, cid, turn) doCreatureSay(getCreatureByName(npcname), ginasios[npcname][turn].msggo, 1) local x = doSummonCreature(gympoke, getThingPos(getCreatureByName(npcname))) registerCreatureEvent(x, "Gym1") registerCreatureEvent(x, "Gym2") registerCreatureEvent(x, "Gym3") registerCreatureEvent(x, "Gym4") setPlayerStorageValue(x, 201, ".") setPlayerStorageValue(x, 201, npcname) setPlayerStorageValue(x, 202, turn) doSendMagicEffect(getThingPos(x), 10) setPlayerStorageValue(x, ginasios[npcname].storage, 1) addEvent(gymChecker, 1000, x, cid, 0, npcname) end --ex: doGymBattle("Misty", "Misty Starmie", cid, 1)2º Script: DATA/CREATURESCRIPTS/SCRIPTS (NOME DO ARQUIVO) gym2.lua
3º TAG: DATA/CREATURESCRIPTS (CREATURESCRIPTS.XML)
4º SCRIPT: DATA/NPC/SCRIPTS (NOME DO ARQUIVO) Misty.lua
local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false local talkState = {} function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Good bye sir!') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) local msg = string.lower(msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if getPlayerStorageValue(cid, ginasios["Misty"].storage) >= 1 then return true end if (msgcontains(msg, 'hi') and (focus == 0) and (focus ~= cid) and (getDistanceToCreature(cid) <= 4)) then focus = cid talkState[talkUser] = 1 selfSay("Welcome to the gym of Pewter City. My name is Misty and I am the leader of this gym. Would you like to battle me?") elseif (msgcontains(msg, "no") or msgcontains(msg, "bye")) and focus == cid and talkState[talkUser] ~= 3 then selfSay("Bye then, tell strong friends to come here and try to beat me!") focus = 0 elseif (msgcontains(msg, "yes") or msgcontains(msg, "battle")) and focus == cid and talkState[talkUser] == 1 then if not hasPokemon(cid) then selfSay("You don't have any pokemon to battle me!") focus = 0 return true end talkState[talkUser] = 3 doGymBattle("Misty", "Misty Starmie", cid, 1) setPlayerStorageValue(cid, ginasios["Misty"].storage, 1) setPlayerStorageValue(cid, 991, 0) local function focusCheck(cid) if not isCreature(cid) then focus = 0 return true end if getPlayerStorageValue(cid, 991) == -1 then focus = 0 return true end addEvent(focusCheck, 500, cid) end addEvent(focusCheck, 1000, cid) end end function onThink() if focus ~= 0 then a, b, c = selfGetPosition() if c ~= getThingPos(focus).z then focus = 0 end end if focus ~= 0 then if getDistanceToCreature(focus) > 6 then focus = 0 end end return true end5º SCRIPT: DATA/NPC (NOME DO ARQUIVO) Misty.xml
6º SCRIPT: DATA/MOSTERS/POKES (NOME DOS ARQUIVOS) Misty Blastoise.xml - Misty Gyarados.xml - Misty Poliwrath.xml - Misty Starmie.xml
7º TAG: DATA/MONSTERS/ (MONSTERS.XML)
Bom Espero Ajuda (1 Semanada de REPS)
JA TO QUASE FICANDO MALUCO E NÃO CONSIGO ARRUMAR (AJUDEM PLX).
Ajudaa Por Favoooooooor
Editado Julho 1 por GMRaphael