Tópico Movido
Este tópico foi movido de "OTServ → Suporte OTServ → Suporte Scripting"
para "OTServ → Suporte OTServ → Suporte Scripting → Pedidos e dúvidas resolvidos - Scripting".
info
Grupo: Marquês
Registrado: 03/02/13
Posts: 1.2k
Reputação: +254
Gênero: Masculino
Char no Tibia: Partiu Baladinha

Tópico Movido
Este tópico foi movido de "OTServ → Suporte OTServ → Suporte Scripting"
para "OTServ → Suporte OTServ → Suporte Scripting → Pedidos e dúvidas resolvidos - Scripting".
info
Grupo: Campones
Registrado: 11/09/15
Posts: 48
Reputação: +2
Iae
Encontrei essa magia de paladin que cai uma "chuva" de bolts do céu em uma área em volta do jogador, mas o script está randomizando a área que as bolts caem, tem como alguém me ajudar a tirar?
local combat = createCombatObject()
local meteor = createCombatObject()
setCombatParam(meteor, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(meteor, COMBAT_PARAM_USECHARGES, TRUE)
setCombatParam(meteor, COMBAT_PARAM_EFFECT, 9)
setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, -30, -50, -40, -55)
setCombatParam(meteor_water, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(meteor_water, COMBAT_PARAM_USECHARGES, TRUE)
setCombatParam(meteor_water, COMBAT_PARAM_EFFECT, 1)
setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, -30, -50, -40, -55)
{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, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 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}
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
doCombat(p.cid, p.combat, positionToVariant(p.pos))
end
doSendMagicEffect(getThingPos(cid), CONST_ME_STUN)
end
if (math.random(0, 6) == 6) then
local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0})
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_HOLY)
addEvent(meteorCast, 200, {cid = cid, pos = pos, combat = meteor_water})
else
local newpos = {x = pos.x - 7, y = pos.y - 6, z = pos.z}
doSendDistanceShoot(newpos, pos, 23)
addEvent(meteorCast, 200, {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
Editado Setembro 23 por Clarym