• 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 Remove on Leveling.

simson361

The Grim Reaper
Joined
Aug 4, 2010
Messages
626
Reaction score
27
Location
sweden
when i level ANY skill at all, dist, mage, axe, mlvl, normal level it gives me full mana and hp, i dont want it to give full mana/hp on any level at all, anyone know how to fix this?
 
@Limos this
Code:
-- [( Script edited by: DoidinMapper for XTibia.com )] --
function onAdvance(cid, skill, oldLevel, newLevel)
local config = {savePlayersOnAdvance = true}
if(config.savePlayersOnAdvance) then
doPlayerSave(cid, TRUE)
end
return TRUE
end
And This
Code:
    <event type= "advance" name= "PointSystem" event= "script" value= "pointSystem.lua"/>

local VocPoints = {
  [1] = 3,
  [2] = 3,
  [3] = 3,
  [4] = 5,
  [5] = 5,
  [6] = 5,
  [7] = 5,
  [8] = 8,
  }
function onAdvance(cid, skill, oldlevel, newlevel)
  if not (VocPoints[getPlayerVocation(cid)]) then
  return true
  end
  if (skill == 8) then
  if (getPlayerStorageValue(cid, 14573) < newlevel) then
  if (getPlayerStorageValue(cid, 14574) < 0) then
  setPlayerStorageValue(cid, 14574, 0)
  setPlayerStorageValue(cid, 14573, 0)
  end

  setPlayerStorageValue(cid, 14573, newlevel)
  setPlayerStorageValue(cid, 14574, getPlayerStorageValue(cid, 14574) + (newlevel - oldlevel) * (VocPoints

[getPlayerVocation(cid)]))
  doSendAnimatedText(getThingPos(cid), "+" .. (newlevel - oldlevel) * (VocPoints[getPlayerVocation(cid)]), 18)
  end
  end

  return true
end
 
The script you posted will give points on level up in any skill, I doesn't see anything that adds full health/mana.

You got another advance script?
 
Last edited:
if there isnt any creaturescript in advance that give the player full mana and full hp then you need source edit.
the two scripts you added before is not giving full mana or full hp when you level up.
 
@MadMOOK if i remove advancedsave.lua from creaturescrit i wont get any hp/mana on level?
(this is the advancedsave.lua script)
Code:
-- [( Script edited by: DoidinMapper for XTibia.com )] --
function onAdvance(cid, skill, oldLevel, newLevel)
local config = {savePlayersOnAdvance = true}
if(config.savePlayersOnAdvance) then
doPlayerSave(cid, TRUE)
end
return TRUE
end
 
errr.. sorry xD use this one and change healPlayerOnLevel = true to FALSE xD
Im really tired :p
Code:
local config = {
    savePlayer = true,
    healPlayerOnLevel = true
}

function onAdvance(cid, skill, oldLevel, newLevel)
    if(skill == SKILL__EXPERIENCE) then
        return true
    end

    if(skill == SKILL__LEVEL and config.healPlayerOnLevel) then
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
        doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid))
    end

    if(config.savePlayer) then
        doPlayerSave(cid, true)
    end

    return true
end
 
It is not the save script.
I don't know how often I should tell you to add information of the server you are using..
Is it a downloadable datapack? Where did you get it? Server Version?
 
@Summ it is TFS 0.3.6 (datapack is not downloadebul anymore i found it on Xtibia.com i tryed to uploade it here but Scarlet wodent let me, virus/bugg/error free also)

-- Updated --
@MadMOOK ty i will try and see what happends :)
 
Last edited by a moderator:
Back
Top