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

Lose all lvls at death

Himii

Premium User
Premium User
Joined
Jan 19, 2011
Messages
1,267
Solutions
5
Reaction score
183
Location
Sweden
Hello, i have got trouble with my ot becouse when i die i lose all of my lvls
Here is mine:

CONFIG
Code:
-- The Forgotten Server

	-- Account manager
	accountManager = true
	namelockManager = true
	newPlayerChooseVoc = true
	newPlayerSpawnPosX = 1106
	newPlayerSpawnPosY = 1095
	newPlayerSpawnPosZ = 7
	newPlayerTownId = 1
	newPlayerLevel = 8
	newPlayerMagicLevel = 5
	generateAccountNumber = false

	-- Auto Combo Dedecter
 	comboTime = 100
   	comboMembers = 20
    comboFriends = 30
    comboFriendsClearTime = 5 * 60 * 1000
    comboFriendsClearInterval = 1 * 60 * 1000
    comboShowAnimation = 1  

	-- Damage Guild/Party --
	noDamageToGuildMates = false -- if true then no damage, if false then damage
	noDamageToPartyMembers = false -- if true then no damage, if false then damage

	-- Anti-Push Prevention System by Xampy
	useAntiPush = false --// enabled = true or disabled = false
	antiPushDelay = 3000 --// default is 3000 (3 seconds)
	antiPushItems = "2148,2152,2160,3976" --// add as much items as you want separated by comma
	capacityOverload = 0.75


	-- Unjustified kills
	redSkullLength = 30 * 24 * 60 * 60
	blackSkullLength = 45 * 24 * 60 * 60
	dailyFragsToRedSkull = 11000
	weeklyFragsToRedSkull = 15000
	monthlyFragsToRedSkull = 111110
	dailyFragsToBlackSkull = dailyFragsToRedSkull
	weeklyFragsToBlackSkull = weeklyFragsToRedSkull
	monthlyFragsToBlackSkull = monthlyFragsToRedSkull
	dailyFragsToBanishment = dailyFragsToRedSkull
	weeklyFragsToBanishment = weeklyFragsToRedSkull
	monthlyFragsToBanishment = monthlyFragsToRedSkull
	blackSkulledDeathHealth = 40
	blackSkulledDeathMana = 0
	useBlackSkull = false
	useFragHandler = true
	advancedFragList = false

	-- Banishments
	notationsToBan = 3
	warningsToFinalBan = 4
	warningsToDeletion = 5
	banLength = 7 * 24 * 60 * 60
	killsBanLength = 7 * 24 * 60 * 60
	finalBanLength = 30 * 24 * 60 * 60
	ipBanishmentLength = 1 * 24 * 60 * 60
	broadcastBanishments = true
	maxViolationCommentSize = 200
	violationNameReportActionType = 2
	autoBanishUnknownBytes = false

	-- Battle
	worldType = "pvp-enforced"
	protectionLevel = 1
	pvpTileIgnoreLevelAndVocationProtection = true
	pzLocked = 20 * 100
	huntingDuration = 60 * 1000
	criticalHitChance = 7
	criticalHitMultiplier = 1
	displayCriticalHitNotify = true
	removeWeaponAmmunition = false
	removeWeaponCharges = false
	removeRuneCharges = false
	whiteSkullTime = 1 * 60 * 1000
	noDamageToSameLookfeet = false
	showHealingDamage = true
	showHealingDamageForMonsters = false
	fieldOwnershipDuration = 5 * 1000
	stopAttackingAtExit = false
	oldConditionAccuracy = false
	loginProtectionPeriod = 10 * 1000
	deathLostPercent = 0
	stairhopDelay = 2 * 1000
	pushCreatureDelay = 2 * 1000
	deathContainerId = 1987
	gainExperienceColor = 215
	addManaSpentInPvPZone = true
	squareColor = 0
	allowFightback = true

	-- Connection config
	worldId = 0
	ip = "MY IP"
	bindOnlyConfiguredIpAddress = false
	loginPort = 7171
	gamePort = 7172
	adminPort = 7171
	statusPort = 7171
	loginTries = 10
	retryTimeout = 5 * 1000
	loginTimeout = 60 * 1000
	maxPlayers = 1000
	motd = "Welcome to Thais War 8.6!"
	displayOnOrOffAtCharlist = true
	onePlayerOnlinePerAccount = false
	allowClones = false
	serverName = "Thais War 8.60"
	loginMessage = "Welcome to Thais War 8.6!"
	statusTimeout = 5 * 60 * 1000
	replaceKickOnLogin = true
	forceSlowConnectionsToDisconnect = false
	loginOnlyWithLoginServer = false
	premiumPlayerSkipWaitList = false

	-- Database
	sqlType = "sqlite"
	sqlHost = "localhost"
	sqlPort = 3306
	sqlUser = "root"
	sqlPass = ""
	sqlDatabase = "theforgottenserver"
	sqlFile = "forgottenserver.s3db"
	sqlKeepAlive = 0
	mysqlReadTimeout = 10
	mysqlWriteTimeout = 10
	encryptionType = "plain"

	-- Deathlist
	deathListEnabled = true
	deathListRequiredTime = 1 * 60 * 1000
	deathAssistCount = 19
	maxDeathRecords = 5

	-- Guilds
	ingameGuildManagement = true
	levelToFormGuild = 8
	premiumDaysToFormGuild = 0
	guildNameMinLength = 4
	guildNameMaxLength = 20

	-- Highscores
	highscoreDisplayPlayers = 15
	updateHighscoresAfterMinutes = 60

	-- Houses
	buyableAndSellableHouses = true
	houseNeedPremium = true
	bedsRequirePremium = true
	levelToBuyHouse = 1
	housesPerAccount = 0
	houseRentAsPrice = false
	housePriceAsRent = false
	housePriceEachSquare = 1000
	houseRentPeriod = "never"
	houseCleanOld = 0
	guildHalls = false

	-- Item usage
	timeBetweenActions = 200
	timeBetweenExActions = 1000
	hotkeyAimbotEnabled = true

	-- Map
	mapName = "War"
	mapAuthor = ""
	randomizeTiles = true
	storeTrash = true
	cleanProtectedZones = true
	mailboxDisabledTowns = "-1"

	-- Process
	defaultPriority = "high"
	niceLevel = 5
	coresUsed = "-1"

	-- Startup
	optimizeDatabaseAtStartup = true
	removePremiumOnInit = true
	confirmOutdatedVersion = false

	-- Spells
	formulaLevel = 70.0
	formulaMagic = 40.0
	bufferMutedOnSpellFailure = false
	spellNameInsteadOfWords = false
	emoteSpells = true

	-- Outfits
	allowChangeOutfit = true
	allowChangeColors = true
	allowChangeAddons = true
	disableOutfitsForPrivilegedPlayers = false
	addonsOnlyPremium = true

	-- Miscellaneous
	dataDirectory = "data/"
	bankSystem = true
	displaySkillLevelOnAdvance = false
	promptExceptionTracerErrorBox = true
	separateViplistPerCharacter = false
	maximumDoorLevel = 500
	maxMessageBuffer = 4

	-- Saving-related
	saveGlobalStorage = true
	useHouseDataStorage = false
	storePlayerDirection = false

	-- Loot
	checkCorpseOwner = true
	monsterLootMessage = 3
	monsterLootMessageType = 25

	-- Ghost mode
	ghostModeInvisibleEffect = false
	ghostModeSpellEffects = true

	-- Limits
	idleWarningTime = 14 * 60 * 1000
	idleKickTime = 15 * 60 * 1000
	expireReportsAfterReads = 1
	playerQueryDeepness = 2
	maxItemsPerPZTile = 0
	maxItemsPerHouseTile = 0

	-- Premium-related
	freePremium = true
	premiumForPromotion = true

	-- Blessings
	blessings = true
	blessingOnlyPremium = false
	blessingReductionBase = 30
	blessingReductionDecrement = 5
	eachBlessReduction = 10

	-- Rates
	experienceStages = false
	rateExperience = 5.0
	rateExperienceFromPlayers = 2
	rateSkill = 30.0
	rateMagic = 50.0
	rateLoot = 2.0
	rateSpawn = 1

	-- Monster rates
	rateMonsterHealth = 1.0
	rateMonsterMana = 1.0
	rateMonsterAttack = 1.0
	rateMonsterDefense = 1.0

	-- Experience from players
	minLevelThresholdForKilledPlayer = 1.9
	maxLevelThresholdForKilledPlayer = 2.1

	-- Stamina
	rateStaminaLoss = 1
	rateStaminaGain = 3
	rateStaminaThresholdGain = 12
	staminaRatingLimitTop = 41 * 60
	staminaRatingLimitBottom = 14 * 60
	rateStaminaAboveNormal = 1.5
	rateStaminaUnderNormal = 0.5
	staminaThresholdOnlyPremium = true

	-- Party
	experienceShareRadiusX = 30
	experienceShareRadiusY = 30
	experienceShareRadiusZ = 1
	experienceShareLevelDifference = 2 / 3
	extraPartyExperienceLimit = 20
	extraPartyExperiencePercent = 5
	experienceShareActivity = 2 * 60 * 1000

	-- Global save
	globalSaveEnabled = false
	globalSaveHour = 8
	shutdownAtGlobalSave = true
	cleanMapAtGlobalSave = false

	-- Spawns
	deSpawnRange = 2
	deSpawnRadius = 50

	-- Summons
	maxPlayerSummons = 2
	teleportAllSummons = false
	teleportPlayerSummons = true

	-- Status
	ownerName = "Himii"
	ownerEmail = ""
	url = ""
	location = "Sweden"
	displayGamemastersWithOnlineCommand = false

	-- Logs
	adminLogsEnabled = false
	displayPlayersLogging = true
	prefixChannelLogs = ""
	runFile = ""
	outLogName = ""
	errorLogName = ""
	truncateLogsOnStartup = false


