Difference between revisions of "Conn/exits"

From City of Hope MUSH
Jump to navigation Jump to search
(Created page with "<pre>ExitFormat: Trods:%r%t[trim(iter(lexits(me),if(get(##/trod),[setq(0, name(##))[index(%q0,:,2,2) <[index(%q0,:,1,1)]>]])))]%rDuelling Rings:%r%t[iter(lexits(me),if(not(get...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<pre>ExitFormat: Trods:%r%t[trim(iter(lexits(me),if(get(##/trod),[setq(0, name(##))[index(%q0,:,2,2) <[index(%q0,:,1,1)]>]])))]%rDuelling Rings:%r%t[iter(lexits(me),if(not(get(##/trod)), [setq(0, name(##))[index(%q0,:,2,2) <[index(%q0,:,1,1)]>]]))]</pre>
+
<pre>@ExitFormat here=Trods:%r%t[trim(iter(lexits(me),if(get(##/trod),[setq(0, name(##))[index(%q0,:,2,2) <%xh[index(%q0,:,1,1)]%xn>]])))]%rDuelling Rings:%r%t[iter(lexits(me),if(not(get(##/trod)), [setq(0, name(##))[index(%q0,:,2,2) <%xh[index(%q0,:,1,1)]%xn>]]))]</pre>
 +
 
 +
 
 +
Okay, gonna try to explain this bit by bit.
 +
 
 +
@exitformat allows you to, for any room you own, list the ones that ''are'' trods on a different line than the ones that aren't.
 +
 
 +
It does this by looping through the exits in a room and, if the exit has had the property TROD, listing it in the first iter, and if it doesn't, listing it on the second.
 +
 
 +
You can change trod to any property you like, as long as it matches what's set in the get(##/trod).

Latest revision as of 10:16, 5 May 2021

@ExitFormat here=Trods:%r%t[trim(iter(lexits(me),if(get(##/trod),[setq(0, name(##))[index(%q0,:,2,2) <%xh[index(%q0,:,1,1)]%xn>]])))]%rDuelling Rings:%r%t[iter(lexits(me),if(not(get(##/trod)), [setq(0, name(##))[index(%q0,:,2,2) <%xh[index(%q0,:,1,1)]%xn>]]))]


Okay, gonna try to explain this bit by bit.

@exitformat allows you to, for any room you own, list the ones that are trods on a different line than the ones that aren't.

It does this by looping through the exits in a room and, if the exit has had the property TROD, listing it in the first iter, and if it doesn't, listing it on the second.

You can change trod to any property you like, as long as it matches what's set in the get(##/trod).