Ir para conteúdo

[Encerrado] [Pokemon] Dúvidas? - Pda


lucashgas

Posts Recomendados

@Zeref

desse geito ai nao aparece nem o efeito :\

 

PosDuIndividuo = getThingPos(cid)

 

doSendMagicEffect({x = PosDuIndividuo.x + 1, y = PosDuIndividuo.y, z = PosDuIndividuo.z}, 247)

 

@edit

o effect so aparece com - 1

 

mais dai aparece do lado de <<< do alakazam

Editado por PkNfan
Link para o comentário
Compartilhar em outros sites

Então era pra ser assim não?

 

PosDuIndividuo = getThingPos(cid)
doSendMagicEffect({x = PosDuIndividuo.x + 1, y = PosDuIndividuo.y, z = PosDuIndividuo.z}, 255)

 

PosDuIndividuo.

Rahsei HAUSHAUSHAUHSU

Link para o comentário
Compartilhar em outros sites

Ve se o cid é mesmo o player, ve outras coisas ai, erro console e derivados, vai testando, mas que eu saiba é x + 1 (plano cartesiano) apesar de que no Tibia o Y se botar + 1, ele desce e não sobe né, bem...

 

@Lendreo

Dou no max 2 meses para eles colocarem mais HP na Blissey, quem quer apostar?!

Editado por ZerefShirou
Link para o comentário
Compartilhar em outros sites

@Slicer

Onde tu achou isso, TA MTU FODA o/

 

@PXG

Shutdown da Madrugada:

- Varios bugs corrigidos



- Frequencia de Hyper Beam de pokes selvagens reduzida

- Loot Outland Fight melhorado.

- Outland Fight Ampliada

- Outland Fly, Skarmory separado de Noctowl/Pidgeot

- Outland Electric spawn reduzido

- Outland Fire Loot melhorado

- Wigglytuff reformulada (em breve Clefable e as devidas pré -evoluções também, estavam muito fora da realidade)

 

pxg%2520shut%252001.pngpxg%2520shut%252002.pngpxg%2520shut%252003.png

pxg%2520shut%252004.pngpxg%2520shut%252005.pngpxg%2520shut%252006.png

Editado por ZerefShirou
Link para o comentário
Compartilhar em outros sites

@zeref

no topico sobre a atualizaçao dos novos gyms e o novo mapa dos porygons e afins.. vai vir soh junto dessa atualizaçao.. nos trolaram lgl... ;x

Link para o comentário
Compartilhar em outros sites

@Slicer como faço para por exp por stagio? eu configurei la no xml o stages.xml e configurei tb la no config coloquei true mais nao funfa como me dizer como faço pra por

Link para o comentário
Compartilhar em outros sites

@pionilo

 

Não existe mais isso, bem existe, mas não é utilizado.

 

Oque eu faria, na parte que o player ganha a xp, no pokeexp.lua

 

daria para colocar Stages lá, o jeito mais simples é uma função basiquinha e util para quem quiser q seria mais ou menos isso:

 

function doExpRates(cid)
if not isPlayer(cid) then return 1 end

if getPlayerLevel(cid) > 50 and getPlayerLevel(cid) <= 100 then
return 0.75
elseif getPlayerLevel(cid) > 100 and getPlayerLevel(cid) <= 150 then
return 0.5
end
return 1
end

 

ai, iria onde da a xp e colocaria "* doExpRates(pk) [no pokeexp.lua, em algumas partes o player é "pk"]"

 

É o jeito que eu faria, simples e pratico

 

@Slicer pode ter uma ideia melhor...

 

 

 

@brun123

 

Visitando o topico e nem pra dar 1 OI

 

jaja edito com print, para entenderem melhor

 

brun123.png

Editado por ZerefShirou
Link para o comentário
Compartilhar em outros sites

Quando eu dei a sugestão pra eles mudarem não era pra por esse lixo ai não ;s

Sepah é só 2 efeitos.

 

