picachul 2 Postado Fevereiro 1, 2012 Share Postado Fevereiro 1, 2012 (editado) Ta funfando 100% agora Editado Fevereiro 1, 2012 por Picachul Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/164/#findComment-1191127 Compartilhar em outros sites More sharing options...
Thedjhabbo 10 Postado Fevereiro 1, 2012 Share Postado Fevereiro 1, 2012 @ Tópico como faz para adiciona saffari ball no dash?? antes de pergunta já esta ai o que eu já fiz! Eu já adicionei no client saffari ball e outra ball e Salvei o dat! Tbm no client o efeito da bal que sai do player para ir ao pokemon dead salvei o dat. já adicionei.... itens.xml itens.otb catch.lua (no data/actions/scripts) configuration.lua (data/lib) heal.lua (data/npc/scripts) Mesmo assim a saffari não captura nenhum poke, as outra já captura! (Já coloquei usable no dat e no itens.otb) Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/164/#findComment-1191160 Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Fevereiro 1, 2012 Share Postado Fevereiro 1, 2012 @Thedjhabbo ja fez isso aki tb? ;p -postado originalmente pelo @lucashgas Todos esses ids de efeito voce encontra em um dat editor que voce encontra aqui no xtibia. Nao esqueca de editar o xml de action pro goback funcionar do xml do portrait para os pokemons aparecerem no portrait. de adicionar a ball na lib configuration.lua e some functions.lua e tambem na tag items.xml colocando isPokeball. qualquer coisa é só me mandar PM @all galera.. vcs tem ideias pra novas passivas, alem das dos pokes.. Scyther, Shiny Scyther, Scizor, Pineco, Forretress, hitmontop, hitmonlee, hitmonchan, electabuzz e magmar? se alguem tiver me mande uma msg privada ou poste aki no topico o funcionamento da passiva q eu tentarei faze-las... desde ja vlw! Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/164/#findComment-1191173 Compartilhar em outros sites More sharing options...
Thedjhabbo 10 Postado Fevereiro 1, 2012 Share Postado Fevereiro 1, 2012 @Thedjhabbo ja fez isso aki tb? ;p -postado originalmente pelo @lucashgas Todos esses ids de efeito voce encontra em um dat editor que voce encontra aqui no xtibia. Nao esqueca de editar o xml de action pro goback funcionar do xml do portrait para os pokemons aparecerem no portrait. de adicionar a ball na lib configuration.lua e some functions.lua e tambem na tag items.xml colocando isPokeball. qualquer coisa é só me mandar PM Cara aqui funcionou... Captura de boa os poke agora quando vou coloca para invoca não vaijá esta adc no portrair tbm no tem look nem fala que poke é! como arrumar isso?? resp ++ Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/164/#findComment-1191204 Compartilhar em outros sites More sharing options...
ewertonvcom 9 Postado Fevereiro 1, 2012 Share Postado Fevereiro 1, 2012 alguem poderia criar uma magia chamada rage furia? pra todos os pokes usar? do rep + Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/164/#findComment-1191206 Compartilhar em outros sites More sharing options...
Thedjhabbo 10 Postado Fevereiro 1, 2012 Share Postado Fevereiro 1, 2012 Erro da saffari ball não tem como da look!! [01/02/2012 12:59:02] [Error - CreatureScript Interface] [01/02/2012 12:59:02] data/creaturescripts/scripts/look.lua:onLook [01/02/2012 12:59:02] Description: [01/02/2012 12:59:02] data/lib/050-function.lua:107: attempt to index local 'str' (a nil value) [01/02/2012 12:59:02] stack traceback: [01/02/2012 12:59:02] data/lib/050-function.lua:107: in function 'getArticle' [01/02/2012 12:59:02] data/creaturescripts/scripts/look.lua:15: in function <data/creaturescripts/scripts/look.lua:1> [01/02/2012 12:59:06] [Error - CreatureScript Interface] [01/02/2012 12:59:06] data/creaturescripts/scripts/look.lua:onLook [01/02/2012 12:59:06] Description: [01/02/2012 12:59:06] data/lib/050-function.lua:107: attempt to index local 'str' (a nil value) [01/02/2012 12:59:06] stack traceback: [01/02/2012 12:59:06] data/lib/050-function.lua:107: in function 'getArticle' [01/02/2012 12:59:06] data/creaturescripts/scripts/look.lua:15: in function <data/creaturescripts/scripts/look.lua:1> [01/02/2012 12:59:06] [Error - CreatureScript Interface] [01/02/2012 12:59:06] data/creaturescripts/scripts/look.lua:onLook [01/02/2012 12:59:06] Description: [01/02/2012 12:59:06] data/lib/050-function.lua:107: attempt to index local 'str' (a nil value) [01/02/2012 12:59:06] stack traceback: [01/02/2012 12:59:06] data/lib/050-function.lua:107: in function 'getArticle' [01/02/2012 12:59:06] data/creaturescripts/scripts/look.lua:15: in function <data/creaturescripts/scripts/look.lua:1> [01/02/2012 12:59:06] [Error - CreatureScript Interface] [01/02/2012 12:59:06] data/creaturescripts/scripts/look.lua:onLook [01/02/2012 12:59:06] Description: [01/02/2012 12:59:06] data/lib/050-function.lua:107: attempt to index local 'str' (a nil value) [01/02/2012 12:59:06] stack traceback: [01/02/2012 12:59:06] data/lib/050-function.lua:107: in function 'getArticle' [01/02/2012 12:59:06] data/creaturescripts/scripts/look.lua:15: in function <data/creaturescripts/scripts/look.lua:1> [01/02/2012 12:59:07] [Error - CreatureScript Interface] [01/02/2012 12:59:07] data/creaturescripts/scripts/look.lua:onLook [01/02/2012 12:59:07] Description: [01/02/2012 12:59:07] data/lib/050-function.lua:107: attempt to index local 'str' (a nil value) [01/02/2012 12:59:07] stack traceback: [01/02/2012 12:59:07] data/lib/050-function.lua:107: in function 'getArticle' [01/02/2012 12:59:07] data/creaturescripts/scripts/look.lua:15: in function <data/creaturescripts/scripts/look.lua:1> [01/02/2012 12:59:07] [Error - CreatureScript Interface] [01/02/2012 12:59:07] data/creaturescripts/scripts/look.lua:onLook [01/02/2012 12:59:07] Description: [01/02/2012 12:59:07] data/lib/050-function.lua:107: attempt to index local 'str' (a nil value) [01/02/2012 12:59:07] stack traceback: [01/02/2012 12:59:07] data/lib/050-function.lua:107: in function 'getArticle' [01/02/2012 12:59:07] data/creaturescripts/scripts/look.lua:15: in function <data/creaturescripts/scripts/look.lua:1> [01/02/2012 12:59:09] [Error - CreatureScript Interface] [01/02/2012 12:59:09] data/creaturescripts/scripts/look.lua:onLook [01/02/2012 12:59:09] Description: [01/02/2012 12:59:09] data/lib/050-function.lua:107: attempt to index local 'str' (a nil value) [01/02/2012 12:59:09] stack traceback: [01/02/2012 12:59:09] data/lib/050-function.lua:107: in function 'getArticle' [01/02/2012 12:59:09] data/creaturescripts/scripts/look.lua:15: in function <data/creaturescripts/scripts/look.lua:1> [01/02/2012 12:59:09] [Error - CreatureScript Interface] [01/02/2012 12:59:09] data/creaturescripts/scripts/look.lua:onLook [01/02/2012 12:59:09] Description: [01/02/2012 12:59:10] data/lib/050-function.lua:107: attempt to index local 'str' (a nil value) [01/02/2012 12:59:10] stack traceback: [01/02/2012 12:59:10] data/lib/050-function.lua:107: in function 'getArticle' [01/02/2012 12:59:10] data/creaturescripts/scripts/look.lua:15: in function <data/creaturescripts/scripts/look.lua:1> [01/02/2012 12:59:10] [Error - CreatureScript Interface] [01/02/2012 12:59:10] data/creaturescripts/scripts/look.lua:onLook [01/02/2012 12:59:10] Description: [01/02/2012 12:59:10] data/lib/050-function.lua:107: attempt to index local 'str' (a nil value) [01/02/2012 12:59:10] stack traceback: [01/02/2012 12:59:10] data/lib/050-function.lua:107: in function 'getArticle' [01/02/2012 12:59:10] data/creaturescripts/scripts/look.lua:15: in function <data/creaturescripts/scripts/look.lua:1> Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/164/#findComment-1191214 Compartilhar em outros sites More sharing options...
diegoSkate 2 Postado Fevereiro 1, 2012 Share Postado Fevereiro 1, 2012 @ Tópico como faz para adiciona saffari ball no dash?? antes de pergunta já esta ai o que eu já fiz! Eu já adicionei no client saffari ball e outra ball e Salvei o dat! Tbm no client o efeito da bal que sai do player para ir ao pokemon dead salvei o dat. já adicionei.... itens.xml itens.otb catch.lua (no data/actions/scripts) configuration.lua (data/lib) heal.lua (data/npc/scripts) Mesmo assim a saffari não captura nenhum poke, as outra já captura! (Já coloquei usable no dat e no itens.otb) Você tem que ter elas no item.otb (use um otb editor) e no dat/spr do cliente (use um dat editor), você precisa adicionar os IDs em sequência, ou seja, a bola tem que ter ID X, sendo usada tem que ter ID X + 1, e com o pokémon morto, X + 2. Adicione os IDs nas tags do actions.xml (data/actions) na parte sobre o catch/goback. Depois vá no catch.lua (data/actions/scripts) e configure ela na tabela, sendo "on" o efeito de quando der catch, "off" o efeito quando não der catch, "id" é o ID da bola que player vai ganhar se der catch, e "send" é o distance effect que a bola manda ao dar catch. Em seguida, abra o arquivo configuration.lua (data/libs) e procure pela tabela "pokeballs", você tem que adicionar as bolas lá também. Na mesma pasta, edite o arquivo somefunctions.lua, na função "isItemPokeball" e "isPokeball". Você adiciona as bolas nos items.xml, e agora adiciona elas na tag do movements.xml (data/movements) na parte de portraits. Lembrando que no items.xml você tem que colocar a frase '<attribute key="ispokeball" value="1"/>' para ter efeito na mana/cap/trade etc. Abra o status system.lua (data/lib) e procure pela tabela "cureballs" ou algo do tipo, adicione as bolas lá também. Em somefunctions.lua denovo, procure a função "isBeingUsed" e edita ela também. Tenta isso! Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/164/#findComment-1191223 Compartilhar em outros sites More sharing options...
DarkninoxD 1 Postado Fevereiro 1, 2012 Share Postado Fevereiro 1, 2012 Alguem tem um System de bike para dash advenced 1.4f ai para poder me passar =P Se passar ++REP Por 3 dias Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/164/#findComment-1191234 Compartilhar em outros sites More sharing options...
matheusshibby 0 Postado Fevereiro 1, 2012 Share Postado Fevereiro 1, 2012 Alguém podia listar para mim todos os CRASHES RESOLVIDOS? ou que tem que arruma? Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/164/#findComment-1191241 Compartilhar em outros sites More sharing options...
Jeffer000 65 Postado Fevereiro 1, 2012 Share Postado Fevereiro 1, 2012 Alguem tem um System de bike para dash advenced 1.4f ai para poder me passar =P Se passar ++REP Por 3 dias Olha na minha sig ^^ Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/164/#findComment-1191244 Compartilhar em outros sites More sharing options...
victorvs 3 Postado Fevereiro 1, 2012 Share Postado Fevereiro 1, 2012 Voltei galera cheguei da escola agora... Le o topico o topico cresceu em média de 3 pags e o q axei de novo?...nothing Isso é mais que uma justificativa para vim outro moderador fechando ou alertando geral por flood..coisas inuteis sendo postadas pois jah estiveram no topic ..jah postaram po galera eliam td antes de postar essa coisas.. @Pocoyo... Cara vo te mata...Eu estavo fazendo jhoto pra q entao? posta o seu entao mas quando tiver algo pronto ou fazendo fala pq n perdemos tempo fazendo o msm U.u.. Vo fazer Um Dive sistema aqui (= Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/164/#findComment-1191257 Compartilhar em outros sites More sharing options...
DarkninoxD 1 Postado Fevereiro 1, 2012 Share Postado Fevereiro 1, 2012 Alguem tem um System de bike para dash advenced 1.4f ai para poder me passar =P Se passar ++REP Por 3 dias Olha na minha sig ^^ Muito Obrigado =D +++REP 3 Dias Seguidos para vc =D so falta eu ver como da rep... =O Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/164/#findComment-1191259 Compartilhar em outros sites More sharing options...
MarcosFraga 34 Postado Fevereiro 1, 2012 Share Postado Fevereiro 1, 2012 (editado) alguem podia me passar um tuto de como colcoar as imagens corrteas dos shinys na barra colwdown e como mudar tipo quero que o shiny hitmonlee seja aquele ja capa vermelha como fasso isso? Cara sobre as imagens dos shinys acho que tens somente que adicionar as ids no itens.otb e depois pegar os ids e colocar na lib.Acho* Agora sobre o shiny hitmonlee ser o da capa vermelha e muito facil usa o dat editor abre.Ai tu procura o chan da capa vermelha feito isso tu salva ele cntrl+e salva com o nome de chan, agora vai la no hitmonchan feio que tu que trocar e aperta cntrl+i que abrirá uma janela pra substiuir ai você escolhe o chan que tinhas salvo e poem abrir e substitui depois é só compilar. Obs : eu ja tinha postado antes isso mas pelo visto não leram, fazer oque.. Espero ter ajudado. Editado Fevereiro 1, 2012 por SoulOroshie Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/164/#findComment-1191270 Compartilhar em outros sites More sharing options...
daaadam 5 Postado Fevereiro 1, 2012 Share Postado Fevereiro 1, 2012 Isso é urgente! Quando um player tá voando e começa usar o "ESC" ele pode atravessar oque quiser. Não sei se isso funciona com o surf também. ------------------------- Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/164/#findComment-1191293 Compartilhar em outros sites More sharing options...
crd1990 0 Postado Fevereiro 1, 2012 Share Postado Fevereiro 1, 2012 ****EDIT!!!**** adicionada passivas de magmar, electabuzz, hitmonlee... e amanha faço a do hitmonchan... se alguem ja pegou o script.. Por Favor, troquei denovo o arquivo exp.lua... e depois posto os scripts de spells pra pokes selvagens... ae pra galera q tava pedindo.. ae vai o sistema de atk passivo dos pokes... Scyther, Shiny Scyther, Scizor, Hitmontop, Pineco, Forretress... vai na pasta creaturescript/scripts/Exp.lua e substitua tudo q esta dentro por isso.. -- [outfit normal] = {out = outfit girando, efeitos} local OutFit = { [366] = {out = 496, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --scyther [912] = {out = 918, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --Scizor [1317] = {out = 849, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --Shiny Scyther [952] = {out = 1193, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --Hitmontop [909] = {out = 1194, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --pineco [910] = {out = 1192, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --Forretress } --acima do efeito 255 n aparece -pelo menos aki- entao fica esse por enquanto... ;x --efeito vermelho => {cima = 261, direita = 263, esquerda = 264, baixo = 262} local combats = { [PSYCHICDAMAGE] = {cor = COLOR_PSYCHIC}, [GRASSDAMAGE] = {cor = COLOR_GRASS}, [POISONEDDAMAGE] = {cor = COLOR_GRASS}, [MORTALGASDAMAGE] = {cor = COLOR_POISON}, [FIREDAMAGE] = {cor = COLOR_FIRE2}, [bURNEDDAMAGE] = {cor = COLOR_BURN}, [WATERDAMAGE] = {cor = COLOR_WATER}, [iCEDAMAGE] = {cor = COLOR_ICE}, [NORMALDAMAGE] = {cor = COLOR_NORMAL}, [GUILLOTINEDAMAGE] = {cor = COLOR_NORMAL}, [FLYDAMAGE] = {cor = COLOR_FLYING}, [GHOSTDAMAGE] = {cor = COLOR_GHOST}, [NIGHTMAREDAMAGE] = {cor = COLOR_GHOST}, [GROUNDDAMAGE] = {cor = COLOR_GROUND}, [ELECTRICDAMAGE] = {cor = COLOR_ELECTRIC}, [THUNDERWAVEDAMAGE] = {cor = COLOR_ELECTRIC}, [ROCKDAMAGE] = {cor = COLOR_ROCK}, [bUGDAMAGE] = {cor = COLOR_BUG}, [FIGHTDAMAGE] = {cor = COLOR_FIGHTING}, [sEISMICTOSSDAMAGE] = {cor = COLOR_FIGHTING}, [DRAGONDAMAGE] = {cor = COLOR_DRAGON}, [POISONDAMAGE] = {cor = COLOR_POISON}, [DARKDAMAGE] = {cor = COLOR_DARK}, [sTEELDAMAGE] = {cor = COLOR_STEEL}, } local function doHeal(cid, amount) doCreatureAddHealth(cid, amount) doSendMagicEffect(getThingPos(cid), 12) doSendAnimatedText(getThingPos(cid), "+"..amount.."", 65) end local function sendPlayerDmgMsg(cid, text) if not isCreature(cid) then return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, text) end local spcevo = { ["Poliwhirl"] = {"Poliwrath", "Politoed"}, ["Gloom"] = {"Bellossom", "Vileplume"}, ["Tyrogue"] = {"Hitmonchan", "Hitmontop", "Hitmonlee"}} local function doEvolveWild(cid) if not isCreature(cid) or getCreatureHealth(cid) <= 0 then return true end local name = getCreatureName(cid) local evolution = "none" if spcevo[name] then evolution = spcevo[name][math.random(1, #spcevo[name])] elseif poevo[name] then evolution = poevo[name].evolution end local a = getPokemonStatus(name) if not a or evolution == "none" then return true end local pk = {} local players = getSpectators(getThingPos(cid), 7, 7) if players then for pp = 1, #players do local this = players[pp] if isCreature(this) and isPlayer(this) and (getCreatureTarget(this) == cid or getDamageMapPercent(this, cid) > 0) then doSendMagicEffect(getThingPos(this), 173) local expstring = cid.."expEx" pk[this] = getItemAttribute(getPlayerSlotItem(this, 8).uid, expstring) doItemSetAttribute(getPlayerSlotItem(this, 8).uid, expstring, 0) end end end local level = getPokemonLevel(cid) local pos = getThingPos(cid) local gender = getCreatureSkull(cid) local lifepercentage = 1 - ((getCreatureHealth(cid) * 1.3) / getCreatureMaxHealth(cid)) local lookdir = getCreatureLookDir(cid) local status = {} status.offense = getOffense(cid) + a.off * 8 status.defense = getDefense(cid) + a.def * 8 status.agi = getSpeed(cid) + a.agi * 8 status.spatk = getSpecialAttack(cid) + a.spatk * 8 status.vit = getVitality(cid) + a.vit * 4 doRemoveCreature(cid) local evo = doCreateMonster(evolution, pos) setWildPokemonLevel(evo, level, status) doCreatureSetLookDir(evo, lookdir) doCreatureSetSkullType(evo, gender) doCreatureAddHealth(evo, -getCreatureMaxHealth(evo) * lifepercentage) doSendMagicEffect(getThingPos(evo), 18) for attacker, experience in pairs (pk) do doWildAttackPlayer(evo, attacker) local expstring = evo.."expEx" local exp = experience or 0 doItemSetAttribute(getPlayerSlotItem(attacker, 8).uid, expstring, exp) end sendFinishEvolutionEffect(evo, true) addEvent(sendFinishEvolutionEffect, 550, evo, true) addEvent(sendFinishEvolutionEffect, 1050, evo) end local races = { [4] = {cor = COLOR_FIRE2}, [6] = {cor = COLOR_WATER}, [7] = {cor = COLOR_NORMAL}, [8] = {cor = COLOR_FIRE2}, [9] = {cor = COLOR_FIGHTING}, [10] = {cor = COLOR_FLYING}, [11] = {cor = COLOR_GRASS}, [12] = {cor = COLOR_POISON}, [13] = {cor = COLOR_ELECTRIC}, [14] = {cor = COLOR_GROUND}, [15] = {cor = COLOR_PSYCHIC}, [16] = {cor = COLOR_ROCK}, [17] = {cor = COLOR_ICE}, [18] = {cor = COLOR_BUG}, [19] = {cor = COLOR_DRAGON}, [20] = {cor = COLOR_GHOST}, [21] = {cor = COLOR_STEEL}, [22] = {cor = COLOR_DARK}, [1] = {cor = 180}, [2] = {cor = 180}, [3] = {cor = 180}, [5] = {cor = 180}, } local damages = {MORTALGASDAMAGE, GROUNDDAMAGE, ELECTRICDAMAGE, ROCKDAMAGE, FLYDAMAGE, BUGDAMAGE, FIGHTINGDAMAGE, DRAGONDAMAGE, POISONDAMAGE, DARKDAMAGE, STEELDAMAGE, NIGHTMAREDAMAGE, GUILLOTINEDAMAGE, SEISMICTOSSDAMAGE} local fixdmgs = {PSYCHICDAMAGE, COMBAT_PHYSICALDAMAGE, GRASSDAMAGE, FIREDAMAGE, WATERDAMAGE, ICEDAMAGE, NORMALDAMAGE, GHOSTDAMAGE} local ignored = {NIGHTMAREDAMAGE, GUILLOTINEDAMAGE, MORTALGASDAMAGE, SEISMICTOSSDAMAGE, PSYCHOSHIFTDAMAGE, POISONEDDAMAGE, BURNEDDAMAGE} local ignoremiss = {NIGHTMAREDAMAGE, MORTALGASDAMAGE, BURNEDDAMAGE, POISONEDDAMAGE} local ignorecritical = {MORTALGASDAMAGE, BURNEDDAMAGE, POISONEDDAMAGE, NIGHTMAREDAMAGE} local cannotkill = {MORTALGASDAMAGE, BURNEDDAMAGE, POISONEDDAMAGE, NIGHTMAREDAMAGE} function onStatsChange(cid, attacker, type, combat, value) if combat == FLYSYSTEMDAMAGE then return false end if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TV local damageCombat = combat if damageCombat == THUNDERWAVEDAMAGE then damageCombat = ELECTRICDAMAGE elseif damageCombat == PSYCHOSHIFTDAMAGE then damageCombat = PSYCHICDAMAGE end if getPlayerStorageValue(cid, 33) >= 1 then -- funcionamento do self destruction if isCreature(attacker) then return false end return true end if not isCreature(attacker) or cid == attacker then if not isInArray(fixdamages, combat) and combats[combat] then doSendAnimatedText(getThingPos(cid), value, combats[combat].cor) end return true end -------------------------------------------------- if combat == SLEEP_POWDERDAMAGE then if not isSummon(cid) and not isSummon(attacker) and not isPlayer(attacker) then return false end if isPlayer(cid) then return false end if isNpcSummon(cid) and getCreatureTarget(cid) ~= attacker then return false end if isSummon(cid) and isSummon(attacker) then if not isInParty(getCreatureMaster(cid)) or not isInParty(getCreatureMaster(attacker)) then return false end if not getPlayerParty(getCreatureMaster(cid)) == getPlayerParty(getCreatureMaster(attacker)) then return false end end doSleep(cid, value, true) return false end -------------------------------------------------- if combat == HEALINGDAMAGE then local healing = math.abs(value) if not isSummon(cid) and not isSummon(attacker) and not isPlayer(attacker) then doHeal(cid, healing) return false end if isSummon(cid) and isSummon(attacker) then if getPlayerStorageValue(getCreatureMaster(cid), 990) >= 1 then return false end if not isInParty(getCreatureMaster(cid)) or not isInParty(getCreatureMaster(attacker)) then doHeal(cid, healing) return false end if not getPlayerParty(getCreatureMaster(cid)) == getPlayerParty(getCreatureMaster(attacker)) then doHeal(cid, healing) return false end end return false end -------------------------------------------------- if combat == POISON_POWDERDAMAGE then if not isSummon(cid) and not isSummon(attacker) and not isPlayer(attacker) then return false end if isNpcSummon(cid) and getCreatureTarget(cid) ~= attacker then return false end if isSummon(cid) and isSummon(attacker) then if not isInParty(getCreatureMaster(cid)) or not isInParty(getCreatureMaster(attacker)) then return false end if not getPlayerParty(getCreatureMaster(cid)) == getPlayerParty(getCreatureMaster(attacker)) then return false end end local master = attacker if isSummon(attacker) then master = getCreatureMaster(attacker) end addEvent(doAdvancedPoison, 2500, attacker, master, cid, getPlayerStorageValue(attacker, 919231), value, getPlayerStorageValue(cid, 3893)) return false end -------------------------------------------------- if isPlayer(attacker) then local valor = value if valor > getCreatureHealth(cid) then valor = getCreatureHealth(cid) end if combat == COMBAT_PHYSICALDAMAGE then return false end if combat == PHYSICALDAMAGE then doSendMagicEffect(getThingPos(cid), 3) doSendAnimatedText(getThingPos(cid), valor, races[getMonsterInfo(getCreatureName(cid)).race].cor) end if combats[damageCombat] and not isInArray(fixdmgs, damageCombat) then doSendAnimatedText(getThingPos(cid), valor, combats[damageCombat].cor) end if #getCreatureSummons(attacker) >= 1 and not isInArray({POISONEDDAMAGE, BURNEDDAMAGE}, combat) then doPlayerSendTextMessage(attacker, MESSAGE_STATUS_DEFAULT, "Your "..getPokeName(getCreatureSummons(attacker)[1]).." dealt "..valor.." damage to "..getSomeoneDescription(cid)..".") end return true end -------------------------------------------------- if isPlayer(cid) and #getCreatureSummons(cid) >= 1 and type == STATSCHANGE_HEALTHLOSS then return false end -------------------------------------------------- if isPlayer(cid) and #getCreatureSummons(cid) <= 0 and type == STATSCHANGE_HEALTHLOSS then local valor = 0 if combat == COMBAT_PHYSICALDAMAGE then valor = getOffense(attacker) else valor = getSpecialAttack(attacker) end valor = valor * playerDamageReduction valor = valor * math.random(83, 117) / 100 if valor >= getCreatureHealth(cid) then valor = getCreatureHealth(cid) end valor = math.floor(valor) doCreatureAddHealth(cid, -valor, 3, 180) if not isPlayer(cid) then addEvent(sendPlayerDmgMsg, 5, cid, "You lost "..valor.." hitpoints due to an attack from "..getSomeoneDescription(attacker)..".") end return false end -------------------------------------------------- if type == STATSCHANGE_HEALTHGAIN then if cid == attacker then return true end if not isSummon(cid) and isSummon(attacker) then return false end if isSummon(cid) and isSummon(attacker) and getPlayerParty(getCreatureMaster(cid)) == getPlayerParty(getCreatureMaster(attacker)) then return false end return true end -------------------------------------------------- if isMonster(attacker) and getPlayerStorageValue(attacker, 201) ~= -1 then if isPlayer(cid) then return false end if getPlayerStorageValue(getCreatureMaster(cid), ginasios[getPlayerStorageValue(attacker, 201)].storage) ~= 1 then return false end end -------------------------------------------------- if isMonster(cid) and getPlayerStorageValue(cid, 201) ~= -1 then if getPlayerStorageValue(getCreatureMaster(attacker), ginasios[getPlayerStorageValue(cid, 201)].storage) ~= 1 then return false end end -------------------------------------------------- -------------------------------------------------- local multiplier = 1 local miss = (getSpeed(cid) - getSpeed(attacker)) * 0.26 local poketype1 = pokes[getCreatureName(cid)].type local poketype2 = pokes[getCreatureName(cid)].type2 if getCreatureCondition(cid, CONDITION_INVISIBLE) then return false end if damageCombat ~= COMBAT_PHYSICALDAMAGE and not isInArray(ignored, damageCombat) then if isInArray(effectiveness[damageCombat].super, poketype1) then multiplier = multiplier * 2 end if isInArray(effectiveness[damageCombat].super, poketype2) then multiplier = multiplier * 2 end if isInArray(effectiveness[damageCombat].weak, poketype1) then multiplier = multiplier * 0.5 end if isInArray(effectiveness[damageCombat].weak, poketype2) then multiplier = multiplier * 0.5 end if isInArray(effectiveness[damageCombat].non, poketype1) or isInArray(effectiveness[damageCombat].non, poketype2) then multiplier = multiplier * 0 end elseif combat == COMBAT_PHYSICALDAMAGE then if isGhostPokemon(cid) and not isGhostPokemon(attacker) then doSendMagicEffect(getThingPos(cid), 3) return false end if getCreatureCondition(attacker, CONDITION_INVISIBLE) and not isGhostPokemon(attacker) then if not isInArray({"Clefable", "Wigglytuff"}, getCreatureName(attacker)) then return false end end if miss > 0 and math.random(1, 100) <= miss and not isSleeping(cid) and not getCreatureCondition(cid, CONDITION_PARALYZE) then doSendMagicEffect(getThingPos(cid), 211) doSendAnimatedText(getThingPos(cid), "MISS", 215) return false end end -------------------------------------------------- local valor = value if multiplier > 2 then multiplier = 2 elseif multiplier == 0.25 then multiplier = 0.5 end -------------------------------------------------- local function resetMiss(cid) if not isCreature(cid) then return true end setPlayerStorageValue(cid, 88726, -1) end if getPlayerStorageValue(cid, 88726) ~= 1 and miss > 0 and math.random(1, 100) <= miss and damageCombat ~= COMBAT_PHYSICALDAMAGE and not isInArray(ignoremiss, combat) and not isSleeping(cid) and not getCreatureCondition(cid, CONDITION_PARALYZE) then doSendMagicEffect(getThingPos(cid), 211) doSendAnimatedText(getThingPos(cid), "MISS", 215) doTeleportThing(cid, getClosestFreeTile(cid, getThingPos(cid)), false) doSendMagicEffect(getThingPos(cid), 211) doFaceCreature(cid, getThingPos(attacker)) setPlayerStorageValue(cid, 88726, 1) addEvent(resetMiss, 2200, cid) return false end if not isSummon(attacker) and not isSummon(cid) then return false end if isSummon(cid) and isSummon(attacker) then if not isInParty(getCreatureMaster(cid)) or not isInParty(getCreatureMaster(attacker)) then return false end if not getPlayerParty(getCreatureMaster(cid)) == getPlayerParty(getCreatureMaster(attacker)) then return false end end if isSleeping(attacker) then return false end local randomRange = math.random(83, 117) / 100 local block = 0 if combat == COMBAT_PHYSICALDAMAGE then block = 1 - (getDefense(cid) / (getOffense(attacker) + getDefense(cid))) if getPokemonGender(attacker) == SEX_MALE then block = block + 0.2 end if getPokemonGender(cid) == SEX_FEMALE then block = block - 0.2 end valor = getOffense(attacker) * block else block = 1 - (getSpecialDefense(cid) / (getSpecialAttack(attacker) + getSpecialDefense(cid))) valor = valor * block * generalSpecialAttackReduction if isSummon(cid) then valor = valor * summonSpecialDamageReduction - getPokemonLevel(cid) / 2 end end valor = valor * multiplier valor = valor * randomRange if isSummon(attacker) then valor = valor * getHappinessRate(attacker) else valor = valor * summonReduction end valor = math.floor(valor) if combat == NIGHTMAREDAMAGE then local div = 8 if isSummon(attacker) and not isSummon(cid) then div = 4 end valor = math.floor(getCreatureMaxHealth(cid)/div) elseif combat == GUILLOTINEDAMAGE then if isGhostPokemon(cid) then doSendMagicEffect(getThingPos(cid), 3) return false end local gDmg = 0.5 if isSummon(attacker) and not isSummon(cid) then gDmg = 0.7 end valor = getCreatureMaxHealth(cid) * gDmg elseif combat == SEISMICTOSSDAMAGE then valor = getPokemonLevel(attacker) * 10 elseif combat == BURNEDDAMAGE then valor = value * getResistance(cid, FIREDAMAGE) elseif combat == POISONEDDAMAGE then valor = value * getResistance(cid, POISONDAMAGE) end if valor <= 0 then doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return false end if math.random(1, 100) == 4 and not isInArray(ignorecritical, combat) then doSendAnimatedText(getThingPos(attacker), "CRITICAL", 215) valor = valor * 2 end if combat == PSYCHOSHIFTDAMAGE and isCreature(cid) then if not isPlayer(cid) then local pos = getThingPos(cid) pos.x = pos.x + math.random(-4,4) pos.y = pos.y + math.random(-4,4) for a = 1, 6 do if not canWalkOnPos(pos, true, true, true, true, false) or not isSightClear(getThingPos(cid), pos, false) then pos = getThingPos(cid) pos.x = pos.x + math.random(-4,4) pos.y = pos.y + math.random(-4,4) end end if not canWalkOnPos(pos, true, true, true, true, false) then pos = getClosestFreeTile(cid, getThingPos(cid)) end if not canWalkOnPos(pos, true, true, true, true, false) then pos = getThingPos(cid) end doTeleportThing(cid, pos, false) end doSendMagicEffect(getThingPos(cid), math.random(12, 14)) end if combat == THUNDERWAVEDAMAGE then doCreatureAddCondition(cid, thunderwavecondition) end if valor >= getCreatureHealth(cid) then if isInArray(cannotKill, combat) and isPlayer(cid) then valor = getCreatureHealth(cid) - 1 else valor = getCreatureHealth(cid) end end --- REFLECT -------------------------------- if not isPlayer(cid) and getPlayerStorageValue(cid, 34) >= 1 and combat ~= COMBAT_PHYSICALDAMAGE then doSendMagicEffect(getThingPos(cid), 135) doSendAnimatedText(getThingPos(cid), "REFLECT", COLOR_GRASS) setPlayerStorageValue(cid, 34, -1) return false end -------------------------------------------- if hasMimicWall(cid) then doSendMagicEffect(getThingPos(cid), 135) local dmgText = ""..valor.."" local a = getPlayerStorageValue(cid, 878) setPlayerStorageValue(cid, 878, a - valor) local k = getPlayerStorageValue(cid, 878) if k <= 0 then local b = getTileItemById(getThingPos(cid), 11440) if b.uid > 1 then doRemoveItem(b.uid, 1) end local c = getTileItemById(getThingPos(cid), 11439) if c.uid > 1 then doRemoveItem(c.uid, 1) end dmgText = ""..a.."" doSendMagicEffect(getThingPos(cid), 3) end doSendAnimatedText(getThingPos(cid), dmgText, 215) return false end if isSummon(attacker) and not isSummon(cid) and not isPlayer(cid) then local expstring = cid.."expEx" if getItemAttribute(getPlayerSlotItem(getCreatureMaster(attacker), 8).uid, expstring) == null then doItemSetAttribute(getPlayerSlotItem(getCreatureMaster(attacker), 8).uid, expstring, 0) end local exp = valor / getCreatureMaxHealth(cid) local ball = getPlayerSlotItem(getCreatureMaster(attacker), 8).uid doItemSetAttribute(ball, expstring, getItemAttribute(ball, expstring) + exp) if getItemAttribute(ball, expstring) > 1 then doItemSetAttribute(ball, expstring, 1) end end if isSummon(cid) and getCreatureHealth(cid) <= (getCreatureMaxHealth(cid)*0.08) and not exhaustion.get(getCreatureMaster(cid), 88726) then exhaustion.set(getCreatureMaster(cid), 88726, 11) doSendMagicEffect(getThingPos(cid), 178) end if isSummon(attacker) then if combat == COMBAT_PHYSICALDAMAGE then doTargetCombatHealth(getCreatureMaster(attacker), cid, PHYSICALDAMAGE, -valor, -valor, 255) else doTargetCombatHealth(getCreatureMaster(attacker), cid, damageCombat, -valor, -valor, 255) end if not isSummon(cid) and not isPlayer(cid) and math.random(1, wildEvolveChance) == math.random(1, wildEvolveChance) then addEvent(doEvolveWild, math.random(1, 2500), cid) end else if combat ~= COMBAT_PHYSICALDAMAGE then doCreatureAddHealth(cid, -math.abs(valor), 3, combats[damageCombat].cor) else doCreatureAddHealth(cid, -math.abs(valor), 3, races[getMonsterInfo(getCreatureName(cid)).race].cor) end if isSummon(cid) then addEvent(sendPlayerDmgMsg, 5, getCreatureMaster(cid), "Your "..getCreatureName(cid).." lost "..valor.." hitpoints due to an attack from "..getSomeoneDescription(attacker)..".") end end local percent = 8 + math.ceil(valor / getCreatureMaxHealth(cid) * 100) if getCreatureHealth(cid) == 0 or percent <= 0 then return false end local runCond = false if math.random(100) <= percent then runCond = true end if runCond then local condPos = getThingPos(cid) local color = 215 local text = "" local effect = 2 if damageCombat == FIREDAMAGE and not isBurning(cid) then doAdvancedBurn(attacker, isPlayer(getCreatureMaster(attacker)) and getCreatureMaster(attacker) or 0, cid, getPokemonLevel(attacker) * 2, math.random(5, 12)) color = COLOR_FIRE2 text = "BURNING" effect = 15 elseif damageCombat == POISONDAMAGE and not isPoisoned(cid) and randomCond == checkCond then doAdvancedPoison(attacker, isPlayer(getCreatureMaster(attacker)) and getCreatureMaster(attacker) or 0, cid, getPokemonLevel(attacker) * 2, math.random(4, 20)) color = COLOR_GRASS text = "POISONED" effect = 8 end doSendMagicEffect(getThingPos(cid), effect) addEvent(doSendAnimatedText, 5, condPos, text, color) end ----------------------------------------PASSIVAS----------------------------------------- ------------------------------"Counter Helix" - "Giro Ball"------------------------------ if isSummon(cid) then if OutFit[getCreatureOutfit(cid).lookType] then if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- if getPlayerStorageValue(cid, 32623) == 1 then --proteçao pra n usar a spell 2x seguidas... return false end local outfitt = OutFit[getCreatureOutfit(cid).lookType] local function doWingAttack(cid, a, damage, min, max) local damagearea = {} local effectpos = getThingPosWithDebug(cid) local effect = 255 if a == 0 then effect = outfitt.cima effectpos.x = effectpos.x + 1 effectpos.y = effectpos.y - 1 damagearea = wingdn elseif a == 1 then effect = outfitt.direita effectpos.x = effectpos.x + 2 effectpos.y = effectpos.y + 1 damagearea = wingde elseif a == 2 then effect = outfitt.baixo effectpos.x = effectpos.x + 1 effectpos.y = effectpos.y + 2 damagearea = wingds elseif a == 3 then effect = outfitt.esquerda effectpos.x = effectpos.x - 1 effectpos.y = effectpos.y + 1 damagearea = wingdw end doSendMagicEffect(effectpos, effect) if damage then if getCreatureOutfit(cid).lookType == (366 or 1317) then --scyther e shiny scyther doAreaCombatHealth(cid, BUGDAMAGE, getThingPosWithDebug(cid), damagearea, -min, -max, CONST_ME_NONE) elseif getCreatureOutfit(cid).lookType == 952 then --hitmontop doAreaCombatHealth(cid, FIGHTINGDAMAGE, getThingPosWithDebug(cid), damagearea, -min, -max, CONST_ME_NONE) else --resto doAreaCombatHealth(cid, STEELDAMAGE, getThingPosWithDebug(cid), damagearea, -min, -max, CONST_ME_NONE) end end end local dire = getCreatureLookDir(cid) local cpos = getThingPosWithDebug(cid) local min = getWildPokemonLevel(cid)*15 --nao sei como funciona o sistema de dano... local max = getWildPokemonLevel(cid)*20 --nao sei como funciona o sistema de dano... setPlayerStorageValue(cid, 32623, 1) --proteçao doSetCreatureOutfit(cid, {lookType = OutFit[getCreatureOutfit(cid).lookType].out}, -1) local function doDance(cid, dir, damage, min, max) if not isCreature(cid) then return true end doCreatureSetLookDir(cid, dir) doWingAttack(cid, dir, damage, min, max) end for times = 0, 2 do for directions = 0, 3 do addEvent(doDance, times * 300, cid, directions, true, min, max) end end local function doChangeO(cid, dir, pos) if not isCreature(cid) then return true end setPlayerStorageValue(cid, 32623, 0) --proteçao doRemoveCondition(cid, CONDITION_OUTFIT) if getThingPosWithDebug(cid).x == pos.x and getThingPosWithDebug(cid).y == pos.y then doCreatureSetLookDir(cid, dir) end end addEvent(doChangeO, 2 * 300 + 10, cid, dire, cpos) end end end -------------------------------------------Passiva de fogo e trovao------------------------------------- local Fire_Thunder = {"Magmar", "Shiny Magmar", "Electabuzz", "Shiny Electabuzz"} --["Nome"] = {effeito, damage} local eff = { ["Magmar"] = {15, FIREDAMAGE}, ["Shiny Magmar"] = {15, FIREDAMAGE}, ["Electabuzz"] = {207, ELECTRICDAMAGE}, ["Shiny Electabuzz"] = {207, ELECTRICDAMAGE}, } if isSummon(cid) then if isInArray(Fire_Thunder, getCreatureName(cid)) then if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- if getPlayerStorageValue(cid, 32623) == 1 then --proteçao pra n usar a spell 2x seguidas... return false end local min = getWildPokemonLevel(cid)*15 --nao sei como funciona o sistema de dano... local max = getWildPokemonLevel(cid)*20 --nao sei como funciona o sistema de dano... local function sendFireEff(cid, dir, eff, damage) if not isCreature(cid) then return true end doAreaCombatHealth(cid, damage, getPosByDir(getThingPosWithDebug(cid), dir), 0, -min, -max, eff) end local function doSpinFire(cid) if not isCreature(cid) then return true end local t = { [1] = SOUTHWEST, [2] = SOUTH, [3] = SOUTHEAST, [4] = EAST, [5] = NORTHEAST, [6] = NORTH, [7] = NORTHWEST, [8] = WEST, [9] = SOUTHWEST, } for a = 1, 17 do if not t[a] then addEvent(sendFireEff, a * 140, cid, t[a-8], eff[getCreatureName(cid)][1], eff[getCreatureName(cid)][2]) else addEvent(sendFireEff, a * 140, cid, t[a], eff[getCreatureName(cid)][1], eff[getCreatureName(cid)][2]) end end setPlayerStorageValue(cid, 32623, 0) --proteçao end setPlayerStorageValue(cid, 32623, 1) --proteçao doSpinFire(cid, false, cid) end end end ---------------------------------------------passiva Hitmonlee---------------------------------- --[outfit] = outfit chutando, local hitmonlees = { [371] = 652, --hitmonlee [1300] = 652, --shiny hitmonlee [877] = 878, --elite hitmonlee PxG } --DETALHE: shiny hitmonlee n tem a sprite dele chutando.. pelo menos eu n achei.. --entao deixei a sprite do hitmonlee normal atacando... if isSummon(cid) then if getCreatureName(cid) == ("Hitmonlee" or "Shiny Hitmonlee") then if getMasterTarget(cid) then if math.random(1, 100) <= 25 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- if getPlayerStorageValue(cid, 32623) == 1 then --proteçao pra n usar a spell 2x seguidas... return false end local function doChangeHitmon(cid) if not isCreature(cid) then return true end setPlayerStorageValue(cid, 32623, 0) --proteçao doRemoveCondition(cid, CONDITION_OUTFIT) end local min = getWildPokemonLevel(cid)*15 --nao sei como funciona o sistema de dano... local max = getWildPokemonLevel(cid)*20 --nao sei como funciona o sistema de dano... setPlayerStorageValue(cid, 32623, 1) --proteçao doSetCreatureOutfit(cid, {lookType = hitmonlees[getCreatureOutfit(cid).lookType]}, -1) doAreaCombatHealth(cid, FIGHTINGDAMAGE, getThingPosWithDebug(getMasterTarget(cid)), 0, -min, -max, 255) addEvent(doChangeHitmon, 700, cid) end end end end return false end DETALHE: isso soh vai funcionar pra summons... pra pokes selvagens use o script postado anteriormente.. colocando em spells.. eu postei um igual esse pra spells na pagina 114... se quiserem deem uma olhada... qlqr problema fle! mostrando o erro/problema e explicando oq vc estava fazendo quando deu o erro... vlws Baum de mais vei... mais o Leee aqu nao ta tiradno dano no Passive so aqui isso ? Isso é urgente! Quando um player tá voando e começa usar o "ESC" ele pode atravessar oque quiser. Não sei se isso funciona com o surf também. ------------------------- Aqui ta de boa isso vei testei agora =/ Link para o comentário https://xtibia.com/forum/topic/177592-encerrado-pokemon-d%C3%BAvidas-pda/page/164/#findComment-1191298 Compartilhar em outros sites More sharing options...
Posts Recomendados