Register forum user name Search FAQ

Gammon Forum

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 ➜ wilderness

wilderness

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1 2  

Posted by De Martino   Italy  (54 posts)  Bio
Date Thu 19 Feb 2004 03:48 PM (UTC)

Amended on Thu 19 Feb 2004 03:49 PM (UTC) by De Martino

Message
Exists in smaugFuss this file:
mapout.c
is possible to visualize the wilderness in SmaugFuss?
I desire to have a map asci in client, so that
to direct me in the mud.

To produce rooms with map character thing I have to add
in the file.are?

A snippet exists for producing map, a patch or it already exists in smauFuss?

^__^
De Martino
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #1 on Thu 19 Feb 2004 06:22 PM (UTC)
Message
I beleive for an ascii map there are several snippets around, I think Samson's site has some, you can check there at http://www.afkmud.com

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Robert Powell   Australia  (367 posts)  Bio
Date Reply #2 on Thu 19 Feb 2004 10:46 PM (UTC)
Message
There is the wonderfull AckMapper, i have donwloaded it, it comes as a .c and.h file but there are no instructions on how to use it, i havent gotten bold enough yet to start pestering here on how to use it, but i will soon enough heh.

Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated.
Top

Posted by De Martino   Italy  (54 posts)  Bio
Date Reply #3 on Fri 20 Feb 2004 12:03 AM (UTC)
Message
thanks Greven, thanks :o)

De Martino
Top

Posted by De Martino   Italy  (54 posts)  Bio
Date Reply #4 on Fri 20 Feb 2004 12:11 AM (UTC)

Amended on Fri 20 Feb 2004 12:12 AM (UTC) by De Martino

Message
dear friend Robert, after download snippet overland.zip
I believes to see the instructions, read the file Overland.txt ;o)

De Martino
Top

Posted by De Martino   Italy  (54 posts)  Bio
Date Reply #5 on Fri 20 Feb 2004 04:18 PM (UTC)
Message
Dear all friend, please help

I don't desire to insert overland in my mud, and in internet I have found this snippet:

Recursive Mapper By Noah Skelton, February 26, 2002


First:

You might want to cedit map and make it a level 1 command..

In act_info.c:

in function do_config find:

else if ( IS_IMMORTAL( ch )
&& !str_prefix( arg+1, "map" ) ) bit = PLR_AUTOMAP; /* maps */

and change it to:

else if (!str_prefix( arg+1, "map" ) ) bit = PLR_AUTOMAP; /* maps */

in function do_look find:

if ( !IS_NPC(ch) && xIS_SET(ch->act, PLR_AUTOMAP) ) /* maps */
{
if(ch->in_room->map != NULL)
{
do_lookmap(ch, NULL);
}
}

And change it to look like this:

if ( !IS_NPC(ch) && xIS_SET(ch->act, PLR_AUTOMAP) ) /* maps */
{
do_lookmap(ch, "auto");
}

In mapout.c:

up at the top where the function declarations are:

find:

void draw_map (CD * ch, RID * rm, int flag, int mode);

change it to:

void draw_map(CHAR_DATA *ch, byte map[50][50]);

and below it paste this:

void CheckRoom(ROOM_INDEX_DATA *location, int PosX, int PosY, byte map[50][50]);
void CheckExitDir(ROOM_INDEX_DATA *location, int PosX, int PosY, int Exd, byte map[50][50]);
int center, MapDiameter;

find the function do_lookmap and delete it and paste this in its place:

void do_lookmap( CHAR_DATA *ch, char *argument )
{
ROOM_INDEX_DATA *location;
int x, y;
byte map[50][50];

if (!str_cmp( argument, "auto" ))
MapDiameter = 5;
else
MapDiameter = atoi(argument);

if ( MapDiameter < 3)
MapDiameter = 3;
else if (MapDiameter>49)
MapDiameter = 49;

x = (MapDiameter/2) * 2;

if(MapDiameter==x)
MapDiameter--;

center = MapDiameter/2+1;
location = get_room_index(ch->in_room->vnum);

for (y=0;y<=MapDiameter;++y){for (x=0;x<=MapDiameter;++x){map[x][y]=(SECT_MAX+1);}}

CheckRoom(location, center, center, map);

map[center][center] = ch->in_room->sector_type;

draw_map(ch, map);

return;
}

After you do that paste this in below it:

