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

Full Hp & Mana

matti450

Member
Joined
Apr 13, 2008
Messages
507
Reaction score
24
Hello i found a script that heal your hp and mana to full when you press on a statue or another item, my problem is that it wont work on my new ot but it work on the other ot. Any adea how i can make that script work?
Code:
local config = {

  healHP = 1000,
  healPlayers = "yes",
  healMonsters = "yes",
}

local healthArea = {

  fromX = 1001,
  fromY = 995,
  fromZ = 7,
  toX = 1009,
  toY = 1002,
  toZ = 7,

}

function onThink(cid, interval, lastExecution)
  for x = healthArea.fromX, healthArea.toX do
  for y = healthArea.fromY, healthArea.toY do
  for z = healthArea.fromZ, healthArea.toZ do
  local pos = {x=x, y=y, z=z, stackpos = 253}
  local thing = getThingfromPos(pos)
  doSendMagicEffect(pos, 12)
  if thing.itemid > 0 then
  if(isPlayer(thing.uid) == TRUE and string.lower(config.healPlayers) == "yes") then
  doCreatureAddHealth(thing.uid, config.healHP)
  if string.lower(getConfigValue("showHealingDamage")) == "yes" then
  doSendAnimatedText(pos, "+"..config.healHP.."", 18)
  end
  elseif(isMonster(thing.uid) == TRUE and string.lower(config.healMonsters) == "yes") then
  doCreatureAddHealth(thing.uid, config.healHP)
  if string.lower(getConfigValue("showHealingDamageForMonsters")) == "yes" then
  doSendAnimatedText(pos, "+"..config.healHP.."", 18)
  end
  end
  end
  end
  end
  end
  return TRUE
end
 
Last edited by a moderator:
Back
Top