@Slicer

Achei 2 bugzitos.

As vezes o harden sai em area e as vezes o eartquake sai com algum outro efeito do pokemon.

Link para o comentário
Compartilhar em outros sites

@ZerefShirou isto serve para versao sem lvl?

 

@Slicer outra bronca é que esta dando este erro direto

[05/09/2012 22:26:50] [Error - CreatureScript Interface]
[05/09/2012 22:26:50] data/creaturescripts/scripts/exp2.0.lua:onStatsChange
[05/09/2012 22:26:50] Description:
[05/09/2012 22:26:50] data/creaturescripts/scripts/exp2.0.lua:252: attempt to index field '?' (a nil value)
[05/09/2012 22:26:50] stack traceback:
[05/09/2012 22:26:51]  data/creaturescripts/scripts/exp2.0.lua:252: in function <data/creaturescripts/scripts/exp2.0.lua:63>

 

 

E aki o exp2.0

 

--NIGHTMAREDAMAGE

--GUILLOTINEDAMAGE

--SEISMICTOSSDAMAGE

--PSYCHOSHIFTDAMAGE

--THUNDERWAVEDAMAGE

local combats = {

[PSYCHICDAMAGE] = {cor = COLOR_PSYCHIC},

[GRASSDAMAGE] = {cor = COLOR_GRASS},

[POISONEDDAMAGE] = {cor = COLOR_GRASS},

[MORTALGASDAMAGE] = {cor = COLOR_POISON},

[FIREDAMAGE] = {cor = COLOR_FIRE2},

[bURNEDDAMAGE] = {cor = COLOR_BURN},

[WATERDAMAGE] = {cor = COLOR_WATER},

[iCEDAMAGE] = {cor = COLOR_ICE},

[NORMALDAMAGE] = {cor = COLOR_NORMAL},

[GUILLOTINEDAMAGE] = {cor = COLOR_NORMAL},

[FLYDAMAGE] = {cor = COLOR_FLYING},

[GHOSTDAMAGE] = {cor = COLOR_GHOST},

[NIGHTMAREDAMAGE] = {cor = COLOR_GHOST},

[GROUNDDAMAGE] = {cor = COLOR_GROUND},

[ELECTRICDAMAGE] = {cor = COLOR_ELECTRIC},

[THUNDERWAVEDAMAGE] = {cor = COLOR_ELECTRIC},

[ROCKDAMAGE] = {cor = COLOR_ROCK},

[bUGDAMAGE] = {cor = COLOR_BUG},

[FIGHTDAMAGE] = {cor = COLOR_FIGHTING},

[sEISMICTOSSDAMAGE] = {cor = COLOR_FIGHTING},

[DRAGONDAMAGE] = {cor = COLOR_DRAGON},

[POISONDAMAGE] = {cor = COLOR_POISON},

[DARKDAMAGE] = {cor = COLOR_DARK},

[sTEELDAMAGE] = {cor = COLOR_STEEL},

}

--alterado v1.5 tabelas agora estao em lib/configuration.lua

local function sendPlayerDmgMsg(cid, text)

if not isCreature(cid) then return true end

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, text)

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

if not isCreature(attacker) then --alterado v1.5 cid == attacker

if not isInArray(fixdamages, combat) and combats[combat] then

doSendAnimatedText(getThingPos(cid), value, combats[combat].cor)

end

return true

end

local damageCombat = combat

--------------------------------------------------

if combat == SLEEP_POWDERDAMAGE then

if ehMonstro(cid) and ehMonstro(attacker) then

return false

end

if canAttackOther(cid, attacker) == "Cant" then

return false

end

if isNpcSummon(cid) and getCreatureTarget(cid) ~= attacker then

return false

end

if getPlayerStorageValue(cid, 21099) >= 1 then return false end

local ret = {}

ret.id = cid

ret.cd = value

ret.check = getPlayerStorageValue(cid, conds["Sleep"])

ret.first = true

ret.cond = "Sleep"

doCondition2(ret)

return false

end

--------------------------------------------------

if combat == POISON_POWDERDAMAGE then

if ehMonstro(cid) and ehMonstro(attacker) then

return false

end

if isNpcSummon(cid) and getCreatureTarget(cid) ~= attacker then

return false

end

if canAttackOther(cid, attacker) == "Cant" then

return false

end

if getPlayerStorageValue(attacker, 21099) >= 1 then return false end

local ret = {}

ret.id = cid

ret.cd = value

ret.check = getPlayerStorageValue(cid, conds["Poison"])

ret.damage = isSummon(attacker) and getMasterLevel(attacker)+getPokemonBoost(attacker) or getPokemonLevel(attacker)

ret.cond = "Poison"

 

doCondition2(ret)

return false

end

--------------------------------------------------

if type == STATSCHANGE_HEALTHGAIN then

if cid == attacker then

return true

end

if isSummon(cid) and isSummon(attacker) and canAttackOther(cid, attacker) == "Cant" then

return false

end

return true

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

if isSummon(attacker) or isPlayer(attacker) then

if canAttackOther(cid, attacker) == "Cant" then return false end

end

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)

if valor >= getCreatureHealth(cid) then

if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then

setPlayerStorageValue(cid, 6598754, -1)

setPlayerStorageValue(cid, 6598755, -1)

doRemoveCondition(cid, CONDITION_OUTFIT)

end

if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then

doRemoveCondition(cid, CONDITION_OUTFIT)

setPlayerStorageValue(cid, 17000, 0)

setPlayerStorageValue(cid, 17001, 0)

setPlayerStorageValue(cid, 63215, -1)

doChangeSpeed(cid, PlayerSpeed)

local item = getPlayerSlotItem(cid, 8)

local btype = getPokeballType(item.itemid)

if #getCreatureSummons(cid) <= 0 then

if isInArray(pokeballs[btype].all, item.itemid) then

doTransformItem(item.uid, pokeballs[btype].off)

doItemSetAttribute(item.uid, "hp", 0)

end

end

end

------------Edited Golden Arena------------------

if getPlayerStorageValue(cid, 22545) == 1 then

if getGlobalStorageValue(22550) == 1 then

doPlayerSendTextMessage(cid, 20, "You are the last survivor of the golden arena! Take your reward!")

doPlayerAddItem(cid, 2152, 100) --premio

setPlayerStorageValue(cid, 22545, -1)

doTeleportThing(cid, getClosestFreeTile(cid, getClosestFreeTile(cid, posBackGolden)), false) --alterado v1.4

setGlobalStorageValue(22550, -1)

doCreatureAddHealth(cid, getCreatureMaxHealth(cid))

return true

else

setGlobalStorageValue(22550, getGlobalStorageValue(22550)-1)

setPlayerStorageValue(cid, 22545, -1)

doTeleportThing(cid, getClosestFreeTile(cid, posBackGolden), false) --alterado v1.4

doCreatureAddHealth(cid, getCreatureMaxHealth(cid))

return true

end

end

-------------------------------------------

end

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 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

--------------------------------------------------

if ehMonstro(cid) and ehMonstro(attacker) then

return false --edited monstro nao atacar monstro

end

local multiplier = 1

poketype1 = pokes[getCreatureName(cid)].type

poketype2 = pokes[getCreatureName(cid)].type2

if getCreatureCondition(cid, CONDITION_INVISIBLE) then

return false

end

if damageCombat ~= COMBAT_PHYSICALDAMAGE and not isInArray(ignored, damageCombat) then

if isInArray(effectiveness[damageCombat].super, poketype1) then

multiplier = multiplier + 0.5

end

if isInArray(effectiveness[damageCombat].super, poketype2) then

multiplier = multiplier + 0.5

end

if isInArray(effectiveness[damageCombat].weak, poketype1) then --Edited effetivenes = pxg... ;p

multiplier = multiplier - 0.25

end

if isInArray(effectiveness[damageCombat].weak, poketype2) then

multiplier = multiplier - 0.25

end

if isInArray(effectiveness[damageCombat].non, poketype1) or isInArray(effectiveness[damageCombat].non, poketype2) then

if isInArray(specialabilities["foresight"], getCreatureName(attacker)) then --alterado v1.5

multiplier = 0.5

elseif getPlayerStorageValue(attacker, 999457) >= 1 then --alterado v1.5

multiplier = 0.5

end

end

elseif combat == COMBAT_PHYSICALDAMAGE then

if isGhostPokemon(cid) then --alterado v1.3

 

if not isInArray(specialabilities["foresight"], getCreatureName(attacker)) then --passiva Foresight!!

doSendMagicEffect(getThingPos(cid), 3)

return false

end

end

local cd = getPlayerStorageValue(attacker, conds["Miss"])

local cd2 = getPlayerStorageValue(attacker, conds["Confusion"])

local cd3 = getPlayerStorageValue(attacker, conds["Stun"])

if cd >= 0 or cd2 >= 0 or cd3 >= 0 then

if math.random(1, 100) > 50 then --Edited miss system -- 50% chance de da miss no atk fisico

doSendMagicEffect(getThingPos(cid), 211)

doSendAnimatedText(getThingPos(attacker), "MISS", 215) --alterado v1.5

return false

end

end

end

--------------------------------------------------

local valor = value

if multiplier == 1.5 then

multiplier = 1.75

elseif multiplier == 1.25 then --edited effetivines = pxg

multiplier = 1

end

--------------------------------------------------

if isSummon(cid) and isSummon(attacker) then

if getCreatureMaster(cid) == getCreatureMaster(attacker) then

return false

end

if canAttackOther(cid, attacker) == "Cant" then

return false

end

end

valor = valor * multiplier

if isSummon(attacker) then

valor = valor * getHappinessRate(attacker)

else

valor = valor * summonReduction

end

valor = math.floor(valor)

 

if combat == COMBAT_PHYSICALDAMAGE then

block = 1 - (getDefense(cid) / (getOffense(attacker) + getDefense(cid)))

valor = getOffense(attacker) * block

 

if isInArray(specialabilities["counter"], getCreatureName(cid)) then

if math.random(1, 100) <= 10 then

doCreatureAddHealth(attacker, -valor, 3, 180) --alterado v1.5

valor = 0

doSendAnimatedText(getThingPosWithDebug(cid), "COUNTER", 215)

end

end

 

else

valor = valor / getDefense(cid)

end

 

-------------------------Edited CLAN SYSTEM-----------------------------------

if isSummon(attacker) and getPlayerStorageValue(getCreatureMaster(attacker), 86228) >= 1 then

valor = valor*getClanPorcent(getCreatureMaster(attacker), combat, "atk") --alterado v1.3

elseif isSummon(cid) and getPlayerStorageValue(getCreatureMaster(cid), 86228) >= 1 then

valor = valor - (valor*getClanPorcent(getCreatureMaster(cid), combat, "def", pokes[getCreatureName(cid)].type, pokes[getCreatureName(cid)].type2))

end

-----------------------------------------------------------------------

 

--[[-------------------- Edited Proteção --------------------------------

if valor <= 10 then

valor = math.random(15, 25) --alterado v1.5

end

------------------------]]-----------------------------------------------

---------------------- FEAR / ROAR ------------------------------------

if getPlayerStorageValue(attacker, conds["Fear"]) >= 1 then --alterado!!

return true

end

--------------------------------------------------------------------------

if damageCombat ~= COMBAT_PHYSICALDAMAGE and not isInArray(ignored, damageCombat) then

if isInArray(effectiveness[damageCombat].non, poketype1) or isInArray(effectiveness[damageCombat].non, poketype2) then

if not isInArray(specialabilities["foresight"], getCreatureName(attacker)) and getPlayerStorageValue(attacker, 999457) <= 0 then

valor = valor * 0 --alterado v1.5

end

end

end

if damageCombat == GROUNDDAMAGE then

if isInArray(specialabilities["levitate"], getCreatureName(cid)) then

valor = 0 --alterado v1.5

end

end

-----------------------------------------------------------------------------

local p = getThingPos(cid)

if p.x == 1 and p.y == 1 and p.z == 10 then

return false

end

if getPlayerStorageValue(cid, 9658783) == 1 then

return false --imune

end

-----------------------------------------------------------------------------

if valor >= getCreatureHealth(cid) then

if isInArray(cannotKill, combat) and isPlayer(cid) then

valor = getCreatureHealth(cid) - 1

else

valor = getCreatureHealth(cid)

end

end

--------------------------------------------

--------------Passiva Lifesteal Clobat------------

if combat == COMBAT_PHYSICALDAMAGE then

if getCreatureName(attacker) == "Crobat" then --alterado v1.4

doCreatureAddHealth(attacker, math.floor(valor))

doSendAnimatedText(getThingPos(attacker), "+ "..math.floor(valor), 30)

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

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) and valor ~= 0 then

valor = math.floor(valor)

addEvent(sendPlayerDmgMsg, 5, getCreatureMaster(cid), "Your "..getCreatureName(cid).." lost "..valor.." hitpoints due to an attack from "..getSomeoneDescription(attacker)..".")

end

end

 

if damageCombat == FIREDAMAGE and not isBurning(cid) then

local ret = {}

ret.id = cid

ret.cd = math.random(5, 12)

ret.check = getPlayerStorageValue(cid, conds["Burn"])

ret.damage = isSummon(attacker) and getMasterLevel(attacker)+getPokemonBoost(attacker) or getPokemonLevel(attacker)

ret.cond = "Burn"

 

doCondition2(ret)

elseif damageCombat == POISONDAMAGE and not isPoisoned(cid) then

local ret = {}

ret.id = cid

ret.cd = math.random(6, 15)

ret.check = getPlayerStorageValue(cid, conds["Poison"])

local lvl = isSummon(attacker) and getMasterLevel(attacker) or getPokemonLevel(attacker)

ret.damage = math.floor((getPokemonLevel(attacker)+lvl)/2)

ret.cond = "Poison"

 

doCondition2(ret)

end

