Como é esse efeito?
Usando Effect "CONST_ANI_REDSTAR" como Magia de ataque
Por Teigor, 04 de mai. de 2013 em Scripts
info
Grupo: Marquês
Registrado: 18/05/11
Posts: 1.1k
Reputação: +150
Gênero: Masculino

info
Grupo: Campones
Registrado: 02/05/13
Posts: 10
Reputação: 0
Char no Tibia: Krasley Volart

info
Grupo: Marquês
Registrado: 18/05/11
Posts: 1.1k
Reputação: +150
Gênero: Masculino

Testa ai:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 18)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -2.0, -150, -1.6, -150)
arr = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Editado Maio 5 por PsyMcKenzie
info
Grupo: Campones
Registrado: 02/05/13
Posts: 10
Reputação: 0
Char no Tibia: Krasley Volart

Substituiu a minha script pela sua e mesmo assim nao funcionou ![]()
info
Grupo: Marquês
Registrado: 18/05/11
Posts: 1.1k
Reputação: +150
Gênero: Masculino

O que acontece?
info
Grupo: Campones
Registrado: 02/05/13
Posts: 10
Reputação: 0
Char no Tibia: Krasley Volart

info
Grupo: Marquês
Registrado: 18/05/11
Posts: 1.1k
Reputação: +150
Gênero: Masculino

Agora vai ![]()
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 18)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -2.0, -150, -1.6, -150)
arr = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Editado Maio 5 por PsyMcKenzie
info
Grupo: Campones
Registrado: 02/05/13
Posts: 10
Reputação: 0
Char no Tibia: Krasley Volart

Bem, eu coloquei o que vc feze nao pegou... porem eu peguei e fiz isso:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_REDSTAR)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -2.0, -150, -1.6, -150)
arr = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
e olha so o que ele faz agora: sai apenas de uma unica direção
info
Grupo: Marquês
Registrado: 18/05/11
Posts: 1.1k
Reputação: +150
Gênero: Masculino

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_REDSTAR)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -2.0, -150, -1.6, -150)
arr = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Editado Maio 5 por PsyMcKenzie
info
Grupo: Campones
Registrado: 02/05/13
Posts: 10
Reputação: 0
Char no Tibia: Krasley Volart

continua saindo apenas uma assassins star dele ![]()
xi amigo,acho que tem como n
Editado Maio 6 por EduziTow
info
Grupo: Campones
Registrado: 06/05/13
Posts: 18
Reputação: +7

Cara,Ve Se É Isso Que Você Quer.
local combat = createCombatObject()
local combat2 = createCombatObject()
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 18)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -7.3, -200, -7.5, -200)
local stun = createConditionObject(CONDITION_PARALYZE)
setConditionParam(stun, CONDITION_PARAM_TICKS, 1000)
setConditionFormula(stun, -0.0, 0, -0.0, 0)
setCombatCondition(combat1, stun)
local meteor_water = createCombatObject()
setCombatParam(meteor_water, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(meteor_water, COMBAT_FORMULA_LEVELMAGIC, -9.3, -200, -9.5, -200)
arr = {
{0, 0, 0, 0, 1, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 2, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 0, 1, 0, 0, 0, 0}
}
local combat_area = createCombatArea(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), 49)
end
function onTargetTile(cid, pos)
if (math.random(0, 0) == 0) 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 - 9, y = pos.y - 8, z = pos.z}
addEvent(meteorCast, 100, {cid = cid, pos = pos, combat = meteor_water})
else
local newpos = {x = pos.x - 9, y = pos.y - 8, z = pos.z}
addEvent(meteorCast, 100, {cid = cid,pos = pos, combat = combat2})
end
end
end
function onTargetTile2(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 - 9, y = pos.y - 8, z = pos.z}
addEvent(meteorCast, 100, {cid = cid, pos = pos, combat = meteor_water})
else
local newpos = {x = pos.x + 9, y = pos.y - 8, z = pos.z}
addEvent(meteorCast, 100, {cid = cid,pos = pos, combat = combat1})
end
end
end
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
setCombatCallback(combat2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Editado Maio 6 por RomarinhoO
info
Grupo: Visconde
Registrado: 24/11/12
Posts: 474
Reputação: +98
Gênero: Masculino

Aqui Amigo :
w = {
[1] = {ef = 18, sh = 18, dmg = COMBAT_PHYSICALDAMAGE},
[2] = {ef = 18, sh = 18, dmg = COMBAT_PHYSICALDAMAGE},
[3] = {ef = 18, sh = 18, dmg = COMBAT_PHYSICALDAMAGE},
[4] = {ef = 18, sh = 18, dmg = COMBAT_PHYSICALDAMAGE},
[5] = {ef = 18, sh = 18, dmg = COMBAT_PHYSICALDAMAGE},
[6] = {ef = 18, sh = 18, dmg = COMBAT_PHYSICALDAMAGE},
[7] = {ef = 18, sh = 18, dmg = COMBAT_PHYSICALDAMAGE}
}
function onUseWeapon(cid, var)
min, max = 300, 300 -- dano minimo e maximo que o player vai rita
target = getCreatureTarget(cid)
if target ~= 0 then
wx = w[math.random(1, #w)]
doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh)
addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef)
end
return true
end
Qualquer Coisa Tamos Aqui
Ajudei? Rep+
Abraços!
info
Grupo: Marquês
Registrado: 18/05/11
Posts: 1.1k
Reputação: +150
Gênero: Masculino

Aqui Amigo :
w = {
[1] = {ef = 18, sh = 18, dmg = COMBAT_PHYSICALDAMAGE},
[2] = {ef = 18, sh = 18, dmg = COMBAT_PHYSICALDAMAGE},
[3] = {ef = 18, sh = 18, dmg = COMBAT_PHYSICALDAMAGE},
[4] = {ef = 18, sh = 18, dmg = COMBAT_PHYSICALDAMAGE},
[5] = {ef = 18, sh = 18, dmg = COMBAT_PHYSICALDAMAGE},
[6] = {ef = 18, sh = 18, dmg = COMBAT_PHYSICALDAMAGE},
[7] = {ef = 18, sh = 18, dmg = COMBAT_PHYSICALDAMAGE}
}
function onUseWeapon(cid, var)
min, max = 300, 300 -- dano minimo e maximo que o player vai rita
target = getCreatureTarget(cid)
if target ~= 0 then
wx = w[math.random(1, #w)]
doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh)
addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef)
end
return true
end
Qualquer Coisa Tamos Aqui
Ajudei? Rep+
Abraços!
O cara pediu spell e voce posta script de weapon.
WTF?




info
Grupo: Campones
Registrado: 02/05/13
Posts: 10
Reputação: 0
Char no Tibia: Krasley Volart
Boa noite galera,
gostaria que alguem me ajuda-se a fazer uma magia utilizando o efeito "CONST_ANI_REDSTAR" como uma spell de ataque.
Eu tentei fazer desse jeito, porem quando testo a magia entra o efeito " CONST_ME_SOUND_GREEN"
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ANI_REDSTAR)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -2.0, -150, -1.6, -150)
arr = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
toda ajuda e muito util!!!
grato