|
benny1564 Novice
Joined: 22 Jun 2004 Posts: 48
|
Posted: Sun Sep 26, 2004 5:59 pm
Change roomcost on multiple rooms? |
Is it somehow possible to change the roomcost to 1 in all rooms that have the color blue?
If not, is there any way at all to change the roomcost on several rooms at once so that I wont have to change it one by one? |
|
_________________ |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Sep 26, 2004 6:37 pm |
Untested.
#LOOP %numrooms() {#IF (%roomcol( %mapvnum( %i)) = blue) {#CALL %roomcost( %mapvnum( %i), 1)}} |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
benny1564 Novice
Joined: 22 Jun 2004 Posts: 48
|
Posted: Sun Sep 26, 2004 6:55 pm |
And if the color isn't blue, if it is 173 in red, 216 in green and 230 in blue? This is where you make your own colors.
|
|
_________________ |
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Sun Sep 26, 2004 8:06 pm |
You should be able to put your map in edit mode, open up the room properties window, and <SHIFT>Click to select any rooms you'd like to change the value for, then when you change the value in the room properties window, all of the selected rooms should update. Note that this will cause a possible long delay as the database gets updated, so you should probably do this while offline. If this seems to hang your computer, just walk away from it for a little while, when you come back, it should be ready to go. Hope this helps.
|
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Mon Sep 27, 2004 4:22 am |
Quote: |
And if the color isn't blue, if it is 173 in red, 216 in green and 230 in blue? This is where you make your own colors. |
To find the color of a room (EASILY) do this, walk to a colored room and type
#SAY %roomcol()
You can then use that number in place of the word in lightbulbs script. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Sep 27, 2004 4:33 am |
I don't understand!
Quote: |
Is it somehow possible to change the roomcost to 1 in all rooms that have the color blue? |
Quote: |
And if the color isn't blue, if it is 173 in red, 216 in green and 230 in blue? |
To change the roomcost of all the rooms that have the color blue that aren't blue, use the following script:
#NOOP
Don't change the question and then pretend it wasn't answered!
Obviously, if the color is something other than 'blue' you should use whatever the color actually is. |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
benny1564 Novice
Joined: 22 Jun 2004 Posts: 48
|
Posted: Mon Sep 27, 2004 11:51 am |
mr kent wrote: |
You should be able to put your map in edit mode, open up the room properties window, and <SHIFT>Click to select any rooms you'd like to change the value for, then when you change the value in the room properties window, all of the selected rooms should update |
I have tried this, it does not work. It is only one room that gets updated.
LightBulb wrote: |
I don't understand! |
The color wasn't blue, it was a homemade color like blue and I did not know how to turn that into the format that zmud uses, forgive me great Zmud master!
Nexela wrote: |
To find the color of a room (EASILY) do this, walk to a colored room and type
#SAY %roomcol()
You can then use that number in place of the word in lightbulbs script. |
Thank you, nexela. |
|
_________________
Last edited by benny1564 on Mon Sep 27, 2004 2:40 pm; edited 5 times in total |
|
|
|
benny1564 Novice
Joined: 22 Jun 2004 Posts: 48
|
Posted: Mon Sep 27, 2004 2:21 pm |
How do I delete this one?
|
|
_________________ |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Sep 27, 2004 9:05 pm |
Sorry about the sarcasm.
Only moderators and above (gurus) can delete posts. If you want a post deleted, the most you can do is replace its text with a request that a moderator delete the post. |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
benny1564 Novice
Joined: 22 Jun 2004 Posts: 48
|
Posted: Thu Sep 30, 2004 7:07 pm |
Your script isn't working lightbulb :(
|
|
_________________ |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Thu Sep 30, 2004 8:03 pm |
Make sure you are in MAP mode also if you still can't get it to work try the script below
MapInfo.mode=%roommode
MapInfo.lock=%maplocked
#CALL %roommode(1)
#CALL %maplocked(0)
#FORALL %mapquery() {#IF (%roomcol( %i) = xxxxxxxx) {#CALL %roomcost( %i, 1)}}
#CALL %roommode(@MapInfo.mode)
#CALL %maplocked(@MapInfo.locked) |
|
|
|
benny1564 Novice
Joined: 22 Jun 2004 Posts: 48
|
Posted: Fri Oct 01, 2004 5:02 pm |
It did work, I wasn't in MAP mode.
|
|
_________________ |
|
|
|
|
|