Ir para conteúdo

Script Attack Pokemon


toddy15

Posts Recomendados

é o seguinte, estou tentando criar um ataque para um pokemon no meu servidor, onde quando ele usa este ataque ele muda para um outfit e logo depois que ele o usa ele volta para o seu outfit normal. Tentei fazer usando a base do Rollout do golem onde ele muda de outfit e volta para o nomrmal logo depois, mas nao deu certo, eu uso a magia e nao acontece nada, nao da erro nem nada.

 

Script:

elseif pokemon.x.spell == "Mass Kick" then

doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)

doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", use "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)

exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)

if getCreatureName(getCreatureSummons(cid)[1]) == "Elite Hitmonlee" then

doSetCreatureOutfit(getCreatureSummons(cid)[1], elitehitmonlee, 8300)

doChangeSpeed(getCreatureSummons(cid)[1], 20)

end

setPlayerStorageValue(getCreatureSummons(cid)[1], 4, 1)

local function roll(params)

if isCreature(params.cid) then

if isCreature(getCreatureSummons(params.cid)[1]) then

if getCreatureCondition(getCreatureSummons(params.cid)[1], CONDITION_OUTFIT) == true then

doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureSummons(cid)[1]), rollout, -((num1)+(getPlayerLevel(cid)*(num3))), -((num1)+(getPlayerLevel(cid)*(num3))), 255)

end

end

end

end

for r = 1, 8 do

addEvent(roll, 1000*r, {cid = cid})

end

 

local function stoproll(params)

if isCreature(params.cid) then

if isCreature(getCreatureSummons(params.cid)[1]) then

doChangeSpeed(getCreatureSummons(params.cid)[1], -101)

if getPlayerStorageValue(getCreatureSummons(params.cid)[1], 5) >= 1 then

setPlayerStorageValue(getCreatureSummons(params.cid)[1], 4, 1)

end

end

end

end

addEvent(stoproll, 8300, {cid = cid})

return 0

elseif pokemon.x.spell == "Headbutt" then

doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)

doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", use "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)

exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)

doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 3)

return 0

elseif pokemon.x.spell == "Thunder Wave" then

doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)

doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", use "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)

exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)

if getCreatureLookDir(getCreatureSummons(cid)[1]) == 0 then

 

doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureSummons(cid)[1]), tsn, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 48)

elseif getCreatureLookDir(getCreatureSummons(cid)[1]) == 1 then

 

doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureSummons(cid)[1]), tse, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 48)

elseif getCreatureLookDir(getCreatureSummons(cid)[1]) == 2 then

 

doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureSummons(cid)[1]), tss, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 48)

elseif getCreatureLookDir(getCreatureSummons(cid)[1]) == 3 then

 

doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureSummons(cid)[1]), tsw, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 48)

end

return 0

elseif pokemon.x.spell == "Thunder Punch" then

doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)

doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", use "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)

exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)

local function damage(params)

if isMonster(getCreatureTarget(params.cid)) then

doAreaCombatHealth(getCreatureSummons(params.cid)[1], element, getThingPos(getCreatureTarget(cid)), 0, -((num1)+(getPlayerLevel(cid)*(num3))), -((num2)+(getPlayerLevel(cid)*(num3))), 48)

else

end

end

addEvent(damage, 0, {cid = cid})

return 0

o look type que eu quero que o pokemon vire é o 301...

Se eu estiver fazendo algo errado no script favor ajudar '-' sou novo nisso...

se tiver alguma função que eu use para deixar ele menor agradeço. :smile_positivo:

Link para o comentário
Compartilhar em outros sites

o vei vc boto headbutt, thunder punch e thunder wave no meiu do post

orgonise sua parada...

 

vo fazer melhor do que só lhe da o script

vo te esplica pq n funfo...

 

sabe essa parte

doSetCreatureOutfit(getCreatureSummons(cid)[1], elitehitmonlee, 8300)

esse elitehitmonlee provavelmente e so o id do outfit...

mas pa mudar o outfit vc tem ki por assim {lookType = 301}

então fica assim

doSetCreatureOutfit(getCreatureSummons(cid)[1], {lookType = 301}, 8300)

=)

 

elseif pokemon.x.spell == "Mass Kick" then
doCreatureSay(getCreatureSummons(cid)[1], ""..string.upper(c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell).."!", TALKTYPE_MONSTER)
doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", use "..c[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType].x.spell.."!", TALKTYPE_SAY)
exhaustion.set(cid, pokemon.x.ex, pokemon.x.cd)
if getCreatureName(getCreatureSummons(cid)[1]) == "Elite Hitmonlee" then
doSetCreatureOutfit(getCreatureSummons(cid)[1], {lookType = 301}, 8300)
doChangeSpeed(getCreatureSummons(cid)[1], 20)
end
setPlayerStorageValue(getCreatureSummons(cid)[1], 4, 1)
local function roll(params)
if isCreature(params.cid) then
if isCreature(getCreatureSummons(params.cid)[1]) then
if getCreatureCondition(getCreatureSummons(params.cid)[1], CONDITION_OUTFIT) == true then
doAreaCombatHealth(getCreatureSummons(cid)[1], element, getThingPos(getCreatureSummons(cid)[1]), rollout, -((num1)+(getPlayerLevel(cid)*(num3))), -((num1)+(getPlayerLevel(cid)*(num3))), 255)
end
end
end
end
for r = 1, 8 do
addEvent(roll, 1000*r, {cid = cid})
end

local function stoproll(params)
if isCreature(params.cid) then
if isCreature(getCreatureSummons(params.cid)[1]) then
doChangeSpeed(getCreatureSummons(params.cid)[1], -101)
if getPlayerStorageValue(getCreatureSummons(params.cid)[1], 5) >= 1 then
setPlayerStorageValue(getCreatureSummons(params.cid)[1], 4, 1)
end
end
end
end
addEvent(stoproll, 8300, {cid = cid})
return 0

 

ajudei?

de rep+

e entre no meu server de pokemon

=)

\/

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...