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

How do I make levelups NOT heal HP and mana?

Shinlo

New Member
Joined
Jun 14, 2009
Messages
8
Reaction score
0
Everytime a character levels up, his HP and mana are regenerated like in global, but I don't like this, what should I do?
 
I think you got me wrong, I'm not talking about the usual regen when you eat food, I'm saying that the characters HP and mana are FULLY regained after leveling up.

I couldn't find anything in the scripts that could lead to it
 
LUA:
function onAdvance(cid, skill, oldLevel, newLevel)
if skill == 8 then
local hp = getCreatureHealth(cid)
local mana = getCreatureMana(cid)
addEvent(doCreatureAddHealth, 100, cid, hp - getCreatureMaxHealth(cid))
addEvent(doCreatureAddMana, 100, cid, mana - getCreatureMaxMana(cid))
end
end

maybe this
 
Sorry, can someone explain me step by step?

0 - Turn on the PC
1 - Open the folder that contains your OTserver
2 - Open the data folder
3 - Open the creaturescripts folder
4 - Find a lua file which contains a name like "advancehp" - "advancegain" - "advance" - "hpmanagain" - "etc."
5 - Click it with the mouse(select it) and use the "supr" key in your keyboard.
6 - Send it to the bin
7 - Profit
8 - Giev me a cookie and a liek
 
0 - Turn on the PC
1 - Open the folder that contains your OTserver
2 - Open the data folder
3 - Open the creaturescripts folder
4 - Find a lua file which contains a name like "advancehp" - "advancegain" - "advance" - "hpmanagain" - "etc."
5 - Click it with the mouse(select it) and use the "supr" key in your keyboard.
6 - Send it to the bin
7 - Profit
8 - Giev me a cookie and a liek

Delete the line from creaturescripts.xml


Also, IIRC 0.2.11pl2 has it enabled by default, go to config.lua and disable it.
 
Code:
-- The Forgotten Server Config

	-- Account Manager
	accountManager = "yes"
	newPlayerChooseVoc = "yes"
	newPlayerSpawnPosX = 32360
	newPlayerSpawnPosY = 31782
	newPlayerSpawnPosZ = 7
	newPlayerTownId = 2
	newPlayerLevel = 8
	newPlayerMagicLevel = 5
	generateAccountNumber = "no"

	-- Banishments
	broadcastBanishments = "no"
	banDays = 7
	finalBanDays = 30
	killsToBan = 5

	-- Battle
	worldType = "pvp"
	hotkeyAimbotEnabled = "yes"
	protectionLevel = 50
	killsToRedSkull = 5
	pzLocked = 60000
	deathLosePercent = 0
	criticalHitChance = 10
	removeAmmoWhenUsingDistanceWeapon = "yes"
	removeChargesFromRunes = "yes"
	removeChargesFromWeapons = "yes"
	timeToDecreaseFrags = 24 * 60 * 60 * 1000
	whiteSkullTime = 15 * 60 * 1000
	oldConditionAccuracy = "no"
	stairJumpExhaustion = 0000
	animationTextOnHeal = "no"

	-- Commands
	displayGamemastersWithOnlineCommand = "no"

	-- Connection Config
	ip = "127.0.0.1"
	bindOnlyGlobalAddress = "no"
	loginProtocolPort = 7171
	gameProtocolPort = 7172
	adminProtocolPort = 7171
	statusProtocolPort = 7171
	loginTries = 10
	retryTimeout = 5 * 1000
	loginTimeout = 60 * 1000
	maxPlayers = "1000"
	motd = "Bem vindo ao Servidor"
	onePlayerOnlinePerAccount = "yes"
	allowClones = "no"
	serverName = "Lokeras Server"
	loginMessage = "Welcome to the server =D"
	adminLogsEnabled = "no"
	statusTimeout = 5 * 60 * 1000
	replaceKickOnLogin = "yes"

	-- Deathlist
	deathListEnabled = "yes"
	maxDeathRecords = 5

	-- Guilds
	ingameGuildSystem = "yes"
	levelToCreateGuild = 100

	-- Highscores
	highscoreDisplayPlayers = 15
	updateHighscoresAfterMinutes = 20

	-- Houses
	housePriceEachSQM = 1000
	houseRentPeriod = "never"

	-- Idle
	kickIdlePlayerAfterMinutes = 15

	-- Item Usage
	timeBetweenActions = 200
	timeBetweenExActions = 1000

	-- Map
	mapName = "Realmap"
        mapAuthor = "Global Full"
	randomizeTiles = "yes"
	mapStorageType = "relational"

	-- Messaging
	maxMessageBuffer = 4

	-- MySQL
	mysqlHost = "localhost"
	mysqlUser = "root"
	mysqlPass = ""
	mysqlDatabase = "theforgottenserver"
	mysqlPort = 3306

	-- Premium Account
	freePremium = "yes"

	-- PVP Server
	displayOnOrOffAtCharlist = "no"
	allowChangeOutfit = "yes"
	noDamageToSameLookfeet = "no"
	experienceByKillingPlayers = "yes"

	-- Rates
	rateExp = 50
	rateSkill = 125
	rateLoot = 3
	rateMagic = 10
	rateSpawn = 2

	-- Real Server Save
	-- note: serverSaveHour means like 03:00, not that it will save every 3 hours,
	-- if you want such a system use autoSaveEachMinutes. this serversave method
	-- may be unstable, we recommend using otadmin if you want real serversaves.
	serverSaveEnabled = "no"
	serverSaveHour = 3
	shutdownAtServerSave = "yes"
	cleanMapAtServerSave = "yes"

	-- Server saving
	autoSaveEachMinutes = 15
	saveGlobalStorage = "no"

	-- Spawns
	deSpawnRange = 2
	deSpawnRadius = 50

	-- SqLite
	sqliteDatabase = "forgottenserver.s3db"

	-- SQL
	sqlType = "sqlite"
	passwordType = "plain"

	-- Startup
	defaultPriority = "high"

	-- Shutdown
	freeMemoryAtShutdown = "yes"

	-- Status
	ownerName = "Lokeras"
	ownerEmail = "[email protected]"
	url = "otzera"
	location = "Brazil"

This is my config.lua, I couldn't find aything that could lead into my problem.
 
Delete the line from creaturescripts.xml


Also, IIRC 0.2.11pl2 has it enabled by default, go to config.lua and disable it.

Causing spam in console? No thanks, then the guy would say "oh hey, now I have another error".
 
Back
Top