|
croww Newbie
Joined: 02 Jul 2013 Posts: 8
|
Posted: Wed Jul 06, 2016 3:54 pm
Coloring rooms in cmud mapper `? |
Is there a way to make a script to color rooms in the cmud map after name in the map.
Like i have alot of rooms named "In the graveyard". Is there a script that goes thro the database and color all those rooms black.
And i have alot of rooms named "In the center of a serene forest meadow" , can i get all those to light green ?
Or do i have to click each rooms in the map and then go to room proterties and change from there ?
The worldmap is huge, and there is a old ascii map that a player did, I am currently running around making a cmud version of it.
http://home.caiway.nl/~lep/zombie/map/
(thats just the outworld, then all the zones are even more rooms)
Any help would be nice |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Wed Jul 06, 2016 11:38 pm |
It is possible to do it by script... however it would likely hang CMUD for a few minutes as it worked.
#CALL %maplocked(0)
#FORALL %numrooms {
#IF (%roomname(%i)="In the graveyard") {#CALL %roomcol(%i, black)}
#IF (%roomname(%i)="In the center of a serene forest meadow") {#CALL %roomcol(%i, lightgreen)}
etc
}
#CALL %maplocked(1) |
|
_________________ Discord: Shalimarwildcat |
|
|
|
croww Newbie
Joined: 02 Jul 2013 Posts: 8
|
Posted: Wed Jul 06, 2016 11:51 pm |
So i guess i take lines and save it to a file. what should i name the file ?
And then go to actions run script ?
Anyways it i get it to work, it will be fantastic |
|
Last edited by croww on Wed Jul 06, 2016 11:56 pm; edited 1 time in total |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Wed Jul 06, 2016 11:54 pm |
You can also edit the properties of several rooms at once, but that tends to mess up the very next room you create via the mapper for some reason.
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
croww Newbie
Joined: 02 Jul 2013 Posts: 8
|
Posted: Wed Jul 06, 2016 11:58 pm |
Yeah i have tried to use the nearby in panels to get as many rooms i can, and then change em all. But it misses so many rooms sometimes
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Thu Jul 07, 2016 12:30 am |
if you put the map into mapping mode, you can draw a box around multiple rooms and select them that way. or shift+click to add individual rooms
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
croww Newbie
Joined: 02 Jul 2013 Posts: 8
|
Posted: Thu Jul 07, 2016 12:38 am |
aye thanks. So those commands you printed out, what should i call the file. is it just a txt file or do i need to call it something else ?
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Thu Jul 07, 2016 12:51 am |
I would likely make a new #EVENT onMapUpdate {to hold it}
Similar to an #ALIAS, but without the possibility of sending the callword to the game if you disable the setting.
Just '#RAISE onMapUpdate' to execute. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
croww Newbie
Joined: 02 Jul 2013 Posts: 8
|
Posted: Fri Jul 08, 2016 12:37 am |
Ok didnt get ur code to work. But this did.
#CALL %maplocked(0)
#VAR Path %mapquery("[Name] LIKE '%Swimming out upon the ocean%'")
#FORALL @Path {#call %roomcol(%i, blue)}
#CALL %maplocked(1)
I just change the "swimming out upon the ocean" to diffrent descriptions.
Thank you for showing the way with maplock and %roomcol%
etc.
Not sure if i am doing it the correct way, but atleast it looks like its working
|
|
|
|
|
|