Go Back   EQEmulator Home > EQEmulator Forums > Development > Development: Custom Code

Development: Custom Code This is for code thatdoes not emulate live and wont be added to the official code.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-12-2008, 08:37 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

You can get the level cap:

make sure #include "../common/rulesys.h" is part of the file, very likely if it's exp code.

Then you can call: RuleI(Character, MaxLevel)
Reply With Quote
  #2  
Old 01-12-2008, 11:05 AM
zeiksz2
Fire Beetle
 
Join Date: Oct 2007
Posts: 20
Default

thank you for your help - worked very well
Reply With Quote
  #3  
Old 01-12-2008, 12:06 PM
zeiksz2
Fire Beetle
 
Join Date: Oct 2007
Posts: 20
Default

had no better idea for rounding up allways.. but this may work

Code:
						int ad=0; if (togo/(set_exp-m_pp.exp)!=(int)(togo/(set_exp-m_pp.exp))) ad=1;
						snprintf(ding,128,"to go: %i (%i from this)",togo,ad+(togo/(set_exp-m_pp.exp)));
and for aa exp

Code:
						int ad2=0; if (togo2/(set_aaxp-m_pp.expAA)!=(int)(togo2/(set_aaxp-m_pp.expAA))) ad2=1;
						snprintf(ding2,128,"to go: %i (%i from this)",togo2,ad2+togo2/(set_aaxp-m_pp.expAA));
Reply With Quote
  #4  
Old 01-13-2008, 05:15 AM
zeiksz2
Fire Beetle
 
Join Date: Oct 2007
Posts: 20
Default

previous code did not work and was not even a good shot.. here is a better one.. tested, working:

Code:
int ad=0; if (togo % (set_exp-m_pp.exp)!= 0) ad=1;
goes for both, so do same with ad2 too..
Reply With Quote
  #5  
Old 03-19-2008, 02:36 PM
Sabyre's Avatar
Sabyre
Sarnak
 
Join Date: Jun 2003
Location: Maine, USA
Posts: 88
Default

Hungry Dev Newb Question: Which file would this code be inserted?
__________________
.......
...
.
"We are the music makers and we are the dreamers of the dreams" - Willy Wonka
Reply With Quote
  #6  
Old 06-02-2008, 08:21 PM
zeiksz2
Fire Beetle
 
Join Date: Oct 2007
Posts: 20
Default

Quote:
Originally Posted by Sabyre View Post
Hungry Dev Newb Question: Which file would this code be inserted?
EQEmu-0.7.0-1070\SOURCE\zone\exp.cpp(134)
Reply With Quote
  #7  
Old 06-03-2008, 06:37 PM
BatCountry
Fire Beetle
 
Join Date: Mar 2006
Posts: 24
Default

Quote:
Originally Posted by zeiksz2 View Post
had no better idea for rounding up allways.. but this may work
The ceil() function will round up always. It's in math.h
Reply With Quote
  #8  
Old 06-05-2008, 04:34 PM
zeiksz2
Fire Beetle
 
Join Date: Oct 2007
Posts: 20
Default

Quote:
Originally Posted by BatCountry View Post
The ceil() function will round up always. It's in math.h
thank you very much
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 09:09 PM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3