• 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 Hello I need some help with heal fountain.

Bufo

-.-'
Joined
Jul 30, 2010
Messages
134
Reaction score
12
Location
P(R)OLAND
Hello I need some help with script "heal fountain".
If player use fountain will add for him 100 % health and mana.
Can you correct my script ?:
PHP:
function onUse(cid, item, frompos, item2, topos)
	if item.aid == 4467 then
		doCreatureAddHealth(cid, 1000000)  // What function is 100% "max" ?
		doCreatureAddMana(cid, 1000000)  // What function is 100% "max" ?
		doSendMagicEffect(getCreaturePosition(cid), 12)
		doPlayerSendTextMessage(cid,22,"Ahhh...")
	end
end
 
Hello I need some help with script "heal fountain".
If player use fountain will add for him 100 % health and mana.
Can you correct my script ?:
PHP:
function onUse(cid, item, frompos, item2, topos)
	if item.aid == 4467 then
		doCreatureAddHealth(cid, 1000000)  // What function is 100% "max" ?
		doCreatureAddMana(cid, 1000000)  // What function is 100% "max" ?
		doSendMagicEffect(getCreaturePosition(cid), 12)
		doPlayerSendTextMessage(cid,22,"Ahhh...")
	end
end

Try your code in your server, if it doesn't work post the errors. Because I don't really see anything wrong with it at a quick glance
 
Lua:
getCreatureMaxMana(cid)  -- returns player max mana so you put it instead of the 1000000
 getCreatureMaxHealth(cid) -- returns player max health so you put it instead of the 1000000
 
Back
Top