Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ MPadvance BUG (again) ?
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Gatewaysysop2
USA (146 posts) Bio
|
Date
| Sat 17 May 2003 08:22 PM (UTC) |
Message
| Hello again,
Been a while since I posted here, but I guess life's been a bit too hectic for mud design lately ;(
Anywho, I ran into a strange bug while trying to put together some mob progs and have them use the mpadvance command on players. I searched the SML archives and found that while someone had asked about this very bug, they were never given a response and no fix was posted. Maybe I just missed it, but it seems to be present in even Samson's FUSS distribution with the oodles of bugfixes, so I assume it's probably in the distribution on this site as well.
Here's the deal:
Pick a mob, any mob, made sure it wasn't flagged as proto (It says proto mobs can't use the command in the help file) and then I trans'ed in a non-imm player and did:
force <mob> mpadvance <player> <some number>
I tried this with low and high level values, I tried going backwards and forwards in level, and I tried upping the levle of the advancing mob to 55 (hard coded limit on mobs when using mset, apparently).
With the mob at level 55 the advancing seemed to work, but it would only advance the player UP one level at a time, regardless of the level or direction I had specified. Clearly this isn't the design of the mpadvance command, or at least I hope not.
Does anyone have any idea as to whether or not this is something I'm doing wrong, or if this is really a bug that has been overlooked? Also does anyone know the fix if the latter is the case? I'd appreciate it.
Thanks!
|
"The world of men is dreaming, it has gone mad in its sleep, and a snake is strangling it, but it can't wake up." -D.H. Lawrence | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sun 18 May 2003 02:42 AM (UTC) |
Message
| This sounds like a bug that has been around for a while. I heard about it a few years ago, so it is not surprising it still might be in the stock code.
I think most places do not describe it exactly because it might give players ideas. :) |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Meerclar
USA (733 posts) Bio
|
Date
| Reply #2 on Sun 18 May 2003 04:49 AM (UTC) |
Message
| Actually, due to the persistent abuse of the mpadvance feature, most imps actually disable this completely. As I recall, the original intent of this was to advance a new character beyond 1st level when they felt they were ready to travel beyond the safety of mudschool so more than the ability to bump char level up by 1 was unnecessary. I also seem to remember there being a coded check for a level requirement with mpadvance before it will function. What I don't ever remember finding was any failsafe code to keep this from being an absolute nightmare for security or tyo prevent abuse by imms and their mortal alts or as "favors" to their friends. As for a potential fix, it's probably reasonably easy to add the necessary security features to the code behind mpadvance but my personal recommendation is to disable it completely before it bites you in the arse. |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org | Top |
|
Posted by
| Boborak
USA (228 posts) Bio
|
Date
| Reply #3 on Mon 19 May 2003 06:19 AM (UTC) |
Message
| I couldn't agree more with Meerclar. It came very close to biting me in the rear when I first started playing with SMAUG and I only caught the person by chance. After I realized it wasn't being used anywhere that couldn't do without it, I cut the code completely out. | Top |
|
Posted by
| Gatewaysysop2
USA (146 posts) Bio
|
Date
| Reply #4 on Tue 03 Jun 2003 06:29 AM (UTC) |
Message
| Just as an afterthought here, I wanted to add my own resolution to the problem. I did do as was recommended and 'gutted' the code, removing the command and every instance of it in the source. This seemed great at first, but I realized something that perhaps I was not the only one to overlook:
In newacad.are (or whatever) there is a mob, Mistress something-or-other, who advances you from level 1 to level 2 when you get through newbie area. If you don't have an mpadvance command, then when she forces the hvak mob to advance you, things get ugly. You end up with, or at least I did, endless spamming of that message about "Who walks through these gates? A so and so of such and such class..." Needless to say the person doesn't make it to level 2 as they are supposed to.
I ended up putting all the MPadvance code back in as it used to be, but once I had made sure it was working again I decided upon one tiny change.
In mud_comm.c, where it reads in do_mpadvance as;
if ( victim->level > ch->level )
{
act( AT_TELL, "$n tells you, 'Sorry... you must seek someone more powerful than I.'",
ch, NULL, victim, TO_VICT );
return;
}
I changed this to:
if ( victim->level > 1 )
{
act( AT_TELL, "$n tells you, 'Sorry... you must seek someone more powerful than I.'",
ch, NULL, victim, TO_VICT );
return;
}
This appears to work as I had hoped, rigging it such that the command is worthless when used on players who's level is already 2 or higher. Since I don't want the MPadvance command used for any other reason than to advance new players from level 1 to level 2, this seemed like an exceptionally easy way to ensure the command was never abused.
Bear in mind that this fix is only sufficient because of the ORIGINAL bug that is still in the code, the one where it only advances you one level at a time no matter what you put in. So even if you had a level 1 player and did
"force <mob> mpadvance <player> 55"
It would only advance them from level 1 to level 2. You have to love the irony of using the original bug to make this quick fix work. ;-) |
"The world of men is dreaming, it has gone mad in its sleep, and a snake is strangling it, but it can't wake up." -D.H. Lawrence | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
17,901 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top