Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-06-2015, 11:30 PM
Silentrath
Fire Beetle
 
Join Date: Nov 2004
Posts: 29
Default 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
Reply With Quote
  #2  
Old 07-07-2015, 10:13 AM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

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;
Reply With Quote
  #3  
Old 07-07-2015, 02:30 PM
Silentrath
Fire Beetle
 
Join Date: Nov 2004
Posts: 29
Default

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

Code:
SetLevel(1);
Reply With Quote
  #4  
Old 07-07-2015, 03:03 PM
kardath2
Fire Beetle
 
Join Date: Aug 2007
Posts: 5
Default

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

Last edited by kardath2; 07-07-2015 at 03:05 PM.. Reason: too slow
Reply With Quote
  #5  
Old 07-07-2015, 03:32 PM
kimura
Hill Giant
 
Join Date: Oct 2011
Posts: 132
Default

You should be able to just add an event death to the global player.pl for that
Reply With Quote
  #6  
Old 07-07-2015, 06:31 PM
Leetsauce
Hill Giant
 
Join Date: Apr 2010
Posts: 169
Default

Quote:
Originally Posted by kimura View Post
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.
Reply With Quote
  #7  
Old 08-15-2015, 09:46 AM
chasem
Fire Beetle
 
Join Date: Apr 2014
Posts: 23
Default

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?
Reply With Quote
  #8  
Old 08-15-2015, 11:05 AM
kimura
Hill Giant
 
Join Date: Oct 2011
Posts: 132
Default

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

Code:
sub EVENT_DEATH {
	quest::level(1);
}
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 06:10 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3