Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, Google, Yandex

Members: 0
Guests: 6
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » levelup bug
Forum Rules | Mark all | Recent Posts

levelup bug
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Nov 24, 2006, 2:16 pm
Go to the top of the page
Go to the bottom of the page

KazRo

GroupMembers
Posts41
JoinedSep 29, 2005

I'm not 100% sure this is a bug, but with the levelup command a immortal can continue to levelup past his "immortalized" level, and even surpass max_level.
       
Post is unread #2 Nov 24, 2006, 2:26 pm   Last edited Nov 25, 2006, 2:07 am by KazRo
Go to the top of the page
Go to the bottom of the page

KazRo

GroupMembers
Posts41
JoinedSep 29, 2005

If this is a bug, I added...

In update.c, under CMDF do_levelup;

above
   ch->level++;

add
   if( ch->level == IS_IMMORTAL( ch ) )
   {
      send_to_char( "&RYou cant &WLEVEL UP&R anymore\n\r", ch );
      return;
   }

       
Post is unread #3 Nov 24, 2006, 4:46 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Are you sure? Just booted 1.77 up and tried it on the admin player. Notice the exp data.

[448hp 788m 780mv] [1exp] level

Experience required, levels 110 to 115:
______________________________________________

(110) 273521875 exp
(111) 281084375 exp
(112) 288785000 exp
(113) 296625000 exp
(114) 304605625 exp
(115) 312728125 exp (You have: 320993749)
______________________________________________

[448hp 788m 780mv] [1exp] levelup
You don't have enough experience to level yet, go forth and adventure!
       
Post is unread #4 Nov 24, 2006, 5:50 pm
Go to the top of the page
Go to the bottom of the page

KazRo

GroupMembers
Posts41
JoinedSep 29, 2005

Its might not be a stock bug then, I just learned about it right before I posted that, I assume its caused by changing your max_level, as mine is 1015. My mistake.
       
Post is unread #5 Nov 24, 2006, 5:55 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Oh, yeah. That could probably have a huge affect on things. It would depend greatly on how you altered the exp_level() function.

BTW, it's sufficient to check for IS_IMMORTAL in your fix. Someone can't be MAX_LEVEL without also being immortal can they? :P
       
Post is unread #6 Nov 24, 2006, 6:07 pm
Go to the top of the page
Go to the bottom of the page

KazRo

GroupMembers
Posts41
JoinedSep 29, 2005

:tongue:didn't think of that :-p I just wanted to make sure I covered all the bases:tongue:
       
Post is unread #7 Nov 26, 2006, 7:47 pm
Go to the top of the page
Go to the bottom of the page

kiasyn
Magician
GroupMembers
Posts121
JoinedJun 30, 2006

KazRo said:

If this is a bug, I added...

In update.c, under CMDF do_levelup;

above
   ch->level++;

add
   if( ch->level == IS_IMMORTAL( ch ) )
   {
      send_to_char( "&RYou cant &WLEVEL UP&R anymore\n\r", ch );
      return;
   }



   if( ch->level == IS_IMMORTAL( ch ) )


this would fire only when ch->level was equal to 0 or 1.
       
Post is unread #8 Nov 26, 2006, 9:02 pm
Go to the top of the page
Go to the bottom of the page

KazRo

GroupMembers
Posts41
JoinedSep 29, 2005

Its not a bug until you change the exp, but I figure it wouldn't be a bad idea to add it anyway just to be on the safe side :P
       
Post is unread #9 Nov 27, 2006, 7:03 am   Last edited Nov 27, 2006, 7:12 am by ToadVile
Go to the top of the page
Go to the bottom of the page

ToadVile

GroupMembers
Posts47
JoinedApr 1, 2006

Yeah, thats true. But, Kiasyn's Fix was close. But, kinda didn't really work out well :P

and here is another thing. If someone who is a avatar, has their exp set by a immortal, they can reach level 101 with that. so with this code below, you have the protection against that.. Just incase you have some imm who does stuff like this. Although, if you do they should be fired :P

   if( IS_IMMORTAL( ch ) || IS_HERO( ch ) )
   {
      send_to_char( "&RYou cant &WLEVEL UP&R anymore\n\r", ch );
      return;
   }


That should fix the problems that levelup have caused where you can exceed over the level your at... heh, i don't think avatars should be able to hit 101 without being advanced so yeah :)

Peace out.
       
Post is unread #10 Nov 27, 2006, 7:36 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Simplified even more:
   if( ch->level >= LEVEL_AVATAR )
   {
      send_to_char( "&RYou cant &WLEVEL UP&R anymore\n\r", ch );
      return;
   }


Just block anyone at Avatar or higher from using the command at all.
       
Post is unread #11 Nov 27, 2006, 7:56 am
Go to the top of the page
Go to the bottom of the page

ToadVile

GroupMembers
Posts47
JoinedApr 1, 2006

Good Point :D
       
Post is unread #12 Nov 27, 2006, 8:01 am
Go to the top of the page
Go to the bottom of the page

kiasyn
Magician
GroupMembers
Posts121
JoinedJun 30, 2006

ToadVile said:

Yeah, thats true. But, Kiasyn's Fix was close. But, kinda didn't really work out well :P


I never made a fix.
       
Post is unread #13 Nov 27, 2006, 8:04 am
Go to the top of the page
Go to the bottom of the page

ToadVile

GroupMembers
Posts47
JoinedApr 1, 2006

Yeah, Sorry. It was KazRo.. But anyway. Samsons way is better then both :P

       
Pages:<< prev 1 next >>