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

War/no potions or runes in pz

Mooosie

- Lua Scripter -
Joined
Aug 2, 2008
Messages
702
Reaction score
27
Location
Sweden
I want source/script that makes the player not heal inside protecting zone(pz). With not "heal" I mean, they can't use potions or runes in pz, but they can heal with spells.

I want this script because of preventing botters that is spamming healing and spells to get higher magic level in temple or wherever the pz are.

Thanks in advance :)
 
you dont need source edit, what you can do is, change potions && every healing rune and put a check, like this one:

ultimate healing rune,
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 10, 12)

function onCastSpell(cid, var)
        if (getTilePzInfo(getCreaturePosition(cid))) then
		doPlayerSendCancel(cid, "You may not use this rune in a protected zone.")
		return true
	end
	return doCombat(cid, combat, var)
end

-

potions.lua

add

Lua:
if (getTilePzInfo(getCreaturePosition(cid))) then
	doPlayerSendCancel(cid, "You may not use this potion in a protected zone.")
	return true
end

after onUse(cid, item, fromPosition, itemEx, toPosition)

like this:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if (getTilePzInfo(getCreaturePosition(cid))) then
		doPlayerSendCancel(cid, "You may not use this potion in a protected zone.")
		return true
	end



edit, soz fixed ehehe thx BigD
 
Last edited:
I've seen many war systems as "noobwar.eu" using that system. You cannot use a potion or healing rune inside pz. thats why I am asking if someone could help me
 
Back
Top