Help!
could one you coding geniuses tell me how to add
exits for se sw ne nw to the grid maker code i'm using.
i give an example here of the pre existing exit codes and a link to the full code im using.
http://www.gammon.com.au/forum/bbshowpost.php bbsubject_id=2854
sorry about posting this again but i got zero responses.
// Check to see if we can make N exits
if(room_count % x) {
location = get_room_index(vnum);
tmp = get_room_index(room_hold[room_count]);
xit = make_exit( location, tmp, 0 );
xit->keyword = STRALLOC( "" );
xit->description = STRALLOC( "" );
xit->key = -1;
xit->exit_info = 0;
}
// Check to see if we can make S exits
if((room_count - 1) % x) {
location = get_room_index(vnum);
tmp = get_room_index(room_hold[room_count - 2]);
xit = make_exit( location, tmp, 2 );
xit->keyword = STRALLOC( "" );
xit->description = STRALLOC( "" );
xit->key = -1;
xit->exit_info = 0;
}
// Check to see if we can make E exits
if( (room_count - 1) % (x * y) < x * y - x ) {
location = get_room_index(vnum);
tmp = get_room_index(room_hold[room_count + x - 1]);
xit = make_exit( location, tmp, 1 );
xit->keyword = STRALLOC( "" );
xit->description = STRALLOC( "" );
xit->key = -1;
xit->exit_info = 0;
}
// Check to see if we can make W exits
if( ( room_count - 1) % (x * y) >= x ) {
location = get_room_index(vnum);
tmp = get_room_index(room_hold[room_count - x - 1]);
xit = make_exit( location, tmp, 3 );
xit->keyword = STRALLOC( "" );
xit->description = STRALLOC( "" );
xit->key = -1;
xit->exit_info = 0;
}
// Check to see if we can make D exits
if( room_count > x * y ) {
location = get_room_index(vnum);
tmp = get_room_index(room_hold[room_count - x * y - 1]);
xit = make_exit( location, tmp, 5 );
xit->keyword = STRALLOC( "" );
xit->description = STRALLOC( "" );
xit->key = -1;
xit->exit_info = 0;
}
// Check to see if we can make U exits
if( room_count <= maxnum - (x * y) ) {
location = get_room_index(vnum);
tmp = get_room_index(room_hold[room_count + x * y - 1]);
xit = make_exit( location, tmp, 4 );
xit->keyword = STRALLOC( "" );
xit->description = STRALLOC( "" );
xit->key = -1;
xit->exit_info = 0;
could one you coding geniuses tell me how to add
exits for se sw ne nw to the grid maker code i'm using.
i give an example here of the pre existing exit codes and a link to the full code im using.
http://www.gammon.com.au/forum/bbshowpost.php bbsubject_id=2854
sorry about posting this again but i got zero responses.
// Check to see if we can make N exits
if(room_count % x) {
location = get_room_index(vnum);
tmp = get_room_index(room_hold[room_count]);
xit = make_exit( location, tmp, 0 );
xit->keyword = STRALLOC( "" );
xit->description = STRALLOC( "" );
xit->key = -1;
xit->exit_info = 0;
}
// Check to see if we can make S exits
if((room_count - 1) % x) {
location = get_room_index(vnum);
tmp = get_room_index(room_hold[room_count - 2]);
xit = make_exit( location, tmp, 2 );
xit->keyword = STRALLOC( "" );
xit->description = STRALLOC( "" );
xit->key = -1;
xit->exit_info = 0;
}
// Check to see if we can make E exits
if( (room_count - 1) % (x * y) < x * y - x ) {
location = get_room_index(vnum);
tmp = get_room_index(room_hold[room_count + x - 1]);
xit = make_exit( location, tmp, 1 );
xit->keyword = STRALLOC( "" );
xit->description = STRALLOC( "" );
xit->key = -1;
xit->exit_info = 0;
}
// Check to see if we can make W exits
if( ( room_count - 1) % (x * y) >= x ) {
location = get_room_index(vnum);
tmp = get_room_index(room_hold[room_count - x - 1]);
xit = make_exit( location, tmp, 3 );
xit->keyword = STRALLOC( "" );
xit->description = STRALLOC( "" );
xit->key = -1;
xit->exit_info = 0;
}
// Check to see if we can make D exits
if( room_count > x * y ) {
location = get_room_index(vnum);
tmp = get_room_index(room_hold[room_count - x * y - 1]);
xit = make_exit( location, tmp, 5 );
xit->keyword = STRALLOC( "" );
xit->description = STRALLOC( "" );
xit->key = -1;
xit->exit_info = 0;
}
// Check to see if we can make U exits
if( room_count <= maxnum - (x * y) ) {
location = get_room_index(vnum);
tmp = get_room_index(room_hold[room_count + x * y - 1]);
xit = make_exit( location, tmp, 4 );
xit->keyword = STRALLOC( "" );
xit->description = STRALLOC( "" );
xit->key = -1;
xit->exit_info = 0;