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

Runes problem

Gregor

New Member
Joined
Feb 29, 2008
Messages
770
Reaction score
3
Location
UK/POLAND
Hello! I have problem i want set sd and my own sd for pally only but when i start server i get error cant load spells.
Here is the code:

Code:
	<rune name="Sudden Death" id="2268" allowfaruse="1" charges="3" lvl="45" maglv="15" exhaustion="1500" needtarget="1" blocktype="solid" script="attack/sudden death.lua"/>
		<vocation name="Sorcerer"/>
		<vocation name="Druid"/>
		<vocation name="Master Sorcerer"/>
		<vocation name="Elder Druid"/>
	</rune>
	<rune name="Paladin Death" id="2263" allowfaruse="1" charges="3" lvl="20" maglv="15" exhaustion="1500" needtarget="1" blocktype="solid" script="attack/paladin death.lua"/>
		<vocation name="Paladin"/>
		<vocation name="Royal Paladin"/>
	</rune>

Anyone can help me how to change runes for voc?
 
Last edited:
global.lua:
PHP:
function doVocationCombat(cid, vocs, combat, var)
	if isPlayer(cid) == TRUE then
		if isInArray(vocs, getPlayerVocation(cid)) == FALSE then
			-- doPlayerSendCancel(cid, "Your vocation can not use this rune.")
			return FALSE
		end
	end
	return doCombat(cid, combat, var)
end

script:
PHP:
local vocations = {2, 5, 6}
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
--setConditionParam(condition, CONDITION_PARAM_SPEED, -200)
setConditionFormula(condition, -0.9, 0, -0.9, 0)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
	return doVocationCombat(cid, vocations, combat, var)
end

Credits:
Colandus for making this cool global function and showing us how to use ^^

Usage:
PHP:
change local vocations = {2, 5, 6}
to
PHP:
local vocations = {4, 8}

NOTE : I am not sure if Paladin voc is 4 and 8 u make sure
 
Last edited:
np, Simonel Request a lock for this thread if it worked to prevent spamage.
 
Back
Top