Pamonha32 0 Postado Janeiro 15, 2011 Share Postado Janeiro 15, 2011 Tipo fiz um spell aki dai nao estou conseguindo colacar para eu atka o bixo e a magia i tbm no cara tipo um exori frigo me ajudem por favor meu ot é 8.60 baiak o scrip: local combat = createCombatObject() local meteor = createCombatObject() setCombatParam(meteor, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(meteor, COMBAT_PARAM_EFFECT, COMBAT_PHYSICALDAMAGE) setCombatParam(meteor, COMBAT_PARAM_DISTANCEEFFECT, CONST_ME_BATS) setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, -4.6, -200, -4.2, -200) local meteor_water = createCombatObject() setCombatParam(meteor_water, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(meteor_water, COMBAT_PARAM_EFFECT, 1) setCombatFormula(meteor_water, COMBAT_FORMULA_LEVELMAGIC, -4.6, -200, -4.2, -200) combat_arr = { {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, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 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 combat_area = createCombatArea(combat_arr) setCombatArea(combat, combat_area) local function meteorCast(p) doCombat(p.cid, p.combat, positionToVariant(p.pos)) end local function stunEffect(cid) doSendMagicEffect(getThingPos(cid), CONST_ME_STUN) end function onTargetTile(cid, pos) if (math.random(0, 1) == 1) then local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 1}) if (isInArray(water, ground.itemid) == TRUE) then local newpos = {x = pos.x -7 , y = pos.y -6 , z = pos.z} doSendDistanceShoot(newpos, pos, CONST_ANI_ONYXARROW) addEvent(meteorCast, 300, {cid = cid, pos = pos, combat = meteor_water}) else local newpos = {x = pos.x -7 , y = pos.y -6, z = pos.z} doSendDistanceShoot(newpos, pos, CONST_ANI_ONYXARROW) addEvent(meteorCast, 300, {cid = cid,pos = pos, combat = meteor}) end end end setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") function onCastSpell(cid, var) return doCombat(cid, combat, var) end Link para o comentário https://xtibia.com/forum/topic/149483-ajuda-por-favor/ Compartilhar em outros sites More sharing options...
0 Kimoszin 32 Postado Janeiro 31, 2011 Share Postado Janeiro 31, 2011 Mano eu arrumei so que vc tem que arrumar mais uma coisa , ele nao fica saindo so num lugar as vezes sai nuns e as vezes no outro mais ja ta hitando. local combat = createCombatObject() local meteor = createCombatObject() setCombatParam(meteor, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(meteor, COMBAT_PARAM_EFFECT, COMBAT_PHYSICALDAMAGE) setCombatParam(meteor, COMBAT_PARAM_DISTANCEEFFECT, CONST_ME_BATS) setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, -4.6, -200, -4.2, -200) local meteor_water = createCombatObject() setCombatParam(meteor_water, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(meteor_water, COMBAT_PARAM_EFFECT, 1) setCombatFormula(meteor_water, COMBAT_FORMULA_LEVELMAGIC, -4.6, -200, -4.2, -200) local area = createCombatArea(AREA_SQUAREWAVE6, AREADIAGONAL_SQUAREWAVE5) setCombatArea(combat, area) local combat_area = createCombatArea(combat_arr) setCombatArea(combat, combat_area) local function meteorCast(p) doCombat(p.cid, p.combat, positionToVariant(p.pos)) end local function stunEffect(cid) doSendMagicEffect(getThingPos(cid), CONST_ME_STUN) end function onTargetTile(cid, pos) if (math.random(0, 1) == 1) then local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 1}) if (isInArray(water, ground.itemid) == TRUE) then local newpos = {x = pos.x -7 , y = pos.y -6 , z = pos.z} doSendDistanceShoot(newpos, pos, CONST_ANI_ONYXARROW) addEvent(meteorCast, 300, {cid = cid, pos = pos, combat = meteor_water}) else local newpos = {x = pos.x -7 , y = pos.y -6, z = pos.z} doSendDistanceShoot(newpos, pos, CONST_ANI_ONYXARROW) addEvent(meteorCast, 300, {cid = cid,pos = pos, combat = meteor}) end end end setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") function onCastSpell(cid, var) return doCombat(cid, combat, var) end Link para o comentário https://xtibia.com/forum/topic/149483-ajuda-por-favor/#findComment-995507 Compartilhar em outros sites More sharing options...
Pergunta
Pamonha32 0
Tipo fiz um spell aki dai nao estou conseguindo colacar para eu atka o bixo e a magia i tbm no cara tipo um exori frigo me ajudem por favor
meu ot é 8.60 baiak
o scrip:
local combat = createCombatObject()
local meteor = createCombatObject()
setCombatParam(meteor, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(meteor, COMBAT_PARAM_EFFECT, COMBAT_PHYSICALDAMAGE)
setCombatParam(meteor, COMBAT_PARAM_DISTANCEEFFECT, CONST_ME_BATS)
setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, -4.6, -200, -4.2, -200)
local meteor_water = createCombatObject()
setCombatParam(meteor_water, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(meteor_water, COMBAT_PARAM_EFFECT, 1)
setCombatFormula(meteor_water, COMBAT_FORMULA_LEVELMAGIC, -4.6, -200, -4.2, -200)
combat_arr = {
{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, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 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 combat_area = createCombatArea(combat_arr)
setCombatArea(combat, combat_area)
local function meteorCast(p)
doCombat(p.cid, p.combat, positionToVariant(p.pos))
end
local function stunEffect(cid)
doSendMagicEffect(getThingPos(cid), CONST_ME_STUN)
end
function onTargetTile(cid, pos)
if (math.random(0, 1) == 1) then
local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 1})
if (isInArray(water, ground.itemid) == TRUE) then
local newpos = {x = pos.x -7 , y = pos.y -6 , z = pos.z}
doSendDistanceShoot(newpos, pos, CONST_ANI_ONYXARROW)
addEvent(meteorCast, 300, {cid = cid, pos = pos, combat = meteor_water})
else
local newpos = {x = pos.x -7 , y = pos.y -6, z = pos.z}
doSendDistanceShoot(newpos, pos, CONST_ANI_ONYXARROW)
addEvent(meteorCast, 300, {cid = cid,pos = pos, combat = meteor})
end
end
end
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Link para o comentário
https://xtibia.com/forum/topic/149483-ajuda-por-favor/Compartilhar em outros sites
1 resposta a esta questão
Posts Recomendados