Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Yandex, DotBot

Members: 0
Guests: 11
Stats
Files
Topics
Posts
Members
Newest Member
481
3,739
19,386
621
KellieBusb
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Smaug Snippets » Overland question
Forum Rules | Mark all | Recent Posts

Overland question
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Dec 19, 2004, 12:07 pm
Go to the top of the page
Go to the bottom of the page

clandestine

GroupMembers
Posts2
JoinedDec 19, 2004

hi, i've recently implemented overland into Rom24, which was kinda a pain, but i'm able to move around the world and it's awesome, thank you Samson!

I just had a quick question, someone could give me a pointer on how to setup the map to wrap north/south & west to east? i've been reading the code over & over trying to figure out how i could have the player move from x = 1 to x = 5000, but i was hoping for some professional advice of those who have used this system more

Thanks in advance,
clandestine
       
Post is unread #2 Dec 19, 2004, 6:08 pm   Last edited Nov 24, 2007, 2:07 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

This rather large switch statement in process_exit() is what controls the restriction on where you go when you reach an edge:

   switch ( dir )
   {
      case DIR_NORTH:
         if( y == -1 )
         {
            send_to_char( "You cannot go any further north!\r\n", ch );
            return rNONE;
         }
         break;

      case DIR_EAST:
         if( x == MAX_X )
         {
            send_to_char( "You cannot go any further east!\r\n", ch );
            return rNONE;
         }
         break;

      case DIR_SOUTH:
         if( y == MAX_Y )
         {
            send_to_char( "You cannot go any further south!\r\n", ch );
            return rNONE;
         }
         break;

      case DIR_WEST:
         if( x == -1 )
         {
            send_to_char( "You cannot go any further west!\r\n", ch );
            return rNONE;
         }
         break;

      case DIR_NORTHEAST:
         if( x == MAX_X || y == -1 )
         {
            send_to_char( "You cannot go any further northeast!\r\n", ch );
            return rNONE;
         }
         break;

      case DIR_NORTHWEST:
         if( x == -1 || y == -1 )
         {
            send_to_char( "You cannot go any further northwest!\r\n", ch );
            return rNONE;
         }
         break;

      case DIR_SOUTHEAST:
         if( x == MAX_X || y == MAX_Y )
         {
            send_to_char( "You cannot go any further southeast!\r\n", ch );
            return rNONE;
         }
         break;

      case DIR_SOUTHWEST:
         if( x == -1 || y == MAX_Y )
         {
            send_to_char( "You cannot go any further southwest!\r\n", ch );
            return rNONE;
         }
         break;
   }


With this in mind it becomes a somewhat simple matter of changing the X and Y values appropriately to come out on the other side of your map.
       
Post is unread #3 Dec 20, 2004, 2:01 pm
Go to the top of the page
Go to the bottom of the page

clandestine

GroupMembers
Posts2
JoinedDec 19, 2004

thank you for your insight, i'll play with that switch statement and see what i can come up with
       
Pages:<< prev 1 next >>