- KriissMiembro
- Mensajes : 54
spell happy
Dom Abr 22, 2012 7:20 pm
bueno es una de las spells que ice hace mucho (: y lo que hace es una carita feliz (tambien pega)
IMÁGENES:
primero vamos a data --> spells --> scripts
happy.lua
Despues vamos a spells.xml
IMÁGENES:
- Spoiler:
- Spoiler:
primero vamos a data --> spells --> scripts
happy.lua
- Spoiler:
- Código:
---CREADO POR KRISS PARA foro de ayuda para OTServ---
local acombat1 = createCombatObject()
local acombat2 = createCombatObject()
local acombat3 = createCombatObject()
local acombat4 = createCombatObject()
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 51)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 17)
setCombatParam(combat1, COMBAT_FORMULA_LEVELMAGIC, -1, -60, -1, -60, 5, 5, 4, 7)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 3)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 27)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1, -60, -1, -60, 5, 5, 4, 7)
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 45)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 11)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -1, -60, -1, -60, 5, 5, 4, 7)
local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setCombatParam(combat4, COMBAT_PARAM_CREATEITEM,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, 1, 0, 0, 0, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
arr4 = {
{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, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0},
{0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 1, 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)
local area4 = createCombatArea(arr4)
setCombatArea(acombat1, area1)
setCombatArea(acombat2, area2)
setCombatArea(acombat3, area3)
setCombatArea(acombat4, area4)
function onTargetTile(cid, pos)
doCombat(cid,combat1,positionToVariant(pos))
end
function onTargetTile2(cid, pos)
doCombat(cid,combat2,positionToVariant(pos))
end
function onTargetTile3(cid, pos)
doCombat(cid,combat3,positionToVariant(pos))
end
function onTargetTile4(cid, pos)
doCombat(cid,combat4,positionToVariant(pos))
end
setCombatCallback(acombat1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
setCombatCallback(acombat2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")
setCombatCallback(acombat3, CALLBACK_PARAM_TARGETTILE, "onTargetTile3")
setCombatCallback(acombat4, CALLBACK_PARAM_TARGETTILE, "onTargetTile4")
local function onCastSpell1(parameters)
doCombat(parameters.cid, acombat1, parameters.var)
end
local function onCastSpell2(parameters)
doCombat(parameters.cid, acombat2, parameters.var)
end
local function onCastSpell3(parameters)
doCombat(parameters.cid, acombat3, parameters.var)
end
local function onCastSpell4(parameters)
doCombat(parameters.cid, acombat4, parameters.var)
end
function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 300, parameters)
addEvent(onCastSpell2, 600, parameters)
addEvent(onCastSpell3, 900, parameters)
addEvent(onCastSpell4, 1200, parameters)
return TRUE
end
Despues vamos a spells.xml
- Código:
<instant name="happy" words="happy" lvl="35" mana="450" prem="1" selftarget="1" exhaustion="2000" needlearn="1" event="script" value="happy.lua">
<vocation id="1"/><vocation id="2"/><vocation id="3"/><vocation id="4"/></instant>
si te gusto y te sirvio dame rep + (: :free:
creditos 100%yo- chanfles97Miembro
- Mensajes : 25
Re: spell happy
Lun Abr 23, 2012 5:19 pm
Me gusto bastante Kriss ^^ +Rep (:, Yo creo que subiré mis aportes en un rato mas ^^
Permisos de este foro:
No puedes responder a temas en este foro.