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
ID:268078
![]() Mar 7 2004, 7:50 am
|
|
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? |
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? |
Is there anyway to force telnet to display those colors?
And its working now, how do I make the map bigger though? |
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 |
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. :) |
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? |
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 |
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: