não entendi seu pedido, vc que que quando usem a magia mostre os monstro invisiveis? ou quer que ele fiquem invisives? explica melhor isso ai ta muito vago '-'
info
Grupo: Campones
Registrado: 18/07/10
Posts: 31
Reputação: +4
Gênero: Masculino

info
Grupo: Artesão
Registrado: 17/11/10
Posts: 112
Reputação: +7
Char no Tibia: Mitsure

Bom eu gostaria da spell com a área invisivel ( effect 250) que quando acerte a criatura cause o effect 12 nela.Não tem a ver com deichar a criatura invisivel.
Tipo tem 3 criaturas dentro da area desta spell, no caso apareceria um brilho azul sobre as 3 ( effect 12). O effect 12 seria no caso o "damage effect" e não um area effect.
Se não intendeu ianda manda pm pra tenta exemplificar melhor ;S.
info
Grupo: Campones
Registrado: 18/07/10
Posts: 31
Reputação: +4
Gênero: Masculino

testa aew:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 205)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 7, 14)
local area = {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 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}
setCombatArea(combat, area)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
info
Grupo: Artesão
Registrado: 17/11/10
Posts: 112
Reputação: +7
Char no Tibia: Mitsure

Mano eh por ai mesmo que eu quero mas ai ta dando o efeito de fire eu kero a spell invisivel deste jeito msm o mas com o effect 12 (o do brilho azul) apareedno soh nas criaturas que acertar.
Tipo trocar o fire que aparece pelo efect 12
Editado Abril 17 por KikimDaPadaria
Troca o
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
por
setCombatParam(combat,COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
Ficaria assim:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 12)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 7, 14)
local area = {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 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}
setCombatArea(combat, area)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Editado Abril 17 por Allangod
info
Grupo: Artesão
Registrado: 17/11/10
Posts: 112
Reputação: +7
Char no Tibia: Mitsure

Mas aew a spell n ta invisivel , eu quero que o efeito 12 aparece apenas nas criaturas
Realmente não sei se vai funciona, se nao funciona acho que cheguei perto:
-- Script created by Port
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 7, 14)
local area = {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 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}
setCombatArea(combat, area)
function onCastSpell(cid, var)
local p = getCreaturePosition(cid)
for j = -2, 2 do
for i = 1, 6 do
local x = {
[0] = {x=p.x+j, y=p.y-1*i, z=p.z},
[1] = {x=p.x+1*i, y=p.y+j, z=p.z},
[2] = {x=p.x+j, y=p.y+1*i, z=p.z},
[3] = {x=p.x-1*i, y=p.y+j, z=p.z}
}
pos = x[getCreatureLookDirection(cid)]
if isCreature(pos)
doSendMagicEffect(pos, 12)
end
end
end
return doCombat(cid, combat, var)
end
Editado Abril 17 por Portland
info
Grupo: Artesão
Registrado: 17/11/10
Posts: 112
Reputação: +7
Char no Tibia: Mitsure

Realmente não sei se vai funciona, se nao funciona acho que cheguei perto:
-- Script created by Port
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 7, 14)
local area = {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 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}
setCombatArea(combat, area)
function onCastSpell(cid, var)
local p = getCreaturePosition(cid)
for j = -2, 2 do
for i = 1, 6 do
local x = {
[0] = {x=p.x+j, y=p.y-1*i, z=p.z},
[1] = {x=p.x+1*i, y=p.y+j, z=p.z},
[2] = {x=p.x+j, y=p.y+1*i, z=p.z},
[3] = {x=p.x-1*i, y=p.y+j, z=p.z}
}
pos = x[getCreatureLookDirection(cid)]
if isCreature(pos)
doSendMagicEffect(pos, 12)
end
end
end
return doCombat(cid, combat, var)
end
Erro:
[Error - LuaScriptInterface::loadFile] data/spells/scripts/attack/bum.lua:2 9: 'then' expected near 'doSendMagicEffect' [Warning - Event::loadScript] Cannot load script (data/spells/scripts/attack/bum.lua) data/spells/scripts/attack/bum.lua:29: 'then' expected near 'doSendMagicEff ect'
Editado Abril 17 por KikimDaPadaria
esqueci do then ![]()
-- Script created by Port
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 7, 14)
local area = {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 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}
setCombatArea(combat, area)
function onCastSpell(cid, var)
local p = getCreaturePosition(cid)
for j = -2, 2 do
for i = 1, 6 do
local x = {
[0] = {x=p.x+j, y=p.y-1*i, z=p.z},
[1] = {x=p.x+1*i, y=p.y+j, z=p.z},
[2] = {x=p.x+j, y=p.y+1*i, z=p.z},
[3] = {x=p.x-1*i, y=p.y+j, z=p.z}
}
pos = x[getCreatureLookDirection(cid)]
if isCreature(pos) then
doSendMagicEffect(pos, 12)
end
end
end
return doCombat(cid, combat, var)
end
info
Grupo: Artesão
Registrado: 17/11/10
Posts: 112
Reputação: +7
Char no Tibia: Mitsure

Agr não deu erro nenhum no distro, porem a spell soh ta indo 1 sqm na frente do player e tb não ta dando o efeito 12 =S
Vlw o esforço...
testo em um monstro?
info
Grupo: Artesão
Registrado: 17/11/10
Posts: 112
Reputação: +7
Char no Tibia: Mitsure

testo em um monstro?
Sim , e foi sem querer ainda, por que eu tentei usar de longe no monstro nem hit deu tem que ficar de cara pra ele, no caso ta assim a área:
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0}
e não da o efeito 12 , (da só o efeito invisivel).
Editado Abril 17 por KikimDaPadaria
A area vc poe assim:
local area = {
{1, 1, 1, 1, 1},
{1, 1, 1, 1, 1},
{1, 1, 1, 1, 1},
{1, 1, 1, 1, 1},
{1, 1, 1, 1, 1},
{1, 1, 3, 1, 1},
{0, 0, 0, 0, 0},
}
Editado Abril 17 por Allangod
consegui cara ![]()
tag na spells.xml é importante lembrar que tem que ter
direction="1"
e a script fica assim:
-- Script created by Port
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 7, 14)
arr = {
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 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}
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onCastSpell(cid, var)
local p = getCreaturePosition(cid)
for j = 1, 5 do
if j == 1 then
u = -2
elseif j==2 then
u = -1
elseif j==3 then
u = 0
elseif j==4 then
u = 1
elseif j==5 then
u = 2
end
for i = 1, 6 do
local x = {
[0] = {x=p.x+u, y=p.y-1*i, z=p.z, stackpos=255},
[1] = {x=p.x+1*i, y=p.y+u, z=p.z, stackpos=255},
[2] = {x=p.x+u, y=p.y+1*i, z=p.z, stackpos=255},
[3] = {x=p.x-1*i, y=p.y+u, z=p.z, stackpos=255}
}
pos = x[getCreatureLookDirection(cid)]
if isCreature(getThingfromPos(pos).uid) then
doSendMagicEffect(pos, 12) --Efeito aki, se quiser trocar mude o 12
end
end
end
return doCombat(cid, combat, var)
end
ta ai, testei e funciono certinho ![]()
Editado Abril 17 por Portland




info
Grupo: Artesão
Registrado: 17/11/10
Posts: 112
Reputação: +7
Char no Tibia: Mitsure
Spell Invisivel com esta area
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 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},
que quando acerta uma ou mais criaturas crie o efeito 12 (brilho azul) nelas.