Flagged zones

Posted by Malti on Tue 25 Apr 2006 04:39 AM — 7 posts, 28,932 views.

USA #0
I am curious how you add quest flagging for zones. For example, when you complete Quest A, you get flagged so you can enter Plane A. I am hoping there is a way to do this without changing much if any code.
USA #1
There's really no way to do this without adding code.

Look into the qbit/abit snippet, that may be what you'd need.
United Kingdom #2
I've been searching for this qbit/abit snippet and haven't had any luck. Does anyone know where i can get it from?

Thanks!
USA #3
http://www.mudbytes.net/index.php?a=files&s=viewfile&fid=962

I just added it there after realizing it didn't exist anywhere that I could find.
United Kingdom #4
Cheers Samson, i was lookin on AFKmud site as i thought i saw them there but didn't =( but thanks again!
USA #5
Oh, and Malti. You could do something, I suppose.

Example: Reward the player an item for completing Quest A. When you try to enter Plane A, have a prog that checks if the player has the item or not. Crude, yes. But it doesn't require any coding.
United Kingdom #6
Hmmm, with this snippet everything seems to work alright until you get to doing the ifcheck.

Log: [*****] BUG: hasabit: bad abit number, Room #1200.


>entry_prog 100
if hasabit($n) == 1
   mea $n Oh wow, this does work!
else
   mea $n seems you dont have the abit... let me set it for you.
   mpaset $n 1
endif


ABIT: 1
This is just me testing it out, was wondering it it can hold a string description =)

Any idea's why it could be causing that? Here is the code for "If hasabit".


      if( !str_cmp( chck, "hasabit" ) )
      {
         int number;

         if( is_number( rval ) )
         {
            number = atoi( rval );

            if( get_abit( chkchar, number ) == NULL )
               return mprog_veval( 0, opr, 1, mob );
            else
               return mprog_veval( 1, opr, 1, mob );
         }
         progbug( "hasabit: bad abit number", mob );
         return BERR;
      }


Thanks =)