• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Spell Vampric Strike *Done, Working, and Shared!*

supomglol

Member
Joined
Jan 29, 2012
Messages
195
Reaction score
10
HERE IS THE FINAL, WORKING SPELL! Was tested with 8.55 , 0.3.6 TFS!





add this to "Vampric Strike.lua" (or create) in Spells; Scipts
HTML:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)
 
 
function onGetFormulaValues(cid, level, skill, attack, factor)
	local skillTotal, levelTotal = skill + attack * 2, level / 5
	return -(skillTotal * 1.1 + levelTotal), -(skillTotal * 3 + levelTotal)
end
 
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
	local mlvl,lvl = getPlayerMagLevel(cid),getPlayerLevel(cid)
	local min = mlvl * 0.8 + lvl * 0.5 --change this formula to change the min amount of healing
	local max = mlvl * 1.2 + lvl * 0.9 --change this formula to change the max amount of healing
	doCreatureAddHealth(cid, math.random(min,max))
	return doCombat(cid, combat, var)
end



and in Data -> Spells -> Spells.xml, add

HTML:
	<instant name="Vampric Strike" words="exori pox" lvl="550" mana="900" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="0" event="script" value="attack/Vampric Strike.lua">
		<vocation id="11"/>
		<vocation id="12"/>
	</instant>



I have second promotions on *Hence why Vocation ID 11 , and ID 12* But Change them as you need!

So basically, it hits as hard as Exori Gran does on a single target, in death damage, that heals the user a slight amount aswell!


Everyone Enjoy :)


Big shotout to DUDEIM for writting the working script for me (well almost, had to add a parathensis) :b

Give him some +Rep!
 
Last edited:
Something like this would be easier to do:
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)


function onGetFormulaValues(cid, level, skill, attack, factor)
	local skillTotal, levelTotal = skill + attack * 2, level / 5
	return -(skillTotal * 1.1 + levelTotal), -(skillTotal * 3 + levelTotal)
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
	local mlvl,lvl = getPlayerMagLevel(cid),getPlayerLevel(cid)
	local min = mlvl * 0.8 + lvl * 0.5 --change this formula to change the min amount of healing
	local max = mlvl * 1.2 + lvl * 0.9 --change this formula to change the max amount of healing
	doCreatureAddHealth(cid, math.random(min,max)
	return doCombat(cid, combat, var)
end
 
Thanks man +++rep

Will test now!

Sorry, Still am new to the spells, I may ask for help in another post :b

Thanks again!!
 
Ah there was a parenthesis you forgot! But I got to work; will post the new one in just 1 sec
 
Edit: Moved everything to the original post to share with everyone.
 
Last edited:
incase you were wondering, the missing one was right after



setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
local mlvl,lvl = getPlayerMagLevel(cid),getPlayerLevel(cid)
local min = mlvl * 0.8 + lvl * 0.5 --change this formula to change the min amount of healing
local max = mlvl * 1.2 + lvl * 0.9 --change this formula to change the max amount of healing
doCreatureAddHealth(cid, math.random(min,max))
return doCombat(cid, combat, var)
end
 
Back
Top