void CheckRoom(ROOM_INDEX_DATA *location, int CX, int CY, byte map[50][50])
{
int PosX, PosY;

PosX=CX; PosY=CY-1;
if (PosX <= MapDiameter && PosY <= MapDiameter && PosX > 0 && PosY > 0)
CheckExitDir(location, PosX, PosY, DIR_NORTH, map);
PosX=CX; PosY=CY+1;
if (PosX <= MapDiameter && PosY <= MapDiameter && PosX > 0 && PosY > 0)
CheckExitDir(location, PosX, PosY, DIR_SOUTH, map);
PosX=CX+1; PosY=CY;
if (PosX <= MapDiameter && PosY <= MapDiameter && PosX > 0 && PosY > 0)
CheckExitDir(location, PosX, PosY, DIR_EAST, map);
PosX=CX-1; PosY=CY;
if (PosX <= MapDiameter && PosY <= MapDiameter && PosX > 0 && PosY > 0)
CheckExitDir(location, PosX, PosY, DIR_WEST, map);
PosX=CX+1; PosY=CY-1;
if (PosX <= MapDiameter && PosY <= MapDiameter && PosX > 0 && PosY > 0)
CheckExitDir(location, PosX, PosY, DIR_NORTHEAST, map);
PosX=CX-1; PosY=CY-1;
if (PosX <= MapDiameter && PosY <= MapDiameter && PosX > 0 && PosY > 0)
CheckExitDir(location, PosX, PosY, DIR_NORTHWEST, map);
PosX=CX+1; PosY=CY+1;
if (PosX <= MapDiameter && PosY <= MapDiameter && PosX > 0 && PosY > 0)
CheckExitDir(location, PosX, PosY, DIR_SOUTHEAST, map);
PosX=CX-1; PosY=CY+1;
if (PosX <= MapDiameter && PosY <= MapDiameter && PosX > 0 && PosY > 0)
CheckExitDir(location, PosX, PosY, DIR_SOUTHWEST, map);

return;
}

void CheckExitDir(ROOM_INDEX_DATA *location,int X, int Y, int ExD, byte map[50][50])
{
EXIT_DATA *xit;

if(get_exit(location, ExD))
{
xit = get_exit(location, ExD);
if(map[X][Y]==(SECT_MAX+1) && !IS_SET(xit->exit_info, EX_CLOSED))
{
location = get_room_index(xit->vnum);
map[X][Y] = location->sector_type;
CheckRoom(location, X, Y, map);
}
}

return;
}

Now find the function draw_map, delete it and put this in its place:

void draw_map(CHAR_DATA *ch, byte map[50][50])
{
int x,y;
char *sect;

for (y=1;y<= MapDiameter;++y)
{
for (x=1;x<=MapDiameter;++x)
{
switch(map[x][y])
{
default:
sect = "&R&r?";
break;
case SECT_INSIDE:
sect = "&z#";
break;
case SECT_CITY:
sect = "&P.";
break;
case SECT_FIELD:
sect = "&G.";
break;
case SECT_FOREST:
sect = "&G@";
break;
case SECT_HILLS:
sect = "&G^^";
break;
case SECT_MOUNTAIN:
sect = "&W^^";
break;
case SECT_WATER_SWIM:
sect = "&B~";
break;
case SECT_WATER_NOSWIM:
sect = "&B~";
break;
case SECT_UNDERWATER:
sect = "&R&b-";
break;
case SECT_AIR:
sect = "&W@";
break;
case SECT_DESERT:
sect = "&Y.";
break;
case SECT_OCEANFLOOR:
sect = "&B-";
break;
case SECT_UNDERGROUND:
sect = "&z.";
break;
case SECT_LAVA:
sect = "&R~";
break;
case SECT_SWAMP:
sect = "&G~";
break;
case (SECT_MAX+1):
sect = " ";
break;
}

if(x==center && y==center)
sect = "&R*";

send_to_char_color(sect, ch);
}
send_to_char("\n\r",ch);
}
return;
}

+++++++++++++++++++++++++++++++++++++++++
continue in other post
Top

Posted by De Martino   Italy  (54 posts)  Bio
Date Reply #6 on Fri 20 Feb 2004 04:22 PM (UTC)
Message

