Ir para conteúdo

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


lucashgas

Posts Recomendados

@pocotozinho , com esse ai que voce me passou , tá dando muito mais bug >.< , tá dando esses bugs aqui ó ...

 

[30/01/2012 05:53:49] [Error - Action Interface]

[30/01/2012 05:53:49] data/actions/scripts/goback.lua:onUse

[30/01/2012 05:53:49] Description:

[30/01/2012 05:53:49] data/lib/cooldown bar.lua:50: attempt to index local 'table' (a nil value)

[30/01/2012 05:53:50] stack traceback:

[30/01/2012 05:53:50] data/lib/cooldown bar.lua:50: in function 'getNewMoveTable'

[30/01/2012 05:53:50] data/lib/cooldown bar.lua:94: in function 'doUpdateMoves'

[30/01/2012 05:53:50] data/actions/scripts/goback.lua:122: in function <data/actions/scripts/goback.lua:1>

 

[30/01/2012 05:54:18] [Error - TalkAction Interface]

[30/01/2012 05:54:18] data/talkactions/scripts/move1.lua:onSay

[30/01/2012 05:54:19] Description:

[30/01/2012 05:54:19] data/talkactions/scripts/move1.lua:34: attempt to index field '?' (a nil value)

[30/01/2012 05:54:19] stack traceback:

[30/01/2012 05:54:19] data/talkactions/scripts/move1.lua:34: in function <data/talkactions/scripts/move1.lua:18>

 

 

Em Tempos, Continuo Com O Bug, No M1 :c

>

[05:14:04] Lucas Morete: [Error - TalkAction Interface]

[30/01/2012 05:13:55] In a timer event called from:

[30/01/2012 05:13:55] data/talkactions/scripts/move1.lua:onSay

[30/01/2012 05:13:55] Description:

[30/01/2012 05:13:55] data/talkactions/scripts/move1.lua:6: attempt to concatenate local 'id' (a nil value)

[30/01/2012 05:13:55] stack traceback:

[30/01/2012 05:13:56] data/talkactions/scripts/move1.lua:6: in function <data/talkactions/scripts/move1.lua:3>

 

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

alguem podia me dizer pq ta dando esse ero na gym sabrina?

 

[30/01/2012 06:23:47] [Error - Npc interface]

[30/01/2012 06:23:47] In a timer event called from:

[30/01/2012 06:23:47] data/npc/scripts/sabrina.lua:onCreatureSay

[30/01/2012 06:23:47] Description:

[30/01/2012 06:23:47] (luaGetCreatureSummons) Creature not found

 

[30/01/2012 06:23:47] [Error - Npc interface]

[30/01/2012 06:23:47] In a timer event called from:

[30/01/2012 06:23:47] data/npc/scripts/sabrina.lua:onCreatureSay

[30/01/2012 06:23:47] Description:

[30/01/2012 06:23:47] data/npc/scripts/sabrina.lua:23: attempt to get length of a boolean value

[30/01/2012 06:23:47] stack traceback:

[30/01/2012 06:23:47] data/npc/scripts/sabrina.lua:23: in function

e tambem isso aqui

07:38 Abra - Surf (m8) is ready!

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

@pocotozinhu, sobre o erro:

07:38 Abra - Surf (m8) is ready!

vc precisa atualizar sua versão, o @brun123 feiz uma correção, a mais recente eu acho que e a 1.4_f

e sobre o npc vou mandar o meu que está funcionando de boa.

 

local focus = 0

local max_distance = 8

local talk_start = 0

local conv = 0

local fighting = false

local challenger = 0

local afk_limit_time = 30 -- seconds

local afk_time = 0 -- don't change

local battle_turn = 1 -- don't change

local challenger_turn = 0 -- don't change

 

local pokemons = {

{name = "Alakazam", level = 93, extralevel = 107, sex = SEX_MALE, nick = "", ball = "normal"},

{name = "Hypno", level = 85, extralevel = 65, sex = SEX_MALE, nick = "", ball = "normal"},

{name = "Mr. Mime", level = 80, extralevel = 120, sex = SEX_FEMALE, nick = "", ball = "normal"},

{name = "Porygon", level = 77, extralevel = 73, sex = SEX_FEMALE, nick = "", ball = "normal"},

}

 

 

local function doSummonGymPokemon(npc)

