[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Ackmapper help needed

Ackmapper help needed

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


Posted by Robert Powell   Australia  (367 posts)  [Biography] bio
Date Wed 27 Oct 2004 06:13 AM (UTC)
Message
I have installed ackmapper and got it working, tho i would like to tweak it further to make it a bit more visual, currently it is displaying as below,

The Temple Of Midgaard                                     -     N     -
-<----------------------------------------------->-        -<-U-(*)--->-
                                                           -     S     -
You are in the southern end of the temple hall in the Temple of Midgaard.
The temple has been constructed from giant marble blocks, eternal in
appearance, and most of the walls are covered by ancient wall paintings
picturing Gods, Giants and peasants.
   Large steps lead down through the grand temple gate, descending the huge
mound upon which the temple is built and ends on the temple square below.


+-----------+
|           |
|           |
|      -    |
|     |     |
|     @     |
|     |     |
|    - -    |
|     |     |
|    - -    |
+-----------+  Exits: north south up.


What i would like to have is the room description along side the right hand side of the map, i did manage to put the call to do_mapper in one place in do_look which game me that result, but the exits were in the wrong place, any help would be great. im currently calling do_mapper from this section of do_look.

if ( arg1[0] == '\0'
           || ( !IS_NPC(ch) && !xIS_SET(ch->act, PLR_BRIEF) ) )
        
	send_to_char( ch->in_room->description, ch );
        do_mapper (ch, arg);




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

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #1 on Wed 27 Oct 2004 09:42 PM (UTC)
Message
Looks like you might need to throw a \n\r before your call for the exits.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Robert Powell   Australia  (367 posts)  [Biography] bio
Date Reply #2 on Thu 28 Oct 2004 06:08 AM (UTC)
Message
that would put the exits on the next line, what i wanted is to have the description on the right hand side the map just like the exits is, so that it loks like this

The Temple Of Midgaard                                     -     N     -
-<----------------------------------------------->-        -<-U-(*)--->-
                                                           -     S     -
+-----------+You are in the southern end of the temple hall
|           |of Midgaard. The temple has been constructed
|           |rom giant marble blocks, eternal in appearance,
|      -    |and most of the walls are covered by ancient 
|     |     |wall paintings picturing Gods, Giants and 
|     @     |peasants. Large steps lead down through the 
|     |     |grand temple gate, descending the huge mound
|    - -    |upon which the temple is built and ends on the
|     |     |temple square below.
|    - -    |
+-----------+  Exits: north south up.


Sorry if i wasnt very clear in what i was wanting to do.

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

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #3 on Thu 28 Oct 2004 06:45 AM (UTC)
Message
What you could do is copy do_mapper and modify it to return a string, each line delimited with the \n. Then you create a function that accepts a character, and integer, and 2 strings. You read in the first one ( your map ) one character at a time until you hit the \n. Instead of putting it in the newline, you use one_argument to add one word at a time, check each time that what you have so far this line + the length of this new word will not exceed the integer passed ( the width of your description ). So, now you've hit the width, have the first line of the map preceeded with a length of the description. Do this for each line until you run out of string A ( your map ), then just add the rest of description in. I hope that makes sense...

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Robert Powell   Australia  (367 posts)  [Biography] bio
Date Reply #4 on Thu 28 Oct 2004 08:58 AM (UTC)
Message
Ok i can understand what you mean, but i know that, that would be way way above anything i could do, thought that there might be an easy way to do it, back to the drawing board for me LOL.

Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated.
[Go to top] 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.


13,186 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]