after having inserted the snippet (a lot of tests)
make my SmaugFuss and I read this :
++++++++++++++++++++++++++++++++++++
make[1]: Entering directory `/cygdrive/c/smaug/src'
gcc -c -O -g2 -Wall -DI3 -DI3SMAUG act_info.c
gcc -c -O -g2 -Wall -DI3 -DI3SMAUG mapout.c
mapout.c:40: error: syntax error before "byte"
mapout.c:41: error: syntax error before "byte"
mapout.c:42: error: syntax error before "byte"
mapout.c:193: error: syntax error before "byte"
mapout.c: In function `draw_map':
mapout.c:202: error: `map' undeclared (first use in this function)
mapout.c:202: error: (Each undeclared identifier is reported only once
mapout.c:202: error: for each function it appears in.)
mapout.c:260: error: `ch' undeclared (first use in this function)
mapout.c: In function `do_lookmap':
mapout.c:356: error: `byte' undeclared (first use in this function)
mapout.c:356: error: syntax error before "map"
mapout.c:376: error: `map' undeclared (first use in this function)
mapout.c: At top level:
mapout.c:387: error: syntax error before "byte"
mapout.c: In function `CheckRoom':
mapout.c:391: error: `CX' undeclared (first use in this function)
mapout.c:391: error: `CY' undeclared (first use in this function)
mapout.c:393: error: `location' undeclared (first use in this function)
mapout.c:393: error: `map' undeclared (first use in this function)
mapout.c: At top level:
mapout.c:419: error: syntax error before "byte"
mapout.c: In function `CheckExitDir':
mapout.c:423: error: `location' undeclared (first use in this function)
mapout.c:423: error: `ExD' undeclared (first use in this function)
mapout.c:426: error: `map' undeclared (first use in this function)
mapout.c:426: error: `X' undeclared (first use in this function)
mapout.c:426: error: `Y' undeclared (first use in this function)
make[1]: *** [mapout.o] Error 1
make[1]: Leaving directory `/cygdrive/c/smaug/src'
make: *** [all] Error 2
+++++++++++++++++++++++++++++++++++++++
what problem do I have? I desire to visualize a small map
of the place where I am, to be able to direct me few few, not one general world map
:o(
De Martino
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #7 on Fri 20 Feb 2004 05:15 PM (UTC)
Message
on the lines in mapout.c, it looks like your missing a ; after each line. Check those.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #8 on Fri 20 Feb 2004 09:48 PM (UTC)
Message
Oh boy, the recursion style in that snipper just made all my alarms go off. If that guy were one of my students he'd have just gotten bonked over the head for writing something like that. :P He should have used two nested for loops or something, anything, but what he did is just icky. :)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by De Martino   Italy  (54 posts)  Bio
Date Reply #9 on Fri 20 Feb 2004 11:10 PM (UTC)

Amended on Sat 21 Feb 2004 10:56 AM (UTC) by De Martino

Message
have not I understood Greven, the snippet is correct or no?
I have only to add the character to the lines " ; "
thanks cmq for your continuous answers, as Nick.

for Ksilyan: do you intend to say that the snippet is to avoid?
not to use? is wrong?

Ksilyan please you would give me you a possible solution for
to visualize a small map to orient in my mud?
A simple solution, doesn't desire a great, but I desires
only a map type ASCII.


De Martino
Top

Posted by De Martino   Italy  (54 posts)  Bio
Date Reply #10 on Sat 21 Feb 2004 03:15 PM (UTC)

Amended on Sat 21 Feb 2004 03:16 PM (UTC) by De Martino

Message
in this site:
http://www.afkmud.com/downloads.php?cat=other

I have downloading thi file ackmapper.zip, in this zip
that is ackmapper.c and ackmapper.h.

After i have correct my makefile: I have inserted ackmapper.c and
ackmapper.o, immediately later boards.c and boards.o.
And I have inserted ackmapper.h.

But I Have e problems when I make, thissnippen is not good for my smaug Fuss?

please help me, for e small map ASCII in my mud :o\

De Martino
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #11 on Sun 22 Feb 2004 11:31 PM (UTC)
Message
Quote:

But I Have e problems when I make ...


What problems? We cannot solve errors if we don't see the error message.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by De Martino   Italy  (54 posts)  Bio
Date Reply #12 on Mon 23 Feb 2004 05:52 PM (UTC)
Message
Nick:
Quote:
What problems? We cannot solve errors if we don't see the error message.


After having inserted ackmapper.c and ackmapper.h, and after having corrected my makefile, I read these errors:
-------------------------------------------------------
$ make
make smaug
make[1]: Entering directory `/cygdrive/c/smaug/src'
gcc -c -O -g2 -Wall -DI3 -DI3SMAUG ackmapper.c
In file included from ackmapper.c:47:
ackmapper.h:29:1: warning: "/*" within comment
ackmapper.h:40:18: merc.h: No such file or directory
In file included from ackmapper.c:47:
ackmapper.h:43: error: syntax error before '/' token
In file included from ackmapper.c:47:
ackmapper.h:82: error: syntax error before "_of_sight"
ackmapper.c:48:17: gsn.h: No such file or directory
ackmapper.c:121: error: `SECT_TREE' undeclared here (not in a function)
ackmapper.c:121: error: initializer element is not constant
ackmapper.c:121: error: (near initialization for `map_info[17].sector_type')
ackmapper.c:121: error: initializer element is not constant
ackmapper.c:121: error: (near initialization for `map_info[17]')
ackmapper.c:122: error: `SECT_FIRE' undeclared here (not in a function)
ackmapper.c:122: error: initializer element is not constant
ackmapper.c:122: error: (near initialization for `map_info[18].sector_type')
ackmapper.c:122: error: initializer element is not constant
ackmapper.c:122: error: (near initialization for `map_info[18]')
ackmapper.c:123: error: `SECT_QUICKSAND' undeclared here (not in a function)
ackmapper.c:123: error: initializer element is not constant
ackmapper.c:123: error: (near initialization for `map_info[19].sector_type')
ackmapper.c:123: error: initializer element is not constant
ackmapper.c:123: error: (near initialization for `map_info[19]')
ackmapper.c:124: error: `SECT_ETHER' undeclared here (not in a function)
ackmapper.c:124: error: initializer element is not constant
ackmapper.c:124: error: (near initialization for `map_info[20].sector_type')
ackmapper.c:124: error: initializer element is not constant
ackmapper.c:124: error: (near initialization for `map_info[20]')
ackmapper.c:125: error: `SECT_GLACIER' undeclared here (not in a function)
ackmapper.c:125: error: initializer element is not constant
ackmapper.c:125: error: (near initialization for `map_info[21].sector_type')
ackmapper.c:125: error: initializer element is not constant
ackmapper.c:125: error: (near initialization for `map_info[21]')
ackmapper.c:126: error: `SECT_EARTH' undeclared here (not in a function)
ackmapper.c:126: error: initializer element is not constant
ackmapper.c:126: error: (near initialization for `map_info[22].sector_type')
ackmapper.c:126: error: initializer element is not constant
ackmapper.c:126: error: (near initialization for `map_info[22]')
ackmapper.c:128: error: initializer element is not constant
ackmapper.c:128: error: (near initialization for `map_info[23]')
ackmapper.c:489:5: warning: "/*" within comment
ackmapper.c: In function `string_justify':
ackmapper.c:491: error: `pbuf' undeclared (first use in this function)
ackmapper.c:491: error: (Each undeclared identifier is reported only once
ackmapper.c:491: error: for each function it appears in.)
ackmapper.c:496: error: `last' undeclared (first use in this function)
ackmapper.c:506: error: `currline' undeclared (first use in this function)
ackmapper.c:507: error: `pret' undeclared (first use in this function)
ackmapper.c:508: error: `blen' undeclared (first use in this function)
ackmapper.c:508: error: `term_width' undeclared (first use in this function)
ackmapper.c:516: error: `numlines' undeclared (first use in this function)
ackmapper.c:518: error: `ret' undeclared (first use in this function)
ackmapper.c:510: warning: value computed is not used
ackmapper.c: In function `disp_map':
ackmapper.c:594: warning: implicit declaration of function `map_format'
ackmapper.c:594: warning: passing arg 2 of `strcpy' makes pointer from integer w
ithout a cast
ackmapper.c:596: error: `ro' undeclared (first use in this function)
ackmapper.c:596: error: syntax error before "ws"
ackmapper.c:598: warning: passing arg 2 of `strcat' makes pointer from integer w
ithout a cast
ackmapper.c: In function `MapArea':
ackmapper.c:639: error: structure has no member named `nex'
ackmapper.c:640: error: syntax error before "t_in_room"
ackmapper.c:694: error: `door_' undeclared (first use in this function)
ackmapper.c:694: error: syntax error before "type"
ackmapper.c:699: error: `SE' undeclared (first use in this function)
ackmapper.c:699: error: syntax error before "CT_UNSEEN"
ackmapper.c: At top level:
ackmapper.c:709: error: syntax error before "return"
ackmapper.c: In function `do_mapper':
ackmapper.c:883: error: `gsn_spy' undeclared (first use in this function)
make[1]: *** [ackmapper.o] Error 1
make[1]: Leaving directory `/cygdrive/c/smaug/src'
make: *** [all] Error 2
-----------------------------------------------------
I desire to visualize a small map ascii in my mud,
in the more way' simple that exists, that I/you/he/she am easy for one
incapable as me, have already made great footsteps, thanks to all of you!

De Martino
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #13 on Mon 23 Feb 2004 06:14 PM (UTC)
Message
at the top ackmapper.h, line 40, you need to change
#include "merc.h"
to
#include "mud.h"
That should fix up a great many of the errors. There is one that I can see quick, that there is a comment within a comment. This means that there are nested /* */ remove the innermost to solve this problem.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by De Martino   Italy  (54 posts)  Bio
Date Reply #14 on Fri 27 Feb 2004 01:38 AM (UTC)
Message
problem not resolved, doesn't do anything
thanks however Greven. :o\

De Martino
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.


49,005 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.