local this = npc

if not isCreature(this) then return true end

if #getCreatureSummons(this) >= 1 or focus == 0 then return true end

local it = pokemons[battle_turn]

doSummonMonster(this, it.name)

local summon = getCreatureSummons(this)[1]

local balleffect = pokeballs["normal"].effect

if it.ball and pokeballs[it.ball] then

balleffect = pokeballs[it.ball].effect

end

doSendMagicEffect(getThingPos(summon), balleffect)

setPlayerStorageValue(summon, 10000, balleffect)

setPlayerStorageValue(summon, 10001, gobackmsgs[math.random(#gobackmsgs)].back:gsub("doka", it.nick ~= "" and it.nick or it.name))

setPlayerStorageValue(summon, 1007, it.nick ~= "" and it.nick or it.name)

doSetMonsterGym(summon, focus)

local name = it.nick ~= "" and it.nick or getCreatureName(this).."s "..it.name

setWildPokemonLevel(summon, it.level, getPokemonStatus(it.name, (it.extralevel + it.level)), name, 1.5)

doCreatureSay(this, gobackmsgs[math.random(#gobackmsgs)].go:gsub("doka", getPlayerStorageValue(summon, 1007)), 1)

fighting = true

battle_turn = battle_turn + 1

end

 

local function doWinDuel(cid, npc)

if not isCreature(cid) then return true end

local this = npc

local a = gymbadges[getCreatureName(this)] + 8

doCreatureSay(npc, "You won the duel! Congratulations, take this "..getItemNameById(a - 8).." as a prize.", 1)

local b = getPlayerItemById(cid, true, a)

if b.uid > 0 then doTransformItem(b.uid, b.itemid - 8) end

end

 

function onCreatureSay(cid, type, msg)

 

local msg = string.lower(msg)

 

if focus == cid then

talk_start = os.clock()

end

 

if msgcontains(msg, 'hi') and focus == 0 and getDistanceToCreature(cid) <= 4 then

focus = cid

talk_start = os.clock()

conv = 1

selfSay("Hello "..getCreatureName(cid)..", my name is Sabrina and I'm Saffron's Gym Leader. How may I help you?")

return true

end

 

if isDuelMsg(msg) and conv == 1 and focus == cid then

 

if getPlayerItemCount(cid, gymbadges[getCreatureName(getThis())]) >= 1 then

selfSay("You have already won my Marsh Badge, maybe some other day we can fight.")

focus = 0

return true

end

 

if not hasPokemon(cid) then

selfSay("To battle agains't a gym leader you need pokemons.")

return true

end

 

selfSay("You are challenging me to a battle. It will be a "..#pokemons.." pokemon limit battle, let's start?")

conv = 2

 

return true

end

 

if isConfirmMsg(msg) and conv == 2 and focus == cid then

 

challenger = focus

setPlayerStorageValue(cid, 990, 1)

selfSay("Yea, let's fight!")

talk_start = os.clock()

addEvent(doSummonGymPokemon, 850, getThis())

conv = 3

 

return true

end

 

if isNegMsg(msg) and conv == 2 and focus == cid then

 

focus = 0

selfSay("It is better for you to refuse a battle against me!")

 

return true

end

 

if msgcontains(msg, 'bye') and focus == cid then

selfSay('Bye and do your best trainer!')

setPlayerStorageValue(focus, 990, -1)

focus = 0

return true

end

end

 

local afk_warning = false

local change = false

 

function onThink()

 

if focus == 0 then

selfTurn(2)

fighting = false

challenger = 0

challenger_turn = 0

battle_turn = 1

afk_time = 0

afk_warning = false

 

if #getCreatureSummons(getThis()) >= 1 then

setPlayerStorageValue(getCreatureSummons(getThis())[1], 1006, 0)

doCreatureAddHealth(getCreatureSummons(getThis())[1], -getCreatureMaxHealth(getCreatureSummons(getThis())[1]))

end

 

return true

else

 

if not isCreature(focus) then

focus = 0

return true

end

 

if fighting then

 

talk_start = os.clock()

 

if not isCreature(getCreatureTarget(getThis())) then

if #getCreatureSummons(challenger) >= 1 then

selfAttackCreature(getCreatureSummons(challenger)[1])

change = true

afk_time = 0

else

afk_time = afk_time + 0.5

if change then

change = false

challenger_turn = challenger_turn + 1

end

end

end

 

if afk_time > afk_limit_time then

setPlayerStorageValue(focus, 990, -1)

focus = 0

selfSay("I have waited too long, come back when you are ready!")

return true

end

 

if not afk_warning and afk_time > afk_limit_time / 2 then

selfSay("Where's your pokemon? Let's fight!")

afk_warning = true

end

 

 

if #getCreatureSummons(getThis()) == 0 then

if battle_turn > #pokemons then

addEvent(doWinDuel, 1000, focus, getThis())

setPlayerStorageValue(focus, 990, -1)

focus = 0

return true

end

addEvent(doSummonGymPokemon, 1000, getThis())

end

 

if not hasPokemon(challenger) or challenger_turn >= 7 or challenger_turn > #pokemons then

selfSay("You lost our duel! Maybe some other time you'll defeat me.")

setPlayerStorageValue(focus, 990, -1)

focus = 0

return true

end

 

end

 

local npcpos = getThingPos(getThis())

local focpos = getThingPos(focus)

 

if npcpos.z ~= focpos.z then

setPlayerStorageValue(focus, 990, -1)

focus = 0

selfSay("Bye then.")

return true

end

 

if (os.clock() - talk_start) > 30 then

selfSay("Good bye and keep training!")

setPlayerStorageValue(focus, 990, -1)

focus = 0

end

 

if getDistanceToCreature(focus) > max_distance then

setPlayerStorageValue(focus, 990, -1)

focus = 0

return true

end

 

local dir = doRedirectDirection(getDirectionTo(npcpos, focpos))

selfTurn(dir)

end

return true

end

Link para o comentário
Compartilhar em outros sites

ta dando esse erro

[30/01/2012 08:23:28] [Error - CreatureScript Interface]

[30/01/2012 08:23:28] data/creaturescripts/scripts/exp.lua:onStatsChange

[30/01/2012 08:23:28] Description:

[30/01/2012 08:23:28] data/creaturescripts/scripts/exp.lua:315: attempt to index field '?' (a nil value)

[30/01/2012 08:23:28] stack traceback:

[30/01/2012 08:23:29] data/creaturescripts/scripts/exp.lua:315: in function <data/creaturescripts/scripts/exp.lua:129>

 

alguem sabe arruma?

Link para o comentário
Compartilhar em outros sites

@pocotozinho

q pokes tavas usando quando deu esse erro?

pq aparentemente.. ta dando isso pq o poke q tas usando n ta na tabela "pokes" no lib/configuration.lua... ou no minimo ele n tem o parametro "type"... "APARENTEMENTE..." ;p

Link para o comentário
Compartilhar em outros sites

Bom se deu esse erro de moves e o pokemon tem o move funcional não é bem um erro é que pode aparacer no console quando o player fala m1 duas 3 vezes faz o teste isso aparece aqui quando eu falo com alguns pokes e aparecia tbm quando não tinha Cd tipo shiny mew e shiny moltres eu adicionei e ficou normal.

 

ALGUEM TEM UM SCRIPT DE POTION FUNCIONANDO ESSE QUE VEIO NÃO HEALA

 

@Mapperotpokemon

Pode me da uma força fiz tudo certo instalei o i tem no dat e no itemeditor so que quando vo fazer se eu ver da debug oque será?

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

Bom se deu esse erro de moves e o pokemon tem o move funcional não é bem um erro é que pode aparacer no console quando o player fala m1 duas 3 vezes faz o teste isso aparece aqui quando eu falo com alguns pokes e aparecia tbm quando não tinha Cd tipo shiny mew e shiny moltres eu adicionei e ficou normal.

 

ALGUEM TEM UM SCRIPT DE POTION FUNCIONANDO ESSE QUE VEIO NÃO HEALA

 

@Mapperotpokemon

Pode me da uma força fiz tudo certo instalei o i tem no dat e no itemeditor so que quando vo fazer se eu ver da debug oque será?

 

vocÊ crio sprite e adiciono? ou vc so adiciono no itemeditor? vc tem que salvar e coloca a confguração certa pra não dar debug depois adiciona o item no xml

Link para o comentário
Compartilhar em outros sites

@all

ae galera.. terminei de editar a skill passiva, swords dance/"giro ball", dos pokes scyther, shiny scyther, hitmontop, forretress, pineco...

caso de algum erro me avise.. e esperando alguem q entenda os scripts do brun123 pra deixar essa passiva 100% ;p

LEMBRANDO: esse script eh pra servir de base pra vcs... ele n esta 100%

Detalhes:
  ●Script esta funcional mas n esta 100%...
  ●E so esta funcionando em pokes selvagens.. pois n sei como funciona o sistema de pokes de player...
  ●Eu n sei como funciona o sistema de dano nesse serv entao coloquei qlqr coisa.. quem for usar tem q arruma a parte do dano...  
  ●Esses IDs de outfits do script sao referentes ao .dat e .spr do novo sistema de portrait q postaram aki... n me recordo quem foi q fez.. desculpe... entao caso seu .dat ou .spr sejam diferentes altere as outfits...

 

 

1* vá a pasta spells/scripts/ ... e crie uma pasta chamada "passivas" ... ficando spells/scripts/passivas .. crie um novo documento .lua e cole isso dentro...

 

 

function getThingPosWithDebug(what)

if not isCreature(what) or getCreatureHealth(what) <= 0 then

return {x = 1, y = 1, z = 1}

end

return getThingPos(what)

end

 

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

local OutFit = {

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

[912] = {out = 918, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --Scizor

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

[952] = {out = 1193, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --Hitmontop

[909] = {out = 1194, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --pineco

[910] = {out = 1192, cima = 128, direita = 129, esquerda = 130, baixo = 131}, --Forretress

}

 

--acima do efeito 255 n aparece -pelo menos aki- entao fica esse por enquanto... ;x

--efeito vermelho => {cima = 261, direita = 263, esquerda = 264, baixo = 262}

function onCastSpell(cid, var)

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

return false

end

 

local outfitt = OutFit[getCreatureOutfit(cid).lookType]

local function doWingAttack(cid, a, damage, min, max)

local damagearea = {}

local effectpos = getThingPosWithDebug(cid)

local effect = 255

if a == 0 then

effect = outfitt.cima

effectpos.x = effectpos.x + 1

effectpos.y = effectpos.y - 1

damagearea = wingdn

elseif a == 1 then

effect = outfitt.direita

effectpos.x = effectpos.x + 2

effectpos.y = effectpos.y + 1

damagearea = wingde

elseif a == 2 then

effect = outfitt.baixo

effectpos.x = effectpos.x + 1

effectpos.y = effectpos.y + 2

damagearea = wingds

elseif a == 3 then

effect = outfitt.esquerda

effectpos.x = effectpos.x - 1

effectpos.y = effectpos.y + 1

damagearea = wingdw

end

doSendMagicEffect(effectpos, effect)

if damage then

if getCreatureOutfit(cid).lookType == (366 or 1317) then --scyther e shiny scyther

doAreaCombatHealth(cid, FLYINGDAMAGE, getThingPosWithDebug(cid), damagearea, -min, -max, CONST_ME_NONE)

elseif getCreatureOutfit(cid).lookType == 952 then --hitmontop

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

else --resto

doAreaCombatHealth(cid, STEELDAMAGE, getThingPosWithDebug(cid), damagearea, -min, -max, CONST_ME_NONE)

end

end

end

 

local dire = getCreatureLookDir(cid)

local cpos = getThingPosWithDebug(cid)

local min = getWildPokemonLevel(cid)*10 --nao sei como funciona o sistema de dano...

local max = getWildPokemonLevel(cid)*15 --nao sei como funciona o sistema de dano...

 

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

doSetCreatureOutfit(cid, {lookType = OutFit[getCreatureOutfit(cid).lookType].out}, -1)

 

local function doDance(cid, dir, damage, min, max)

if not isCreature(cid) then return true end

doCreatureSetLookDir(cid, dir)

doWingAttack(cid, dir, damage, min, max)

end

 

for times = 0, 5 do

for directions = 0, 3 do

addEvent(doDance, times * 300, cid, directions, true, min, max)

end

end

 

local function doChangeO(cid, dir, pos)

if not isCreature(cid) then return true end

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

doRemoveCondition(cid, CONDITION_OUTFIT)

if getThingPosWithDebug(cid).x == pos.x and getThingPosWithDebug(cid).y == pos.y then

doCreatureSetLookDir(cid, dir)

end

end

 

addEvent(doChangeO, 5 * 300 + 10, cid, dire, cpos)

end

 

 

depois volte na pasta spells e abra o spells.xml e cole isso ... antes de </spells>

 

 

<instant name="Sword Dance" words="spell270" lvl="1000" mana="0" event="script" value="passivas/Sword Dance.lua"></instant>

 

 

e por ultimo.. va na pasta monster/pokes e abra um desses pokes {Scyther, Shiny Scyther, hitmontop, Forretress, Pineco} e coloque isso na parte de "defense" do poke.. PS: altere a "chance" como vc preferir...

 

 

<defenses armor="0" defense="0">

<defense name="Sword Dance" interval="1000" chance="24" min="90" max="120">

</defense>

</defenses>

 

 

ficando assim.. Exemplo do Scyther...

 

 

<?xml version="1.0" encoding="UTF-8"?>

<monster name="Scyther" nameDescription="a scyther" race="bug" experience="1044" speed="177" manacost="0">

<health now="110" max="110"/>

<look type="366" head="55" body="80" legs="95" feet="113" corpse="11958"/>

<targetchange interval="10000" chance="0"/>

<strategy attack="100" defense="0"/>

<flags>

<flag summonable="1"/>

<flag attackable="1"/>

<flag hostile="1"/>

<flag illusionable="1"/>

<flag convinceable="1"/>

<flag pushable="1"/>

<flag canpushitems="0"/>

<flag canpushcreatures="0"/>

<flag targetdistance="1"/>

<flag staticattack="97"/>

<flag runonhealth="0"/>

<flag hungerdelay="20"/>

</flags>

<attacks>

<attack name="melee" interval="2000" chance="100" range="1" min="-50" max="-100"/>

<attack name="Quick Attack" interval="2570" chance="31" range="2"/>

<attack name="Slash" interval="2852" chance="29" range="1"/>

<attack name="Wing Attack" interval="3322" chance="26" range="6"/>

<attack name="Fury Cutter" interval="3040" chance="28" range="1"/>

<attack name="Agility" interval="6330" chance="17" range="6"/>

<attack name="Razor Wind" interval="3040" chance="28" range="6"/>

<attack name="Swords Dance" interval="4403" chance="20" range="6"/>

<attack name="X-Scissor" interval="3698" chance="24" range="1"/>

</attacks>

<defenses armor="0" defense="0">

<defense name="Sword Dance" interval="1000" chance="24" min="90" max="120">

</defense>

</defenses>

<voices interval="5000" chance="10">

<voice sentence="SCYTHER!"/>

</voices>

<loot>

<item id="12171" chance="10000" count="1" countmax="1"/>

<item id="11448" chance="100" count="1" countmax="1"/>

<item id="12167" chance="10000" count="1" countmax="1"/>

</loot>

<script>

<event name="Spawn"/>

</script>

</monster>

 

 

 

 

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

Pois é salvo normal mas da debug quando eu vejo o item.

Debora eu não sei desse mapa mas aqui nesse topico tem o kpdo do Gmhareot eu acho ta muito bom com resp e tem uma boost machine em celadon ( se bem que é so coloca no map editor facil demais.)

 

Deu certo aqui ta funcionando as balls menos a saffari lol

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

continuo com o bug no m1, qndo players usam o m1, laga tudo o sv :S , e da o seguinte erro

>

[05:14:04] Lucas Morete: [Error - TalkAction Interface]

[30/01/2012 05:13:55] In a timer event called from:

[30/01/2012 05:13:55] data/talkactions/scripts/move1.lua:onSay

[30/01/2012 05:13:55] Description:

[30/01/2012 05:13:55] data/talkactions/scripts/move1.lua:6: attempt to concatenate local 'id' (a nil value)

[30/01/2012 05:13:55] stack traceback:

[30/01/2012 05:13:56] data/talkactions/scripts/move1.lua:6: in function <data/talkactions/scripts/move1.lua:3>

 

 

Preciso De Ajuda :C

Link para o comentário
Compartilhar em outros sites

Posta esse teu move1 ae cara qualquer coisa usa o meu que não tem erro se tiver dando erro não é o move e sim a spell dele:

 

local msgs = {"use ", ""}

 

function doAlertReady(cid, id, movename, n, cd)

if not isCreature(cid) then return true end

local myball = getPlayerSlotItem(cid, 8)

if myball.itemid > 0 and getItemAttribute(myball.uid, cd) == "cd:"..id.."" then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPokeballName(myball.uid).." - "..movename.." (m"..n..") is ready!")

return true

end

local p = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid)

if not p or #p <= 0 then return true end

for a = 1, #p do

if getItemAttribute(p[a], cd) == "cd:"..id.."" then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPokeballName(p[a]).." - "..movename.." (m"..n..") is ready!")

return true

end

end

end

 

function onSay(cid, words, param, channel)

 

 

if param ~= "" then return true end

if string.len(words) > 3 then return true end

 

if #getCreatureSummons(cid) == 0 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need a pokemon to use moves.")

return 0

end

 

if getCreatureCondition(getCreatureSummons(cid)[1], CONDITION_INVISIBLE) and not isGhostPokemon(getCreatureSummons(cid)[1]) then

return 0

end

 

local mypoke = getCreatureSummons(cid)[1]

 

if getCreatureCondition(cid, CONDITION_EXHAUST) then return true end

if getCreatureName(mypoke) == "Evolution" then return true end

 

local name = getCreatureName(mypoke) == "Ditto" and getPlayerStorageValue(mypoke, 1010) or getCreatureName(mypoke)

 

local it = string.sub(words, 2, 3)

local move = movestable[name].move1

local cdzin = "move"..it..""

 

if it == "2" then

move = movestable[name].move2

elseif it == "3" then

move = movestable[name].move3

elseif it == "4" then

move = movestable[name].move4

elseif it == "5" then

move = movestable[name].move5

elseif it == "6" then

move = movestable[name].move6

elseif it == "7" then

move = movestable[name].move7

elseif it == "8" then

move = movestable[name].move8

elseif it == "9" then

move = movestable[name].move9

elseif it == "10" then

move = movestable[name].move10

elseif it == "11" then

move = movestable[name].move11

elseif it == "12" then

move = movestable[name].move12

elseif it == "13" then

move = movestable[name].move13

end

 

if not move then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.")

return true

end

 

if false and getLevel(mypoke) < move.level then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't have enough level to use this move.")

return 0

end

 

if getCD(getPlayerSlotItem(cid, 8).uid, cdzin) > 0 and getCD(getPlayerSlotItem(cid, 8).uid, cdzin) < (move.cd + 2) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to wait "..getCD(getPlayerSlotItem(cid, 8).uid, cdzin).." seconds to use this move again.")

return 0

end

 

if getTileInfo(getThingPos(mypoke)).protection then

doPlayerSendCancel(cid, "Your pokemon cannot use moves while in protection zone.")

return 0

end

 

 

if move.target == 1 then

 

if not isCreature(getCreatureTarget(cid)) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don\'t have any targets.")

return 0

end

 

if getCreatureCondition(getCreatureTarget(cid), CONDITION_INVISIBLE) then

return 0

end

 

if getCreatureHealth(getCreatureTarget(cid)) <= 0 then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your have already defeated your target.")

return 0

end

 

if not isCreature(getCreatureSummons(cid)[1]) then

return true

end

 

if getDistanceBetween(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid))) > move.dist then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Get closer to the target to use this move.")

return 0

end

 

if not isSightClear(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid)), false) then

return 0

end

end

 

doCreatureSay(cid, ""..getPokeName(mypoke)..", "..msgs[math.random(#msgs)]..""..move.name.."!", TALKTYPE_SAY)

 

local newid = 0

 

if isSleeping(mypoke) then

newid = setCD(getPlayerSlotItem(cid, 8).uid, cdzin, 8)

doCreatureSay(mypoke, "zZzZ", TALKTYPE_MONSTER)

return 0

else

newid = setCD(getPlayerSlotItem(cid, 8).uid, cdzin, move.cd)

end

 

if move.name ~= "Metronome" then

doCreatureSay(mypoke, ""..string.upper(move.name).."!", TALKTYPE_MONSTER)

end

 

addEvent(doAlertReady, move.cd * 1000, cid, newid, move.name, it, cdzin)

docastspell(mypoke, move.name)

doCreatureAddCondition(cid, playerexhaust)

 

if useKpdoDlls then

doUpdateCooldowns(cid)

end

 

return 0

end

 

Link para o comentário
Compartilhar em outros sites

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