StyloMaldoso 330 Postado Maio 29, 2012 Share Postado Maio 29, 2012 @StyloMaldoso e.e não seria mt difiçil fazer o script não, seria mais difiçil pega todas as sprite só pelo nox spr e junta todas elas @ZerefShirou vai passa o sistema de moto ou faze um de boat ? .-. @StyloMaldoso e.e não seria mt difiçil fazer o script não, seria mais difiçil pega todas as sprite só pelo nox spr e junta todas elas @ZerefShirou vai passa o sistema de moto ou faze um de boat ? .-. Voce ta afim de faze não? eu passo as sprint pra vc e nois faz ^^? se kize aceita msn '0' Link para o comentário Compartilhar em outros sites More sharing options...
Henriquepxc 3 Postado Maio 29, 2012 Share Postado Maio 29, 2012 @Zeref veio essa ideia eh boua,mas vamos pensar assim. Eu tenho um marill level 10 e qro evoluir pra azumarill,ela tambem vai ficar level 10. Tem como fazer pra quando ela evoluir ir para o level dela,tipo 60? Vllws. @Kurobisu Proucura no topico que vocÊ acha tudo que vc quer ai. [.spoiler] e [./spoiler] sem os "."... Link para o comentário Compartilhar em outros sites More sharing options...
rDs7008 47 Postado Maio 29, 2012 Share Postado Maio 29, 2012 (editado) edited. Editado Maio 29, 2012 por RicardoSohnn Link para o comentário Compartilhar em outros sites More sharing options...
Kurobisu 73 Postado Maio 29, 2012 Share Postado Maio 29, 2012 Vlw's mano obrigado. Bem, mais e o resto das perguntas. Alguém pode me responder? Link para o comentário Compartilhar em outros sites More sharing options...
zesy 6 Postado Maio 30, 2012 Share Postado Maio 30, 2012 @ZerefShirou Deu esse erro aqui(Obs. Não é erro meu, pq coloquei certinho...) [29/05/2012 22:20:29] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/exp.lua:173: 'end' expected (to close 'if' at line 171) near 'endif' [29/05/2012 22:20:29] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/exp.lua) [29/05/2012 22:20:29] data/creaturescripts/scripts/exp.lua:173: 'end' expected (to close 'if' at line 171) near 'endif' Melhor deixar queto, depois eu arrumo isso... E... continua o Bug da Ball Shiny, eu dou catch em 1 magikarp, e 1 shiny magikarp... os dois vem com a Ball Shiny(Brilhando) Link para o comentário Compartilhar em outros sites More sharing options...
Session Start 125 Postado Maio 30, 2012 Share Postado Maio 30, 2012 (editado) @ZerefShirou Deu esse erro aqui(Obs. Não é erro meu, pq coloquei certinho...) [29/05/2012 22:20:29] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/exp.lua:173: 'end' expected (to close 'if' at line 171) near 'endif' [29/05/2012 22:20:29] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/exp.lua) [29/05/2012 22:20:29] data/creaturescripts/scripts/exp.lua:173: 'end' expected (to close 'if' at line 171) near 'endif' Melhor deixar queto, depois eu arrumo isso... E... continua o Bug da Ball Shiny, eu dou catch em 1 magikarp, e 1 shiny magikarp... os dois vem com a Ball Shiny(Brilhando) Deixa eu ver os scripts? posta ai o exp.lua... Editado Maio 30, 2012 por Cleberadm Link para o comentário Compartilhar em outros sites More sharing options...
zesy 6 Postado Maio 30, 2012 Share Postado Maio 30, 2012 Tá ai meu jovem: local combats = { [PSYCHICDAMAGE] = {cor = COLOR_PSYCHIC}, [GRASSDAMAGE] = {cor = COLOR_GRASS}, [POISONEDDAMAGE] = {cor = COLOR_GRASS}, [MORTALGASDAMAGE] = {cor = COLOR_POISON}, [FIREDAMAGE] = {cor = COLOR_FIRE2}, --COMPLETAMENTE EDITED [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 Foresight = {"Machamp", "Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Machamp"} --passiva Foresight!! local counter = {"Machamp", "Machoke", "Hitmonchan", "Hitmonlee", "Magmar", "Electabuzz", "Scyther", "Snorlax", "Kangaskhan", "Arcanine", "Shiny Kangaskhan", "Shiny Arcanine", "Shiny Snorlax", "Shiny Scyther", "Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Machamp", "Shiny Machoke", "Shiny Magmar", "Shiny Electabuzz"} local tooBad = {"Scyther", "Scizor", "Hitmonlee", "Hitmonchan", "Hitmontop", "Tyrogue", "Shiny Scyther", "Shiny Hitmonchan", "Shiny Hitmonlee"} 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", "Poliwrath"}, ["Gloom"] = {"Vileplume", "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 = 10 ---(getSpeed(cid) - getSpeed(attacker)) * 0.26 --if pokes[getCreatureName(cid)] then poketype1 = pokes[getCreatureName(cid)].type poketype2 = pokes[getCreatureName(cid)].type2 --end 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 if not isInArray(Foresight, getCreatureName(attacker)) then --passiva Foresight!! doSendMagicEffect(getThingPos(cid), 3) return false end end if isCreature(attacker) and isCreature(cid) then if not isCreature(getMasterTarget(attacker)) then doSendMagicEffect(getThingPos(cid), 247) return false end end if getCreatureCondition(attacker, CONDITION_INVISIBLE) and not isGhostPokemon(attacker) then local tabela = {"Clefable", "Wigglytuff", "Alakazam", "Kadabra", "Mr. Mime", "Porygon", "Shiny Alakazam", "Shiny Porygon", "Shiny Kadabra", "Shiny Mr. Mime", "Shiny Clefable", "Shiny Wigglytuff"} if not isInArray(tabela, getCreatureName(attacker)) then return false --editei end end local cd = getPlayerStorageValue(attacker, 32659) local cd2 = getPlayerStorageValue(attacker, 3891) if cd > 0 or cd2 > 0 then if math.random(1, 100) > 50 then --50% chance de da miss no atk fisico doSendMagicEffect(getThingPos(cid), 211) doSendAnimatedText(getThingPos(cid), "MISS", 215) return false end end end -------------------------------------------------- local valor = value if multiplier > 2 then multiplier = 2.5 elseif multiplier == 0.25 then multiplier = 0.5 end -------------------------------------------------- --damageCombat ~= COMBAT_PHYSICALDAMAGE and not getCreatureCondition(cid, CONDITION_PARALYZE) if miss > 0 and math.random(1, 100) <= miss and not isInArray(ignoremiss, combat) then if isInArray(tooBad, getCreatureName(cid)) and getCreatureTarget(attacker) == cid then doSendMagicEffect(getThingPos(cid), 211) doSendAnimatedText(getThingPos(cid), "Too Bad", 215) doTeleportThing(cid, getClosestFreeTile(cid, getThingPos(attacker)), false) doSendMagicEffect(getThingPos(cid), 211) doFaceCreature(cid, getThingPos(attacker)) --ver aki end 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 local randomRange = math.random(83, 117) / 100 local block = 1 if not isPlayer(cid) then 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 if isInArray(Foresight, getCreatureName(attacker)) then --passiva Foresight!! valor = valor / 2 end if isInArray(counter, getCreatureName(cid)) then if (math.random(1, 100) <= 10) then --% chance do poke dar counter -> 10 = 10% chance doSendAnimatedText(getThingPos(cid), "COUNTER", 215) doTargetCombatHealth(cid, attacker, COMBAT_PHYSICALDAMAGE, valor, valor, 3) doSendMagicEffect(getThingPos(cid), 3) return false end end else block = 1 - (getDefense(cid) / (getSpecialAttack(attacker) + getDefense(cid))) if block <= 0 then doSendMagicEffect(getThingPos(cid), 247) end valor = valor * block * generalSpecialAttackReduction if isSummon(cid) then valor = valor * summonSpecialDamageReduction - getPokemonLevel(cid) / 2 end 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), 3) 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 --NIGHTMAREDAMAGE --GUILLOTINEDAMAGE --SEISMICTOSSDAMAGE --PSYCHOSHIFTDAMAGE --THUNDERWAVEDAMAGE if valor >= getCreatureHealth(cid) then if isInArray(cannotKill, combat) and isPlayer(cid) then valor = getCreatureHealth(cid) - 1 else valor = getCreatureHealth(cid) end 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(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 ------------------------------------POTIONS------------------------------------------- if isSummon(cid) and type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(cid, 173) >= 1 then if damageCombat ~= BURNEDDAMAGE and damageCombat ~= POISONEDDAMAGE then setPlayerStorageValue(cid, 174, 1) doSendAnimatedText(getThingPos(cid), "Lost Heal", 144) end end end ----------------------------------------PASSIVAS----------------------------------------- ------------------------------"Counter Helix" - "Giro Ball"------------------------------ -- [outfit normal] = {out = outfit girando, efeitos} local OutFit = { [366] = {out = 496, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --scyther [912] = {out = 918, cima = 236, direita = 232, esquerda = 224, baixo = 233}, --Scizor [1317] = {out = 849, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --Shiny Scyther [952] = {out = 1193, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --Hitmontop [909] = {out = 1194, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --pineco [910] = {out = 1192, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --Forretress } local helix = {"Scyther", "Scizor", "Shiny Scyther", "Hitmontop", "Pineco", "Forretress"} if isSummon(cid) then if OutFit[getCreatureOutfit(cid).lookType] or getCreatureOutfit(cid).lookType == 0 then local chance = getCreatureName(cid) == "Hitmontop" and (16 + getPlayerStorageValue(cid, 465987)) or 15 if math.random(1, 100) <= chance 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 if not isInArray(helix, getCreatureName(cid)) then return false end local outfitt = OutFit[getCreatureOutfit(cid).lookType] or OutFit[getPlayerStorageValue(cid, 98654)] local look = getCreatureOutfit(cid).lookType local min = getPokemonLevel(cid)*5 local max = getPokemonLevel(cid)*10 local function damage(cid, min, max) if isCreature(cid) then if look == 366 or look == 1317 then --scyther e shiny scyther doAreaCombatHealth(cid, BUGDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, CONST_ME_NONE) elseif look == 952 then --hitmontop doAreaCombatHealth(cid, FIGHTINGDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, CONST_ME_NONE) else --resto doAreaCombatHealth(cid, STEELDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, CONST_ME_NONE) end doAreaCombatHealth(cid, null, getThingPos(cid), scythe1, 0, 0, outfitt.cima) --cima doAreaCombatHealth(cid, null, getThingPos(cid), scythe2, 0, 0, outfitt.baixo) --baixo doAreaCombatHealth(cid, null, getThingPos(cid), scythe3, 0, 0, outfitt.direita) --direita doAreaCombatHealth(cid, null, getThingPos(cid), scythe4, 0, 0, outfitt.esquerda) --esquerda end end setPlayerStorageValue(cid, 32623, 1) --proteçao doSetCreatureOutfit(cid, {lookType = outfitt.out}, -1) local function doChangeO(cid) if not isCreature(cid) then return true end setPlayerStorageValue(cid, 32623, 0) --proteçao if isSleeping(cid) and getMonsterInfo(getCreatureName(cid)).lookCorpse ~= 0 then doSetCreatureOutfit(cid, {lookType = 0, lookTypeEx = getMonsterInfo(getCreatureName(cid)).lookCorpse}, -1) else doRemoveCondition(cid, CONDITION_OUTFIT) end end local delay = 200 -- não mexe for i = 1, 2 do addEvent(damage, delay*i, cid, min, max) end addEvent(doChangeO, 2 * 300 + 10, cid) end end end -------------------------------------------Lava Counter / Electricity------------------------------------- local Fire_Thunder = {"Magmar", "Shiny Magmar", "Electabuzz", "Shiny Electabuzz", "Magby", "Elekid"} --["Nome"] = {effeito, damage} local eff = { ["Magmar"] = {15, FIREDAMAGE}, ["Shiny Magmar"] = {15, FIREDAMAGE}, ["Magby"] = {15, FIREDAMAGE}, ["Electabuzz"] = {207, ELECTRICDAMAGE}, ["Shiny Electabuzz"] = {207, ELECTRICDAMAGE}, ["Elekid"] = {207, ELECTRICDAMAGE}, } if isSummon(cid) then local e = getCreatureMaster(cid) if isInArray(Fire_Thunder, getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke")) then if math.random(1, 100) <= 20 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 = getPokemonLevel(cid)*5 local max = getPokemonLevel(cid)*10 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 addEvent(setPlayerStorageValue, 17*140, cid, 32623, 0) --proteçao end setPlayerStorageValue(cid, 32623, 1) --proteçao doSpinFire(cid) end end end ---------------------------------------------Demon Kicker---------------------------------- --[outfit] = outfit chutando, local hitmonlees = { [371] = 652, --hitmonlee [877] = 878, --shiny hitmonlee PxG [11891] = 652, --hitmonlee durmindo } --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 local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Shiny Hitmonlee" or name == "Hitmonlee" then if isCreature(getMasterTarget(cid)) then if math.random(1, 100) <= (21 + getPlayerStorageValue(cid, 465987)) then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- if getDistanceBetween(getThingPos(cid), getThingPos(getMasterTarget(cid))) > 1 then return false end 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 if isSleeping(cid) and getMonsterInfo(getCreatureName(cid)).lookCorpse ~= 0 then doSetCreatureOutfit(cid, {lookType = 0, lookTypeEx = getMonsterInfo(getCreatureName(cid)).lookCorpse}, -1) else doRemoveCondition(cid, CONDITION_OUTFIT) end end local min = getOffense(cid)*1.1 --getPokemonLevel(cid)*15 local max = getOffense(cid)*1.2 --getPokemonLevel(cid)*20 setPlayerStorageValue(cid, 32623, 1) --proteçao --arrumar isso!!! if isSleeping(cid) and getMonsterInfo(getCreatureName(cid)).lookCorpse ~= 0 then doSetCreatureOutfit(cid, {lookType = hitmonlees[getCreatureOutfit(cid).lookTypeEx]}, -1) else doSetCreatureOutfit(cid, {lookType = hitmonlees[getCreatureOutfit(cid).lookType]}, -1) end doTargetCombatHealth(cid, getMasterTarget(cid), FIGHTINGDAMAGE, -min, -max, 255) addEvent(doChangeHitmon, 700, cid) end end end end -------------------------------------------Demon Puncher------------------------------------- local hitmonchans = { ["Hitmonchan"] = { [0] = {out = 559, eff = 112, type = FIGHTINGDAMAGE}, --outfit normal [1] = {out = 1075, eff = 35, type = FIREDAMAGE}, --outfit fogo [2] = {out = 1077, eff = 48, type = ELECTRICDAMAGE}, --outfit raio [3] = {out = 1078, eff = 43, type = ICEDAMAGE}, --outfit gelo [4] = {out = 1076, eff = 140, type = GHOSTDAMAGE} --outfit ghost }, ["Shiny Hitmonchan"] = { --aconcelho trocar a outfit do shiny hitmonchan pela do elite hitmonchan do PO... [0] = {out = 837, eff = 112, type = FIGHTINGDAMAGE}, --outfit normal [1] = {out = 1080, eff = 35, type = FIREDAMAGE}, --outfit fogo [2] = {out = 1081, eff = 48, type = ELECTRICDAMAGE}, --outfit raio [3] = {out = 1082, eff = 43, type = ICEDAMAGE}, --outfit gelo [4] = {out = 1079, eff = 140, type = GHOSTDAMAGE} --outfit ghost } } local monchanOUT = {837, 1080, 1081, 1082, 1079} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Shiny Hitmonchan" or name == "Hitmonchan" then if isCreature(getMasterTarget(cid)) then if math.random(1, 100) <= (21 + getPlayerStorageValue(cid, 465987)) then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- if getDistanceBetween(getThingPos(cid), getThingPos(getMasterTarget(cid))) > 1 then return false end if getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") == "Shiny Hitmonchan" and not isInArray(monchanOUT, getCreatureOutfit(cid).lookType) then return false --proteçao pro script n funcionar com o shiny monchan com outfit diferente da do elite... end --script soh funciona com outfit do elite hirmonchan do PO... local min = getOffense(cid)*1.1 --getPokemonLevel(cid)*15 local max = getOffense(cid)*1.2 --getPokemonLevel(cid)*20 local hands = getItemAttribute(getPlayerSlotItem(e, 8).uid, "hands") doSendDistanceShoot(getThingPos(cid), getThingPos(getMasterTarget(cid)), 39) doTargetCombatHealth(cid, getMasterTarget(cid), hitmonchans[name][hands].type, -min, -max, 255) local target = getThingPos(getMasterTarget(cid)) target.x = target.x + 1 if hands == 4 then doSendMagicEffect(target, hitmonchans[name][hands].eff) else doSendMagicEffect(getThingPos(getMasterTarget(cid)), hitmonchans[name][hands].eff) end end end end end ---------------------------------------Stunning Confusion------------------------------------------ local ducks = {"Golduck", "Psyduck", "Shiny Golduck", "Shiny Psyduck"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(ducks, name) then if math.random(1, 100) <= 20 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 = getPokemonLevel(cid)*5 --nao sei como funciona o sistema de dano... local max = getPokemonLevel(cid)*10 --nao sei como funciona o sistema de dano... local function damage(cid) if isCreature(cid) then doAreaCombatHealth(cid, PSYCHICDAMAGE, getThingPosWithDebug(cid), confusion, -min, -max, 136) end end setPlayerStorageValue(cid, 32623, 1) --proteçao for i = 1, 7 do addEvent(damage, i*500, cid) end addEvent(setPlayerStorageValue, 3500, cid, 32623, 0) --proteçao end end end -----------------------------------------Groundshock----------------------------------- if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Kangaskhan" or name == "Shiny Kangaskhan" then if math.random(1, 100) <= 20 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- local min = getPokemonLevel(cid)*10 --nao sei como funciona o sistema de dano... local max = getPokemonLevel(cid)*15 --nao sei como funciona o sistema de dano... doAreaCombatHealth(cid, NORMALDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, 255) local sps = getThingPosWithDebug(cid) sps.x = sps.x+1 sps.y = sps.y+1 doSendMagicEffect(sps, 127) end end end --------------------------------------Electric Charge--------------------------------------------------- local charge = {"Pikachu", "Shiny Pikachu", "Raichu", "Shiny Raichu"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(charge, name) then if getPlayerStorageValue(cid, 253) >= 0 then return true end if math.random(1, 100) <= 15 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- setPlayerStorageValue(cid, 253, 1) doSendMagicEffect(getThingPos(cid), 207) doSendAnimatedText(getThingPos(cid), "FOCUS", 144) end end end -------------------------------------Melody------------------------------------ if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Wigglytuff" or name == "Shiny Wigglytuff" then if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- doAreaCombatHealth(cid, SLEEP_POWDERDAMAGE, getThingPosWithDebug(cid), powders, -6, -10, 33) end end end ------------------------------------- Dragon Fury / Fury --------------------------------------- local DracoFury = {"Persian", "Shiny Persian", "Gyarados", "Shiny Gyarados", "Dratini", "Shiny Dratini", "Dragonair", "Shiny Dragonair", "Dragonite", "Shiny Dragonite"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(DracoFury, name) then if math.random(1, 100) <= 10 then --Chance 10 = 10% edite como quiser... if getPlayerStorageValue(cid, 32623) == 1 then return false end setPlayerStorageValue(cid, 32623, 1) if getCreatureName(cid) == "Persian" or getCreatureName(cid) == "Shiny Persian" then doRaiseStatus(cid, true, false, false, 2, 15000) else doRaiseStatus(cid, true, true, false, 2, 15000) end for t = 1, 10 do addEvent(sendMoveEffect, t*1500, cid, 12) end addEvent(setPlayerStorageValue, 15000, cid, 32623, 0) end end end ------------------------------------- Mega Drain --------------------------------------- arr = { {0, 0, 0, 0, 0}, {0, 1, 1, 1, 0}, {0, 1, 2, 1, 0}, {0, 1, 1, 1, 0}, {0, 0, 0, 0, 0} } local mega = {"Oddish", "Gloom", "Vileplume", "Kabuto", "Kabutops", "Parasect", "Tangela", "Shiny Oddish", "Shiny Gloom", "Shiny Vileplume", "Shiny Kabuto", "Shiny Kabutops", "Shiny Parasect", "Shiny Tangela"} local min = getPokemonLevel(cid)*3 --nao sei como funciona o sistema de dano... local max = getPokemonLevel(cid)*5 --nao sei como funciona o sistema de dano... if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(mega, name) then if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 20 = 20% local uid = checkAreaUid(getThingPos(cid), arr, 1, 1) for _,pid in pairs(uid) do if (isMonster(pid) or (isSummon(pid) and canAttackOther(cid, pid)) == "Can" or (isPlayer(pid) and #getCreatureSummons(pid) <= 0)) then if getCreatureTarget(pid) == cid then local hp = getCreatureHealth(pid) local drain = choose(min, max) if hp-drain >= 1 then doCreatureAddHealth(pid, -drain) doCreatureAddHealth(cid, drain) doSendAnimatedText(getThingPos(pid), "-"..drain.."", 144) doSendAnimatedText(getThingPos(cid), "+"..drain.."", 32) end end end end end end end ------------------------------------- Spores Reaction --------------------------------------- local spores = {"Oddish", "Gloom", "Vileplume", "Shiny Oddish", "Shiny Gloom", "Shiny Vileplume"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(spores, name) then if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 20 = 20% +/- doAreaCombatHealth(cid, SLEEP_POWDERDAMAGE, getThingPosWithDebug(cid), powders, -2, -3, 27) end end end return false end Link para o comentário Compartilhar em outros sites More sharing options...
Session Start 125 Postado Maio 30, 2012 Share Postado Maio 30, 2012 local combats = { [PSYCHICDAMAGE] = {cor = COLOR_PSYCHIC}, [GRASSDAMAGE] = {cor = COLOR_GRASS}, [POISONEDDAMAGE] = {cor = COLOR_GRASS}, [MORTALGASDAMAGE] = {cor = COLOR_POISON}, [FIREDAMAGE] = {cor = COLOR_FIRE2}, --COMPLETAMENTE EDITED [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 Foresight = {"Machamp", "Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Machamp"} --passiva Foresight!! local counter = {"Machamp", "Machoke", "Hitmonchan", "Hitmonlee", "Magmar", "Electabuzz", "Scyther", "Snorlax", "Kangaskhan", "Arcanine", "Shiny Kangaskhan", "Shiny Arcanine", "Shiny Snorlax", "Shiny Scyther", "Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Machamp", "Shiny Machoke", "Shiny Magmar", "Shiny Electabuzz"} local tooBad = {"Scyther", "Scizor", "Hitmonlee", "Hitmonchan", "Hitmontop", "Tyrogue", "Shiny Scyther", "Shiny Hitmonchan", "Shiny Hitmonlee"} 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", "Poliwrath"}, ["Gloom"] = {"Vileplume", "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 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 = 10 ---(getSpeed(cid) - getSpeed(attacker)) * 0.26 --if pokes[getCreatureName(cid)] then poketype1 = pokes[getCreatureName(cid)].type poketype2 = pokes[getCreatureName(cid)].type2 --end 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 if not isInArray(Foresight, getCreatureName(attacker)) then --passiva Foresight!! doSendMagicEffect(getThingPos(cid), 3) return false end end if isCreature(attacker) and isCreature(cid) then if not isCreature(getMasterTarget(attacker)) then doSendMagicEffect(getThingPos(cid), 247) return false end end if getCreatureCondition(attacker, CONDITION_INVISIBLE) and not isGhostPokemon(attacker) then local tabela = {"Clefable", "Wigglytuff", "Alakazam", "Kadabra", "Mr. Mime", "Porygon", "Shiny Alakazam", "Shiny Porygon", "Shiny Kadabra", "Shiny Mr. Mime", "Shiny Clefable", "Shiny Wigglytuff"} if not isInArray(tabela, getCreatureName(attacker)) then return false --editei end end local cd = getPlayerStorageValue(attacker, 32659) local cd2 = getPlayerStorageValue(attacker, 3891) if cd > 0 or cd2 > 0 then if math.random(1, 100) > 50 then --50% chance de da miss no atk fisico doSendMagicEffect(getThingPos(cid), 211) doSendAnimatedText(getThingPos(cid), "MISS", 215) return false end end end -------------------------------------------------- local valor = value if multiplier > 2 then multiplier = 2.5 elseif multiplier == 0.25 then multiplier = 0.5 end -------------------------------------------------- --damageCombat ~= COMBAT_PHYSICALDAMAGE and not getCreatureCondition(cid, CONDITION_PARALYZE) if miss > 0 and math.random(1, 100) <= miss and not isInArray(ignoremiss, combat) then if isInArray(tooBad, getCreatureName(cid)) and getCreatureTarget(attacker) == cid then doSendMagicEffect(getThingPos(cid), 211) doSendAnimatedText(getThingPos(cid), "Too Bad", 215) doTeleportThing(cid, getClosestFreeTile(cid, getThingPos(attacker)), false) doSendMagicEffect(getThingPos(cid), 211) doFaceCreature(cid, getThingPos(attacker)) --ver aki end 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 local randomRange = math.random(83, 117) / 100 local block = 1 if not isPlayer(cid) then 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 if isInArray(Foresight, getCreatureName(attacker)) then --passiva Foresight!! valor = valor / 2 end if isInArray(counter, getCreatureName(cid)) then if (math.random(1, 100) <= 10) then --% chance do poke dar counter -> 10 = 10% chance doSendAnimatedText(getThingPos(cid), "COUNTER", 215) doTargetCombatHealth(cid, attacker, COMBAT_PHYSICALDAMAGE, valor, valor, 3) doSendMagicEffect(getThingPos(cid), 3) return false end end else block = 1 - (getDefense(cid) / (getSpecialAttack(attacker) + getDefense(cid))) if block <= 0 then doSendMagicEffect(getThingPos(cid), 247) end valor = valor * block * generalSpecialAttackReduction if isSummon(cid) then valor = valor * summonSpecialDamageReduction - getPokemonLevel(cid) / 2 end 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), 3) 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 --NIGHTMAREDAMAGE --GUILLOTINEDAMAGE --SEISMICTOSSDAMAGE --PSYCHOSHIFTDAMAGE --THUNDERWAVEDAMAGE if valor >= getCreatureHealth(cid) then if isInArray(cannotKill, combat) and isPlayer(cid) then valor = getCreatureHealth(cid) - 1 else valor = getCreatureHealth(cid) end 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(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 ------------------------------------POTIONS------------------------------------------- if isSummon(cid) and type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(cid, 173) >= 1 then if damageCombat ~= BURNEDDAMAGE and damageCombat ~= POISONEDDAMAGE then setPlayerStorageValue(cid, 174, 1) doSendAnimatedText(getThingPos(cid), "Lost Heal", 144) end end end ----------------------------------------PASSIVAS----------------------------------------- ------------------------------"Counter Helix" - "Giro Ball"------------------------------ -- [outfit normal] = {out = outfit girando, efeitos} local OutFit = { [366] = {out = 496, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --scyther [912] = {out = 918, cima = 236, direita = 232, esquerda = 224, baixo = 233}, --Scizor [1317] = {out = 849, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --Shiny Scyther [952] = {out = 1193, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --Hitmontop [909] = {out = 1194, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --pineco [910] = {out = 1192, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --Forretress } local helix = {"Scyther", "Scizor", "Shiny Scyther", "Hitmontop", "Pineco", "Forretress"} if isSummon(cid) then if OutFit[getCreatureOutfit(cid).lookType] or getCreatureOutfit(cid).lookType == 0 then local chance = getCreatureName(cid) == "Hitmontop" and (16 + getPlayerStorageValue(cid, 465987)) or 15 if math.random(1, 100) <= chance 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 if not isInArray(helix, getCreatureName(cid)) then return false end local outfitt = OutFit[getCreatureOutfit(cid).lookType] or OutFit[getPlayerStorageValue(cid, 98654)] local look = getCreatureOutfit(cid).lookType local min = getPokemonLevel(cid)*5 local max = getPokemonLevel(cid)*10 local function damage(cid, min, max) if isCreature(cid) then if look == 366 or look == 1317 then --scyther e shiny scyther doAreaCombatHealth(cid, BUGDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, CONST_ME_NONE) elseif look == 952 then --hitmontop doAreaCombatHealth(cid, FIGHTINGDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, CONST_ME_NONE) else --resto doAreaCombatHealth(cid, STEELDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, CONST_ME_NONE) end doAreaCombatHealth(cid, null, getThingPos(cid), scythe1, 0, 0, outfitt.cima) --cima doAreaCombatHealth(cid, null, getThingPos(cid), scythe2, 0, 0, outfitt.baixo) --baixo doAreaCombatHealth(cid, null, getThingPos(cid), scythe3, 0, 0, outfitt.direita) --direita doAreaCombatHealth(cid, null, getThingPos(cid), scythe4, 0, 0, outfitt.esquerda) --esquerda end end setPlayerStorageValue(cid, 32623, 1) --proteçao doSetCreatureOutfit(cid, {lookType = outfitt.out}, -1) local function doChangeO(cid) if not isCreature(cid) then return true end setPlayerStorageValue(cid, 32623, 0) --proteçao if isSleeping(cid) and getMonsterInfo(getCreatureName(cid)).lookCorpse ~= 0 then doSetCreatureOutfit(cid, {lookType = 0, lookTypeEx = getMonsterInfo(getCreatureName(cid)).lookCorpse}, -1) else doRemoveCondition(cid, CONDITION_OUTFIT) end end local delay = 200 -- não mexe for i = 1, 2 do addEvent(damage, delay*i, cid, min, max) end addEvent(doChangeO, 2 * 300 + 10, cid) end end end -------------------------------------------Lava Counter / Electricity------------------------------------- local Fire_Thunder = {"Magmar", "Shiny Magmar", "Electabuzz", "Shiny Electabuzz", "Magby", "Elekid"} --["Nome"] = {effeito, damage} local eff = { ["Magmar"] = {15, FIREDAMAGE}, ["Shiny Magmar"] = {15, FIREDAMAGE}, ["Magby"] = {15, FIREDAMAGE}, ["Electabuzz"] = {207, ELECTRICDAMAGE}, ["Shiny Electabuzz"] = {207, ELECTRICDAMAGE}, ["Elekid"] = {207, ELECTRICDAMAGE}, } if isSummon(cid) then local e = getCreatureMaster(cid) if isInArray(Fire_Thunder, getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke")) then if math.random(1, 100) <= 20 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 = getPokemonLevel(cid)*5 local max = getPokemonLevel(cid)*10 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 addEvent(setPlayerStorageValue, 17*140, cid, 32623, 0) --proteçao end setPlayerStorageValue(cid, 32623, 1) --proteçao doSpinFire(cid) end end end ---------------------------------------------Demon Kicker---------------------------------- --[outfit] = outfit chutando, local hitmonlees = { [371] = 652, --hitmonlee [877] = 878, --shiny hitmonlee PxG [11891] = 652, --hitmonlee durmindo } --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 local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Shiny Hitmonlee" or name == "Hitmonlee" then if isCreature(getMasterTarget(cid)) then if math.random(1, 100) <= (21 + getPlayerStorageValue(cid, 465987)) then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- if getDistanceBetween(getThingPos(cid), getThingPos(getMasterTarget(cid))) > 1 then return false end 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 if isSleeping(cid) and getMonsterInfo(getCreatureName(cid)).lookCorpse ~= 0 then doSetCreatureOutfit(cid, {lookType = 0, lookTypeEx = getMonsterInfo(getCreatureName(cid)).lookCorpse}, -1) else doRemoveCondition(cid, CONDITION_OUTFIT) end end local min = getOffense(cid)*1.1 --getPokemonLevel(cid)*15 local max = getOffense(cid)*1.2 --getPokemonLevel(cid)*20 setPlayerStorageValue(cid, 32623, 1) --proteçao --arrumar isso!!! if isSleeping(cid) and getMonsterInfo(getCreatureName(cid)).lookCorpse ~= 0 then doSetCreatureOutfit(cid, {lookType = hitmonlees[getCreatureOutfit(cid).lookTypeEx]}, -1) else doSetCreatureOutfit(cid, {lookType = hitmonlees[getCreatureOutfit(cid).lookType]}, -1) end doTargetCombatHealth(cid, getMasterTarget(cid), FIGHTINGDAMAGE, -min, -max, 255) addEvent(doChangeHitmon, 700, cid) end end end end -------------------------------------------Demon Puncher------------------------------------- local hitmonchans = { ["Hitmonchan"] = { [0] = {out = 559, eff = 112, type = FIGHTINGDAMAGE}, --outfit normal [1] = {out = 1075, eff = 35, type = FIREDAMAGE}, --outfit fogo [2] = {out = 1077, eff = 48, type = ELECTRICDAMAGE}, --outfit raio [3] = {out = 1078, eff = 43, type = ICEDAMAGE}, --outfit gelo [4] = {out = 1076, eff = 140, type = GHOSTDAMAGE} --outfit ghost }, ["Shiny Hitmonchan"] = { --aconcelho trocar a outfit do shiny hitmonchan pela do elite hitmonchan do PO... [0] = {out = 837, eff = 112, type = FIGHTINGDAMAGE}, --outfit normal [1] = {out = 1080, eff = 35, type = FIREDAMAGE}, --outfit fogo [2] = {out = 1081, eff = 48, type = ELECTRICDAMAGE}, --outfit raio [3] = {out = 1082, eff = 43, type = ICEDAMAGE}, --outfit gelo [4] = {out = 1079, eff = 140, type = GHOSTDAMAGE} --outfit ghost } } local monchanOUT = {837, 1080, 1081, 1082, 1079} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Shiny Hitmonchan" or name == "Hitmonchan" then if isCreature(getMasterTarget(cid)) then if math.random(1, 100) <= (21 + getPlayerStorageValue(cid, 465987)) then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- if getDistanceBetween(getThingPos(cid), getThingPos(getMasterTarget(cid))) > 1 then return false end if getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") == "Shiny Hitmonchan" and not isInArray(monchanOUT, getCreatureOutfit(cid).lookType) then return false --proteçao pro script n funcionar com o shiny monchan com outfit diferente da do elite... end --script soh funciona com outfit do elite hirmonchan do PO... local min = getOffense(cid)*1.1 --getPokemonLevel(cid)*15 local max = getOffense(cid)*1.2 --getPokemonLevel(cid)*20 local hands = getItemAttribute(getPlayerSlotItem(e, 8).uid, "hands") doSendDistanceShoot(getThingPos(cid), getThingPos(getMasterTarget(cid)), 39) doTargetCombatHealth(cid, getMasterTarget(cid), hitmonchans[name][hands].type, -min, -max, 255) local target = getThingPos(getMasterTarget(cid)) target.x = target.x + 1 if hands == 4 then doSendMagicEffect(target, hitmonchans[name][hands].eff) else doSendMagicEffect(getThingPos(getMasterTarget(cid)), hitmonchans[name][hands].eff) end end end end end ---------------------------------------Stunning Confusion------------------------------------------ local ducks = {"Golduck", "Psyduck", "Shiny Golduck", "Shiny Psyduck"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(ducks, name) then if math.random(1, 100) <= 20 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 = getPokemonLevel(cid)*5 --nao sei como funciona o sistema de dano... local max = getPokemonLevel(cid)*10 --nao sei como funciona o sistema de dano... local function damage(cid) if isCreature(cid) then doAreaCombatHealth(cid, PSYCHICDAMAGE, getThingPosWithDebug(cid), confusion, -min, -max, 136) end end setPlayerStorageValue(cid, 32623, 1) --proteçao for i = 1, 7 do addEvent(damage, i*500, cid) end addEvent(setPlayerStorageValue, 3500, cid, 32623, 0) --proteçao end end end -----------------------------------------Groundshock----------------------------------- if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Kangaskhan" or name == "Shiny Kangaskhan" then if math.random(1, 100) <= 20 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- local min = getPokemonLevel(cid)*10 --nao sei como funciona o sistema de dano... local max = getPokemonLevel(cid)*15 --nao sei como funciona o sistema de dano... doAreaCombatHealth(cid, NORMALDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, 255) local sps = getThingPosWithDebug(cid) sps.x = sps.x+1 sps.y = sps.y+1 doSendMagicEffect(sps, 127) end end end --------------------------------------Electric Charge--------------------------------------------------- local charge = {"Pikachu", "Shiny Pikachu", "Raichu", "Shiny Raichu"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(charge, name) then if getPlayerStorageValue(cid, 253) >= 0 then return true end if math.random(1, 100) <= 15 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- setPlayerStorageValue(cid, 253, 1) doSendMagicEffect(getThingPos(cid), 207) doSendAnimatedText(getThingPos(cid), "FOCUS", 144) end end end -------------------------------------Melody------------------------------------ if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Wigglytuff" or name == "Shiny Wigglytuff" then if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- doAreaCombatHealth(cid, SLEEP_POWDERDAMAGE, getThingPosWithDebug(cid), powders, -6, -10, 33) end end end ------------------------------------- Dragon Fury / Fury --------------------------------------- local DracoFury = {"Persian", "Shiny Persian", "Gyarados", "Shiny Gyarados", "Dratini", "Shiny Dratini", "Dragonair", "Shiny Dragonair", "Dragonite", "Shiny Dragonite"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(DracoFury, name) then if math.random(1, 100) <= 10 then --Chance 10 = 10% edite como quiser... if getPlayerStorageValue(cid, 32623) == 1 then return false end setPlayerStorageValue(cid, 32623, 1) if getCreatureName(cid) == "Persian" or getCreatureName(cid) == "Shiny Persian" then doRaiseStatus(cid, true, false, false, 2, 15000) else doRaiseStatus(cid, true, true, false, 2, 15000) end for t = 1, 10 do addEvent(sendMoveEffect, t*1500, cid, 12) end addEvent(setPlayerStorageValue, 15000, cid, 32623, 0) end end end ------------------------------------- Mega Drain --------------------------------------- arr = { {0, 0, 0, 0, 0}, {0, 1, 1, 1, 0}, {0, 1, 2, 1, 0}, {0, 1, 1, 1, 0}, {0, 0, 0, 0, 0} } local mega = {"Oddish", "Gloom", "Vileplume", "Kabuto", "Kabutops", "Parasect", "Tangela", "Shiny Oddish", "Shiny Gloom", "Shiny Vileplume", "Shiny Kabuto", "Shiny Kabutops", "Shiny Parasect", "Shiny Tangela"} local min = getPokemonLevel(cid)*3 --nao sei como funciona o sistema de dano... local max = getPokemonLevel(cid)*5 --nao sei como funciona o sistema de dano... if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(mega, name) then if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 20 = 20% local uid = checkAreaUid(getThingPos(cid), arr, 1, 1) for _,pid in pairs(uid) do if (isMonster(pid) or (isSummon(pid) and canAttackOther(cid, pid)) == "Can" or (isPlayer(pid) and #getCreatureSummons(pid) <= 0)) then if getCreatureTarget(pid) == cid then local hp = getCreatureHealth(pid) local drain = choose(min, max) if hp-drain >= 1 then doCreatureAddHealth(pid, -drain) doCreatureAddHealth(cid, drain) doSendAnimatedText(getThingPos(pid), "-"..drain.."", 144) doSendAnimatedText(getThingPos(cid), "+"..drain.."", 32) end end end end end end end ------------------------------------- Spores Reaction --------------------------------------- local spores = {"Oddish", "Gloom", "Vileplume", "Shiny Oddish", "Shiny Gloom", "Shiny Vileplume"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(spores, name) then if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 20 = 20% +/- doAreaCombatHealth(cid, SLEEP_POWDERDAMAGE, getThingPosWithDebug(cid), powders, -2, -3, 27) end end end return false end Tenta ai e diz oq apareceu.. e_e nao garanto nada hein =[ Link para o comentário Compartilhar em outros sites More sharing options...
zesy 6 Postado Maio 30, 2012 Share Postado Maio 30, 2012 Ahh, cara, não era isso, mais diboua... Valeu pera intenção man... esse ai tava certo, só quando eu coloco o script do Zeref q da o erro... Link para o comentário Compartilhar em outros sites More sharing options...
Session Start 125 Postado Maio 30, 2012 Share Postado Maio 30, 2012 (editado) Ahh, cara, não era isso, mais diboua... Valeu pera intenção man... esse ai tava certo, só quando eu coloco o script do Zeref q da o erro... e que o erro que vc posto ali emcima era no exp,lua ;s entao nem posta o erro... @ALLL Estou precisando colocar storage no login.lua das vocation mas eu coloco e quando desloga e loga ele volta a pokemon trainer =[ se alguem poder me ajudar envia pm ai plx <3 Editado Maio 30, 2012 por Cleberadm Link para o comentário Compartilhar em outros sites More sharing options...
zesy 6 Postado Maio 30, 2012 Share Postado Maio 30, 2012 (editado) Olha vou posta aqui, o exp.lua com a parte do Zeref pere: local combats = { [PSYCHICDAMAGE] = {cor = COLOR_PSYCHIC}, [GRASSDAMAGE] = {cor = COLOR_GRASS}, [POISONEDDAMAGE] = {cor = COLOR_GRASS}, [MORTALGASDAMAGE] = {cor = COLOR_POISON}, [FIREDAMAGE] = {cor = COLOR_FIRE2}, --COMPLETAMENTE EDITED [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 Foresight = {"Machamp", "Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Machamp"} --passiva Foresight!! local counter = {"Machamp", "Machoke", "Hitmonchan", "Hitmonlee", "Magmar", "Electabuzz", "Scyther", "Snorlax", "Kangaskhan", "Arcanine", "Shiny Kangaskhan", "Shiny Arcanine", "Shiny Snorlax", "Shiny Scyther", "Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Machamp", "Shiny Machoke", "Shiny Magmar", "Shiny Electabuzz"} local tooBad = {"Scyther", "Scizor", "Hitmonlee", "Hitmonchan", "Hitmontop", "Tyrogue", "Shiny Scyther", "Shiny Hitmonchan", "Shiny Hitmonlee"} 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", "Poliwrath"}, ["Gloom"] = {"Vileplume", "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 endif isSummon(cid) and isSummon(attacker) then if not getTileZoneInfo(getCreaturePosition(cid)) == 2 and not getTileZoneInfo(getCreaturePosition(attacker)) == 2 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 doSleep(cid, value, true) return false end 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 = 10 ---(getSpeed(cid) - getSpeed(attacker)) * 0.26 --if pokes[getCreatureName(cid)] then poketype1 = pokes[getCreatureName(cid)].type poketype2 = pokes[getCreatureName(cid)].type2 --end 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 if not isInArray(Foresight, getCreatureName(attacker)) then --passiva Foresight!! doSendMagicEffect(getThingPos(cid), 3) return false end end if isCreature(attacker) and isCreature(cid) then if not isCreature(getMasterTarget(attacker)) then doSendMagicEffect(getThingPos(cid), 247) return false end end if getCreatureCondition(attacker, CONDITION_INVISIBLE) and not isGhostPokemon(attacker) then local tabela = {"Clefable", "Wigglytuff", "Alakazam", "Kadabra", "Mr. Mime", "Porygon", "Shiny Alakazam", "Shiny Porygon", "Shiny Kadabra", "Shiny Mr. Mime", "Shiny Clefable", "Shiny Wigglytuff"} if not isInArray(tabela, getCreatureName(attacker)) then return false --editei end end local cd = getPlayerStorageValue(attacker, 32659) local cd2 = getPlayerStorageValue(attacker, 3891) if cd > 0 or cd2 > 0 then if math.random(1, 100) > 50 then --50% chance de da miss no atk fisico doSendMagicEffect(getThingPos(cid), 211) doSendAnimatedText(getThingPos(cid), "MISS", 215) return false end end end -------------------------------------------------- local valor = value if multiplier > 2 then multiplier = 2.5 elseif multiplier == 0.25 then multiplier = 0.5 end -------------------------------------------------- --damageCombat ~= COMBAT_PHYSICALDAMAGE and not getCreatureCondition(cid, CONDITION_PARALYZE) if miss > 0 and math.random(1, 100) <= miss and not isInArray(ignoremiss, combat) then if isInArray(tooBad, getCreatureName(cid)) and getCreatureTarget(attacker) == cid then doSendMagicEffect(getThingPos(cid), 211) doSendAnimatedText(getThingPos(cid), "Too Bad", 215) doTeleportThing(cid, getClosestFreeTile(cid, getThingPos(attacker)), false) doSendMagicEffect(getThingPos(cid), 211) doFaceCreature(cid, getThingPos(attacker)) --ver aki end 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 local randomRange = math.random(83, 117) / 100 local block = 1 if not isPlayer(cid) then 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 if isInArray(Foresight, getCreatureName(attacker)) then --passiva Foresight!! valor = valor / 2 end if isInArray(counter, getCreatureName(cid)) then if (math.random(1, 100) <= 10) then --% chance do poke dar counter -> 10 = 10% chance doSendAnimatedText(getThingPos(cid), "COUNTER", 215) doTargetCombatHealth(cid, attacker, COMBAT_PHYSICALDAMAGE, valor, valor, 3) doSendMagicEffect(getThingPos(cid), 3) return false end end else block = 1 - (getDefense(cid) / (getSpecialAttack(attacker) + getDefense(cid))) if block <= 0 then doSendMagicEffect(getThingPos(cid), 247) end valor = valor * block * generalSpecialAttackReduction if isSummon(cid) then valor = valor * summonSpecialDamageReduction - getPokemonLevel(cid) / 2 end 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), 3) 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 --NIGHTMAREDAMAGE --GUILLOTINEDAMAGE --SEISMICTOSSDAMAGE --PSYCHOSHIFTDAMAGE --THUNDERWAVEDAMAGE if valor >= getCreatureHealth(cid) then if isInArray(cannotKill, combat) and isPlayer(cid) then valor = getCreatureHealth(cid) - 1 else valor = getCreatureHealth(cid) end 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(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 ------------------------------------POTIONS------------------------------------------- if isSummon(cid) and type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(cid, 173) >= 1 then if damageCombat ~= BURNEDDAMAGE and damageCombat ~= POISONEDDAMAGE then setPlayerStorageValue(cid, 174, 1) doSendAnimatedText(getThingPos(cid), "Lost Heal", 144) end end end ----------------------------------------PASSIVAS----------------------------------------- ------------------------------"Counter Helix" - "Giro Ball"------------------------------ -- [outfit normal] = {out = outfit girando, efeitos} local OutFit = { [366] = {out = 496, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --scyther [912] = {out = 918, cima = 236, direita = 232, esquerda = 224, baixo = 233}, --Scizor [1317] = {out = 849, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --Shiny Scyther [952] = {out = 1193, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --Hitmontop [909] = {out = 1194, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --pineco [910] = {out = 1192, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --Forretress } local helix = {"Scyther", "Scizor", "Shiny Scyther", "Hitmontop", "Pineco", "Forretress"} if isSummon(cid) then if OutFit[getCreatureOutfit(cid).lookType] or getCreatureOutfit(cid).lookType == 0 then local chance = getCreatureName(cid) == "Hitmontop" and (16 + getPlayerStorageValue(cid, 465987)) or 15 if math.random(1, 100) <= chance 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 if not isInArray(helix, getCreatureName(cid)) then return false end local outfitt = OutFit[getCreatureOutfit(cid).lookType] or OutFit[getPlayerStorageValue(cid, 98654)] local look = getCreatureOutfit(cid).lookType local min = getPokemonLevel(cid)*5 local max = getPokemonLevel(cid)*10 local function damage(cid, min, max) if isCreature(cid) then if look == 366 or look == 1317 then --scyther e shiny scyther doAreaCombatHealth(cid, BUGDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, CONST_ME_NONE) elseif look == 952 then --hitmontop doAreaCombatHealth(cid, FIGHTINGDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, CONST_ME_NONE) else --resto doAreaCombatHealth(cid, STEELDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, CONST_ME_NONE) end doAreaCombatHealth(cid, null, getThingPos(cid), scythe1, 0, 0, outfitt.cima) --cima doAreaCombatHealth(cid, null, getThingPos(cid), scythe2, 0, 0, outfitt.baixo) --baixo doAreaCombatHealth(cid, null, getThingPos(cid), scythe3, 0, 0, outfitt.direita) --direita doAreaCombatHealth(cid, null, getThingPos(cid), scythe4, 0, 0, outfitt.esquerda) --esquerda end end setPlayerStorageValue(cid, 32623, 1) --proteçao doSetCreatureOutfit(cid, {lookType = outfitt.out}, -1) local function doChangeO(cid) if not isCreature(cid) then return true end setPlayerStorageValue(cid, 32623, 0) --proteçao if isSleeping(cid) and getMonsterInfo(getCreatureName(cid)).lookCorpse ~= 0 then doSetCreatureOutfit(cid, {lookType = 0, lookTypeEx = getMonsterInfo(getCreatureName(cid)).lookCorpse}, -1) else doRemoveCondition(cid, CONDITION_OUTFIT) end end local delay = 200 -- não mexe for i = 1, 2 do addEvent(damage, delay*i, cid, min, max) end addEvent(doChangeO, 2 * 300 + 10, cid) end end end -------------------------------------------Lava Counter / Electricity------------------------------------- local Fire_Thunder = {"Magmar", "Shiny Magmar", "Electabuzz", "Shiny Electabuzz", "Magby", "Elekid"} --["Nome"] = {effeito, damage} local eff = { ["Magmar"] = {15, FIREDAMAGE}, ["Shiny Magmar"] = {15, FIREDAMAGE}, ["Magby"] = {15, FIREDAMAGE}, ["Electabuzz"] = {207, ELECTRICDAMAGE}, ["Shiny Electabuzz"] = {207, ELECTRICDAMAGE}, ["Elekid"] = {207, ELECTRICDAMAGE}, } if isSummon(cid) then local e = getCreatureMaster(cid) if isInArray(Fire_Thunder, getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke")) then if math.random(1, 100) <= 20 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 = getPokemonLevel(cid)*5 local max = getPokemonLevel(cid)*10 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 addEvent(setPlayerStorageValue, 17*140, cid, 32623, 0) --proteçao end setPlayerStorageValue(cid, 32623, 1) --proteçao doSpinFire(cid) end end end ---------------------------------------------Demon Kicker---------------------------------- --[outfit] = outfit chutando, local hitmonlees = { [371] = 652, --hitmonlee [877] = 878, --shiny hitmonlee PxG [11891] = 652, --hitmonlee durmindo } --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 local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Shiny Hitmonlee" or name == "Hitmonlee" then if isCreature(getMasterTarget(cid)) then if math.random(1, 100) <= (21 + getPlayerStorageValue(cid, 465987)) then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- if getDistanceBetween(getThingPos(cid), getThingPos(getMasterTarget(cid))) > 1 then return false end 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 if isSleeping(cid) and getMonsterInfo(getCreatureName(cid)).lookCorpse ~= 0 then doSetCreatureOutfit(cid, {lookType = 0, lookTypeEx = getMonsterInfo(getCreatureName(cid)).lookCorpse}, -1) else doRemoveCondition(cid, CONDITION_OUTFIT) end end local min = getOffense(cid)*1.1 --getPokemonLevel(cid)*15 local max = getOffense(cid)*1.2 --getPokemonLevel(cid)*20 setPlayerStorageValue(cid, 32623, 1) --proteçao --arrumar isso!!! if isSleeping(cid) and getMonsterInfo(getCreatureName(cid)).lookCorpse ~= 0 then doSetCreatureOutfit(cid, {lookType = hitmonlees[getCreatureOutfit(cid).lookTypeEx]}, -1) else doSetCreatureOutfit(cid, {lookType = hitmonlees[getCreatureOutfit(cid).lookType]}, -1) end doTargetCombatHealth(cid, getMasterTarget(cid), FIGHTINGDAMAGE, -min, -max, 255) addEvent(doChangeHitmon, 700, cid) end end end end -------------------------------------------Demon Puncher------------------------------------- local hitmonchans = { ["Hitmonchan"] = { [0] = {out = 559, eff = 112, type = FIGHTINGDAMAGE}, --outfit normal [1] = {out = 1075, eff = 35, type = FIREDAMAGE}, --outfit fogo [2] = {out = 1077, eff = 48, type = ELECTRICDAMAGE}, --outfit raio [3] = {out = 1078, eff = 43, type = ICEDAMAGE}, --outfit gelo [4] = {out = 1076, eff = 140, type = GHOSTDAMAGE} --outfit ghost }, ["Shiny Hitmonchan"] = { --aconcelho trocar a outfit do shiny hitmonchan pela do elite hitmonchan do PO... [0] = {out = 837, eff = 112, type = FIGHTINGDAMAGE}, --outfit normal [1] = {out = 1080, eff = 35, type = FIREDAMAGE}, --outfit fogo [2] = {out = 1081, eff = 48, type = ELECTRICDAMAGE}, --outfit raio [3] = {out = 1082, eff = 43, type = ICEDAMAGE}, --outfit gelo [4] = {out = 1079, eff = 140, type = GHOSTDAMAGE} --outfit ghost } } local monchanOUT = {837, 1080, 1081, 1082, 1079} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Shiny Hitmonchan" or name == "Hitmonchan" then if isCreature(getMasterTarget(cid)) then if math.random(1, 100) <= (21 + getPlayerStorageValue(cid, 465987)) then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- if getDistanceBetween(getThingPos(cid), getThingPos(getMasterTarget(cid))) > 1 then return false end if getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") == "Shiny Hitmonchan" and not isInArray(monchanOUT, getCreatureOutfit(cid).lookType) then return false --proteçao pro script n funcionar com o shiny monchan com outfit diferente da do elite... end --script soh funciona com outfit do elite hirmonchan do PO... local min = getOffense(cid)*1.1 --getPokemonLevel(cid)*15 local max = getOffense(cid)*1.2 --getPokemonLevel(cid)*20 local hands = getItemAttribute(getPlayerSlotItem(e, 8).uid, "hands") doSendDistanceShoot(getThingPos(cid), getThingPos(getMasterTarget(cid)), 39) doTargetCombatHealth(cid, getMasterTarget(cid), hitmonchans[name][hands].type, -min, -max, 255) local target = getThingPos(getMasterTarget(cid)) target.x = target.x + 1 if hands == 4 then doSendMagicEffect(target, hitmonchans[name][hands].eff) else doSendMagicEffect(getThingPos(getMasterTarget(cid)), hitmonchans[name][hands].eff) end end end end end ---------------------------------------Stunning Confusion------------------------------------------ local ducks = {"Golduck", "Psyduck", "Shiny Golduck", "Shiny Psyduck"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(ducks, name) then if math.random(1, 100) <= 20 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 = getPokemonLevel(cid)*5 --nao sei como funciona o sistema de dano... local max = getPokemonLevel(cid)*10 --nao sei como funciona o sistema de dano... local function damage(cid) if isCreature(cid) then doAreaCombatHealth(cid, PSYCHICDAMAGE, getThingPosWithDebug(cid), confusion, -min, -max, 136) end end setPlayerStorageValue(cid, 32623, 1) --proteçao for i = 1, 7 do addEvent(damage, i*500, cid) end addEvent(setPlayerStorageValue, 3500, cid, 32623, 0) --proteçao end end end -----------------------------------------Groundshock----------------------------------- if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Kangaskhan" or name == "Shiny Kangaskhan" then if math.random(1, 100) <= 20 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- local min = getPokemonLevel(cid)*10 --nao sei como funciona o sistema de dano... local max = getPokemonLevel(cid)*15 --nao sei como funciona o sistema de dano... doAreaCombatHealth(cid, NORMALDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, 255) local sps = getThingPosWithDebug(cid) sps.x = sps.x+1 sps.y = sps.y+1 doSendMagicEffect(sps, 127) end end end --------------------------------------Electric Charge--------------------------------------------------- local charge = {"Pikachu", "Shiny Pikachu", "Raichu", "Shiny Raichu"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(charge, name) then if getPlayerStorageValue(cid, 253) >= 0 then return true end if math.random(1, 100) <= 15 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- setPlayerStorageValue(cid, 253, 1) doSendMagicEffect(getThingPos(cid), 207) doSendAnimatedText(getThingPos(cid), "FOCUS", 144) end end end -------------------------------------Melody------------------------------------ if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Wigglytuff" or name == "Shiny Wigglytuff" then if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- doAreaCombatHealth(cid, SLEEP_POWDERDAMAGE, getThingPosWithDebug(cid), powders, -6, -10, 33) end end end ------------------------------------- Dragon Fury / Fury --------------------------------------- local DracoFury = {"Persian", "Shiny Persian", "Gyarados", "Shiny Gyarados", "Dratini", "Shiny Dratini", "Dragonair", "Shiny Dragonair", "Dragonite", "Shiny Dragonite"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(DracoFury, name) then if math.random(1, 100) <= 10 then --Chance 10 = 10% edite como quiser... if getPlayerStorageValue(cid, 32623) == 1 then return false end setPlayerStorageValue(cid, 32623, 1) if getCreatureName(cid) == "Persian" or getCreatureName(cid) == "Shiny Persian" then doRaiseStatus(cid, true, false, false, 2, 15000) else doRaiseStatus(cid, true, true, false, 2, 15000) end for t = 1, 10 do addEvent(sendMoveEffect, t*1500, cid, 12) end addEvent(setPlayerStorageValue, 15000, cid, 32623, 0) end end end ------------------------------------- Mega Drain --------------------------------------- arr = { {0, 0, 0, 0, 0}, {0, 1, 1, 1, 0}, {0, 1, 2, 1, 0}, {0, 1, 1, 1, 0}, {0, 0, 0, 0, 0} } local mega = {"Oddish", "Gloom", "Vileplume", "Kabuto", "Kabutops", "Parasect", "Tangela", "Shiny Oddish", "Shiny Gloom", "Shiny Vileplume", "Shiny Kabuto", "Shiny Kabutops", "Shiny Parasect", "Shiny Tangela"} local min = getPokemonLevel(cid)*3 --nao sei como funciona o sistema de dano... local max = getPokemonLevel(cid)*5 --nao sei como funciona o sistema de dano... if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(mega, name) then if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 20 = 20% local uid = checkAreaUid(getThingPos(cid), arr, 1, 1) for _,pid in pairs(uid) do if (isMonster(pid) or (isSummon(pid) and canAttackOther(cid, pid)) == "Can" or (isPlayer(pid) and #getCreatureSummons(pid) <= 0)) then if getCreatureTarget(pid) == cid then local hp = getCreatureHealth(pid) local drain = choose(min, max) if hp-drain >= 1 then doCreatureAddHealth(pid, -drain) doCreatureAddHealth(cid, drain) doSendAnimatedText(getThingPos(pid), "-"..drain.."", 144) doSendAnimatedText(getThingPos(cid), "+"..drain.."", 32) end end end end end end end ------------------------------------- Spores Reaction --------------------------------------- local spores = {"Oddish", "Gloom", "Vileplume", "Shiny Oddish", "Shiny Gloom", "Shiny Vileplume"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(spores, name) then if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 20 = 20% +/- doAreaCombatHealth(cid, SLEEP_POWDERDAMAGE, getThingPosWithDebug(cid), powders, -2, -3, 27) end end end return false end Tá ai man, com esse script dá akele erro... {Saindo} Editado Maio 30, 2012 por ZeSy Link para o comentário Compartilhar em outros sites More sharing options...
Session Start 125 Postado Maio 30, 2012 Share Postado Maio 30, 2012 Olha vou posta aqui, o exp.lua com a parte do Zeref pere: local combats = { [PSYCHICDAMAGE] = {cor = COLOR_PSYCHIC}, [GRASSDAMAGE] = {cor = COLOR_GRASS}, [POISONEDDAMAGE] = {cor = COLOR_GRASS}, [MORTALGASDAMAGE] = {cor = COLOR_POISON}, [FIREDAMAGE] = {cor = COLOR_FIRE2}, --COMPLETAMENTE EDITED [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 Foresight = {"Machamp", "Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Machamp"} --passiva Foresight!! local counter = {"Machamp", "Machoke", "Hitmonchan", "Hitmonlee", "Magmar", "Electabuzz", "Scyther", "Snorlax", "Kangaskhan", "Arcanine", "Shiny Kangaskhan", "Shiny Arcanine", "Shiny Snorlax", "Shiny Scyther", "Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Machamp", "Shiny Machoke", "Shiny Magmar", "Shiny Electabuzz"} local tooBad = {"Scyther", "Scizor", "Hitmonlee", "Hitmonchan", "Hitmontop", "Tyrogue", "Shiny Scyther", "Shiny Hitmonchan", "Shiny Hitmonlee"} 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", "Poliwrath"}, ["Gloom"] = {"Vileplume", "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 endif isSummon(cid) and isSummon(attacker) then if not getTileZoneInfo(getCreaturePosition(cid)) == 2 and not getTileZoneInfo(getCreaturePosition(attacker)) == 2 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 doSleep(cid, value, true) return false end 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 = 10 ---(getSpeed(cid) - getSpeed(attacker)) * 0.26 --if pokes[getCreatureName(cid)] then poketype1 = pokes[getCreatureName(cid)].type poketype2 = pokes[getCreatureName(cid)].type2 --end 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 if not isInArray(Foresight, getCreatureName(attacker)) then --passiva Foresight!! doSendMagicEffect(getThingPos(cid), 3) return false end end if isCreature(attacker) and isCreature(cid) then if not isCreature(getMasterTarget(attacker)) then doSendMagicEffect(getThingPos(cid), 247) return false end end if getCreatureCondition(attacker, CONDITION_INVISIBLE) and not isGhostPokemon(attacker) then local tabela = {"Clefable", "Wigglytuff", "Alakazam", "Kadabra", "Mr. Mime", "Porygon", "Shiny Alakazam", "Shiny Porygon", "Shiny Kadabra", "Shiny Mr. Mime", "Shiny Clefable", "Shiny Wigglytuff"} if not isInArray(tabela, getCreatureName(attacker)) then return false --editei end end local cd = getPlayerStorageValue(attacker, 32659) local cd2 = getPlayerStorageValue(attacker, 3891) if cd > 0 or cd2 > 0 then if math.random(1, 100) > 50 then --50% chance de da miss no atk fisico doSendMagicEffect(getThingPos(cid), 211) doSendAnimatedText(getThingPos(cid), "MISS", 215) return false end end end -------------------------------------------------- local valor = value if multiplier > 2 then multiplier = 2.5 elseif multiplier == 0.25 then multiplier = 0.5 end -------------------------------------------------- --damageCombat ~= COMBAT_PHYSICALDAMAGE and not getCreatureCondition(cid, CONDITION_PARALYZE) if miss > 0 and math.random(1, 100) <= miss and not isInArray(ignoremiss, combat) then if isInArray(tooBad, getCreatureName(cid)) and getCreatureTarget(attacker) == cid then doSendMagicEffect(getThingPos(cid), 211) doSendAnimatedText(getThingPos(cid), "Too Bad", 215) doTeleportThing(cid, getClosestFreeTile(cid, getThingPos(attacker)), false) doSendMagicEffect(getThingPos(cid), 211) doFaceCreature(cid, getThingPos(attacker)) --ver aki end 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 local randomRange = math.random(83, 117) / 100 local block = 1 if not isPlayer(cid) then 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 if isInArray(Foresight, getCreatureName(attacker)) then --passiva Foresight!! valor = valor / 2 end if isInArray(counter, getCreatureName(cid)) then if (math.random(1, 100) <= 10) then --% chance do poke dar counter -> 10 = 10% chance doSendAnimatedText(getThingPos(cid), "COUNTER", 215) doTargetCombatHealth(cid, attacker, COMBAT_PHYSICALDAMAGE, valor, valor, 3) doSendMagicEffect(getThingPos(cid), 3) return false end end else block = 1 - (getDefense(cid) / (getSpecialAttack(attacker) + getDefense(cid))) if block <= 0 then doSendMagicEffect(getThingPos(cid), 247) end valor = valor * block * generalSpecialAttackReduction if isSummon(cid) then valor = valor * summonSpecialDamageReduction - getPokemonLevel(cid) / 2 end 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), 3) 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 --NIGHTMAREDAMAGE --GUILLOTINEDAMAGE --SEISMICTOSSDAMAGE --PSYCHOSHIFTDAMAGE --THUNDERWAVEDAMAGE if valor >= getCreatureHealth(cid) then if isInArray(cannotKill, combat) and isPlayer(cid) then valor = getCreatureHealth(cid) - 1 else valor = getCreatureHealth(cid) end 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(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 ------------------------------------POTIONS------------------------------------------- if isSummon(cid) and type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(cid, 173) >= 1 then if damageCombat ~= BURNEDDAMAGE and damageCombat ~= POISONEDDAMAGE then setPlayerStorageValue(cid, 174, 1) doSendAnimatedText(getThingPos(cid), "Lost Heal", 144) end end end ----------------------------------------PASSIVAS----------------------------------------- ------------------------------"Counter Helix" - "Giro Ball"------------------------------ -- [outfit normal] = {out = outfit girando, efeitos} local OutFit = { [366] = {out = 496, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --scyther [912] = {out = 918, cima = 236, direita = 232, esquerda = 224, baixo = 233}, --Scizor [1317] = {out = 849, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --Shiny Scyther [952] = {out = 1193, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --Hitmontop [909] = {out = 1194, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --pineco [910] = {out = 1192, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --Forretress } local helix = {"Scyther", "Scizor", "Shiny Scyther", "Hitmontop", "Pineco", "Forretress"} if isSummon(cid) then if OutFit[getCreatureOutfit(cid).lookType] or getCreatureOutfit(cid).lookType == 0 then local chance = getCreatureName(cid) == "Hitmontop" and (16 + getPlayerStorageValue(cid, 465987)) or 15 if math.random(1, 100) <= chance 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 if not isInArray(helix, getCreatureName(cid)) then return false end local outfitt = OutFit[getCreatureOutfit(cid).lookType] or OutFit[getPlayerStorageValue(cid, 98654)] local look = getCreatureOutfit(cid).lookType local min = getPokemonLevel(cid)*5 local max = getPokemonLevel(cid)*10 local function damage(cid, min, max) if isCreature(cid) then if look == 366 or look == 1317 then --scyther e shiny scyther doAreaCombatHealth(cid, BUGDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, CONST_ME_NONE) elseif look == 952 then --hitmontop doAreaCombatHealth(cid, FIGHTINGDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, CONST_ME_NONE) else --resto doAreaCombatHealth(cid, STEELDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, CONST_ME_NONE) end doAreaCombatHealth(cid, null, getThingPos(cid), scythe1, 0, 0, outfitt.cima) --cima doAreaCombatHealth(cid, null, getThingPos(cid), scythe2, 0, 0, outfitt.baixo) --baixo doAreaCombatHealth(cid, null, getThingPos(cid), scythe3, 0, 0, outfitt.direita) --direita doAreaCombatHealth(cid, null, getThingPos(cid), scythe4, 0, 0, outfitt.esquerda) --esquerda end end setPlayerStorageValue(cid, 32623, 1) --proteçao doSetCreatureOutfit(cid, {lookType = outfitt.out}, -1) local function doChangeO(cid) if not isCreature(cid) then return true end setPlayerStorageValue(cid, 32623, 0) --proteçao if isSleeping(cid) and getMonsterInfo(getCreatureName(cid)).lookCorpse ~= 0 then doSetCreatureOutfit(cid, {lookType = 0, lookTypeEx = getMonsterInfo(getCreatureName(cid)).lookCorpse}, -1) else doRemoveCondition(cid, CONDITION_OUTFIT) end end local delay = 200 -- não mexe for i = 1, 2 do addEvent(damage, delay*i, cid, min, max) end addEvent(doChangeO, 2 * 300 + 10, cid) end end end -------------------------------------------Lava Counter / Electricity------------------------------------- local Fire_Thunder = {"Magmar", "Shiny Magmar", "Electabuzz", "Shiny Electabuzz", "Magby", "Elekid"} --["Nome"] = {effeito, damage} local eff = { ["Magmar"] = {15, FIREDAMAGE}, ["Shiny Magmar"] = {15, FIREDAMAGE}, ["Magby"] = {15, FIREDAMAGE}, ["Electabuzz"] = {207, ELECTRICDAMAGE}, ["Shiny Electabuzz"] = {207, ELECTRICDAMAGE}, ["Elekid"] = {207, ELECTRICDAMAGE}, } if isSummon(cid) then local e = getCreatureMaster(cid) if isInArray(Fire_Thunder, getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke")) then if math.random(1, 100) <= 20 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 = getPokemonLevel(cid)*5 local max = getPokemonLevel(cid)*10 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 addEvent(setPlayerStorageValue, 17*140, cid, 32623, 0) --proteçao end setPlayerStorageValue(cid, 32623, 1) --proteçao doSpinFire(cid) end end end ---------------------------------------------Demon Kicker---------------------------------- --[outfit] = outfit chutando, local hitmonlees = { [371] = 652, --hitmonlee [877] = 878, --shiny hitmonlee PxG [11891] = 652, --hitmonlee durmindo } --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 local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Shiny Hitmonlee" or name == "Hitmonlee" then if isCreature(getMasterTarget(cid)) then if math.random(1, 100) <= (21 + getPlayerStorageValue(cid, 465987)) then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- if getDistanceBetween(getThingPos(cid), getThingPos(getMasterTarget(cid))) > 1 then return false end 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 if isSleeping(cid) and getMonsterInfo(getCreatureName(cid)).lookCorpse ~= 0 then doSetCreatureOutfit(cid, {lookType = 0, lookTypeEx = getMonsterInfo(getCreatureName(cid)).lookCorpse}, -1) else doRemoveCondition(cid, CONDITION_OUTFIT) end end local min = getOffense(cid)*1.1 --getPokemonLevel(cid)*15 local max = getOffense(cid)*1.2 --getPokemonLevel(cid)*20 setPlayerStorageValue(cid, 32623, 1) --proteçao --arrumar isso!!! if isSleeping(cid) and getMonsterInfo(getCreatureName(cid)).lookCorpse ~= 0 then doSetCreatureOutfit(cid, {lookType = hitmonlees[getCreatureOutfit(cid).lookTypeEx]}, -1) else doSetCreatureOutfit(cid, {lookType = hitmonlees[getCreatureOutfit(cid).lookType]}, -1) end doTargetCombatHealth(cid, getMasterTarget(cid), FIGHTINGDAMAGE, -min, -max, 255) addEvent(doChangeHitmon, 700, cid) end end end end -------------------------------------------Demon Puncher------------------------------------- local hitmonchans = { ["Hitmonchan"] = { [0] = {out = 559, eff = 112, type = FIGHTINGDAMAGE}, --outfit normal [1] = {out = 1075, eff = 35, type = FIREDAMAGE}, --outfit fogo [2] = {out = 1077, eff = 48, type = ELECTRICDAMAGE}, --outfit raio [3] = {out = 1078, eff = 43, type = ICEDAMAGE}, --outfit gelo [4] = {out = 1076, eff = 140, type = GHOSTDAMAGE} --outfit ghost }, ["Shiny Hitmonchan"] = { --aconcelho trocar a outfit do shiny hitmonchan pela do elite hitmonchan do PO... [0] = {out = 837, eff = 112, type = FIGHTINGDAMAGE}, --outfit normal [1] = {out = 1080, eff = 35, type = FIREDAMAGE}, --outfit fogo [2] = {out = 1081, eff = 48, type = ELECTRICDAMAGE}, --outfit raio [3] = {out = 1082, eff = 43, type = ICEDAMAGE}, --outfit gelo [4] = {out = 1079, eff = 140, type = GHOSTDAMAGE} --outfit ghost } } local monchanOUT = {837, 1080, 1081, 1082, 1079} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Shiny Hitmonchan" or name == "Hitmonchan" then if isCreature(getMasterTarget(cid)) then if math.random(1, 100) <= (21 + getPlayerStorageValue(cid, 465987)) then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- if getDistanceBetween(getThingPos(cid), getThingPos(getMasterTarget(cid))) > 1 then return false end if getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") == "Shiny Hitmonchan" and not isInArray(monchanOUT, getCreatureOutfit(cid).lookType) then return false --proteçao pro script n funcionar com o shiny monchan com outfit diferente da do elite... end --script soh funciona com outfit do elite hirmonchan do PO... local min = getOffense(cid)*1.1 --getPokemonLevel(cid)*15 local max = getOffense(cid)*1.2 --getPokemonLevel(cid)*20 local hands = getItemAttribute(getPlayerSlotItem(e, 8).uid, "hands") doSendDistanceShoot(getThingPos(cid), getThingPos(getMasterTarget(cid)), 39) doTargetCombatHealth(cid, getMasterTarget(cid), hitmonchans[name][hands].type, -min, -max, 255) local target = getThingPos(getMasterTarget(cid)) target.x = target.x + 1 if hands == 4 then doSendMagicEffect(target, hitmonchans[name][hands].eff) else doSendMagicEffect(getThingPos(getMasterTarget(cid)), hitmonchans[name][hands].eff) end end end end end ---------------------------------------Stunning Confusion------------------------------------------ local ducks = {"Golduck", "Psyduck", "Shiny Golduck", "Shiny Psyduck"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(ducks, name) then if math.random(1, 100) <= 20 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 = getPokemonLevel(cid)*5 --nao sei como funciona o sistema de dano... local max = getPokemonLevel(cid)*10 --nao sei como funciona o sistema de dano... local function damage(cid) if isCreature(cid) then doAreaCombatHealth(cid, PSYCHICDAMAGE, getThingPosWithDebug(cid), confusion, -min, -max, 136) end end setPlayerStorageValue(cid, 32623, 1) --proteçao for i = 1, 7 do addEvent(damage, i*500, cid) end addEvent(setPlayerStorageValue, 3500, cid, 32623, 0) --proteçao end end end -----------------------------------------Groundshock----------------------------------- if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Kangaskhan" or name == "Shiny Kangaskhan" then if math.random(1, 100) <= 20 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- local min = getPokemonLevel(cid)*10 --nao sei como funciona o sistema de dano... local max = getPokemonLevel(cid)*15 --nao sei como funciona o sistema de dano... doAreaCombatHealth(cid, NORMALDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, 255) local sps = getThingPosWithDebug(cid) sps.x = sps.x+1 sps.y = sps.y+1 doSendMagicEffect(sps, 127) end end end --------------------------------------Electric Charge--------------------------------------------------- local charge = {"Pikachu", "Shiny Pikachu", "Raichu", "Shiny Raichu"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(charge, name) then if getPlayerStorageValue(cid, 253) >= 0 then return true end if math.random(1, 100) <= 15 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- setPlayerStorageValue(cid, 253, 1) doSendMagicEffect(getThingPos(cid), 207) doSendAnimatedText(getThingPos(cid), "FOCUS", 144) end end end -------------------------------------Melody------------------------------------ if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Wigglytuff" or name == "Shiny Wigglytuff" then if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- doAreaCombatHealth(cid, SLEEP_POWDERDAMAGE, getThingPosWithDebug(cid), powders, -6, -10, 33) end end end ------------------------------------- Dragon Fury / Fury --------------------------------------- local DracoFury = {"Persian", "Shiny Persian", "Gyarados", "Shiny Gyarados", "Dratini", "Shiny Dratini", "Dragonair", "Shiny Dragonair", "Dragonite", "Shiny Dragonite"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(DracoFury, name) then if math.random(1, 100) <= 10 then --Chance 10 = 10% edite como quiser... if getPlayerStorageValue(cid, 32623) == 1 then return false end setPlayerStorageValue(cid, 32623, 1) if getCreatureName(cid) == "Persian" or getCreatureName(cid) == "Shiny Persian" then doRaiseStatus(cid, true, false, false, 2, 15000) else doRaiseStatus(cid, true, true, false, 2, 15000) end for t = 1, 10 do addEvent(sendMoveEffect, t*1500, cid, 12) end addEvent(setPlayerStorageValue, 15000, cid, 32623, 0) end end end ------------------------------------- Mega Drain --------------------------------------- arr = { {0, 0, 0, 0, 0}, {0, 1, 1, 1, 0}, {0, 1, 2, 1, 0}, {0, 1, 1, 1, 0}, {0, 0, 0, 0, 0} } local mega = {"Oddish", "Gloom", "Vileplume", "Kabuto", "Kabutops", "Parasect", "Tangela", "Shiny Oddish", "Shiny Gloom", "Shiny Vileplume", "Shiny Kabuto", "Shiny Kabutops", "Shiny Parasect", "Shiny Tangela"} local min = getPokemonLevel(cid)*3 --nao sei como funciona o sistema de dano... local max = getPokemonLevel(cid)*5 --nao sei como funciona o sistema de dano... if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(mega, name) then if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 20 = 20% local uid = checkAreaUid(getThingPos(cid), arr, 1, 1) for _,pid in pairs(uid) do if (isMonster(pid) or (isSummon(pid) and canAttackOther(cid, pid)) == "Can" or (isPlayer(pid) and #getCreatureSummons(pid) <= 0)) then if getCreatureTarget(pid) == cid then local hp = getCreatureHealth(pid) local drain = choose(min, max) if hp-drain >= 1 then doCreatureAddHealth(pid, -drain) doCreatureAddHealth(cid, drain) doSendAnimatedText(getThingPos(pid), "-"..drain.."", 144) doSendAnimatedText(getThingPos(cid), "+"..drain.."", 32) end end end end end end end ------------------------------------- Spores Reaction --------------------------------------- local spores = {"Oddish", "Gloom", "Vileplume", "Shiny Oddish", "Shiny Gloom", "Shiny Vileplume"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(spores, name) then if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 20 = 20% +/- doAreaCombatHealth(cid, SLEEP_POWDERDAMAGE, getThingPosWithDebug(cid), powders, -2, -3, 27) end end end return false end Tá ai man, com esse script dá akele erro... {Saindo} local combats = { [PSYCHICDAMAGE] = {cor = COLOR_PSYCHIC}, [GRASSDAMAGE] = {cor = COLOR_GRASS}, [POISONEDDAMAGE] = {cor = COLOR_GRASS}, [MORTALGASDAMAGE] = {cor = COLOR_POISON}, [FIREDAMAGE] = {cor = COLOR_FIRE2}, --COMPLETAMENTE EDITED [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 Foresight = {"Machamp", "Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Machamp"} --passiva Foresight!! local counter = {"Machamp", "Machoke", "Hitmonchan", "Hitmonlee", "Magmar", "Electabuzz", "Scyther", "Snorlax", "Kangaskhan", "Arcanine", "Shiny Kangaskhan", "Shiny Arcanine", "Shiny Snorlax", "Shiny Scyther", "Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Machamp", "Shiny Machoke", "Shiny Magmar", "Shiny Electabuzz"} local tooBad = {"Scyther", "Scizor", "Hitmonlee", "Hitmonchan", "Hitmontop", "Tyrogue", "Shiny Scyther", "Shiny Hitmonchan", "Shiny Hitmonlee"} 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", "Poliwrath"}, ["Gloom"] = {"Vileplume", "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 getTileZoneInfo(getCreaturePosition(cid)) == 2 and not getTileZoneInfo(getCreaturePosition(attacker)) == 2 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 doSleep(cid, value, true) return false end 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 = 10 ---(getSpeed(cid) - getSpeed(attacker)) * 0.26 --if pokes[getCreatureName(cid)] then poketype1 = pokes[getCreatureName(cid)].type poketype2 = pokes[getCreatureName(cid)].type2 --end 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 if not isInArray(Foresight, getCreatureName(attacker)) then --passiva Foresight!! doSendMagicEffect(getThingPos(cid), 3) return false end end if isCreature(attacker) and isCreature(cid) then if not isCreature(getMasterTarget(attacker)) then doSendMagicEffect(getThingPos(cid), 247) return false end end if getCreatureCondition(attacker, CONDITION_INVISIBLE) and not isGhostPokemon(attacker) then local tabela = {"Clefable", "Wigglytuff", "Alakazam", "Kadabra", "Mr. Mime", "Porygon", "Shiny Alakazam", "Shiny Porygon", "Shiny Kadabra", "Shiny Mr. Mime", "Shiny Clefable", "Shiny Wigglytuff"} if not isInArray(tabela, getCreatureName(attacker)) then return false --editei end end local cd = getPlayerStorageValue(attacker, 32659) local cd2 = getPlayerStorageValue(attacker, 3891) if cd > 0 or cd2 > 0 then if math.random(1, 100) > 50 then --50% chance de da miss no atk fisico doSendMagicEffect(getThingPos(cid), 211) doSendAnimatedText(getThingPos(cid), "MISS", 215) return false end end end -------------------------------------------------- local valor = value if multiplier > 2 then multiplier = 2.5 elseif multiplier == 0.25 then multiplier = 0.5 end -------------------------------------------------- --damageCombat ~= COMBAT_PHYSICALDAMAGE and not getCreatureCondition(cid, CONDITION_PARALYZE) if miss > 0 and math.random(1, 100) <= miss and not isInArray(ignoremiss, combat) then if isInArray(tooBad, getCreatureName(cid)) and getCreatureTarget(attacker) == cid then doSendMagicEffect(getThingPos(cid), 211) doSendAnimatedText(getThingPos(cid), "Too Bad", 215) doTeleportThing(cid, getClosestFreeTile(cid, getThingPos(attacker)), false) doSendMagicEffect(getThingPos(cid), 211) doFaceCreature(cid, getThingPos(attacker)) --ver aki end 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 local randomRange = math.random(83, 117) / 100 local block = 1 if not isPlayer(cid) then 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 if isInArray(Foresight, getCreatureName(attacker)) then --passiva Foresight!! valor = valor / 2 end if isInArray(counter, getCreatureName(cid)) then if (math.random(1, 100) <= 10) then --% chance do poke dar counter -> 10 = 10% chance doSendAnimatedText(getThingPos(cid), "COUNTER", 215) doTargetCombatHealth(cid, attacker, COMBAT_PHYSICALDAMAGE, valor, valor, 3) doSendMagicEffect(getThingPos(cid), 3) return false end end else block = 1 - (getDefense(cid) / (getSpecialAttack(attacker) + getDefense(cid))) if block <= 0 then doSendMagicEffect(getThingPos(cid), 247) end valor = valor * block * generalSpecialAttackReduction if isSummon(cid) then valor = valor * summonSpecialDamageReduction - getPokemonLevel(cid) / 2 end 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), 3) 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 --NIGHTMAREDAMAGE --GUILLOTINEDAMAGE --SEISMICTOSSDAMAGE --PSYCHOSHIFTDAMAGE --THUNDERWAVEDAMAGE if valor >= getCreatureHealth(cid) then if isInArray(cannotKill, combat) and isPlayer(cid) then valor = getCreatureHealth(cid) - 1 else valor = getCreatureHealth(cid) end 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(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 ------------------------------------POTIONS------------------------------------------- if isSummon(cid) and type == STATSCHANGE_HEALTHLOSS then if getPlayerStorageValue(cid, 173) >= 1 then if damageCombat ~= BURNEDDAMAGE and damageCombat ~= POISONEDDAMAGE then setPlayerStorageValue(cid, 174, 1) doSendAnimatedText(getThingPos(cid), "Lost Heal", 144) end end end ----------------------------------------PASSIVAS----------------------------------------- ------------------------------"Counter Helix" - "Giro Ball"------------------------------ -- [outfit normal] = {out = outfit girando, efeitos} local OutFit = { [366] = {out = 496, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --scyther [912] = {out = 918, cima = 236, direita = 232, esquerda = 224, baixo = 233}, --Scizor [1317] = {out = 849, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --Shiny Scyther [952] = {out = 1193, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --Hitmontop [909] = {out = 1194, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --pineco [910] = {out = 1192, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --Forretress } local helix = {"Scyther", "Scizor", "Shiny Scyther", "Hitmontop", "Pineco", "Forretress"} if isSummon(cid) then if OutFit[getCreatureOutfit(cid).lookType] or getCreatureOutfit(cid).lookType == 0 then local chance = getCreatureName(cid) == "Hitmontop" and (16 + getPlayerStorageValue(cid, 465987)) or 15 if math.random(1, 100) <= chance 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 if not isInArray(helix, getCreatureName(cid)) then return false end local outfitt = OutFit[getCreatureOutfit(cid).lookType] or OutFit[getPlayerStorageValue(cid, 98654)] local look = getCreatureOutfit(cid).lookType local min = getPokemonLevel(cid)*5 local max = getPokemonLevel(cid)*10 local function damage(cid, min, max) if isCreature(cid) then if look == 366 or look == 1317 then --scyther e shiny scyther doAreaCombatHealth(cid, BUGDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, CONST_ME_NONE) elseif look == 952 then --hitmontop doAreaCombatHealth(cid, FIGHTINGDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, CONST_ME_NONE) else --resto doAreaCombatHealth(cid, STEELDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, CONST_ME_NONE) end doAreaCombatHealth(cid, null, getThingPos(cid), scythe1, 0, 0, outfitt.cima) --cima doAreaCombatHealth(cid, null, getThingPos(cid), scythe2, 0, 0, outfitt.baixo) --baixo doAreaCombatHealth(cid, null, getThingPos(cid), scythe3, 0, 0, outfitt.direita) --direita doAreaCombatHealth(cid, null, getThingPos(cid), scythe4, 0, 0, outfitt.esquerda) --esquerda end end setPlayerStorageValue(cid, 32623, 1) --proteçao doSetCreatureOutfit(cid, {lookType = outfitt.out}, -1) local function doChangeO(cid) if not isCreature(cid) then return true end setPlayerStorageValue(cid, 32623, 0) --proteçao if isSleeping(cid) and getMonsterInfo(getCreatureName(cid)).lookCorpse ~= 0 then doSetCreatureOutfit(cid, {lookType = 0, lookTypeEx = getMonsterInfo(getCreatureName(cid)).lookCorpse}, -1) else doRemoveCondition(cid, CONDITION_OUTFIT) end end local delay = 200 -- não mexe for i = 1, 2 do addEvent(damage, delay*i, cid, min, max) end addEvent(doChangeO, 2 * 300 + 10, cid) end end end -------------------------------------------Lava Counter / Electricity------------------------------------- local Fire_Thunder = {"Magmar", "Shiny Magmar", "Electabuzz", "Shiny Electabuzz", "Magby", "Elekid"} --["Nome"] = {effeito, damage} local eff = { ["Magmar"] = {15, FIREDAMAGE}, ["Shiny Magmar"] = {15, FIREDAMAGE}, ["Magby"] = {15, FIREDAMAGE}, ["Electabuzz"] = {207, ELECTRICDAMAGE}, ["Shiny Electabuzz"] = {207, ELECTRICDAMAGE}, ["Elekid"] = {207, ELECTRICDAMAGE}, } if isSummon(cid) then local e = getCreatureMaster(cid) if isInArray(Fire_Thunder, getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke")) then if math.random(1, 100) <= 20 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 = getPokemonLevel(cid)*5 local max = getPokemonLevel(cid)*10 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 addEvent(setPlayerStorageValue, 17*140, cid, 32623, 0) --proteçao end setPlayerStorageValue(cid, 32623, 1) --proteçao doSpinFire(cid) end end end ---------------------------------------------Demon Kicker---------------------------------- --[outfit] = outfit chutando, local hitmonlees = { [371] = 652, --hitmonlee [877] = 878, --shiny hitmonlee PxG [11891] = 652, --hitmonlee durmindo } --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 local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Shiny Hitmonlee" or name == "Hitmonlee" then if isCreature(getMasterTarget(cid)) then if math.random(1, 100) <= (21 + getPlayerStorageValue(cid, 465987)) then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- if getDistanceBetween(getThingPos(cid), getThingPos(getMasterTarget(cid))) > 1 then return false end 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 if isSleeping(cid) and getMonsterInfo(getCreatureName(cid)).lookCorpse ~= 0 then doSetCreatureOutfit(cid, {lookType = 0, lookTypeEx = getMonsterInfo(getCreatureName(cid)).lookCorpse}, -1) else doRemoveCondition(cid, CONDITION_OUTFIT) end end local min = getOffense(cid)*1.1 --getPokemonLevel(cid)*15 local max = getOffense(cid)*1.2 --getPokemonLevel(cid)*20 setPlayerStorageValue(cid, 32623, 1) --proteçao --arrumar isso!!! if isSleeping(cid) and getMonsterInfo(getCreatureName(cid)).lookCorpse ~= 0 then doSetCreatureOutfit(cid, {lookType = hitmonlees[getCreatureOutfit(cid).lookTypeEx]}, -1) else doSetCreatureOutfit(cid, {lookType = hitmonlees[getCreatureOutfit(cid).lookType]}, -1) end doTargetCombatHealth(cid, getMasterTarget(cid), FIGHTINGDAMAGE, -min, -max, 255) addEvent(doChangeHitmon, 700, cid) end end end end -------------------------------------------Demon Puncher------------------------------------- local hitmonchans = { ["Hitmonchan"] = { [0] = {out = 559, eff = 112, type = FIGHTINGDAMAGE}, --outfit normal [1] = {out = 1075, eff = 35, type = FIREDAMAGE}, --outfit fogo [2] = {out = 1077, eff = 48, type = ELECTRICDAMAGE}, --outfit raio [3] = {out = 1078, eff = 43, type = ICEDAMAGE}, --outfit gelo [4] = {out = 1076, eff = 140, type = GHOSTDAMAGE} --outfit ghost }, ["Shiny Hitmonchan"] = { --aconcelho trocar a outfit do shiny hitmonchan pela do elite hitmonchan do PO... [0] = {out = 837, eff = 112, type = FIGHTINGDAMAGE}, --outfit normal [1] = {out = 1080, eff = 35, type = FIREDAMAGE}, --outfit fogo [2] = {out = 1081, eff = 48, type = ELECTRICDAMAGE}, --outfit raio [3] = {out = 1082, eff = 43, type = ICEDAMAGE}, --outfit gelo [4] = {out = 1079, eff = 140, type = GHOSTDAMAGE} --outfit ghost } } local monchanOUT = {837, 1080, 1081, 1082, 1079} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Shiny Hitmonchan" or name == "Hitmonchan" then if isCreature(getMasterTarget(cid)) then if math.random(1, 100) <= (21 + getPlayerStorageValue(cid, 465987)) then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- if getDistanceBetween(getThingPos(cid), getThingPos(getMasterTarget(cid))) > 1 then return false end if getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") == "Shiny Hitmonchan" and not isInArray(monchanOUT, getCreatureOutfit(cid).lookType) then return false --proteçao pro script n funcionar com o shiny monchan com outfit diferente da do elite... end --script soh funciona com outfit do elite hirmonchan do PO... local min = getOffense(cid)*1.1 --getPokemonLevel(cid)*15 local max = getOffense(cid)*1.2 --getPokemonLevel(cid)*20 local hands = getItemAttribute(getPlayerSlotItem(e, 8).uid, "hands") doSendDistanceShoot(getThingPos(cid), getThingPos(getMasterTarget(cid)), 39) doTargetCombatHealth(cid, getMasterTarget(cid), hitmonchans[name][hands].type, -min, -max, 255) local target = getThingPos(getMasterTarget(cid)) target.x = target.x + 1 if hands == 4 then doSendMagicEffect(target, hitmonchans[name][hands].eff) else doSendMagicEffect(getThingPos(getMasterTarget(cid)), hitmonchans[name][hands].eff) end end end end end ---------------------------------------Stunning Confusion------------------------------------------ local ducks = {"Golduck", "Psyduck", "Shiny Golduck", "Shiny Psyduck"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(ducks, name) then if math.random(1, 100) <= 20 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 = getPokemonLevel(cid)*5 --nao sei como funciona o sistema de dano... local max = getPokemonLevel(cid)*10 --nao sei como funciona o sistema de dano... local function damage(cid) if isCreature(cid) then doAreaCombatHealth(cid, PSYCHICDAMAGE, getThingPosWithDebug(cid), confusion, -min, -max, 136) end end setPlayerStorageValue(cid, 32623, 1) --proteçao for i = 1, 7 do addEvent(damage, i*500, cid) end addEvent(setPlayerStorageValue, 3500, cid, 32623, 0) --proteçao end end end -----------------------------------------Groundshock----------------------------------- if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Kangaskhan" or name == "Shiny Kangaskhan" then if math.random(1, 100) <= 20 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- local min = getPokemonLevel(cid)*10 --nao sei como funciona o sistema de dano... local max = getPokemonLevel(cid)*15 --nao sei como funciona o sistema de dano... doAreaCombatHealth(cid, NORMALDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, 255) local sps = getThingPosWithDebug(cid) sps.x = sps.x+1 sps.y = sps.y+1 doSendMagicEffect(sps, 127) end end end --------------------------------------Electric Charge--------------------------------------------------- local charge = {"Pikachu", "Shiny Pikachu", "Raichu", "Shiny Raichu"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(charge, name) then if getPlayerStorageValue(cid, 253) >= 0 then return true end if math.random(1, 100) <= 15 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- setPlayerStorageValue(cid, 253, 1) doSendMagicEffect(getThingPos(cid), 207) doSendAnimatedText(getThingPos(cid), "FOCUS", 144) end end end -------------------------------------Melody------------------------------------ if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if name == "Wigglytuff" or name == "Shiny Wigglytuff" then if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 10 = 10% +/- doAreaCombatHealth(cid, SLEEP_POWDERDAMAGE, getThingPosWithDebug(cid), powders, -6, -10, 33) end end end ------------------------------------- Dragon Fury / Fury --------------------------------------- local DracoFury = {"Persian", "Shiny Persian", "Gyarados", "Shiny Gyarados", "Dratini", "Shiny Dratini", "Dragonair", "Shiny Dragonair", "Dragonite", "Shiny Dragonite"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(DracoFury, name) then if math.random(1, 100) <= 10 then --Chance 10 = 10% edite como quiser... if getPlayerStorageValue(cid, 32623) == 1 then return false end setPlayerStorageValue(cid, 32623, 1) if getCreatureName(cid) == "Persian" or getCreatureName(cid) == "Shiny Persian" then doRaiseStatus(cid, true, false, false, 2, 15000) else doRaiseStatus(cid, true, true, false, 2, 15000) end for t = 1, 10 do addEvent(sendMoveEffect, t*1500, cid, 12) end addEvent(setPlayerStorageValue, 15000, cid, 32623, 0) end end end ------------------------------------- Mega Drain --------------------------------------- arr = { {0, 0, 0, 0, 0}, {0, 1, 1, 1, 0}, {0, 1, 2, 1, 0}, {0, 1, 1, 1, 0}, {0, 0, 0, 0, 0} } local mega = {"Oddish", "Gloom", "Vileplume", "Kabuto", "Kabutops", "Parasect", "Tangela", "Shiny Oddish", "Shiny Gloom", "Shiny Vileplume", "Shiny Kabuto", "Shiny Kabutops", "Shiny Parasect", "Shiny Tangela"} local min = getPokemonLevel(cid)*3 --nao sei como funciona o sistema de dano... local max = getPokemonLevel(cid)*5 --nao sei como funciona o sistema de dano... if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(mega, name) then if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 20 = 20% local uid = checkAreaUid(getThingPos(cid), arr, 1, 1) for _,pid in pairs(uid) do if (isMonster(pid) or (isSummon(pid) and canAttackOther(cid, pid)) == "Can" or (isPlayer(pid) and #getCreatureSummons(pid) <= 0)) then if getCreatureTarget(pid) == cid then local hp = getCreatureHealth(pid) local drain = choose(min, max) if hp-drain >= 1 then doCreatureAddHealth(pid, -drain) doCreatureAddHealth(cid, drain) doSendAnimatedText(getThingPos(pid), "-"..drain.."", 144) doSendAnimatedText(getThingPos(cid), "+"..drain.."", 32) end end end end end end end ------------------------------------- Spores Reaction --------------------------------------- local spores = {"Oddish", "Gloom", "Vileplume", "Shiny Oddish", "Shiny Gloom", "Shiny Vileplume"} if isSummon(cid) then local e = getCreatureMaster(cid) local name = getItemAttribute(getPlayerSlotItem(e, 8).uid, "poke") if isInArray(spores, name) then if math.random(1, 100) <= 10 then -- Porcentagem de chance pro poke usar a passiva... 20 = 20% +/- doAreaCombatHealth(cid, SLEEP_POWDERDAMAGE, getThingPosWithDebug(cid), powders, -2, -3, 27) end end end return false end coloca ai e me avisa se da certo!! Link para o comentário Compartilhar em outros sites More sharing options...
zerefshirou 112 Postado Maio 30, 2012 Share Postado Maio 30, 2012 (editado) AFF VAI TOMAR NO CU CLIQUEI ERRADO Tava com um post para cada pergunta... jaja edito essa porra u.u Edit: @jan well Que eu saiba é na tabela que fica no surf.lua (movements) @Cleberadm Tambem gostaria de saber mas, não ofereço coisa inutil Você colocou algum return? como você colocou isso da vocation, poste o login.lua em spoiler ou só a parte do vocation se quiser @matheuusmv De acordo com minhas fontes, fechou @StyloMaldoso Está falando das taunts? Porque eles recrutariam um noob? Mas passa link ai não ouvi falar disso @Pokemonultimatetwo Não e não @Henriquepxc coloca na parte la no evolvepokemon la doItemSetAttribute(pokeball.uid, "level", pokes[theevo].level) Que eu saiba é assim boa sorte @ZeSy Aqui e com outras pessoas funciona corretamente, veja se não tem algo errado no item que esta tentando ou algo assim Editado Maio 30, 2012 por ZerefShirou Link para o comentário Compartilhar em outros sites More sharing options...
Al3ss4ndr 1 Postado Maio 30, 2012 Share Postado Maio 30, 2012 Como arruma esse bug? ;(( tem "varios" como este do move1 ;( [28/05/2012 22:49:10] [Error - TalkAction Interface] [28/05/2012 22:49:10] data/talkactions/scripts/move1.lua:onSay [28/05/2012 22:49:10] Description: [28/05/2012 22:49:10] (luaGetThingFromPos) Tile not found REP+++ Pode ser bug no mapa tenta usa o mastermap do brun123 no meu caso usava o mapa kpdo e sempre aparecia esse bug Link para o comentário Compartilhar em outros sites More sharing options...
Session Start 125 Postado Maio 30, 2012 Share Postado Maio 30, 2012 Zeref.. ta no final local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } local flys = { ["Moltres"] = {229, 2300}, -- moltres ["Articuno"] = {230, 2100}, -- artic ["Zapdos"] = {224, 2600}, -- zapdos ["Mew"] = {232, 2200}, -- 1000 ["Mewtwo"] = {233, 2200},-- two ["Dragonite"] = {221, 1300},-- nite ["Pidgeot"] = {222, 900}, -- geot ["Fearow"] = {226, 800}, -- fearow ["Aerodactyl"] = {227, 1100}, -- aero ["Charizard"] = {216, 1000}, -- chari ["Porygon"] = {316, 600}, -- porygon ["Shiny Moltres"] = {229, 2300}, -- Shiny moltres ["Shiny Articuno"] = {1018, 2100}, -- Shiny artic ["Shiny Zapdos"] = {1019, 2600}, -- Shiny zapdos ["Shiny Mew"] = {1022, 2200}, -- Shiny 1000 ["Shiny Mewtwo"] = {1021, 2200},-- Shiny two ["Shiny Dragonite"] = {1020, 1300},-- Shiny nite ["Shiny Pidgeot"] = {996, 900}, -- Shiny geot ["Shiny Fearow"] = {997, 800}, -- Shiny fearow ["Shiny Aerodactyl"] = {1017, 1100}, -- Shiny aero ["Shiny Charizard"] = {995, 1000}, -- Shiny chari ["Shiny Porygon"] = {1016, 600}, -- Shiny porygon ["Porygon2"] = {648, 890}, -- 2 ["Skarmory"] = {649, 1000}, -- skarmory ["Crobat"] = {652, 1190}, -- crobat } local rides = { ["Tauros"] = {128, 580}, -- tauros ["Ninetales"] = {129, 800}, -- kyuubi ["Rapidash"] = {130, 800}, -- rapid ["Ponyta"] = {131, 410}, -- ponyta ["Rhyhorn"] = {132, 400}, -- rhyhorn ["Arcanine"] = {12, 900}, -- arcan ["Onix"] = {126, 450}, -- onix ["Venusaur"] = {134, 390}, -- venu ["Dodrio"] = {133, 750}, -- dodrio ["Doduo"] = {135, 420}, -- doduo ["Shiny Tauros"] = {1024, 580}, -- tauros ["Shiny Ninetales"] = {999, 800}, -- kyuubi ["Shiny Rapidash"] = {1005, 800}, -- rapid ["Shiny Ponyta"] = {1004, 410}, -- ponyta ["Shiny Rhyhorn"] = {1023, 400}, -- rhyhorn ["Shiny Arcanine"] = {1003, 900}, -- arcan ["Shiny Onix"] = {126, 450}, -- onix ["Shiny Venusaur"] = {1040, 390}, -- venu ["Shiny Dodrio"] = {1007, 750}, -- dodrio ["Shiny Doduo"] = {1006, 420}, -- doduo ["Crystal Onix"] = {293, 480}, -- cristal onix ["Steelix"] = {646, 750}, -- steelix ["Meganium"] = {685, 720}, -- meganium ["Bayleef"] = {686, 555}, -- bayleef ["Stantler"] = {687, 595}, -- stantler ["Houndoom"] = {647, 820}, -- houndoom ["Piloswine"] = {689, 450}, -- piloswine ["Mareep"] = {688, 400}, -- marip } local surf = { ["Poliwag"] = {lookType=278, speed = 320}, ["Poliwhirl"] = {lookType=137, speed = 480}, ["Seaking"] = {lookType=269, speed = 520}, ["Dewgong"] = {lookType=183, speed = 700}, ["Blastoise"] = {lookType=184, speed = 850}, ["Tentacruel"] = {lookType=185, speed = 750}, ["Lapras"] = {lookType=186, speed = 960}, ["Gyarados"] = {lookType=187, speed = 1050}, ["Omastar"] = {lookType=188, speed = 680}, ["Kabutops"] = {lookType=189, speed = 840}, ["Poliwrath"] = {lookType=190, speed = 680}, ["Vaporeon"] = {lookType=191, speed = 800}, ["Staryu"] = {lookType=266, speed = 385}, ["Starmie"] = {lookType=267, speed = 685}, ["Goldeen"] = {lookType=268, speed = 355}, ["Seadra"] = {lookType=270, speed = 655}, ["Golduck"] = {lookType=271, speed = 760}, ["Squirtle"] = {lookType=273, speed = 365}, ["Wartortle"] = {lookType=275, speed = 605}, ["Tentacool"] = {lookType=277, speed = 340}, ["Snorlax"] = {lookType=300, speed = 500}, ["Shiny Poliwag"] = {lookType=1010, speed = 320}, ["Shiny Poliwhirl"] = {lookType=1011, speed = 480}, ["Shiny Seaking"] = {lookType=1027, speed = 520}, ["Shiny Dewgong"] = {lookType=1015, speed = 700}, ["Shiny Blastoise"] = {lookType=1002, speed = 850}, ["Shiny Tentacruel"] = {lookType=1014, speed = 750}, ["Shiny Lapras"] = {lookType=1031, speed = 960}, ["Shiny Gyarados"] = {lookType=1030, speed = 1050}, ["Shiny Omastar"] = {lookType=1033, speed = 680}, ["Shiny Kabutops"] = {lookType=1034, speed = 840}, ["Shiny Poliwrath"] = {lookType=1012, speed = 680}, ["Shiny Vaporeon"] = {lookType=1032, speed = 800}, ["Shiny Staryu"] = {lookType=1028, speed = 385}, ["Shiny Starmie"] = {lookType=1029, speed = 685}, ["Shiny Goldeen"] = {lookType=1026, speed = 355}, ["Shiny Seadra"] = {lookType=1025, speed = 655}, ["Shiny Golduck"] = {lookType=1009, speed = 760}, ["Shiny Squirtle"] = {lookType=1000, speed = 365}, ["Shiny Wartortle"] = {lookType=1001, speed = 605}, ["Shiny Tentacool"] = {lookType=1013, speed = 340}, ["Shiny Snorlax"] = {lookType=1035, speed = 500}, ["Mantine"] = {lookType=636, speed = 820}, ["Totodile"] = {lookType=637, speed = 360}, ["Croconow"] = {lookType=638, speed = 590}, ["Feraligatr"] = {lookType=645, speed = 900}, ["Marill"] = {lookType=639, speed = 340}, ["Azumarill"] = {lookType=642, speed = 680}, ["Quagsire"] = {lookType=643, speed = 740}, ["Kingdra"] = {lookType=644, speed = 1020}, ["Octillery"] = {lookType=641, speed = 600}, ["Wooper"] = {lookType=640, speed = 315}, } function onLogin(cid) doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 100) doCreatureSetDropLoot(cid, false) local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if getCreatureName(cid) == "Account Manager" then local outfit = {} if accountManagerRandomPokemonOutfit then outfit = {lookType = getPokemonXMLOutfit(oldpokedex[math.random(151)][1])} else outfit = accountManagerOutfit end doSetCreatureOutfit(cid, outfit, -1) return true end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end local outfit = {} if getPlayerVocation(cid) == 0 then doPlayerSetMaxCapacity(cid, 0) doPlayerSetVocation(cid, 1,4) setCreatureMaxMana(cid, 6) doPlayerAddSoul(cid, -getPlayerSoul(cid)) setPlayerStorageValue(cid, 19898, 0) if getCreatureOutfit(cid).lookType == 128 then outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)} elseif getCreatureOutfit(cid).lookType == 136 then outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)} end doCreatureChangeOutfit(cid, outfit) end registerCreatureEvent(cid, "WatchTv") registerCreatureEvent(cid, "StopWatchingTv") registerCreatureEvent(cid, "WalkTv") registerCreatureEvent(cid, "RecordTv") --registerCreatureEvent(cid, "Death") registerCreatureEvent(cid, "PlayerLogout") registerCreatureEvent(cid, "WildAttack") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "PokemonIdle") registerCreatureEvent(cid, "EffectOnAdvance") registerCreatureEvent(cid, "GeneralConfiguration") registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "LookSystem") registerCreatureEvent(cid, "T1") registerCreatureEvent(cid, "T2") registerCreatureEvent(cid, "task_count") if getPlayerStorageValue(cid, 99284) == 1 then setPlayerStorageValue(cid, 99284, -1) end if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then setPlayerStorageValue(cid, 6598754, -1) setPlayerStorageValue(cid, 6598755, -1) end doChangeSpeed(cid, -(getCreatureSpeed(cid))) if getPlayerStorageValue(cid, 17000) >= 1 then -- fly local item = getPlayerSlotItem(cid, 8) local poke = getItemAttribute(item.uid, "poke") doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) doRemoveCondition(cid, CONDITION_OUTFIT) doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1) local apos = getFlyingMarkedPos(cid) apos.stackpos = 0 if getTileThingByPos(apos).itemid <= 2 then doCombatAreaHealth(cid, FIREDAMAGE, getFlyingMarkedPos(cid), 0, 0, 0, CONST_ME_NONE) doCreateItem(460, 1, getFlyingMarkedPos(cid)) end doTeleportThing(cid, apos, false) local posicao = getTownTemplePosition(getPlayerTown(cid)) markFlyingPos(cid, posicao) elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf local item = getPlayerSlotItem(cid, 8) local poke = getItemAttribute(item.uid, "poke") doSetCreatureOutfit(cid, {lookType = surf[poke].lookType + 351}, -1) doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride local item = getPlayerSlotItem(cid, 8) local poke = getItemAttribute(item.uid, "poke") if rides[poke] then doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) doRemoveCondition(cid, CONDITION_OUTFIT) doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1) else setPlayerStorageValue(cid, 17001, -1) doChangeSpeed(cid, PlayerSpeed) end local posicao2 = getTownTemplePosition(getPlayerTown(cid)) markFlyingPos(cid, posicao2) elseif getPlayerStorageValue(cid, 13008) >= 1 then -- dive if not isInArray({5405, 5406, 5407, 5408, 5409, 5410}, getTileInfo(getThingPos(cid)).itemid) then setPlayerStorageValue(cid, 13008, 0) doChangeSpeed(cid, PlayerSpeed) doRemoveCondition(cid, CONDITION_OUTFIT) return true end if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1034, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) else doSetCreatureOutfit(cid, {lookType = 1035, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) end doChangeSpeed(cid, 800) elseif getPlayerStorageValue(cid, 5700) > 0 then --bike doChangeSpeed(cid, getPlayerStorageValue(cid, 5700)) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1394}, -1) else doSetCreatureOutfit(cid, {lookType = 1393}, -1) end elseif getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 7 then doChangeSpeed(cid, 140*getPlayerGroupId(cid)) else doChangeSpeed(cid, PlayerSpeed) end if getPlayerStorageValue(cid,5000) == True then setPlayerVocation(cid,5) elseif getPlayerStorageValue(cid,5001) == True then setPlayerVocation(cid,6) end return true end Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados