manda ele te mandar a funçao.. changeposbydir... ;x deve ta na lib dele...
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

info
Grupo: Visconde
Registrado: 27/02/13
Posts: 446
Reputação: +282
Gênero: Masculino

Ele nao entra faz 3 dias -'
Editado Março 27 por OrochiElf
O que a função 'changeposbydir' deveria fazer?
#edit
Acho que sei como é essa função, se for a que estou pensando, o nome dela no tfs é getPositionByDirection(fromPosition, direction, size)
Teste ai:
eryUTCpi[/pastebin]
Editado Março 27 por dalvorsn
info
Grupo: Visconde
Registrado: 27/02/13
Posts: 446
Reputação: +282
Gênero: Masculino

Bom, a funçao mesmo iria jogar o mesmo efeito para todos lados do player.
\ | /
-0-
/ | \
Mais ou menos do jeito dakeles pontos ali.
@Vou testar o seu sistema.
Bom, a funçao mesmo iria jogar o mesmo efeito para todos lados do player.
\ | /
-0-
/ | \
Mais ou menos do jeito dakeles pontos ali.
@Vou testar o seu sistema.
Eu não alterei em nada a magia, eu apenas troquei o nome 'changeposbydir' por 'getPositionByDirection'
info
Grupo: Visconde
Registrado: 27/02/13
Posts: 446
Reputação: +282
Gênero: Masculino

Funciionou , REP+ ,
Duvida Sanada.




info
Grupo: Visconde
Registrado: 27/02/13
Posts: 446
Reputação: +282
Gênero: Masculino
Fala ai galera, meu amigo me passou uma spell para eu usar em meu servidor.
porém quando eu fui testar deu um error muito chato.
Script
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 255)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 7, 14)
local arr = {
{0,0,0,0,0,1,0,0,0,0,0},
{0,1,0,0,0,1,0,0,0,1,0},
{0,0,1,0,0,1,0,0,1,0,0},
{0,0,0,1,0,1,0,1,0,0,0},
{0,0,0,0,1,1,1,0,0,0,0},
{1,1,1,1,1,2,1,1,1,1,1},
{0,0,0,0,1,1,1,0,0,0,0},
{0,0,0,1,0,1,0,1,0,0,0},
{0,0,1,0,0,1,0,0,1,0,0},
{0,1,0,0,0,1,0,0,0,1,0},
{0,0,0,0,0,1,0,0,0,0,0}
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
local function onCastSpell1(parameters)
doCombat(parameters.cid, combat1, parameters.var)
end
function getThingPosWithDebug(what)
if not isCreature(what) or getCreatureHealth(what) <= 0 then
return {x = 1, y = 1, z = 1}
end
return getThingPos(what)
end
function onCastSpell(cid, var)
function onOut1(cid)
local outfit = getCreatureOutfit(cid)
outfit.lookType = 350
doSetCreatureOutfit(cid, outfit, -1)
end
function onOut2(cid)
local outfit = getCreatureOutfit(cid)
outfit.lookType = 351
doSetCreatureOutfit(cid, outfit, -1)
end
function onRemove(cid)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
local function ChargingBeam(cid)
if not isCreature(cid) then
return true
end
local tab = {}
for x = -2, 2 do
for y = -2, 2 do
local pos = getThingPosWithDebug(cid)
pos.x = pos.x + x
pos.y = pos.y + y
if pos.x ~= getThingPosWithDebug(cid).x and pos.y ~= getThingPosWithDebug(cid).y then
table.insert(tab, pos)
end
end
end
doSendDistanceShoot(tab[math.random(#tab)], getThingPosWithDebug(cid), 35)
end
local function onSpell(cid)
doCombat(cid, combat, var)
for a=0,7 do
doSendDistanceShoot(getThingPos(cid), changeposbydir(getThingPos(cid), a, a>3 and 4 or 5), 35)
end
end
local function son2(cid)
useSound(cid,26,"sounds/energy.wav")
end
addEvent(function() son2(cid) end,1*1000)
useSound(cid,26,"sounds/load.wav")
doCreatureSay(cid,"Energy Explosion",TALKTYPE_ORANGE_1)
onOut1(cid)
addEvent(function() onOut2(cid) end,1*1000)
addEvent(function() onRemove(cid) end,2*1000)
ChargingBeam(cid)
ChargingBeam(cid)
ChargingBeam(cid)
ChargingBeam(cid)
addEvent(function() onSpell(cid) end,1*1000)
addEvent(doCombat,1100,cid,combat,var)
end
Se alguem poder ajudar *-*