Ir para conteúdo
  • 0

[Resolvido] [Ajuste] Spell não centralizada


LeoTK

Pergunta

Fala guys será que alguém pode me ajudar a centralizar essa spell gostaria de colocar o efeito dela mais para a direita alguém pode dar uma força?

 

Spoiler

local tempo = 60
local effect = {430}
     
local points = 30
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, points)
setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, points)
setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, points)
setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, points)
setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, points)
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, points)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, points)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)

            
local function Magica(tempo2,tempo3,cid)
if isCreature(cid) then
for i=1, #effect do
local position = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z}
doSendMagicEffect(position, effect)
end
end
end
                  
function onCastSpell(cid, var)
if exhaustion.check(cid, 102053) == FALSE then
doCombat(cid, combat, var)
tempo2 = 0
while (tempo2 ~= (tempo*1000)) do
addEvent(Magica, tempo2, tempo2, tempo*1000, cid)
tempo2 = tempo2 + 300
end
local position = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z}
exhaustion.set(cid, 102053, tempo)
doCreatureSay(cid, "Susano!", TALKTYPE_MONSTER)
doSendMagicEffect(position, 430)
else
doPlayerSendCancel(cid, "Sorry, you are transformed.")
end
end

 

Link para o comentário
Compartilhar em outros sites

4 respostass a esta questão

Posts Recomendados

  • 0

 

local tempo = 60local effect = {430}     local points = 30local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)local condition = createConditionObject(CONDITION_ATTRIBUTES)setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, points)setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, points)setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, points)setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, points)setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, points)setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, points)setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, points)setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)setCombatCondition(combat, condition)            local function Magica(tempo2,tempo3,cid)if isCreature(cid) thenfor i=1, #effect dolocal position = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z}doSendMagicEffect(position, effect)endendend                  function onCastSpell(cid, var)if exhaustion.check(cid, 102053) == FALSE thendoCombat(cid, combat, var)tempo2 = 0while (tempo2 ~= (tempo*1000)) doaddEvent(Magica, tempo2, tempo2, tempo*1000, cid)tempo2 = tempo2 + 300endlocal position = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z}exhaustion.set(cid, 102053, tempo)doCreatureSay(cid, "Susano!", TALKTYPE_MONSTER)doSendMagicEffect(position, 430)elsedoPlayerSendCancel(cid, "Sorry, you are transformed.")endend  

 

 

Linha alterada:

local position = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z}
 

Adicionei X+1 fazendo que o efeito saisse 1 sqm q frente >

X = <>

Y = /\ \/

Z = Andar

Link para o comentário
Compartilhar em outros sites

  • 0
32 minutos atrás, Deadpool disse:

so altera aq:

local position = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z}

nos getCreaturePosition.

vlw ^^

33 minutos atrás, Deadpool disse:

so altera aq:

local position = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z}

nos getCreaturePosition.

coloquei a reposta do crypter como melhor para caso alguém tiver alguma dúvida entender como funciona o x y e z positions mas só com a sua resposta consegui resolver vlw xD

Link para o comentário
Compartilhar em outros sites

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