LOGIN
Code:
local config = {
	loginMessage = getConfigValue('loginMessage'),
	useFragHandler = getBooleanFromString(getConfigValue('useFragHandle r')),
	level = 500, 
	bless = {1, 2, 3, 4, 5}
}
 
function onLogin(cid)
	local frags = math.max(0, getPlayerStorageValue(cid, 20233))
	if(frags >= 5000) then
		doCreatureSetGuildEmblem(cid, EMBLEM_RED)
	elseif(frags >= 1500) then
		doCreatureSetGuildEmblem(cid, EMBLEM_BLUE)
	elseif(frags >= 250) then
		doCreatureSetGuildEmblem(cid, EMBLEM_GREEN)
	end
	if getPlayerStorageValue(cid, 20233) == -1 then
		doCreatureSetStorage(cid, 20233, 0)
	end
	registerCreatureEvent(cid, "FragsL")
	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
		doPlayerSetPromotionLevel(cid, 1)
	end
 
	local accountManager = getPlayerAccountManager(cid)
	if(accountManager == MANAGER_NONE) then
	local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
		if(lastLogin > 0) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
			str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
		else
			str = str .. " Please choose your outfit."
			doPlayerSendOutfitWindow(cid)
		end
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
	elseif(accountManager == MANAGER_NAMELOCK) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
	elseif(accountManager == MANAGER_ACCOUNT) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
	end
 
	if(not isPlayerGhost(cid)) then
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
	end
	registerCreatureEvent(cid, "Mail")
	registerCreatureEvent(cid, "GuildMotd")
	registerCreatureEvent(cid, "Idle")
	if(config.useFragHandler) then
		registerCreatureEvent(cid, "SkullCheck")
	end
	registerCreatureEvent(cid, "ReportBug")
	registerCreatureEvent(cid, "AdvanceSave")
	return true
end


Can anyone see any problems in those? (All loss things are on 0 in the database and i dont know why i only want no item loss)
 
Code:
-- Experience from players
	minLevelThresholdForKilledPlayer = 1.9
	maxLevelThresholdForKilledPlayer = 2.1

change both of those to
Lua:
-- Experience from players
	minLevelThresholdForKilledPlayer = 0
	maxLevelThresholdForKilledPlayer = 0

Look for this in your config.lua

Code:
rateExperienceFromPlayers = 2

change it to "1" then change your pvp-enforced to - pvp restart ot and job done you now have skulls and pve...
 
Last edited:
I still get lvl 1 when i die :(
Can this script do anything with this??
Code:
function onLogin(cid)

	if getPlayerLevel(cid) < 350 then
	doPlayerAddExperience(cid, (getExperienceForLevel(350) - getPlayerExperience(cid)))
end
return TRUE
end
 
Back
Top