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

Exura gran mas res - Good idea!

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
671
Hello.
I need one remake for "exura gran mas res" spell:
- Exura gran mas res ONLY can heal party members;
- If im not in party i can attack and deal damage to enemy;
- If i attack enemy - enemy player, monster (what is without party), monster i deal damage

Summary:
- I can attack other monsters/players
- I only can heal party members (if any player is not in my party i deal him damage)


Anyone can make it for me ?
 
Just make it check for isInParty.
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_TARGETPLAYERSORSUMMONS, TRUE)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

function onGetFormulaValues(cid, level, maglevel)
	min = (level * 1 + maglevel * 4) * 2.08
	max = (level * 1 + maglevel * 4) * 2.7
	if min < 250 then
		min = 250
	end
	return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

local area = createCombatArea(AREA_CIRCLE3X3)
setCombatArea(combat, area)

function onCastSpell(cid, var)
	if isInParty(cid) then
		return doCombat(cid, combat, var)
	else
		return true
	end
end
Don't know if it will work, I haven't tried.
 
Back
Top