• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Bug with spells

Status
Not open for further replies.

Yony

New Member
Joined
Sep 7, 2007
Messages
318
Reaction score
0
Location
Israel
I'm using 8.0 version of Umbyevo.. And there is exhausted bug..
When you cast spell/rune too fast.. it will take mana without doing any affect..
Example: when you shoot sd too fast sometimes the SD will waste charges without shooting..
Please help me!!!

here is example of a code:
PHP:
local storevalue = 2578 -- value where exhausted is saved
local exhausttime = 1 -- 1 second exhaustion
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -.8, 0, 0, 0)

local arr = {
{0, 1, 0},
{0, 1, 0},
{0, 1, 0},
{0, 3, 0},
}

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

function onCastSpell(cid, var)
local pAccess = getPlayerAccess(cid) -- Returns the player's access
	if (isPlayer(cid) == TRUE and pAccess < 3) then
		if (exhaust(cid, storevalue, exhausttime) == 1) then
			return doCombat(cid, combat, var)
		else
			doPlayerSendCancel(cid, "You are exhausted.")
		end
	else
		return doCombat(cid, combat, var)
	end		
end
 
Last edited:
I'm using TFS.. but i want to make pvp server (no hotkeys)
and the stable server for tfs dont have this feature..
so..
anyway i got it fixed
 
Usually helps the community if you post what the problem were and how you fixed them.
But saying that Most people will use TFS anyway.

qQWg2Kw.png

ZgwZwHb.png
 
Status
Not open for further replies.
Back
Top