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
➜ Question on grid maker
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Gareth555
(14 posts) Bio
|
| Date
| Tue 24 Jun 2003 01:58 AM (UTC) |
| Message
| i have a coding question, in the grid maker i use
it only creates n e s w and u and d exits.
here is the code below. I would like to add
NE NW SE and SW to that. What would the xit = make_exit
line be in the new cases i want to add? (im not a coder):)
// 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;
} | | 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.
7,766 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top