• 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!

A Sd that is dmging 40% of opponents life cooldown 5 min

GOD Wille

Excellent OT User
Joined
Jan 11, 2010
Messages
2,826
Solutions
2
Reaction score
815
Location
Sweden
I'm searching of a SD that is dmging 40% of opponents life with a cooldown of 5 min.
 
i might lower it to 20% but i want the script ;P

and i got a lot higher exp serv than lvl 400 knights etc

(and this item shouldnt be obtainable in quest etc) just some of them is gonna have it
 
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)

function onCastSpell(cid, var)
------------------ CONFIG ------------------------------------
local damagepercent = 40 -- How many % damage shall SD take?
--------------------------------------------------------------

local target = getCreatureTarget(cid)
local sddamage1 = (getCreatureHealth(target)/100)*damagepercent
local sddamage2 = math.floor(sddamage1)
if isCreature(target) then
doCreatureAddHealth(target, -sddamage2)
return doCombat(cid, combat, var)
else
doPlayerSendTextMessage(cid, 13, "Target could not be found.")
return true
end
end

This will deal 40% of remaining health. Means its very powerful against characters, especially knights with full hp. As an "initiater" not a "killing blow".

if opponement = 400 hp and you shoot this SD he will loose 160HP.
If opponement = 100 hp and you shoot this SD he will loose 40HP.

You can change the percent in the config.
 
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
	
function onCastSpell(cid, var)
	if not exhaustion.check(cid, 101) then
		if doCombat(cid, combat, var) then
			local f = variantToNumber(var)
			if f ~= 0 then
				exhaustion.set(cid, 101, 300)
				local hp = - (math.ceil(getCreatureHealth(f) * 0.4))
				doTargetCombatHealth(cid, f, COMBAT_DEATHDAMAGE, hp, hp, CONST_ME_NONE)
			end
			return true
		end
	else
		doPlayerSendCancel(cid, 'Cooldown[' .. exhaustion.get(cid, 101) .. ']')
	end
end
 
Back
Top