Passe o ID do "espinho"
- Fórum
- xTibia - Notícias e Suporte
- Soluções
- Archived
- Exevo Gran Trap
info
Grupo: Artesão
Registrado: 15/01/12
Posts: 100
Reputação: +9
Char no Tibia: Leon Of Pandoria

A localidade é essa:
local =
{0, 0, 0, 0, 3, 3, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 3, 3, 3, 0, 4, 0, 1, 1, 1, 0, 0},
{3, 3, 3, 0, 4, 0, 4, 0, 4, 0, 1, 1, 1},
{3, 0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 1},
{3, 4, 4, 4, 4, 4, 2, 4, 4, 4, 4, 4, 1},
{3, 0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 1},
{3, 3, 3, 0, 4, 0, 4, 0, 4, 0, 1, 1, 1},
{0, 0, 3, 3, 3, 0, 4, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 0, 3, 3, 1, 1, 1, 0, 0, 0, 0}
Legenda:
Numero 2: posição do player.
Numero1:Locais onde criará o iten com ID:8386
Numero3: Locais onde criará o iten com ID:8387
Numero4: Locais onde aparecerá effect CONST_ME_FIREWORK_YELLOW (/z 28)
Observação: se póssível colocar CONST_ME_HOLYDAMAGE nos locais onde os espinhos irão aparecer
Observação2: é obvio, que os espinhos iriam sumir depois de um tempo, 10 segundos seria ideal.
O máximo que consegui chegar foi até isso, só que da alguns erros que não sei consertar e também não consegui colocar para sumir depois de 10 segundos
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 39)
setCombatParam(combat1, COMBAT_PARAM_CREATEITEM, 8387)
local combat2 = createCombatObject()
setConditionParam(condition2, CONDITION_PARAM_TICKS, 4000)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 39)
setCombatParam(combat2, COMBAT_PARAM_CREATEITEM, 8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 0, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat1, parameters.var)
end
local function onCastSpell2(parameters)
doCombat(parameters.cid, parameters.combat2, parameters.var)
end
local function onCastSpell3(parameters)
doCombat(parameters.cid, parameters.combat3, parameters.var)
end
function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3 }
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 100, parameters)
addEvent(onCastSpell3, 100, parameters)
end
Obrigado desde já ;D
Outra coisa, sabe me dizer como que eu retiro o exausted entre magias ?
Por exemplo, quando eu healo com exura vita, demora muito para soltar um exevo frigo hur :S
Editado Fevereiro 27 por luakao
info
Grupo: Artesão
Registrado: 15/01/12
Posts: 100
Reputação: +9
Char no Tibia: Leon Of Pandoria

aew manow Sua Spell!
Primeiro Vá ao Items.xml :
</item>
<item id="8386" article="a" name="skeletal remains">
<attribute key="type" value="magicfield" />
<attribute key="decayTo" value="0" />
<attribute key="duration" value="20" />
</item>
<item id="8387" article="a" name="skeletal remains">
<attribute key="type" value="magicfield" />
<attribute key="decayTo" value="0" />
<attribute key="duration" value="20" />
Vá em SPells.xml:
</instant>
<instant name="Trap" words="Trap" lvl="200" mana="120" prem="1" selftarget="1" exhaustion="3000" needlearn="0" script="trap.lua">
<vocation id="1"/>
<vocation id="2"/>
<vocation id="3"/>
<vocation id="4"/>
Vá em Spells/Scripts: Crie Um arquivo chamado trap.lua e adicione:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 39)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat1, COMBAT_PARAM_CREATEITEM, 8386)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 39)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat2, COMBAT_PARAM_CREATEITEM, 8387)
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 28)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
local arr1 = {
{ 0, 0, 0, 1, 1, 0. },
{ 0, 0, 0, 0, 1, 1. },
{ 0, 0, 0, 0, 0, 1, },
{ 0, 0, 0, 2, 0, 1, },
{ 0, 0, 0, 0, 0, 1, },
{ 0, 0, 0, 0, 1, 1, },
{ 0, 0, 1, 1, 1, 0, },
}
local arr2 = {
{ 0, 1, 1, 0, 0, 0. },
{ 1, 1, 0, 0, 0, 0. },
{ 1, 0, 0, 0, 0, 0, },
{ 1, 0, 0, 2, 0, 0, },
{ 1, 0, 0, 0, 0, 0, },
{ 1, 1, 0, 0, 0, 0, },
{ 0, 1, 1, 0, 0, 0, },
}
local arr3 = {
{ 0, 0, 0, 1, 0, 0. },
{ 0, 0, 0, 1, 0, 0. },
{ 0, 0, 1, 1, 1, 0, },
{ 1, 1, 1, 2, 1, 1, },
{ 0, 0, 1, 1, 1, 0, },
{ 0, 0, 0, 1, 0, 0, },
{ 0, 0, 0, 1, 0, 0, },
}
local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat1, parameters.var)
end
local function onCastSpell2(parameters)
doCombat(parameters.cid, parameters.combat2, parameters.var)
end
local function onCastSpell3(parameters)
doCombat(parameters.cid, parameters.combat3, parameters.var)
end
function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3 }
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 200, parameters)
addEvent(onCastSpell3, 300, parameters)
return TRUE
end
Deu Certo da um REP ++
Cara, deu tudo certo, muito obrigado mesmo, REP+
info
Grupo: Artesão
Registrado: 15/01/12
Posts: 100
Reputação: +9
Char no Tibia: Leon Of Pandoria

Que bom !
se precisar de mais ajuda!
;D
tamo aew!
VLw's



info
Grupo: Campones
Registrado: 01/06/08
Posts: 45
Reputação: 0
Olá pessoal, então, eu estou procurando um script de exevo gran trap, mas só que ao invez de ser MW ou grav vita, eu gostaria que fosse uns espinhos, como eu vi em um outro lugar que ao invez de ser MW era espinhos, muito obrigado desde já