Ir para conteúdo

Spell que segue o player.


xmaster0

Posts Recomendados

Pessoas eu trouxe aqui um script pra quem puder editar:

Bem esse script faz soltar varios effect e ares diferentes, porém se vc mexer o pokemon o poder fica saindo naquele lugar onde que ele tava, e não segue poke:

queria que ele seguisse, quem consegue?:

 

talvez um função que verifique a pos do player e mande o spell seguir ele

 

script aqui(pra editar)

 

 

local acombat1 = createCombatObject()
local acombat2 = createCombatObject()
local acombat3 = createCombatObject()
local acombat4 = createCombatObject()
local acombat5 = createCombatObject()
local acombat6 = createCombatObject()

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PSYCHICDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 136)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -0.3, 0, -0.4, 0)


local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PSYCHICDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 133)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -0.3, 0, -0.4, 0)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PSYCHICDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 136)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -0.3, 0, -0.4, 0)


local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PSYCHICDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 137)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -0.3, 0, -0.4, 0)

local combat5 = createCombatObject()
setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PSYCHICDAMAGE)
setCombatParam(combat5, COMBAT_PARAM_EFFECT, 133)
setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -0.3, 0, -0.4, 0)

local combat6 = createCombatObject()
setCombatParam(combat6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 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
local area5 = createCombatArea(arr5)
local area6 = createCombatArea(arr6)
setCombatArea(acombat1, area1)
setCombatArea(acombat2, area2)
setCombatArea(acombat3, area3)
setCombatArea(acombat4, area4)
setCombatArea(acombat5, area5)
setCombatArea(acombat6, area6)

function onTargetTile(cid, pos)
doCombat(cid,combat1,positionToVariant(pos))
end

function onTargetTile2(cid, pos)
doCombat(cid,combat2,positionToVariant(pos))
end

function onTargetTile3(cid, pos)
doCombat(cid,combat3,positionToVariant(pos))
end

function onTargetTile4(cid, pos)
doCombat(cid,combat4,positionToVariant(pos))
end

function onTargetTile5(cid, pos)
doCombat(cid,combat5,positionToVariant(pos))
end

function onTargetTile6(cid, pos)
doCombat(cid,combat6,positionToVariant(pos))
end

setCombatCallback(acombat1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

setCombatCallback(acombat2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")


setCombatCallback(acombat3, CALLBACK_PARAM_TARGETTILE, "onTargetTile3")


setCombatCallback(acombat4, CALLBACK_PARAM_TARGETTILE, "onTargetTile4")


setCombatCallback(acombat5, CALLBACK_PARAM_TARGETTILE, "onTargetTile5")


setCombatCallback(acombat6, CALLBACK_PARAM_TARGETTILE, "onTargetTile6")

local function onCastSpell1(parameters)
doCombat(parameters.cid, acombat1, parameters.var)
end

local function onCastSpell2(parameters)
doCombat(parameters.cid, acombat2, parameters.var)
end

local function onCastSpell3(parameters)
doCombat(parameters.cid, acombat3, parameters.var)
end

local function onCastSpell4(parameters)
doCombat(parameters.cid, acombat4, parameters.var)
end

local function onCastSpell5(parameters)
doCombat(parameters.cid, acombat5, parameters.var)
end

local function onCastSpell6(parameters)
doCombat(parameters.cid, acombat6, parameters.var)
end


function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 500, parameters)
addEvent(onCastSpell3, 900, parameters)
addEvent(onCastSpell4, 1300, parameters)
addEvent(onCastSpell5, 1700, parameters)
addEvent(onCastSpell6, 2100, parameters)

end

 

 

 

 

 

se puder ajudar eu tenho um script que faz seguir o player, é o poison gas, porém ele só solta um efeito e uma area e repete varias vezes só esses, por isso quero o de cima, pois ele varia mais

 

 

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, POISONDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 114)

local area = createCombatArea(AREA_CIRCLE2X2)
setCombatArea(combat, area)

local area2 = createCombatArea(AREA_CIRCLE2X2)
setCombatArea(combat, area)

function onCastSpell(cid, var)
doCreatureSay(cid, "POISON GAS!", TALKTYPE_MONSTER)
if getPlayerStorageValue(cid, 3) >= 1 then
doSendAnimatedText(getThingPos(cid), "MISS", 215)
setPlayerStorageValue(cid, 3, -1)
return true
end
if getPlayerStorageValue(cid, 5) >= 1 then
if math.random(1,100) <= 33 then
doSendAnimatedText(getThingPos(cid), "SELF HIT", 180)
if isPlayer(getCreatureTarget(cid)) then
huah = getPlayerLevel(getCreatureTarget(cid))
else
huah = getPlayerLevel(getCreatureMaster(getCreatureTarget(cid)))
end
local levels = huah
doTargetCombatHealth(getCreatureTarget(cid), cid, COMBAT_PHYSICALDAMAGE, -(math.random((levels*3),(levels*5))), -((math.random((levels*3),(levels*5))+10)), 3)
return true
end
end
local function gas(params)
if isCreature(params.cid) then
doAreaCombatHealth(cid, POISONDAMAGE, getThingPos(cid), area, -(params.x), -(params.y), 114)
end
local function gas2(params)
if isCreature(params.cid) then
doAreaCombatHealth(cid, POISONDAMAGE, getThingPos(cid), area2, -(params.x), -(params.y), 226)
end
end
end
if getCreatureName(cid) == "Articuno" then
min = 5
elseif getCreatureName(cid) == "Vileplume" then
min = 85
elseif getCreatureName(cid) == "Gloom" then
min = 25
elseif getCreatureName(cid) == "Koffing" then
min = 10
elseif getCreatureName(cid) == "Weezing" then
min = 55
end
local x = min
local y = x + 10
addEvent(gas, 000, {cid = cid, x = x, y = y})
addEvent(gas2, 500, {cid = cid, x = x, y = y})
addEvent(gas, 1000, {cid = cid, x = x, y = y})
addEvent(gas, 1500, {cid = cid, x = x, y = y})
addEvent(gas, 2200, {cid = cid, x = x, y = y})
addEvent(gas, 2700, {cid = cid, x = x, y = y})
addEvent(gas, 3200, {cid = cid, x = x, y = y})
addEvent(gas, 3900, {cid = cid, x = x, y = y})
addEvent(gas, 4400, {cid = cid, x = x, y = y})
addEvent(gas, 4900, {cid = cid, x = x, y = y})
end

 

 

Rep+

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...