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

Lua Help with mana restore.

Dexftw

Total Boss
Joined
Jan 30, 2011
Messages
317
Reaction score
8
[C]: in function 'getCreatureMaxMana'
[03/02/2011 16:23:09] data/actions/scripts/Specialfood/blessedsteak.lua:3: in function <data/actions/scripts/Specialfood/blessedsteak.lua:1>


Code:
function onUse(cid,item, fromPosition, itemEx, toPosition)
if item.itemid == 9999 then
 doCreatureAddMana(cid, getCreatureMaxMana(cid))
 doPlayerSendTextMessage(cid,198,"your mana has been restored completely!")
 doTransformItem(item.uid,2035)
 elseif item.itemid == 2035 then
 doPlayerSendCancel(cid,"there is no more food left on this dish")
 end
 return TRUE
 end
Anyone know why that function is giving an error? tfs 0.2.10 fyi
 
Is that the whole error? seems to me there is something missing also there is a 24 hour bump time (that means not the next day you can bump but 24 hours after the last post was made)
 
Lua:
function onUse(cid,item, fromPosition, itemEx, toPosition)
		if item.itemid == 9999 then
	for max = getCreatureMaxMana(cid) do
                setCreatureMaxMana(cid, max)
		doPlayerSendTextMessage(cid,198,"your mana has been restored completely!") and  doTransformItem(item.uid,2035)
	elseif item.itemid == 2035 then
	doPlayerSendCancel(cid,"there is no more food left on this dish")
		end
	return LUA_ERROR
 end

test it
 
Back
Top