--[[---------------CD BAR-----------------------

if isSummon(cid) then

doCreatureExecuteTalkAction(getCreatureMaster(cid), "/pokeread")

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"------------------------------ alterado v1.5 \/ formula de dano de quase todas as passivas!!

-- [outfit normal] = {out = outfit girando, efeitos}

local OutFit = {

["Scyther"] = {out = 496, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --scyther

["Scizor"] = {out = 918, cima = 236, direita = 232, esquerda = 224, baixo = 233}, --Scizor

["Shiny Scyther"] = {out = 849, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --Shiny Scyther

["Hitmontop"] = {out = 1193, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --Hitmontop

["Shiny Hitmontop"] = {out = 1451, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --Shiny Hitmontop --alterado v1.4

["Pineco"] = {out = 1194, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --pineco

["Forretress"] = {out = 1192, cima = 251, direita = 253, esquerda = 254, baixo = 252}, --Forretress

}

if OutFit[getCreatureName(cid)] then

local nome1 = getCreatureName(cid)

local chance = (nome1 == "Hitmontop" or nome1 == "Shiny Hitmontop") and (16 + getPlayerStorageValue(cid, 465987)) or 15 --alterado v1.4

if math.random(1, 100) <= chance then

 

if getPlayerStorageValue(cid, 32623) == 1 then --proteçao pra n usar a passiva 2x seguidas...

return false

end

 

local outfitt = OutFit[nome1]

 

local min = (getSpecialAttack(cid)*40)*0.1

local max = min + getPokemonLevel(cid) --alterado v1.5

local function damage(cid, min, max)

if isCreature(cid) then

if isInArray({"Scyther", "Shiny Scyther"}, nome1) then

doAreaCombatHealth(cid, BUGDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, CONST_ME_NONE)

elseif isInArray({"Hitmontop", "Shiny Hitmontop"}, nome1) then

doAreaCombatHealth(cid, FIGHTINGDAMAGE, getThingPosWithDebug(cid), scyther5, -min, -max, CONST_ME_NONE)

else

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)

doSetCreatureOutfit(cid, {lookType = outfitt.out}, -1)

 

local function doChangeO(cid)

if not isCreature(cid) then return true end

setPlayerStorageValue(cid, 32623, 0)

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

-------------------------------------------Lava Counter / Electricity-------------------------------------

local Fire_Thunder = {"Magmar", "Electabuzz", "Shiny Electabuzz", "Magby", "Elekid"}

--["Nome"] = {effeito, damage}

local eff = {

["Magmar"] = {5, FIREDAMAGE, 1461},

["Magby"] = {5, FIREDAMAGE}, --alterado v1.5

["Electabuzz"] = {207, ELECTRICDAMAGE, 1462},

["Shiny Electabuzz"] = {207, ELECTRICDAMAGE, 1460},

["Elekid"] = {207, ELECTRICDAMAGE},

}

if isInArray(Fire_Thunder, getCreatureName(cid)) and math.random(1, 100) <= 15 then

 

if getPlayerStorageValue(cid, 32623) == 1 then --proteçao pra n usar a passiva 2x seguidas...

return false

end

local min = (getSpecialAttack(cid)*27)*0.1

local max = min + getPokemonLevel(cid)

 

local function sendFireEff(cid, dir, eff, damage)

if not isCreature(cid) then return true end

doAreaCombatHealth(cid, damage, getPosByDir(getThingPos(cid), dir), 0, -min, -max, eff)

end

local function doSpinFire(cid)

if not isCreature(cid) then return true end

local t = {

[1] = SOUTH,

[2] = SOUTHEAST,

[3] = EAST,

[4] = NORTHEAST,

[5] = NORTH,

[6] = NORTHWEST,

[7] = WEST,

[8] = SOUTHWEST,

}

for a = 1, 8 do

addEvent(sendFireEff, a * 140, cid, t[a], eff[getCreatureName(cid)][1], eff[getCreatureName(cid)][2])

end

addEvent(setPlayerStorageValue, 8*140, cid, 32623, 0) --proteçao

end

local out = eff[getCreatureName(cid)][3]

if out then

doSetCreatureOutfit(cid, {lookType = out}, 8*140)

end

setPlayerStorageValue(cid, 32623, 1) --proteçao

doSpinFire(cid)

end

---------------------------------------------Demon Kicker----------------------------------

--[outfit] = outfit chutando,

local hitmonlees = {

["Hitmonlee"] = 652, --hitmonlee

["Shiny Hitmonlee"] = 878, --shiny hitmonlee

}

if isInArray({"Hitmonlee", "Shiny Hitmonlee"}, getCreatureName(cid)) and isCreature(getMasterTarget(cid)) then

if math.random(1, 100) <= (21 + getPlayerStorageValue(cid, 465987)) then

 

local nome = getCreatureName(cid)

 

if getDistanceBetween(getThingPos(cid), getThingPos(getMasterTarget(cid))) > 1 then

return false

end

if getPlayerStorageValue(cid, 32623) == 1 then --proteçao pra n usar a passiva 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)*45)*0.1

local max = min + getPokemonLevel(cid)

 

 

setPlayerStorageValue(cid, 32623, 1) --proteçao

 

doSetCreatureOutfit(cid, {lookType = hitmonlees[nome]}, -1)

doTargetCombatHealth(cid, getMasterTarget(cid), FIGHTINGDAMAGE, -min, -max, 255)

 

addEvent(doChangeHitmon, 700, cid)

end

end

-------------------------------------------Demon Puncher-------------------------------------

if isInArray({"Hitmonchan", "Shiny Hitmonchan"}, getCreatureName(cid)) and isCreature(getMasterTarget(cid)) then

if math.random(1, 100) <= (21 + getPlayerStorageValue(cid, 465987)) then

 

if getDistanceBetween(getThingPos(cid), getThingPos(getMasterTarget(cid))) > 1 then

return false

end

 

local name = getCreatureName(cid)

local min = (getOffense(cid)*45)*0.1

local max = min + getPokemonLevel(cid)

 

if ehMonstro(cid) then

hands = 0

else

hands = getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "hands")

end

 

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

---------------------------------------Stunning Confusion------------------------------------------

local ducks = {"Golduck", "Psyduck"}

if isInArray(ducks, getCreatureName(cid)) and math.random(1, 100) <= 20 then

 

if getPlayerStorageValue(cid, 32623) == 1 then --proteçao pra n usar a spell 2x seguidas...

return false

end

 

local min = (getSpecialAttack(cid)*10)*0.1

local max = min + getPokemonLevel(cid)

 

local function damage(cid)

if isCreature(cid) then

doAreaCombatHealth(cid, PSYCHICDAMAGE, getThingPosWithDebug(cid), bombWee3, -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

-----------------------------------------Groundshock-----------------------------------

if getCreatureName(cid) == "Kangaskhan" and math.random(1, 100) <= 20 then

 

local min = (getSpecialAttack(cid)*40)*0.1

local max = min + getPokemonLevel(cid)

 

doAreaCombatHealth(cid, NORMALDAMAGE, getThingPos(cid), scyther5, -min, -max, 255)

local sps = getThingPos(cid)

sps.x = sps.x+1

sps.y = sps.y+1

doSendMagicEffect(sps, 127)

end

--------------------------------------Electric Charge---------------------------------------------------

local charge = {"Pikachu", "Raichu", "Shiny Raichu"}

if isInArray(charge, getCreatureName(cid)) and math.random(1, 100) <= 15 then

if getPlayerStorageValue(cid, 253) >= 1 then

return true

end

setPlayerStorageValue(cid, 253, 1)

doSendMagicEffect(getThingPos(cid), 207)

doSendAnimatedText(getThingPos(cid), "FOCUS", 144)

end

-------------------------------------Melody------------------------------------

if getCreatureName(cid) == "Wigglytuff" and math.random(1, 100) <= 10 then

doAreaCombatHealth(cid, SLEEP_POWDERDAMAGE, getThingPos(cid), powders, -6, -10, 33)

end

------------------------------------- Dragon Fury / Fury ---------------------------------------

local DracoFury = {"Persian", "Gyarados", "Shiny Gyarados", "Dratini", "Shiny Dratini", "Dragonair", "Shiny Dragonair", "Dragonite", "Shiny Dragonite"}

if isInArray(DracoFury, getCreatureName(cid)) and math.random(1, 100) <= 10 then

if getPlayerStorageValue(cid, 32623) == 1 then

return false

end

setPlayerStorageValue(cid, 32623, 1)

if getCreatureName(cid) == "Persian" then

doRaiseStatus(cid, 2, 0, 0, 10)

else --alterado v1.5

doRaiseStatus(cid, 2, 2, 0, 10)

end

 

for t = 1, 7 do --alterado v1.5

addEvent(sendMoveEffect, t*1500, cid, 12)

end

addEvent(setPlayerStorageValue, 10000, cid, 32623, 0) --alterado v1.5

end

------------------------------------- Mega Drain ---------------------------------------

local mega = {"Oddish", "Gloom", "Vileplume", "Kabuto", "Kabutops", "Parasect", "Tangela", "Shiny Vileplume", "Shiny Tangela"}

 

if isInArray(mega, getCreatureName(cid)) and math.random(1, 100) <= 10 then

local min = (getSpecialAttack(cid)*1)*0.1

local max = min + getPokemonLevel(cid)

 

local uid = checkAreaUid(getThingPos(cid), check, 1, 1)

for _,pid in pairs(uid) do

if isCreature(cid) and isCreature(pid) and pid ~= cid then

if isPlayer(pid) and #getCreatureSummons(pid) >= 1 then return false end

 

local life = getCreatureHealth(pid)

doAreaCombatHealth(cid, GRASSDAMAGE, getThingPos(pid), 0, -min, -max, 14)

local newlife = life - getCreatureHealth(pid)

doSendMagicEffect(getThingPos(cid), 14)

if newlife >= 1 then

doCreatureAddHealth(cid, newlife)

doSendAnimatedText(getThingPos(cid), "+"..newlife.."", 32)

end

end

end

end

------------------------------------- Spores Reaction ---------------------------------------

local spores = {"Oddish", "Gloom", "Vileplume", "Shiny Vileplume"}

if isInArray(spores, getCreatureName(cid)) and math.random(1, 100) <= 10 then

local random = math.random(1, 3)

if random == 1 then

doAreaCombatHealth(cid, SLEEP_POWDERDAMAGE, getThingPos(cid), powders, -2, -3, 27) --2 3

elseif random == 2 then

local ret = {}

ret.id = 0

ret.cd = 6

ret.eff = 0

ret.check = 0

ret.spell = "none"

ret.cond = "Stun"

 

doMoveInArea2(cid, 85, confusion, GRASSDAMAGE, 0, 0, spell, ret)

else

doAreaCombatHealth(cid, POISON_POWDERDAMAGE, getThingPos(cid), powders, 6, 10, 84)

end

end

------------------------------------ Passiva Amnesia ---------------------------------------- daki pra baixo foi alterado v1.4 \/

local amnesia = {"Wooper", "Quagsire", "Swinub", "Piloswine"}

if isInArray(amnesia, getCreatureName(cid)) and math.random(1, 100) <= 10 then

doCreatureSay(cid, "????", 20) --a espera do efeito certo.. kk

doSendMagicEffect(getThingPos(cid), 132)

setPlayerStorageValue(cid, 253, 1)

end

----------------------------------- Passiva Zen Mind -----------------------------------------

if getCreatureName(cid) == "Slowking" and math.random(1, 100) <= 10 and isWithCondition(cid) then

function doCure(cid)

if not isCreature(cid) then return true end

if isSummon(cid) then

doCureBallStatus(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "all")

end

doCureStatus(cid, "all")

end

 

addEvent(doCure, 1000, cid)

doSetCreatureOutfit(cid, {lookType = 1001}, 2000)

end

---------------------------------- Passiva Mirror Coat ---------------------------------------

if getCreatureName(cid) == "Wobbuffet" and math.random(1, 100) <= 10 then

if getPlayerStorageValue(cid, 21099) <= 0 then

setPlayerStorageValue(cid, 21099, 1)

doSetCreatureOutfit(cid, {lookType = 1447}, -1)

end

end

--------------------------------- Passiva Illusion -----------------------------------------

--Talvez na proxima atualizaçao kkk passiva tensa...

 

 

return false

end

 

Link para o comentário
Compartilhar em outros sites

@Slicer

tem um bug que ta acontecendo aqui, tipo os players vão dar "fly" ai aparece a msg que ta em duel, mesmo não estando.

sabe como arruma cara ?, vlw!

OBS: Duel por order!

 

e quando vai dar surf também

 

Edit: Bom pelo que EU vi, isto deve acontecer por algumas causas

• Quando player tem 5 Pokemons ele pode aceitar Duel de 6 Pokemons (Pode ser uma das causas para continuar com storage do duel).

• Quando o player ta duel pode entrar no CP.

 

 

Essas duas causas deve fazer esse bug.

tem como colocar o duel para ex: se o cara tiver 5 Pokemons não consegue invitar duel de 6 pokemons etc, tem como pff ?.. vlw

 

@Slicer

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...