Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
lewdpotato
Novice


Joined: 16 May 2002
Posts: 48
Location: USA

PostPosted: Sat Aug 03, 2002 10:08 pm   

Map look command
 
Im trying to figure out how to change the look command. the trade wars game Im playing uses the command (d) for redisplay sector so the look command does not work. im using ver 6.16. also will the map work for me? trade wars does not use north south east west, it is numbers set up on the chaos theory.
Reply with quote
lewdpotato
Novice


Joined: 16 May 2002
Posts: 48
Location: USA

PostPosted: Sat Aug 03, 2002 10:15 pm   
 
I found the area to change the setting for the look command in the strings and doors. I still need to figure out how to get rid of all the north south east west stuff if that is possible.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Aug 04, 2002 12:22 am   
 
You don't have to get rid of it really. Just use the mapdir character by default it is set to '>'. It allows you to create a non-standard exit with text of whatever you specify. Hence typing ">1000" at the command line will sennd 1000 to the TWGS and create an exit with text of 1000. I would recommend that you highly coordinate sectors using the vnum field. You set that with the command "#NOOP %roomnum(%roomnum,1000}". Just replace the 1000 with whatever variable you are storing the destination sector in.

Now for a more complete scripted solution. First you have to know that you are not in a submenu. You would have to do that since I don't recall enough of TW to do it.

#TR (^Sector%s: (%d) in (*)$} {CurrentSector=%1;#IF (%roomnum(%1)=%null) {#MAKEROOM {%1} {%2};#NOOP %roomnum(%roomnum,%1)} {#TELEPORT %1;#IF (%roomname!="%2") {#NOOP %roomname(%roomnum,"%2")}}}
#TR {^Warps to Sector~(s~) : (*)$} {Warps=%replace("%1","-","|");#FORALL @Warps {#IF (%ismember(%trim(%i),%roomexit)=0) {#IF (%roomnum(%number(%trim(%i)))) {#NOOP %roomportal(%roomnum,%trim(%i),%trim(%i))} {#MAKEROOM {%1} {unvisited};#NOOP %roomnum(%roomnum,%number(%trim(%i)));#TELEPORT @CurrentSector}}}

If I got it right it should make all the appropiate exits for you, set the vnums to match sector numbers, and capture something for roomname. You can leave it in follow mode by the looks of it and never even have to configure the mapper based on its autoconfigure stuff.

Where knowing your at the main menu comes in is too turn off the script, and to keep the mapper from trying to follow things that aren't movements like getting a port report, or a warps report.
Reply with quote
lewdpotato
Novice


Joined: 16 May 2002
Posts: 48
Location: USA

PostPosted: Sun Aug 04, 2002 3:20 am   
 
thanks for the reply, I tried but can not get this to work. when I look at the square on the map it says #0, when I run the first #noop it tries to warp me to sector #2, Im sure this is close or Im doing something wrong here.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Aug 04, 2002 8:04 pm   
 
Had a few typos, and forgot a %trim in one spot. I also added an oninput trigger to capture when you transmit anything numeric and it changes it to a #SEND so the mapper doesn't recieve it and get confused, you may need to put #GAG into that trigger if it is double sending it.

#CLASS {MapBuild} {"enable"}
#VAR CurrentSector {1}
#VAR Warps {1 | 3 | 4 | 5 | 6}
#TRIGGER {^Sector%s: (%d) in (*)$} {#IF (%roomnum!=@CurrentSector) {#TELEPORT @CurrentSector};CurrentSector=%1;#IF (%roomnum(%1)=%null) {#MAKEROOM {%1} {%2};#NOOP %roomnum(%roomnum,%1)} {#TELEPORT %1;#IF (%roomname!="%2") { #NOOP %roomname(%roomnum,"%2")}}}
#ONINPUT {^(%d)$} {#SEND %1} "" {"notrig"}
#TRIGGER {^Warps to Sector~(s~) : (*)$} {Warps=%replace("%1","-","|");#FORALL @Warps { #IF (%ismember(%trim(%i),%roomexit)=0) { #IF (%roomnum(%number(%trim(%i)))) { #NOOP %roomportal(%roomnum,%trim(%i),%trim(%i))} {#MAKEROOM {%trim(%i)} {unvisited};#NOOP %roomnum(%roomnum,%number(%trim(%i)));#TELEPORT @CurrentSector}}}}
#CLASS 0
Reply with quote
lewdpotato
Novice


Joined: 16 May 2002
Posts: 48
Location: USA

PostPosted: Sun Aug 04, 2002 9:41 pm   
 
wow! very cool, works great, thank you for making that script for me. If you dont mind I would like to leave that one in the finished script area. thanks again.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Aug 05, 2002 3:08 am   
 
Yeah go right ahead just make sure to put some further documentation with it, such as how to properly implement it, and any caveats you find after using it.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net