I want to make a text mud with byond (that will run though telnet) I want to make a map on my mud because I hate the confusing commands like north south east west exc, I know there is a way to make a text map, but I dont know how, heres a picture of one
http://www.ashavar.com/client/images/screen10.jpg
1
2
ID:268078
Mar 7 2004, 7:50 am
|
|
In response to Malver
|
|
Parse.dm:62:error:view:undefined var
Parse.dm:62:error:view:undefined var Parse.dm:63:error:view:undefined var Parse.dm:63:error:view:undefined var mob/proc/ShowMap() var/buf = "" // Store the map before outputting it for(var/xx = x-view, xx < x+view+1, xx++) // 21x21 view for(var/yy = y-view, yy < y+view+1, yy++) var/turf/T = locate(xx,yy,z) if(T) buf += T.text buf += "\n" src << buf // Show the map to the player but anyway. So I would just under the turfs name put like * If I wanted that to show up as grass? |
In response to Garthor
|
|
o.o but why are the views comming up errors (sorry about that garthor.)
|
In response to Malver
|
|
the views keep on bringing back errors
|
In response to Kasumi Tomonari
|
|
I think they need to be 'client.view' or 'world.view'.
|
In response to Kasumi Tomonari
|
|
I need more help now!
runtime error: type mismatch proc name: ShowMap (/mob/proc/ShowMap) source file: Parse.dm,60 usr: Kasumi Tomonari (/mob) src: Kasumi Tomonari (/mob) call stack: Kasumi Tomonari (/mob): ShowMap() Kasumi Tomonari (/mob): Login() Kasumi Tomonari (/client): New() Kasumi Tomonari (/client): New() Setting network delay to 0. mob/proc/ShowMap() var/buf = "" // Store the map before outputting it for(var/xx = x-view(), xx < x+view()+1, xx++) // 21x21 view for(var/yy = y-view(), yy < y+view()+1, yy++) var/turf/T = locate(xx,yy,z) if(T) buf += T.text buf += "\n" src << buf // Show the map to the player Also, is there anyway to force telnet, exc to show htmled colors? Not just the basic ones? |
In response to Kasumi Tomonari
|
|
The view(), as I said before, needs to be world.view or client.view.
|
In response to Hazman
|
|
Is there anyway to force telnet to display those colors?
And its working now, how do I make the map bigger though? |
In response to Kasumi Tomonari
|
|
Change the view variable(world.view || client.view).
|
In response to Hazman
|
|
Now it says that theres a loop, I disabled loop checks and it and it froze.
|
In response to Kasumi Tomonari
|
|
When are you showing the map?
|
In response to Hazman
|
|
at mob/Login()
|
In response to Kasumi Tomonari
|
|
Is it, perchance, in a loop?
|
In response to Hazman
|
|
yeah that was I was thinking.. I think the loops in here
mob/proc/ShowMap() var/buf = "" // Store the map before outputting it for(var/yy = y-world.view || client.view, yy < y+world.view || client.view+1, yy++) for(var/xx = x-world.view || client.view, xx < x+world.view || client.view+1, xx++) var/turf/T = locate(xx,yy,z) if(T) buf += T.name buf += "\n" src << buf // Show the map to the player |
In response to Kasumi Tomonari
|
|
It isn't. Maybe it's in mob/Login()? It'll be something like
while(1) ShowMap() . |
In response to Kasumi Tomonari
|
|
Kasumi Tomonari wrote:
mob/proc/ShowMap() Not quite. Replace those "view()" with "client.view" and you should be all set. Also, is there anyway to force telnet, exc to show htmled colors? Not just the basic ones? You can display as many colours as your telnet client allows. :) |
In response to Malver
|
|
How would I make the map space out? Its all on one line, but I need it to be on diffrent lines..
now: 1010101010101010101010101 Need: 10101010 10101010 10101010 10101010 Also, how would I make it appear a @ if there was a mob there? |
In response to Kasumi Tomonari
|
|
Kasumi Tomonari wrote:
How would I make the map space out? Its all on one line, but I need it to be on diffrent lines.. It was spacing it out properly, but you moved the 'buf += "\n"'. Also, how would I make it appear a @ if there was a mob there? var/mob/M = locate() in T // assuming T is the turf |
1
2
There certainly is a way. It's just a matter of looping through all of the turfs in view and writing them out. Here's an example snippet: