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

Dieng and getting level 1

Amiroslo

Excellent OT User
Joined
Jul 28, 2009
Messages
6,812
Solutions
6
Reaction score
822
I got a problem, when someone dies he get lvl 1 again :S
why? im using tfs 0.3.6pl1

even if u r 35, he gets 1 again

i want so u cant go under level 35 and if u die u lose 1 level
my login.lua
Code:
local config = {
	loginMessage = getConfigValue('loginMessage'),
	useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
	end

	local accountManager = getPlayerAccountManager(cid)
	if(accountManager == MANAGER_NONE) then
		local mapMark = {x=1010, y=1015, z=6}
		local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
		if(lastLogin > 0) then
			setPlayerStorageValue(cid,10010,0)
			doPlayerSendCancel(cid,"Your Killstreaks Have Been Reset")
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
			str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
			end
		else
			doPlayerPopupFYI(cid,"Welcome VENORE WAR")
			doPlayerPopupFYI(cid,"After you choose your outfit and set your hotkeys..")
			doPlayerPopupFYI(cid,"Create Your Guild, Get Rady, Go For The Strike!")
			doPlayerAddMapMark(cid,mapMark,2,"TELEPORTER")
			str = str .. " Please choose your outfit."
			doPlayerSendOutfitWindow(cid)
			end
		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, "Advance")
	registerCreatureEvent(cid, "ReportBug")
	registerCreatureEvent(cid, "AdvanceSave")
	registerCreatureEvent(cid, "ReportBug")
	registerCreatureEvent(cid, "AdvanceSave")
	registerCreatureEvent(cid, "VipCheck")
	registerCreatureEvent(cid, "TempleTeleporter")
	registerCreatureEvent(cid, "forever amulet")
	registerCreatureEvent(cid, "skull amulet")
	registerCreatureEvent(cid, "charge amulet")
       registerCreatureEvent(cid,'SpellUp')
	registerCreatureEvent(cid, "ondeath")
	registerCreatureEvent(cid, "onPrepareDeath")
       registerCreatureEvent(cid, "firstItems")
	   	registerCreatureEvent(cid, "FragReward")
    registerCreatureEvent(cid, "MageBomb")	
registerCreatureEvent(cid, "Frag Reward")

	registerCreatureEvent(cid, "Idle")
	if(config.useFragHandler) then
		registerCreatureEvent(cid, "SkullCheck")
	end
	return true
end
 
Last edited:
Was he level 2 to begin with?
trollface.jpg
 
no, 10 :P
even if u r 35, he gets 1 again

i want so u cant go under level 35 and if u die u lose 1 level
 
Last edited:
XML:
<?xml version="1.0" encoding="UTF-8"?>
<vocations>
	<vocation id="0" name="Begynner" description="a begynner" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="1" name="Wizard" description="a wizard" needpremium="0" gaincap="10" gainhp="5" gainmana="15" gainhpticks="2" gainhpamount="10" gainmanaticks="2" gainmanaamount="35" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="40">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="2" name="Magician" description="a magician" needpremium="0" gaincap="10" gainhp="5" gainmana="15" gainhpticks="2" gainhpamount="10" gainmanaticks="2" gainmanaamount="35" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="40">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="3" name="Ranger" description="a ranger" needpremium="0" gaincap="20" gainhp="10" gainmana="13" gainhpticks="2" gainhpamount="15" gainmanaticks="2" gainmanaamount="25" manamultiplier="1.4" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="40">
		<formula meleeDamage="1.0" distDamage="1.1" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="4" name="Fighter" description="a fighter" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="1" gainhpamount="15" gainmanaticks="2" gainmanaamount="20" manamultiplier="3.0" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="40">
		<formula meleeDamage="1.1" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>

	<vocation id="5" name="Master Wizard" description="a master wizard" needpremium="0" gaincap="10" gainhp="5" gainmana="15" gainhpticks="2" gainhpamount="10" gainmanaticks="2" gainmanaamount="35" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="40">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.35"/>
	</vocation>
	<vocation id="6" name="Great Magician" description="a great magician" needpremium="0" gaincap="10" gainhp="5" gainmana="15" gainhpticks="2" gainhpamount="10" gainmanaticks="2" gainmanaamount="35" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="40">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.35"/>
	</vocation>
	<vocation id="7" name="Super Ranger" description="a super ranger" needpremium="0" gaincap="20" gainhp="10" gainmana="13" gainhpticks="2" gainhpamount="15" gainmanaticks="2" gainmanaamount="25" manamultiplier="1.4" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="40">
		<formula meleeDamage="1.0" distDamage="1.1" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.35"/>
	</vocation>
	<vocation id="8" name="Real Fighter" description="a real fighter" needpremium="0" gaincap="25" gainhp="5" gainmana="5" gainhpticks="1" gainhpamount="15" gainmanaticks="2" gainmanaamount="20" manamultiplier="3.0" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="40">
		<formula meleeDamage="1.1" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.35"/>
	</vocation>

</vocations>
 
remove
lessloss="40"
from all lines

Edited

Code:
<?xml version="1.0" encoding="UTF-8"?>
<vocations>
	<vocation id="0" name="Begynner" description="a begynner" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="1" name="Wizard" description="a wizard" needpremium="0" gaincap="10" gainhp="5" gainmana="15" gainhpticks="2" gainhpamount="10" gainmanaticks="2" gainmanaamount="35" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="1">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="2" name="Magician" description="a magician" needpremium="0" gaincap="10" gainhp="5" gainmana="15" gainhpticks="2" gainhpamount="10" gainmanaticks="2" gainmanaamount="35" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="2">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="3" name="Ranger" description="a ranger" needpremium="0" gaincap="20" gainhp="10" gainmana="13" gainhpticks="2" gainhpamount="15" gainmanaticks="2" gainmanaamount="25" manamultiplier="1.4" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="3">
		<formula meleeDamage="1.0" distDamage="1.1" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
	<vocation id="4" name="Fighter" description="a fighter" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="1" gainhpamount="15" gainmanaticks="2" gainmanaamount="20" manamultiplier="3.0" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="4">
		<formula meleeDamage="1.1" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
	</vocation>
 
	<vocation id="5" name="Master Wizard" description="a master wizard" needpremium="0" gaincap="10" gainhp="5" gainmana="15" gainhpticks="2" gainhpamount="10" gainmanaticks="2" gainmanaamount="35" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="1">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.35"/>
	</vocation>
	<vocation id="6" name="Great Magician" description="a great magician" needpremium="0" gaincap="10" gainhp="5" gainmana="15" gainhpticks="2" gainhpamount="10" gainmanaticks="2" gainmanaamount="35" manamultiplier="1.1" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="2">
		<formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.35"/>
	</vocation>
	<vocation id="7" name="Super Ranger" description="a super ranger" needpremium="0" gaincap="20" gainhp="10" gainmana="13" gainhpticks="2" gainhpamount="15" gainmanaticks="2" gainmanaamount="25" manamultiplier="1.4" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="3">
		<formula meleeDamage="1.0" distDamage="1.1" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.35"/>
	</vocation>
	<vocation id="8" name="Real Fighter" description="a real fighter" needpremium="0" gaincap="25" gainhp="5" gainmana="5" gainhpticks="1" gainhpamount="15" gainmanaticks="2" gainmanaamount="20" manamultiplier="3.0" attackspeed="1000" soulmax="200" gainsoulticks="15" fromvoc="4">
		<formula meleeDamage="1.1" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
		<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.35"/>
	</vocation>
 
</vocations>

rep++ if helped
 
Check your config.lua
Search for: deathLostPercent
Set it to 10 and everything should work properly.
Rep if i helped you!
 
Back
Top