|
OmegaDeus Apprentice
Joined: 14 Sep 2005 Posts: 121
|
Posted: Sun Oct 02, 2005 10:13 am
Seriously Experienced Scripters only |
K, here's my next project. i've got my prompt looking just how i want it, except for one thing: i wanna make a graphical compass to go next to it.
current prompt:
Code: |
*-------------------------------------------------------*
|Aerun 35 |
*-------------------------------------------------------*
|Health: 1526/2445 Body: 853/1187 Mind: 1449/1449 |
*-------------------------------------------------------*
|ETL: 408 Time: 6pm Til Q: 0 On Q: 0 Q Points: 2 |
*-------------------------------------------------------*
|Exits: NESW Area: Troubled Waters |
*-------------------------------------------------------*
|Enemy: Me: QFew |
*-------------------------------------------------------*
|
proposed compass:
Code: |
*-------------*
| (N) |U| |
| | |
| NW | NE |
| \ | / |
|(W)--[O]--(E)|
| / | \ |
| SW | SE |
| | |
| (S) |D| |
*-------------*
|
total prompt when finished:
Code: |
*-------------------------------------------------------* *-------------*
|Aerun 35 | | (N) |U| |
*-------------------------------------------------------* | | |
|Health: 1526/2445 Body: 853/1187 Mind: 1449/1449 | | NW | NE |
*-------------------------------------------------------* | \ | / |
|ETL: 408 Time: 6pm Til Q: 0 On Q: 0 Q Points: 2 | |(W)--[O]--(E)|
*-------------------------------------------------------* | / | \ |
|Exits: NESW Area: Troubled Waters | | SW | SE |
*-------------------------------------------------------* | | |
|Enemy: Me: QFew | | (S) |D| |
*-------------------------------------------------------* *-------------*
|
The major kicker is that I only want the directions listed by exits to be shown. What would be the best way to go about doing so? The directions when all directions are possible show up as NESWUDNeSeSwNw. this is already being drawn into the prompt under a variable. so i wouldn't have to have it redrawn, i just need to figure out the best way to make that into my compass. |
|
|
|
Kiasyn Apprentice
Joined: 05 Dec 2004 Posts: 196 Location: New Zealand
|
Posted: Sun Oct 02, 2005 10:57 am |
look into doing something like
%if(ismember("n",@existlist),"(N)"," " |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sun Oct 02, 2005 3:53 pm |
If you want to make a graphical compass that works well with the zMUD mapper, also take a look at the compass.zsc file that comes with the sample scripts with zMUD. It might give you some ideas.
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Oct 02, 2005 5:59 pm |
First, we need to clean up your list (I've replaced the secondary directions with their one-letter #Direction counterparts as found in the DirectionsDiag class in your settings, which is found in the System folder):
Exits = %replace(%replace(%replace(%replace("%1","Se", "L"),"Sw", "K"),"Nw", "H"), "Ne", "J")
This line should be put where you capture exits and assign it to a variable in your prompt trigger (if you didn't have this, it needs to be added).
Next, modify your #SAYs or #ECHOs displaying your prompt. All the pretty stuff like pipes (|), slashes (\ and /), dashes (-) and asterisks (*) will need to be lined up manually (sorry, %format() just makes things harder). Once set, for each direction replace the direction letter with something like this:
%if(%pos("N",@Exits),"(N)",%repeat(" ", 3))
For the secondary directions, it will look more like this:
%if(%pos("H", @Exits),Nw,%repeat(" ", 2)) |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
OmegaDeus Apprentice
Joined: 14 Sep 2005 Posts: 121
|
Posted: Sun Oct 02, 2005 7:40 pm |
much work in this one, but thanks to everyone's ideas i'm getting it to work.
|
|
_________________
Look at me I've got zSKILLS |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|