Ir para conteúdo

[Ajuda]


Nando3513

Posts Recomendados

Bom galera no meu ot tem um effect no utani gran hur e utani hur conforme a Foto que vou postar ele sai para DIreita , Esquerda , Cima , Baixo... EU queria q ele saice apenas para atraz do PLayer independente do lado q ele estege.

 

Ficarei grato se me ajudarem

 

magiae.jpg

 

o Script ta assim

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(condition, 0.7, -56, 0.7, -56)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
local position = getCreaturePosition(cid)
doSendDistanceShoot(position, {x = position.x, y = position.y + 5, z = position.z}, 40)
doSendDistanceShoot(position, {x = position.x, y = position.y - 5, z = position.z}, 40)
doSendDistanceShoot(position, {x = position.x + 5, y = position.y, z = position.z}, 40)
doSendDistanceShoot(position, {x = position.x - 5, y = position.y, z = position.z}, 40)
return doCombat(cid, combat, var)
end

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

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(condition, 0.7, -56, 0.7, -56)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
local position = getCreaturePosition(cid)
local t = {
  [0] = {x = position.x, y = position.y - 5, z = position.z},
  [1] = {x = position.x - 5, y = position.y, z = position.z},
  [2] = {x = position.x, y = position.y + 5, z = position.z},
  [3] = {x = position.x + 5, y = position.y, z = position.z}
}
doSendDistanceShoot(position, t[getCreatureLookDirection(cid)], 40)
return doCombat(cid, combat, var)
end

 

Teste e reporte o resultado no tópico!

 

Link para o comentário
Compartilhar em outros sites

Nem sai a magia agora ... e da o seguinte erro no console do ot

 

[26/07/2010 20:46:45] Lua Script Error: [spell Interface] 
[26/07/2010 20:46:45] data/spells/scripts/support/haste.lua:onCastSpell

[26/07/2010 20:46:45] data/spells/scripts/support/haste.lua:18: attempt to call global 'getCreatureLookDirection' (a nil value)
[26/07/2010 20:46:45] stack traceback:
[26/07/2010 20:46:45] 	data/spells/scripts/support/haste.lua:18: in function <data/spells/scripts/support/haste.lua:10>

Link para o comentário
Compartilhar em outros sites

O script do Oneshot ainda tava errado, só saia certo por dois lados, cara qual a versão do seu server ?

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

 

local condition = createConditionObject(CONDITION_HASTE)

setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)

setConditionFormula(condition, 0.7, -56, 0.7, -56)

setCombatCondition(combat, condition)

 

function onCastSpell(cid, var)

local position = getCreaturePosition(cid)

local t = {

[0] = {x = position.x, y = position.y + 5, z = position.z},

[1] = {x = position.x - 5, y = position.y, z = position.z},

[2] = {x = position.x, y = position.y - 5, z = position.z},

[3] = {x = position.x + 5, y = position.y, z = position.z}

}

doSendDistanceShoot(position, t[getCreatureLookDirection(cid)], 40)

return doCombat(cid, combat, var)

end

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...