EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::General Support (https://www.eqemulator.org/forums/forumdisplay.php?f=598)
-   -   Anyway to set a player level 1 after death? (https://www.eqemulator.org/forums/showthread.php?t=39832)

Silentrath 07-06-2015 11:30 PM

Anyway to set a player level 1 after death?
 
I am looking in the db, to see if there's a way to revert a player to level 1 after they die. I think I might just need to edit the code to where the xp lost upon death is calculated, unless someone knows of an easier way? Also while I'm there, I want it so when a player dies they get spawned with their starter gear.

Thanks in advance!

Silentrath

provocating 07-07-2015 10:13 AM

I would think you would do this in attack.cpp

Keep in mind my source is custom and older. The routine you would want is Client::Death

On mine there is a line

Code:

mylevel = mylevel ? mylevel : 1;
You could try just changing that to a flat out....

Code:

mylevel = 1;

Silentrath 07-07-2015 02:30 PM

Got level 1 working by, modifying where it calculates how much xp is lost, just commented out that code and put

Code:

SetLevel(1);

kardath2 07-07-2015 03:03 PM

Where's the delete button? I'm too slow.

kimura 07-07-2015 03:32 PM

You should be able to just add an event death to the global player.pl for that

Leetsauce 07-07-2015 06:31 PM

Quote:

Originally Posted by kimura (Post 241540)
You should be able to just add an event death to the global player.pl for that

This. So much easier than a code change. If you need a sample let us know.

chasem 08-15-2015 09:46 AM

I've been looking into this in a way - Leet or someone, would you mind showing a sample of how to edit it in player.pl?

kimura 08-15-2015 11:05 AM

should be as simple as putting this in your global_player.pl file...(not tested though)

Code:

sub EVENT_DEATH {
        quest::level(1);
}



All times are GMT -4. The time now is 08:40 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.