[NPC] Speller Upgrader + Spells.
Sáb Mar 24, 2012 9:02 pm
Hola usuarios de OTSuporter, hoy traigo un npc, que me creo mock, lo mejore un poco, y cree unos spells para este npc;).
El NPC, Consiste en;
Este npc fue creado con el fin, de subir tus spells, o upgradearlos, es decir, vas con el, le sides "Hi" / Upgrade / Dices el nombre del spell/ Yes.
Que la han upgradeado, mas adelante, les enseño fotos .
El limite de upgradear el spell, es +3.
Cada vez que subas o upgrades el spell, el spell pegara mas, donde tu lo podras configurar en los spells, que veras mas adelante.
Empezamos
Data/NPC/Bearman.xml
Ponemos lo siguiente;
Ahora;
Data/npc/scripts/bearman.lua
Ahora, bien, les dejare unas spells, las cuales yo cree, para upgradear[configurable el damage].
Esta es una;
data/spells/scripts/druidsfinal.lua
Aca les dejo otra;
magequest.lua
knightfinal.lua
Paladinfinal.lua
knightquest.lua
paladinquest.lua
Spells.xml
Screens;
Credits;
Falcon & Mock.
El NPC, Consiste en;
Este npc fue creado con el fin, de subir tus spells, o upgradearlos, es decir, vas con el, le sides "Hi" / Upgrade / Dices el nombre del spell/ Yes.
Que la han upgradeado, mas adelante, les enseño fotos .
El limite de upgradear el spell, es +3.
Cada vez que subas o upgrades el spell, el spell pegara mas, donde tu lo podras configurar en los spells, que veras mas adelante.
Empezamos
Data/NPC/Bearman.xml
Ponemos lo siguiente;
- Código:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Bearman" script="Bearman.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="16" head="57" body="59" legs="40" feet="76" addons="0"/>
</npc>
Ahora;
Data/npc/scripts/bearman.lua
- Código:
local focus = {}
--config
local CONF = {
['enchanted ultimate strike'] = {lvl=500,voc={2,6,1,5},storage=18471,amount={20,50,70}},
['knights ultimate strike'] = {lvl=300,voc={4,8},storage=18472,amount={10,30,50}},
['druids ultimate strike'] = {lvl=300,voc={2,6},storage=18473,amount={10,30,50}},
['paladinfinal'] = {lvl=500,voc={2,6,1,5},storage=18474,amount={20,50,70}},
['knightquest'] = {lvl=300,voc={4,8},storage=18475,amount={10,30,50}},
['paladinquest'] = {lvl=300,voc={2,6},storage=18476,amount={10,30,50}},
}
local upgrade_item = 6500
function onCreatureSay(cid, type, msg)
if not focus[cid] then
if msg:lower() == 'hi' then
focus[cid] = {state=1,start=os.time()}
selfSay('Hello '..getCreatureName(cid),cid)
end
else
if focus[cid].state==1 then
if msg:find('upgrade') then
local list = ''
for index,data in pairs(CONF) do
list = list..'{'..index..'}, '
end
list = list:sub(1,#list-2)
selfSay('The spells avaliable to upgrade is: '..list..'. Choose one',cid)
elseif CONF[msg:lower()] then
local voc = getPlayerVocation(cid)
local proceed = false
for i=1,#CONF[msg:lower()].voc do
if CONF[msg:lower()].voc[i] == voc then
proceed = true
break
end
end
if proceed then
local lvl = getPlayerStorageValue(cid,CONF[msg:lower()].storage)
lvl = lvl == -1 and 0 or lvl
if lvl == 3 then
selfSay('This spell already in max level.',cid)
else
selfSay('Do you want upgrade your spell form lvl +'..lvl..' to +'..(lvl+1)..'? Going to cost '..CONF[msg:lower()].amount[lvl+1]..' spell stones.',cid)
focus[cid].state=2
focus[cid].name = msg:lower()
end
else
selfSay('Vocation do not match',cid)
end
end
elseif focus[cid].state==2 then
if msg:find('yes') then
local lvl = getPlayerStorageValue(cid,CONF[focus[cid].name].storage)
lvl = lvl == -1 and 0 or lvl
if getPlayerItemCount(cid,upgrade_item) >= CONF[focus[cid].name].amount[lvl+1] then
doSendMagicEffect(getCreaturePosition(cid),12)
setPlayerStorageValue(cid,CONF[focus[cid].name].storage,lvl+1)
doPlayerRemoveItem(cid,upgrade_item,CONF[focus[cid].name].amount[lvl+1])
focus[cid].state=1
selfSay('Now your spell is +'..(lvl+1)..'',cid)
else
selfSay('No enought stones.',cid)
end
else
selfSay('Then no.',cid)
focus[cid].state=1
end
elseif msg:find('bye') then
focus[cid] = nil
selfSay('Bye',cid)
end
end
end
function onThink()
for cid in pairs(focus) do
if not isPlayer(cid) then
focus[cid] = nil
else
if getDistanceBetween(getCreaturePosition(cid),getCreaturePosition(getNpcCid())) >= 5 then
selfSay('Bye',cid)
focus[cid] = nil
end
end
end
end
function onCreatureAppear(cid)
end
function onCreatureDisappear(cid)
end
Ahora, bien, les dejare unas spells, las cuales yo cree, para upgradear[configurable el damage].
Esta es una;
data/spells/scripts/druidsfinal.lua
- Código:
--Scripted by Legend-- 500
local SPELL_LVL_STORAGE = 18471
local combat1 = {}
local combat_formulas = {
[0] = {-5.8, -500, -5, -600},
[1] = {-6.8, -800, -6, -900},
[2] = {-7.8, -1000, -7, -1200},
[3] = {-9.8, -1800, -9, -2000},
}
for i=0,3 do
combat1[i] = createCombatObject()
setCombatParam(combat1[i], COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat1[i], COMBAT_PARAM_EFFECT,41)
setCombatParam(combat1[i], COMBAT_PARAM_DISTANCEEFFECT, 28)
setCombatFormula(combat1[i],COMBAT_FORMULA_LEVELMAGIC,combat_formulas[i][1], combat_formulas[i][2],combat_formulas[i][3],combat_formulas[i][4] )
end
local combat2 = {}
local combat2_formulas = {
[0] = {-5.8, -500, -5, -600},
[1] = {-6.8, -800, -6, -900},
[2] = {-7.8, -1000, -7, -1200},
[3] = {-9.8, -1800, -9, -2000},
}
for i=0,3 do
combat2[i] = createCombatObject()
setCombatParam(combat2[i], COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
setCombatParam(combat2[i], COMBAT_PARAM_EFFECT,46)
setCombatParam(combat2[i], COMBAT_PARAM_DISTANCEEFFECT, 3)
setCombatFormula(combat2[i], COMBAT_FORMULA_LEVELMAGIC,combat2_formulas[i][1], combat2_formulas[i][2],combat2_formulas[i][3],combat2_formulas[i][4])
end
local combat3 = {}
local combat3_formulas = {
[0] = {-5.8, -500, -5, -600},
[1] = {-6.8, -800, -6, -900},
[2] = {-7.8, -1000, -7, -1200},
[3] = {-9.8, -1800, -9, -2000},
}
for i=0,3 do
combat3[i] = createCombatObject()
setCombatParam(combat3[i], COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat3[i], COMBAT_PARAM_EFFECT,17)
setCombatParam(combat3[i], COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat3[i], COMBAT_FORMULA_LEVELMAGIC,combat3_formulas[i][1], combat3_formulas[i][2],combat3_formulas[i][3],combat3_formulas[i][4])
end
local function onCastSpell1(parameters)
doCombat(parameters.cid, combat1[parameters.lvl], parameters.var)
end
local function onCastSpell2(parameters)
doCombat(parameters.cid, combat2[parameters.lvl], parameters.var)
end
local function onCastSpell3(parameters)
doCombat(parameters.cid, combat3[parameters.lvl], parameters.var)
end
function onCastSpell(cid, var)
local lvl = getPlayerStorageValue(cid,SPELL_LVL_STORAGE)
lvl = lvl == -1 and 0 or lvl
local parameters = { cid = cid, var = var,lvl=lvl}
addEvent(onCastSpell1, 0, parameters)
addEvent(onCastSpell2, 300, parameters)
addEvent(onCastSpell3, 600, parameters)
return TRUE
end
Aca les dejo otra;
magequest.lua
- Código:
--Scripted by Legend-- 500
local SPELL_LVL_STORAGE = 18471
local combat1 = {}
local combat_formulas = {
[0] = {-5.8, -500, -5, -600},
[1] = {-6.8, -800, -6, -900},
[2] = {-7.8, -1000, -7, -1200},
[3] = {-9.8, -1800, -9, -2000},
}
for i=0,3 do
combat1[i] = createCombatObject()
setCombatParam(combat1[i], COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat1[i], COMBAT_PARAM_EFFECT,17)
setCombatParam(combat1[i], COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat1[i], COMBAT_FORMULA_LEVELMAGIC,combat_formulas[i][1], combat_formulas[i][2],combat_formulas[i][3],combat_formulas[i][4] )
end
local combat2 = {}
local combat2_formulas = {
[0] = {-5.8, -500, -5, -600},
[1] = {-6.8, -800, -6, -900},
[2] = {-7.8, -1000, -7, -1200},
[3] = {-9.8, -1800, -9, -2000},
}
for i=0,3 do
combat2[i] = createCombatObject()
setCombatParam(combat2[i], COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat2[i], COMBAT_PARAM_EFFECT,36)
setCombatParam(combat2[i], COMBAT_PARAM_DISTANCEEFFECT, 3)
setCombatFormula(combat2[i], COMBAT_FORMULA_LEVELMAGIC,combat2_formulas[i][1], combat2_formulas[i][2],combat2_formulas[i][3],combat2_formulas[i][4])
end
local combat3 = {}
local combat3_formulas = {
[0] = {-5.8, -500, -5, -600},
[1] = {-6.8, -800, -6, -900},
[2] = {-7.8, -1000, -7, -1200},
[3] = {-9.8, -1800, -9, -2000},
}
for i=0,3 do
combat3[i] = createCombatObject()
setCombatParam(combat3[i], COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat3[i], COMBAT_PARAM_EFFECT,37)
setCombatParam(combat3[i], COMBAT_PARAM_DISTANCEEFFECT, 4)
setCombatFormula(combat3[i], COMBAT_FORMULA_LEVELMAGIC,combat3_formulas[i][1], combat3_formulas[i][2],combat3_formulas[i][3],combat3_formulas[i][4])
end
local function onCastSpell1(parameters)
doCombat(parameters.cid, combat1[parameters.lvl], parameters.var)
end
local function onCastSpell2(parameters)
doCombat(parameters.cid, combat2[parameters.lvl], parameters.var)
end
local function onCastSpell3(parameters)
doCombat(parameters.cid, combat3[parameters.lvl], parameters.var)
end
function onCastSpell(cid, var)
local lvl = getPlayerStorageValue(cid,SPELL_LVL_STORAGE)
lvl = lvl == -1 and 0 or lvl
local parameters = { cid = cid, var = var,lvl=lvl}
addEvent(onCastSpell1, 0, parameters)
addEvent(onCastSpell2, 300, parameters)
addEvent(onCastSpell3, 600, parameters)
return TRUE
end
knightfinal.lua
- Código:
--Scripted by Legend-- 300
local SPELL_LVL_STORAGE = 18472
local combat1 = {}
local combat_formulas = {
[0] = {1, -1000, 1, -1100},
[1] = {1, -1200, 1, -1500},
[2] = {1, -1800, 1, -2000},
[3] = {1, -2000, 1, -2500},
}
for i=0,3 do
combat1[i] = createCombatObject()
setCombatParam(combat1[i], COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1[i], COMBAT_PARAM_EFFECT,4)
setCombatFormula(combat1[i], COMBAT_FORMULA_SKILL,combat_formulas[i][1], combat_formulas[i][2],combat_formulas[i][3],combat_formulas[i][4] )
end
local combat2 = {}
local combat2_formulas = {
[0] = {1, -1000, 1, -1100},
[1] = {1, -1200, 1, -1500},
[2] = {1, -1800, 1, -2000},
[3] = {1, -2000, 1, -2500},
}
for i=0,3 do
combat2[i] = createCombatObject()
setCombatParam(combat2[i], COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2[i], COMBAT_PARAM_EFFECT,9)
setCombatFormula(combat2[i], COMBAT_FORMULA_SKILL,combat2_formulas[i][1], combat2_formulas[i][2],combat2_formulas[i][3],combat2_formulas[i][4])
end
local combat3 = {}
local combat3_formulas = {
[0] = {1, -1000, 1, -1100},
[1] = {1, -1200, 1, -1500},
[2] = {1, -1800, 1, -2000},
[3] = {1, -2000, 1, -2500},
}
for i=0,3 do
combat3[i] = createCombatObject()
setCombatParam(combat3[i], COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3[i], COMBAT_PARAM_EFFECT,16)
setCombatFormula(combat3[i], COMBAT_FORMULA_SKILL,combat3_formulas[i][1], combat3_formulas[i][2],combat3_formulas[i][3],combat3_formulas[i][4])
end
local function onCastSpell1(parameters)
doCombat(parameters.cid, combat1[parameters.lvl], parameters.var)
end
local function onCastSpell2(parameters)
doCombat(parameters.cid, combat2[parameters.lvl], parameters.var)
end
local function onCastSpell3(parameters)
doCombat(parameters.cid, combat3[parameters.lvl], parameters.var)
end
function onCastSpell(cid, var)
local lvl = getPlayerStorageValue(cid,SPELL_LVL_STORAGE)
lvl = lvl == -1 and 0 or lvl
local parameters = { cid = cid, var = var,lvl=lvl}
addEvent(onCastSpell1, 0, parameters)
addEvent(onCastSpell2, 300, parameters)
addEvent(onCastSpell3, 600, parameters)
return TRUE
end
Paladinfinal.lua
- Código:
local SPELL_LVL_STORAGE = 18474
local combat1 = {}
local combat_formulas = {
[0] = {1, -1000, 1, -1100},
[1] = {1, -1200, 1, -1500},
[2] = {1, -1800, 1, -2000},
[3] = {1, -2000, 1, -2500},
}
for i=0,3 do
combat1[i] = createCombatObject()
setCombatParam(combat1[i], COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1[i], COMBAT_PARAM_EFFECT, 1)
setCombatParam(combat1[i], COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_REDSTAR)
setCombatFormula(combat1[i], COMBAT_FORMULA_SKILL,combat_formulas[i][1], combat_formulas[i][2],combat_formulas[i][3],combat_formulas[i][4] )
end
local combat2 = {}
local combat2_formulas = {
[0] = {1, -1000, 1, -1100},
[1] = {1, -1200, 1, -1500},
[2] = {1, -1800, 1, -2000},
[3] = {1, -2000, 1, -2500},
}
for i=0,3 do
combat2[i] = createCombatObject()
setCombatParam(combat2[i], COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat2[i], COMBAT_PARAM_EFFECT,39)
setCombatParam(combat2[i], COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)
setCombatFormula(combat2[i], COMBAT_FORMULA_SKILL, combat2_formulas[i][1], combat2_formulas[i][2],combat2_formulas[i][3],combat2_formulas[i][4])
end
local combat3 = {}
local combat3_formulas = {
[0] = {1, -1000, 1, -1100},
[1] = {1, -1200, 1, -1500},
[2] = {1, -1800, 1, -2000},
[3] = {1, -2000, 1, -2500},
}
for i=0,3 do
combat3[i] = createCombatObject()
setCombatParam(combat3[i], COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat3[i], COMBAT_PARAM_EFFECT,47)
setCombatParam(combat3[i], COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)
setCombatFormula(combat3[i], COMBAT_FORMULA_SKILL,combat3_formulas[i][1], combat3_formulas[i][2],combat3_formulas[i][3],combat3_formulas[i][4])
end
local function onCastSpell1(parameters)
doCombat(parameters.cid, combat1[parameters.lvl], parameters.var)
end
local function onCastSpell2(parameters)
doCombat(parameters.cid, combat2[parameters.lvl], parameters.var)
end
local function onCastSpell3(parameters)
doCombat(parameters.cid, combat3[parameters.lvl], parameters.var)
end
function onCastSpell(cid, var)
local lvl = getPlayerStorageValue(cid,SPELL_LVL_STORAGE)
lvl = lvl == -1 and 0 or lvl
local parameters = { cid = cid, var = var,lvl=lvl}
addEvent(onCastSpell1, 0, parameters)
addEvent(onCastSpell2, 300, parameters)
addEvent(onCastSpell3, 600, parameters)
return TRUE
end
knightquest.lua
- Código:
--Scripted by Legend--
--Scripted by Legend-- 500
local SPELL_LVL_STORAGE = 18475
local combat1 = {}
local combat_formulas = {
[0] = {1, -1000, 1, -1100},
[1] = {1, -2000, 1, -2100},
[2] = {1, -3000, 1, -3100},
[3] = {1, -4000, 1, -4100},
}
for i=0,3 do
combat1[i] = createCombatObject()
setCombatParam(combat1[i], COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1[i], COMBAT_PARAM_EFFECT,4)
setCombatFormula(combat1[i], COMBAT_FORMULA_SKILL,combat_formulas[i][1], combat_formulas[i][2],combat_formulas[i][3],combat_formulas[i][4] )
end
local combat2 = {}
local combat2_formulas = {
[0] = {1, -1000, 1, -1100},
[1] = {1, -2000, 1, -2100},
[2] = {1, -3000, 1, -3100},
[3] = {1, -4000, 1, -4100},
}
for i=0,3 do
combat2[i] = createCombatObject()
setCombatParam(combat2[i], COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2[i], COMBAT_PARAM_EFFECT,9)
setCombatFormula(combat2[i], COMBAT_FORMULA_SKILL,combat2_formulas[i][1], combat2_formulas[i][2],combat2_formulas[i][3],combat2_formulas[i][4] )
end
local combat3 = {}
local combat3_formulas = {
[0] = {1, -1000, 1, -1100},
[1] = {1, -2000, 1, -2100},
[2] = {1, -3000, 1, -3100},
[3] = {1, -4000, 1, -4100},
}
for i=0,3 do
combat3[i] = createCombatObject()
setCombatParam(combat3[i], COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3[i], COMBAT_PARAM_EFFECT,16)
setCombatFormula(combat3[i], COMBAT_FORMULA_SKILL,combat3_formulas[i][1], combat3_formulas[i][2],combat3_formulas[i][3],combat3_formulas[i][4] )
end
local combat4 = {}
local combat4_formulas = {
[0] = {1, -1000, 1, -1100},
[1] = {1, -2000, 1, -2100},
[2] = {1, -3000, 1, -3100},
[3] = {1, -4000, 1, -4100},
}
for i=0,3 do
combat4[i] = createCombatObject()
setCombatParam(combat4[i], COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat4[i], COMBAT_PARAM_EFFECT,34)
setCombatFormula(combat4[i], COMBAT_FORMULA_SKILL,combat4_formulas[i][1], combat4_formulas[i][2],combat4_formulas[i][3],combat4_formulas[i][4] )
end
local combat5 = {}
local combat5_formulas = {
[0] = {1, -1000, 1, -1100},
[1] = {1, -2000, 1, -2100},
[2] = {1, -3000, 1, -3100},
[3] = {1, -4000, 1, -4100},
}
for i=0,3 do
combat5[i] = createCombatObject()
setCombatParam(combat5[i], COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat5[i], COMBAT_PARAM_EFFECT,44)
setCombatFormula(combat5[i], COMBAT_FORMULA_SKILL,combat5_formulas[i][1], combat5_formulas[i][2],combat5_formulas[i][3],combat5_formulas[i][4] )
end
local function onCastSpell1(parameters)
doCombat(parameters.cid, combat1[parameters.lvl], parameters.var)
end
local function onCastSpell2(parameters)
doCombat(parameters.cid, combat2[parameters.lvl], parameters.var)
end
local function onCastSpell3(parameters)
doCombat(parameters.cid, combat3[parameters.lvl], parameters.var)
end
local function onCastSpell4(parameters)
doCombat(parameters.cid, combat4[parameters.lvl], parameters.var)
end
local function onCastSpell5(parameters)
doCombat(parameters.cid, combat5[parameters.lvl], parameters.var)
end
function onCastSpell(cid, var)
local lvl = getPlayerStorageValue(cid,SPELL_LVL_STORAGE)
lvl = lvl == -1 and 0 or lvl
local parameters = { cid = cid, var = var,lvl=lvl}
addEvent(onCastSpell1, 0, parameters)
addEvent(onCastSpell2, 300, parameters)
addEvent(onCastSpell3, 600, parameters)
addEvent(onCastSpell4, 900, parameters)
addEvent(onCastSpell5, 1200, parameters)
return TRUE
end
paladinquest.lua
- Código:
--Scripted by Legend--
--Scripted by Legend-- 500
local SPELL_LVL_STORAGE = 18476
local combat1 = {}
local combat_formulas = {
[0] = {1, -1000, 1, -1100},
[1] = {1, -2000, 1, -2100},
[2] = {1, -3000, 1, -3100},
[3] = {1, -4000, 1, -4100},
}
for i=0,3 do
combat1[i] = createCombatObject()
setCombatParam(combat1[i], COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1[i], COMBAT_PARAM_EFFECT, 29)
setCombatParam(combat1[i], COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_REDSTAR)
setCombatFormula(combat1[i], COMBAT_FORMULA_SKILL,combat_formulas[i][1], combat_formulas[i][2],combat_formulas[i][3],combat_formulas[i][4] )
end
local combat2 = {}
local combat2_formulas = {
[0] = {1, -1000, 1, -1100},
[1] = {1, -2000, 1, -2100},
[2] = {1, -3000, 1, -3100},
[3] = {1, -4000, 1, -4100},
}
for i=0,3 do
combat2[i] = createCombatObject()
setCombatParam(combat2[i], COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat2[i], COMBAT_PARAM_EFFECT,36)
setCombatParam(combat2[i], COMBAT_PARAM_DISTANCEEFFECT, 33)
setCombatFormula(combat2[i], COMBAT_FORMULA_SKILL,combat2_formulas[i][1], combat2_formulas[i][2],combat2_formulas[i][3],combat2_formulas[i][4] )
end
local combat3 = {}
local combat3_formulas = {
[0] = {1, -1000, 1, -1100},
[1] = {1, -2000, 1, -2100},
[2] = {1, -3000, 1, -3100},
[3] = {1, -4000, 1, -4100},
}
for i=0,3 do
combat3[i] = createCombatObject()
setCombatParam(combat3[i], COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat3[i], COMBAT_PARAM_EFFECT,47)
setCombatParam(combat3[i], COMBAT_PARAM_DISTANCEEFFECT, 32)
setCombatFormula(combat3[i], COMBAT_FORMULA_SKILL, combat3_formulas[i][1], combat3_formulas[i][2],combat3_formulas[i][3],combat3_formulas[i][4] )
end
local combat4 = {}
local combat4_formulas = {
[0] = {1, -1000, 1, -1100},
[1] = {1, -2000, 1, -2100},
[2] = {1, -3000, 1, -3100},
[3] = {1, -4000, 1, -4100},
}
for i=0,3 do
combat4[i] = createCombatObject()
setCombatParam(combat4[i], COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat4[i], COMBAT_PARAM_EFFECT,41)
setCombatParam(combat4[i], COMBAT_PARAM_DISTANCEEFFECT, 34)
setCombatFormula(combat4[i], COMBAT_FORMULA_SKILL,combat4_formulas[i][1], combat4_formulas[i][2],combat4_formulas[i][3],combat4_formulas[i][4] )
end
local combat5 = {}
local combat5_formulas = {
[0] = {1, -1000, 1, -1100},
[1] = {1, -2000, 1, -2100},
[2] = {1, -3000, 1, -3100},
[3] = {1, -4000, 1, -4100},
}
for i=0,3 do
combat5[i] = createCombatObject()
setCombatParam(combat5[i], COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
setCombatParam(combat5[i], COMBAT_PARAM_EFFECT,46)
setCombatParam(combat5[i], COMBAT_PARAM_DISTANCEEFFECT, 39)
setCombatFormula(combat5[i], COMBAT_FORMULA_SKILL, combat5_formulas[i][1], combat5_formulas[i][2],combat5_formulas[i][3],combat5_formulas[i][4] )
end
local function onCastSpell1(parameters)
doCombat(parameters.cid, combat1[parameters.lvl], parameters.var)
end
local function onCastSpell2(parameters)
doCombat(parameters.cid, combat2[parameters.lvl], parameters.var)
end
local function onCastSpell3(parameters)
doCombat(parameters.cid, combat3[parameters.lvl], parameters.var)
end
local function onCastSpell4(parameters)
doCombat(parameters.cid, combat4[parameters.lvl], parameters.var)
end
local function onCastSpell5(parameters)
doCombat(parameters.cid, combat5[parameters.lvl], parameters.var)
end
function onCastSpell(cid, var)
local lvl = getPlayerStorageValue(cid,SPELL_LVL_STORAGE)
lvl = lvl == -1 and 0 or lvl
local parameters = { cid = cid, var = var,lvl=lvl}
addEvent(onCastSpell1, 0, parameters)
addEvent(onCastSpell2, 300, parameters)
addEvent(onCastSpell3, 600, parameters)
addEvent(onCastSpell4, 900, parameters)
addEvent(onCastSpell5, 1200, parameters)
return TRUE
end
Spells.xml
- Código:
<instant name="Enchanted Ultimate Strike" words="ezzunat fritermort" lvl="500" manapercent="14" prem="1" range="4" casterTargetOrDirection="1" blockwalls="1" exhaustion="1800" needlearn="1" event="script" value="magequest.lua">
<vocation id="2"/>
<vocation id="6"/>
<vocation id="1"/>
<vocation id="5"/>
</instant>
<instant name="Knights Ultimate Strike" words="ezzuna gran hur" lvl="400" manapercent="10" prem="1" range="1" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="0" event="script" value="knightfinal.lua">
<vocation id="4"/>
<vocation id="8"/>
</instant>
<instant name="Druids Ultimate Strike" words="ezzuna hur frigo" lvl="400" manapercent="11" prem="1" range="4" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="0" event="script" value="atomics/druidsfinal.lua">
<vocation id="2"/>
<vocation id="6"/>
</instant>
<instant name="Paladins Ultimate Strike" words="ezzuna gran con" lvl="400" manapercent="10" prem="1" range="4" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="0" event="script" value="paladinfinal.lua">
<vocation id="3"/>
<vocation id="7"/>
</instant>
<instant name="Enchanted Ultimate Hur" words="ezzunat hur" lvl="500" manapercent="14" prem="1" range="1" casterTargetOrDirection="1" blockwalls="1" exhaustion="1800" needlearn="1" event="script" value="knightquest.lua">
<vocation id="4"/>
<vocation id="8"/>
</instant>
<instant name="Enchanted Ultimate Con" words="ezzunat con" lvl="500" manapercent="18" prem="1" range="4" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="1" event="script" value="paladinquest.lua">
<vocation id="3"/>
<vocation id="7"/>
</instant>
Screens;
Credits;
Falcon & Mock.
Permisos de este foro:
No puedes responder a temas en este foro.