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

Exori with always a constant min damage

mamon_2

Banned User
Joined
Jul 2, 2007
Messages
424
Reaction score
0
Hi, this is my exori, I was wondering if could add a min damage, for example, if exori would hit less than 200, that it always be 200, like the UH, if it is going to heal less than 250, it heal 250.

Any idea?

PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0.6, 0, 1.2, 0)

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

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
Perhaps i need this aswell, to balance the accuracy of some spells a little :)
 
Fierce Berserk and Berserk (exori and exori gran) ideas

You can calculate you damage based on LUA script, skill for weapon and player weapond attack (exori gran example with bad dmg, make you dmg?):
PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)

function getSpellDamage(cid, weaponSkill, weaponAttack, attackStrength)
	damage = weaponSkill * weaponAttack * attackStrength / 100
	damage1 = damage * 0.8
	if(damage < 250) then
		damage = 250
	end
	if(damage1 < 250) then
		damage1 = 250
	end
	return -damage, -damage1
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "getSpellDamage")

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
Last edited:
Thanks, but in theforgottenserver-v0.2-win32gui isnt working :S
It says:

Warning: [Event::loadScript] Event onCastSpell not found. data/spells/scripts/attack/exori.lua

:S:S:S
 
Back
Top