Shinmaru
エロルアー Scripter!
[Creator Details = Start]
Creator Name: 375311
Creator URL: OtLand - View Profile: 375311
Creator E-mail: N/A
Creator's Script Full Name: Rune Blade
[Creator Details = End]
First create a folder in 'data/spells/scripts/' and name it 'rune_blade', that done now
we commence. And I want to give thanks to my Guinea Pig:
THIS GUY-------->
for taking the beating of his life time.
[Install [Fire Blade] = Start]
Script Name: fire_blade.lua
Type: Spell
Lua Location: data/spells/scripts/rune_blade/
Lua Code:
XML Location: data/spells/spells.xml
XML Code:
Extra Details:
Description: This spell lets you empower the Runed Sword(7417) with fire magic.
[Install [Fire Blade] = End]
[Install [Ice Blade] = Start]
Script Name: ice_blade.lua
Type: Spell
Lua Location: data/spells/scripts/rune_blade/
Lua Code:
XML Location: data/spells/spells.xml
XML Code:
Extra Details:
Description: This spell lets you empower the Runed Sword(7417) with ice magic.
[Install [Ice Blade] = End]
[Install [Earth Blade] = Start]
Script Name: earth_blade.lua
Type: Spell
Lua Location: data/spells/scripts/rune_blade/
Lua Code:
XML Location: data/spells/spells.xml
XML Code:
Extra Details:
Description: This spell lets you empower the Runed Sword(7417) with earth magic.
[Install [Earth Blade] = End]
[Install [Lightning Blade] = Start]
Script Name: lightning_blade.lua
Type: Spell
Lua Location: data/spells/scripts/rune_blade/
Lua Code:
XML Location: data/spells/spells.xml
XML Code:
Extra Details:
Description: This spell lets you empower the Runed Sword(7417) with lightning magic.
[Install [Lightning Blade] = End]
[Install [Force Blade] = Start]
Script Name: force_blade.lua
Type: Spell
Lua Location: data/spells/scripts/rune_blade/
Lua Code:
XML Location: data/spells/spells.xml
XML Code:
Extra Details:
Description: This spell lets you empower the Runed Sword(7417) with force magic.
[Install [Force Blade] = End]
[Install [Rune Blade] = Start]
Script Name: RuneBlade
Type: Weapon
Lua Location: data/weapons/scripts/
Lua Code:
XML Location: data/weapons/weapons.xml
XML Code:
Extra Details: find the other registry that has the same id as the one just posted
and delete it.
Description: This is where the action happens, when you attack
a creature the magic powers that where placed on the Runed Sword
will be released and it will harm your enemies.
[Install [Rune Blade] = End]
And just in case you may want to know:
Hi Kirikizu = Fire Slash
Hyouga Bakuhatsu = Glacier Explosion
Jimen no Hitsugi = Terra Coffin
Inazuma Sashikizu = Lightning Stab
Oukii Kirikizu = Grand Slash
Kirikizu = Slash
Well I hope you enjoy this and REP if you really liked it.
Creator Name: 375311
Creator URL: OtLand - View Profile: 375311
Creator E-mail: N/A
Creator's Script Full Name: Rune Blade
[Creator Details = End]
First create a folder in 'data/spells/scripts/' and name it 'rune_blade', that done now
we commence. And I want to give thanks to my Guinea Pig:
THIS GUY-------->
for taking the beating of his life time.
[Install [Fire Blade] = Start]
Script Name: fire_blade.lua
Type: Spell
Lua Location: data/spells/scripts/rune_blade/
Lua Code:
Lua:
function onCastSpell(cid, var)
local left = getPlayerSlotItem(cid, 6)
local right = getPlayerSlotItem(cid, 5)
if left.itemid == 7417 then
doSetItemActionId(left.uid, 12001)
doSetItemSpecialDescription(left.uid, "It is enhanced with fire magic.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREATTACK)
elseif right.itemid == 7417 then
doSetItemActionId(right.uid, 12001)
doSetItemSpecialDescription(right.uid, "It is enhanced with fire magic.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREATTACK)
else
doPlayerSendCancel(cid, "Runed Sword must be on your hands to cast this spell.")
end
return true
end
XML Code:
PHP:
<instant name="Hi Kirikizu" words="fire blade" lvl="10" mana="40" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="rune_blade/fire_blade.lua">
<vocation id="4"/>
<vocation id="8"/>
</instant>
Description: This spell lets you empower the Runed Sword(7417) with fire magic.
[Install [Fire Blade] = End]
[Install [Ice Blade] = Start]
Script Name: ice_blade.lua
Type: Spell
Lua Location: data/spells/scripts/rune_blade/
Lua Code:
Lua:
function onCastSpell(cid, var)
local left = getPlayerSlotItem(cid, 6)
local right = getPlayerSlotItem(cid, 5)
if left.itemid == 7417 then
doSetItemActionId(left.uid, 12002)
doSetItemSpecialDescription(left.uid, "It is enhanced with ice magic.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIANTICE)
elseif right.itemid == 7417 then
doSetItemActionId(right.uid, 12002)
doSetItemSpecialDescription(right.uid, "It is enhanced with ice magic.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIANTICE)
else
doPlayerSendCancel(cid, "Runed Sword must be on your hands to cast this spell.")
end
return true
end
XML Code:
PHP:
<instant name="Hyouga Bakuhatsu" words="ice blade" lvl="15" mana="60" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="rune_blade/ice_blade.lua">
<vocation id="4"/>
<vocation id="8"/>
</instant>
Description: This spell lets you empower the Runed Sword(7417) with ice magic.
[Install [Ice Blade] = End]
[Install [Earth Blade] = Start]
Script Name: earth_blade.lua
Type: Spell
Lua Location: data/spells/scripts/rune_blade/
Lua Code:
Lua:
function onCastSpell(cid, var)
local left = getPlayerSlotItem(cid, 6)
local right = getPlayerSlotItem(cid, 5)
if left.itemid == 7417 then
doSetItemActionId(left.uid, 12003)
doSetItemSpecialDescription(left.uid, "It is enhanced with earth magic.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_STONES)
elseif right.itemid == 7417 then
doSetItemActionId(right.uid, 12003)
doSetItemSpecialDescription(right.uid, "It is enhanced with earth magic.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_STONES)
else
doPlayerSendCancel(cid, "Runed Sword must be on your hands to cast this spell.")
end
return true
end
XML Code:
PHP:
<instant name="Jimen no Hitsugi" words="earth blade" lvl="20" mana="80" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="rune_blade/earth_blade.lua">
<vocation id="4"/>
<vocation id="8"/>
</instant>
Description: This spell lets you empower the Runed Sword(7417) with earth magic.
[Install [Earth Blade] = End]
[Install [Lightning Blade] = Start]
Script Name: lightning_blade.lua
Type: Spell
Lua Location: data/spells/scripts/rune_blade/
Lua Code:
Lua:
function onCastSpell(cid, var)
local left = getPlayerSlotItem(cid, 6)
local right = getPlayerSlotItem(cid, 5)
if left.itemid == 7417 then
doSetItemActionId(left.uid, 12004)
doSetItemSpecialDescription(left.uid, "It is enhanced with lightning magic.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_BIGCLOUDS)
elseif right.itemid == 7417 then
doSetItemActionId(right.uid, 12004)
doSetItemSpecialDescription(right.uid, "It is enhanced with lightning magic.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_BIGCLOUDS)
else
doPlayerSendCancel(cid, "Runed Sword must be on your hands to cast this spell.")
end
return true
end
XML Code:
PHP:
<instant name="Inazuma Sashikizu" words="lightning blade" lvl="25" mana="100" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="rune_blade/lightning_blade.lua">
<vocation id="4"/>
<vocation id="8"/>
</instant>
Description: This spell lets you empower the Runed Sword(7417) with lightning magic.
[Install [Lightning Blade] = End]
[Install [Force Blade] = Start]
Script Name: force_blade.lua
Type: Spell
Lua Location: data/spells/scripts/rune_blade/
Lua Code:
Lua:
function onCastSpell(cid, var)
local left = getPlayerSlotItem(cid, 6)
local right = getPlayerSlotItem(cid, 5)
if left.itemid == 7417 then
doSetItemActionId(left.uid, 12005)
doSetItemSpecialDescription(left.uid, "It is enhanced with force magic.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GROUNDSHAKER)
elseif right.itemid == 7417 then
doSetItemActionId(right.uid, 12005)
doSetItemSpecialDescription(right.uid, "It is enhanced with force magic.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GROUNDSHAKER)
else
doPlayerSendCancel(cid, "Runed Sword must be on your hands to cast this spell.")
end
return true
end
XML Code:
PHP:
<instant name="Oukii Kirikizu" words="force blade" lvl="30" mana="120" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="rune_blade/force_blade.lua">
<vocation id="4"/>
<vocation id="8"/>
</instant>
Description: This spell lets you empower the Runed Sword(7417) with force magic.
[Install [Force Blade] = End]
[Install [Rune Blade] = Start]
Script Name: RuneBlade
Type: Weapon
Lua Location: data/weapons/scripts/
Lua Code:
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_NONE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0.5, 0, 0.5, 0)
local area = createCombatArea({
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 3, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0}
})
setCombatArea(combat, area)
local combat_fire = createCombatObject()
setCombatParam(combat_fire, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat_fire, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat_fire, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat_fire, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK)
setCombatParam(combat_fire, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setCombatFormula(combat_fire, COMBAT_FORMULA_SKILL, 1, 0, 1, 0)
local area_fire = createCombatArea({
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 1, 0, 0},
{0, 0, 0, 3, 0, 0, 0},
{0, 0, 1, 0, 0, 0, 0},
{0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0}
})
setCombatArea(combat_fire, area_fire)
local combat_ice = createCombatObject()
setCombatParam(combat_ice, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat_ice, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat_ice, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat_ice, COMBAT_PARAM_EFFECT, CONST_ME_GIANTICE)
setCombatParam(combat_ice, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)
setCombatFormula(combat_ice, COMBAT_FORMULA_SKILL, 1, 0, 1, 0)
local area_ice = createCombatArea({
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 0, 1, 0, 0},
{0, 1, 0, 1, 0, 1, 0},
{0, 0, 1, 3, 1, 0, 0},
{0, 1, 0, 1, 0, 1, 0},
{0, 0, 1, 0, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0}
})
setCombatArea(combat_ice, area_ice)
local combat_earth = createCombatObject()
setCombatParam(combat_earth, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat_earth, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat_earth, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
setCombatParam(combat_earth, COMBAT_PARAM_EFFECT, CONST_ME_STONES)
setCombatParam(combat_earth, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLEARTH)
setCombatFormula(combat_earth, COMBAT_FORMULA_SKILL, 1, 0, 1, 0)
local area_earth = createCombatArea({
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 0, 0, 0, 1, 0},
{1, 0, 1, 1, 1, 0, 1},
{1, 0, 1, 3, 1, 0, 1},
{1, 0, 1, 1, 1, 0, 1},
{0, 1, 0, 0, 0, 1, 0},
{0, 0, 1, 1, 1, 0, 0}
})
setCombatArea(combat_earth, area_earth)
local combat_energy = createCombatObject()
setCombatParam(combat_energy, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat_energy, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat_energy, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat_energy, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
setCombatParam(combat_energy, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatFormula(combat_energy, COMBAT_FORMULA_SKILL, 1, 0, 1, 0)
local area_energy = createCombatArea({
{0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 1, 3, 1, 0, 0},
{0, 0, 1, 0, 1, 0, 0},
{0, 0, 1, 0, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0}
})
setCombatArea(combat_energy, area_energy)
local combat_critical = createCombatObject()
setCombatParam(combat_critical, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat_critical, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat_critical, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat_critical, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
setCombatParam(combat_critical, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)
setCombatFormula(combat_critical, COMBAT_FORMULA_SKILL, 1, 0, 1, 0)
local area_critical = createCombatArea({
{0, 0, 0, 0, 0, 0, 1},
{0, 0, 0, 0, 1, 1, 0},
{0, 0, 0, 1, 1, 1, 0},
{0, 0, 1, 3, 1, 0, 0},
{0, 1, 1, 1, 0, 0, 0},
{0, 1, 1, 0, 0, 0, 0},
{1, 0, 0, 0, 0, 0, 0}
})
setCombatArea(combat_critical, area_critical)
local t = {
[12001] = {say = "Hi Kirikizu!", spend = 7, level = 10, combat = combat_fire, combatDflt = combat},
[12002] = {say = "Hyouga Bakuhatsu!", spend = 10, level = 15, combat = combat_ice, combatDflt = combat},
[12003] = {say = "Jimen no Hitsugi!", spend = 12, level = 20, combat = combat_earth, combatDflt = combat},
[12004] = {say = "Inazuma Sashikizu!", spend = 14, level = 25, combat = combat_energy, combatDflt = combat},
[12005] = {say = "Oukii Kirikizu!", spend = 16, level = 30, combat = combat_critical, combatDflt = combat}
}
function onUseWeapon(cid, var)
local left = getPlayerSlotItem(cid, 6)
local right = getPlayerSlotItem(cid, 5)
if getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 then
for aid, action in pairs(t) do
local manaSpend = action.spend
if getCreatureMana(cid) >= manaSpend then
if left.actionid == aid then
if getPlayerLevel(cid) >= action.level then
if action.combat then
doCreatureSay(cid, action.say, TALKTYPE_MONSTER_YELL)
doPlayerAddSpentMana(cid, manaSpend)
doCreatureAddMana(cid, -manaSpend)
doCombat(cid, action.combat, var)
end
end
elseif right.actionid == aid then
if getPlayerLevel(cid) >= action.level then
if action.combat then
doCreatureSay(cid, action.say, TALKTYPE_MONSTER_YELL)
doPlayerAddSpentMana(cid, manaSpend)
doCreatureAddMana(cid, -manaSpend)
doCombat(cid, action.combat, var)
end
end
end
elseif getCreatureMana(cid) < manaSpend then
if action.combatDflt then
if left.actionid == aid then
doCreatureSay(cid, "Kirikizu!", TALKTYPE_MONSTER_YELL)
doCombat(cid, action.combatDflt, var)
elseif right.actionid == aid then
doCreatureSay(cid, "Kirikizu!", TALKTYPE_MONSTER_YELL)
doCombat(cid, action.combatDflt, var)
end
end
end
end
elseif getPlayerVocation(cid) ~= 4 or getPlayerVocation(cid) ~= 8 then
if left.itemid == 7417 then
doCreatureSay(cid, "Kirikizu!", TALKTYPE_MONSTER_YELL)
doCombat(cid, combat, var)
elseif right.itemid == 7417 then
doCreatureSay(cid, "Kirikizu!", TALKTYPE_MONSTER_YELL)
doCombat(cid, combat, var)
end
end
return true
end
XML Code:
PHP:
<melee id="7417" event="script" value="RuneBlade.lua"/>
and delete it.
Description: This is where the action happens, when you attack
a creature the magic powers that where placed on the Runed Sword
will be released and it will harm your enemies.
[Install [Rune Blade] = End]
And just in case you may want to know:
Hi Kirikizu = Fire Slash
Hyouga Bakuhatsu = Glacier Explosion
Jimen no Hitsugi = Terra Coffin
Inazuma Sashikizu = Lightning Stab
Oukii Kirikizu = Grand Slash
Kirikizu = Slash
Well I hope you enjoy this and REP if you really liked it.