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

BUG conjure food!! HELP!!!

valivan601

New Member
Joined
Apr 13, 2011
Messages
365
Reaction score
1
I have this scrpt to conjure food on my server but when a player hold the hotkey they no waste cap and fills the bp with food, the soul and mana are working fine

Anyone can help me with this?

Code:
local t = {
	2666, -- meat
	2671, -- ham
	2681, -- grape
	2674, -- aple
	2689, -- bread
	2690, -- roll
	2696 -- cheese
}
 
function onCastSpell(cid, var)
	if doPlayerAddItemEx(cid, doCreateItemEx(t[math.random(#t)])) ~= RETURNVALUE_NOERROR then
		doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
		doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
		return false
	end
 
	if math.random(2) == 1 then
		doPlayerAddItemEx(cid, doCreateItemEx(t[math.random(#t)]))
	end
 
	doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_GREEN)
	return true
end
 
I don't see the problem you have here.
Are you saying the food has no weight? If so, you should check items.xml and put weight on it?
 
the problem is when the player hold the hotkey it fills the bp with food and dont get exausted the cap also dont move if the player cast the spells normaly without hold hotkey all works fine
 
Back
Top