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

Sd bug atk pz!

GOD Wille

Excellent OT User
Joined
Jan 11, 2010
Messages
2,826
Solutions
2
Reaction score
815
Location
Sweden
Tell me how to do so ppl cant atk in pz with this rune
They cant in just normal mode but when they sd in battle it works, please help.
Code:
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)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -24.2 , -1800, -24.3, 1800)

function onCastSpell(cid, var)
	if not(getTileInfo(getPlayerPosition(cid)).protection) then
		return doCombat(cid, combat, var)
	else
		doPlayerSendCancel(cid, "You can't use Sudden Death in a protected zone.")
	end
end

nobody know???
 
Last edited:
Code:
	<conjure name="Sudden Death" words="adori gran mort" lvl="45" mana="985" soul="5" reagentId="2260" conjureId="2268" conjureCount="3" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
		<vocation id="1"/>
		<vocation id="5"/>
	</conjure>

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
function getCombatFormulas(cid, lv, maglv)
	local formula_min = -((lv*0.25 + maglv*3) * 1.75)
	local formula_max = -((lv*0.25 + maglv*3) * 2.20)

	if(formula_max < formula_min) then
		local tmp = formula_max
		formula_max = formula_min
		formula_min = tmp
	end
	return formula_min, formula_max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

Rep++
 
Code:
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)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -24.2 , -1800, -24.3, 1800)

function onCastSpell(cid, var)
	[COLOR="Red"][B]if not(getTileInfo(getPlayerPosition(cid)).protection) then[/B][/COLOR]
		return doCombat(cid, combat, var)
[B][COLOR="Red"]	else
		doPlayerSendCancel(cid, "You can't use Sudden Death in a protected zone.")[/COLOR][/B]
[COLOR="Red"][B]	end[/B][/COLOR]
end
delete the red lines
 
Code:
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)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -24.2 , -1800, -24.3, 1800)

function onCastSpell(cid, var)
    if getTileInfo(getPlayerPosition(cid)).protection then
        return doCombat(cid, combat, var)
    else
        doPlayerSendCancel(cid, "You can't use Sudden Death in a protected zone.")
    end
end
 
Code:
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)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -24.2 , -1800, -24.3, 1800)

function onCastSpell(cid, var)
    if not getTileInfo(getThingPos(cid)).protection and not getTileInfo(getThingPos(variantToNumber(var))).protection then
        return doCombat(cid, combat, var)
    else
        doPlayerSendCancel(cid, "You can't use Sudden Death in a protection zone.")
    end
end
 
Back
Top