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

[Request] Mana Burn

justin234

New Member
Joined
Jan 22, 2008
Messages
999
Reaction score
4
I would like a spell that takes/drains mana.
(With A Magic Effect - Like FIREAREA)

Example:
Player Says: Mana Burn "4000 = Removes 4000 Mana

Thanks.
 
Moved to request and support. Try to post in correct section, that gives better chance to get help. :p
 
Code:
function onSay(cid, words, param)
	if isNumber(param) == TRUE then
		if getCreatureMana(cid) >= param then
			doCreatureAddMana(cid,-param)
			doSendMagicEffect(getCreaturePosition(cid),CONST_ME_FIREAREA)
		else
			doPlayerSendCancel(cid,"You don't have enough mana.")
		end
	else
		doPlayerSendCancel(cid,"You have to use numbers not words.")
	end
	return FALSE
end


kind regards, Evil Hero
 
Still doesnt work.

Code:
[02/12/2008  15:47:43] Lua Script Error: [TalkAction Interface] 
[02/12/2008  15:47:43] data/talkactions/scripts/train_mana.lua:onSay

[02/12/2008  15:47:43] data/talkactions/scripts/train_mana.lua:3: attempt to compare string with number
[02/12/2008  15:47:43] stack traceback:
[02/12/2008  15:47:43] 	data/talkactions/scripts/train_mana.lua:3: in function <data/talkactions/scripts/train_mana.lua:1>
 
Back
Top