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

HEAL Boost

115820

Member
Joined
Feb 27, 2011
Messages
193
Solutions
1
Reaction score
5
Location
London, England
Hi.
I need help. I see in a Brazil Server that boost. He no a item, but a storage add in player. That storage add more healing mana and health when use spell or rune. If someone knows how make this, please help me.
If u want see what the system. IP : theheroesoftime.servegame.com 8.6
 
You can edit the healing spells and runes, check for the storagevalue and execute a different combat with more healing.
Code:
if getPlayerStorageValue(cid, 34573) >= 1 then
   return doCombat(cid, combat2, var)
end
 
You can edit the healing spells and runes, check for the storagevalue and execute a different combat with more healing.
Code:
if getPlayerStorageValue(cid, 34573) >= 1 then
   return doCombat(cid, combat2, var)
end
Thanks, but the boost is Automatic, like SoftBoots. Use Automatic.
 
In-game it will be automatic using limos's script.
It requires effort and planning outside of the game on your part to implement the system.
 
basically like this
Code:
combat1.. function function blah blah
    skill/level == 1, 1
    return combat

combat2.. function function blah blah
    skill/level == 2, 1
    return combat

onCast blah blah
    local storage = 45001
    if getPlayerStorageValue(cid, storage) < 1 then
        return doCombat(cid, combat1, var)
    elseif getPlayerStorageValue(cid, storage) == 1 then
        return doCombat(cid, combat2, var)
    end
    return true
end
 
basically like this
Code:
combat1.. function function blah blah
    skill/level == 1, 1
    return combat

combat2.. function function blah blah
    skill/level == 2, 1
    return combat

onCast blah blah
    local storage = 45001
    if getPlayerStorageValue(cid, storage) < 1 then
        return doCombat(cid, combat1, var)
    elseif getPlayerStorageValue(cid, storage) == 1 then
        return doCombat(cid, combat2, var)
    end
    return true
end
Where i active? data/????
 
But this is not spell. i no need say spell to use. i need use automatic, when login in server player start healing. Like VIP EFFECT.
 
Last edited:
But this is not spell. i no need say spell to use. i need use automatic, when login in server player start healing. Like VIP EFFECT.
"storage add more healing mana and health when use spell or rune."
This is exact quote of your first post.

If it's not a spell or rune, and you want them to regen mana/hp forever when they get a storage.. make an onThink event in globalevents.
 
But this is not spell. i no need say spell to use. i need use automatic, when login in server player start healing. Like VIP EFFECT.

This?

Code:
local t = {seconds = 3, storage = 5152, bonusHealth = 150, bonusMana = 0}

local function bonusRegeneration(cid)
   if isPlayer(cid) then
     doCreatureAddHealth(cid, 150)
     if t.bonusMana ~= 0 then
       doCreatureAddMana(cid, t.bonusMana)
     end
     bonus = addEvent(bonusRegeneration, 1000*t.seconds, cid)
   end
end

function onLogin(cid)
   if getPlayerStorageValue(cid, t.storage) > 0 then
    bonusRegeneration(cid)
   end
   return true
end

function onLogout(cid)
   if getPlayerStorageValue(cid, t.storage) > 0 then
     stopEvent(bonus)
   end
   return true
end

Code:
<event type="login" name="bonus" event="script" value="bonus.lua"/>
<event type="logout" name="bonus" event="script" value="bonus.lua"/>

Code:
registerCreatureEvent(cid, "bonus")

EDIT: would be better this instead to prevent addEvents.
Code:
local t = {storage = 5152, bonusHealth = 150, secondsHealth = 3, --[[bonusMana = 0, secondsMana = 0]]}

local bonus = createConditionObject(CONDITION_REGENERATION)
setConditionParam(bonus, CONDITION_PARAM_BUFF, 1)
setConditionParam(bonus, CONDITION_PARAM_SUBID, 1)
setConditionParam(bonus, CONDITION_PARAM_TICKS, -1)
setConditionParam(bonus, CONDITION_PARAM_HEALTHGAIN, t.bonusHealth)
setConditionParam(bonus, CONDITION_PARAM_HEALTHTICKS, 1000*t.secondsHealth)
-- bonusMana
--[[setConditionParam(bonus, CONDITION_PARAM_MANAGAIN, t.bonusMana)
setConditionParam(bonus, CONDITION_PARAM_MANATICKS, 1000*t.secondsMana)]]

function onLogin(cid)
   if getPlayerStorageValue(cid, t.storage) > 0 then
     doAddCondition(cid, bonus, 1)
   end
   return true
end
 
Last edited:
"storage add more healing mana and health when use spell or rune."
This is exact quote of your first post.

If it's not a spell or rune, and you want them to regen mana/hp forever when they get a storage.. make an onThink event in globalevents.
Sorry i write wrong.
This?

Code:
local t = {seconds = 3, storage = 5152, bonusHealth = 150, bonusMana = 0}

local function bonusRegeneration(cid)

   if isPlayer(cid) and getPlayerStorageValue(cid, t.storage) > 0 then
     doCreatureAddHealth(cid, 150)
     if t.bonusMana ~= 0 then
       doCreatureAddMana(cid, t.bonusMana)
     end
     bonus = addEvent(bonusRegeneration, 1000*t.seconds, cid)
   end
end

function onLogin(cid)
   bonusRegeneration(cid)
   return true
end

function onLogout(cid)
   if getPlayerStorageValue(cid, t.storage) > 0 then
     stopEvent(bonus)
   end
   return true
end

Code:
<event type="login" name="bonus" event="script" value="bonus.lua"/>
<event type="logout" name="bonus" event="script" value="bonus.lua"/>

Code:
registerCreatureEvent(cid, "bonus")
Thanks.
 
Erro :Creature not found. (LuaDoAddCondition)

The First work :)


Hey, can fix to show Mana In voc (sorcerer, druid) and Health in voc (knight and pally). Dont Show two effects +150(health) +100(Mana). But Healing Health and Mana in all vocations.
 
Last edited:
Erro :Creature not found. (LuaDoAddCondition)

The First work :)


Hey, can fix to show Mana In voc (sorcerer, druid) and Health in voc (knight and pally). Dont Show two effects +150(health) +100(Mana). But Healing Health and Mana in all vocations.

Weird, it should work. Anyways seems like you are ok with the first one :p
Code:
local t = {storage = 5152, seconds = 3, health = {bonusHealth = 350, vocations = {3, 4}}, mana = {bonusMana = 150, vocations = {1, 2}}}

local function bonusRegeneration(cid)
   if isPlayer(cid) then
         if isInArray(t.health.vocations, getPlayerVocation(cid)) then
           doCreatureAddHealth(cid, t.health.bonusHealth)
      elseif isInArray(t.mana.vocations, getPlayerVocation(cid)) then
           doCreatureAddMana(cid, t.mana.bonusMana)
         end
     bonus = addEvent(bonusRegeneration, 1000*t.seconds, cid)
   end
end

function onLogin(cid)
   if getPlayerStorageValue(cid, t.storage) > 0 then
      bonusRegeneration(cid)
   end
   return true
end

function onLogout(cid)
   if getPlayerStorageValue(cid, t.storage) > 0 then
      stopEvent(bonus)
   end
   return true
end
 

Similar threads

Back
Top