• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Request - Action that gives +5hp permamently to player

lynx_

New Member
Joined
Sep 15, 2011
Messages
25
Reaction score
0
Requesting action that gives +5 health points to player PERMAMENTLY.

Before using player has for example 1000 hp.

After it he has 1005 hp.


Giving rep ofc, thanks for trying to help!
 
and if he advances level he gets (hishp)+5? if yes
doPlayerSetMaxHealth(cid, getPlayerMaxHealth(cid)+5) I guess :p
 
I have found nothing through search, can you guide me?

And I don't want bonus health with lvling, I want just an item that increases player max hp by 5 points, and
doPlayerSetMaxHealth(cid, getPlayerMaxHealth(cid)+5)
seems to be not working..
 
Enjoy.

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local health = 2 -- amount of health to get per use
local cost = 1000 -- amount to pay per use
local add = getCreatureMaxHealth(cid) + health

if isPlayer(cid) and getPlayerMoney(cid) > cost then
if doPlayerRemoveMoney(cid, cost) == true then
setCreatureMaxHealth(cid, add)
else 
doPlayerSendTextMessage(cid,25,"You dont have enough money to purchase this")
end
end
return true
end
 
Enjoy.

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local health = 2 -- amount of health to get per use
local cost = 1000 -- amount to pay per use
local add = getCreatureMaxHealth(cid) + health

if isPlayer(cid) and getPlayerMoney(cid) > cost then
if doPlayerRemoveMoney(cid, cost) == true then
setCreatureMaxHealth(cid, add)
else 
doPlayerSendTextMessage(cid,25,"You dont have enough money to purchase this")
end
end
return true
end
No offense but...
AAAAH MY EYES!

LUA:
local health = 5
local add = getCreatureMaxHealth(cid) + 5
function onUse(cid, item, fromPosition, itemEx, toPosition)
		if isPlayer(cid) then
			doRemoveItem(cid, item.uid)
			setCreatureMaxHealth(cid, add)
		end
	return true
end
 
and it is possible that when you kill a monster, give you 5 + hp permamently?

LUA:
local t = { 
      m = "Rat",
      hp = 5
      }
function onKill(cid, target)
	if not isPlayer(target) and getCreatureName(target) == t.m then
		setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+t.hp)
	end
return TRUE
end
 
LUA:
local t = { 
      m = "Rat",
      hp = 5
      }
function onKill(cid, target)
	if not isPlayer(target) and getCreatureName(target) == t.m then
		setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+t.hp)
	end
return TRUE
end

thanks, and add mana permamently is possible?
 
PHP:
local t = { 
      m = "Rat",
      hp = 60
     mana = 120

      }
function onKill(cid, target)
	if not isPlayer(target) and getCreatureName(target) == t.m then
		setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+t.hp)
		setCreatureMaxMana(cid, getCreatureMaxMana+t.mana)
	end
return TRUE
end

??
 
LUA:
local t = { 
      m = "Rat",
      hp = 60,
     mana = 120
      }
function onKill(cid, target)
    if not isPlayer(target) and getCreatureName(target) == t.m then
        setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+t.hp)
        setCreatureMaxMana(cid, getCreatureMaxMana+t.mana)
    end
return TRUE
end
 
Back
Top