mikeC130 Apprentice
Joined: 03 Jul 2006 Posts: 110
|
Posted: Sun Dec 05, 2010 1:16 pm Re: Looping through all rooms |
[quote="masterkrueger"]Hi, I want to go through all rooms on my map and put the first line of the description as the room name.
How do i begin looping through the rooms?[/quote]
%mapquery() will return all rooms. Cycling through them can be done with #forall %mapquery() {code here}.
You should be able to do it with something along these lines:
Code: |
#LOCAL $Desc $Rname $newdesc
#forall %mapquery() {
$Desc=%roomdesc(%i,)
$Rname=%roomname(%i,)
$newdesc=%concat($Rname,$Desc)
#call %roomdesc(%i,$newdesc)
}
|
Not tested, however.
Mike |
|