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

Lua TFS dead %

Nicek

oldschool
Joined
Aug 8, 2007
Messages
158
Reaction score
7
Hello.

Where Can I edit died percent in TFS because I dont see it in config.lua

please help, thx.
 
I dont have it.

Look its my full config.

-- The Forgotten Server Config

-- Account manager
accountManager = "yes"
namelockManager = "yes"
newPlayerChooseVoc = "yes"
newPlayerSpawnPosX = 50
newPlayerSpawnPosY = 50
newPlayerSpawnPosZ = 7
newPlayerTownId = 1
newPlayerLevel = 100
newPlayerMagicLevel = 0
generateAccountNumber = "no"

-- Banishments
notationsToBan = 3
warningsToFinalBan = 4
warningsToDeletion = 5
banLength = 0 * 24 * 60 * 60
finalBanLength = 0 * 24 * 60 * 60
ipBanishmentLength = 3 * 24 * 60 * 60
broadcastBanishments = "yes"
killsToBan = 25
maxViolationCommentSize = 200

-- Battle
worldType = "pvp"
hotkeyAimbotEnabled = "yes"
protectionLevel = 200
pvpTileIgnoreLevelAndVocationProtection = "yes"
killsToRedSkull = 20
pzLocked = 5 * 1000
criticalHitChance = 7
displayCriticalHitNotify = "no"
removeAmmoWhenUsingDistanceWeapon = "no"
removeChargesFromRunes = "no"
timeToDecreaseFrags = 60 * 60 * 1000
whiteSkullTime = 1 * 60 * 1000
noDamageToSameLookfeet = "no"
experienceByKillingPlayers = "no"
showHealingDamage = "no"
fieldOwnershipDuration = 5 * 1000
stopAttackingAtExit = "no"
oldConditionAccuracy = "no"

-- Connection config
worldId = 0
ip = "209.97.223.134"
port = 7171
loginTries = 10
retryTimeout = 5 * 1000
loginTimeout = 60 * 1000
maxPlayers = "1000"
motd = "PureWar. Online Everything fixed! NO more acc reset!"
displayOnOrOffAtCharlist = "no"
onePlayerOnlinePerAccount = "yes"
allowClones = 0
serverName = "PureWar"
loginMessage = "PureWar.Omgforum.net --Forums!"
adminLogsEnabled = "no"
statusTimeout = 5 * 60 * 1000
replaceKickOnLogin = "yes"
forceSlowConnectionsToDisconnect = "no"
loginOnlyWithLoginServer = "no"

-- Database
-- NOTE: sqlFile is used only by sqlite database, and sqlKeepAlive by mysql database.
-- To disable sqlKeepAlive use 0 value.
sqlType = "sqlite"
sqlHost = "localhost"
sqlPort = 3306
sqlUser = "root"
sqlPass = ""
sqlDatabase = "theforgottenserver"
sqlFile = "forgottenserver.s3db"
sqlKeepAlive = 60
optimizeDatabaseAtStartup = "yes"
passwordType = "plain"

-- Deathlist
deathListEnabled = "yes"
maxDeathRecords = 5

-- Guilds
ingameGuildManagement = "yes"
levelToFormGuild = 8
guildNameMinLength = 4
guildNameMaxLength = 20

-- Highscores
highscoreDisplayPlayers = 15
updateHighscoresAfterMinutes = 60

-- Houses
buyableAndSellableHouses = "yes"
housesPerAccount = 1
levelToBuyHouse = 1
houseRentAsPrice = "no"
housePriceAsRent = "no"
housePriceEachSQM = 1000
houseRentPeriod = "never"

-- Item usage
timeBetweenActions = 200
timeBetweenExActions = 1000

-- Map
mapName = "PureWar"
mapAuthor = "Komic"
randomizeTiles = "yes"
cleanProtectedZones = "yes"

-- Miscellaneous
-- NOTE: defaultPriority works only on Windows
defaultPriority = "high"
maxMessageBuffer = 9
kickIdlePlayerAfterMinutes = 60
allowChangeOutfit = "yes"
allowChangeColors = "yes"
disableOutfitsForPrivilegedPlayers = "no"
displayGamemastersWithOnlineCommand = "yes"
bankSystem = "yes"
saveGlobalStorage = "yes"
displaySkillLevelOnAdvance = "yes"
spellNameInsteadOfWords = "yes"
emoteSpells = "yes"
expireReportsAfterReads = 1

-- Premium account
freePremium = "yes"
removePremiumOnInit = "yes"
premiumForPromotion = "yes"
blessingsOnlyPremium = "yes"
houseNeedPremium = "yes"
bedsRequirePremium = "yes"

-- Rates
-- NOTE: experienceStages configuration is located in data/XML/stages.xml.
rateExp = 1000
rateSkill = 5000
rateLoot = 7
rateMagic = 1000
rateSpawn = 20
extraPartyExpLimit = 20
extraPartyExpPercent = 5
experienceStages = "no"

-- Global save
-- NOTE: globalSaveHour means like 03:00, not that it will save every 3 hours,
-- if you want such a system please check out data/globalevents/globalevents.xml.
globalSaveEnabled = "no"
globalSaveHour = 8
shutdownAtGlobalSave = "yes"
cleanMapAtGlobalSave = "no"

-- Spawns
deSpawnRange = 2
deSpawnRadius = 50

-- Summons
maxPlayerSummons = 2
teleportAllSummons = "no" --FIXME: Doesn't work
teleportPlayerSummons = "no" --FIXME: Doesn't work

-- Status
ownerName = "PureWar OT"
ownerEmail = "@otland.net"
url = "http://otland.net/"
location = "Europe"
 
Older / modified versions of TFS have deathloss in vocations.xml I believe.
It should be able to be modified per vocation in there, if I remember correctly.

Failing this, it could be that you are missing a line in your creaturescripts/scripts/login.lua

backup any files before trying this.

data/creaturescripts/creaturescripts.xml
Code:
<event type="login" name="PlayerLogin" script="login.lua"/>
data/creaturescripts/scripts/login.lua
Code:
function onLogin(cid)
	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		for i = PLAYERLOSS_EXPERIENCE, PLAYERLOSS_ITEMS do
			doPlayerSetLossPercent(cid, i, getConfigValue('deathLostPercent'))
		end
	end

	registerCreatureEvent(cid, "PlayerDeath")
	return TRUE
end

Once you have that in, you can then use deathLostPercent = 10 in your config.lua
 
Tell us what version of TFS you are using.

You also can set the death loss in the database. Just set the account manager/samples loss_experience

To set all the death loss of all creatures to 10% (normal)
just run this sql query in your database:
Code:
UPDATE players SET loss_experience = 10;
UPDATE players SET loss_skills = 10;
UPDATE players SET loss_items = 10;
UPDATE players SET loss_mana = 10;
 
Back
Top