• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Increase players max health/mana

Aarthec

w0000t
Joined
Apr 25, 2009
Messages
129
Reaction score
0
Location
Sweden
Click on an item and the players max health/mana will be increased.
Haven't seen this on otland before so I just made one.

Lua:
function onUse(cid, item, frompos, itemEx, topos)
local config = {
			storage=5000,
			addmana=2000,
			addhealth=1000,
			levelReq=80
		}
		
    if getPlayerStorageValue(cid, config.storage) == -1 then
		if getPlayerLevel(cid) >= config.levelReq then
			setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+config.addhealth)
			setCreatureMaxMana(cid, getCreatureMaxMana(cid)+config.addmana)
			doPlayerSendTextMessage(cid, 22, "Your max health has been increased by "..config.addhealth.." and your max mana by "..config.addmana.."!")
			setPlayerStorageValue(cid, config.storage, 1)
		else
			doPlayerSendCancel(cid, "You need level "..config.levelReq.." to use this item.")
		end
	else
		doPlayerSendCancel(cid, "You have already used this item.")
	end
return TRUE
end
 
Alright, there was one, but... it was a post in a thread on the 2nd page.
Better to have one here imo. ^^
 
Back
Top Bottom