Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ MUSHclient
➜ Jscript
➜ Notes
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Shaun Biggs
USA (644 posts) Bio
|
Date
| Wed 08 Aug 2007 08:18 PM (UTC) Amended on Wed 08 Aug 2007 08:19 PM (UTC) by Shaun Biggs
|
Message
| |
Posted by
| Nick Gammon
Australia (23,052 posts) Bio
Forum Administrator |
Date
| Reply #1 on Wed 08 Aug 2007 10:48 PM (UTC) |
Message
| What is the name of your other world? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #2 on Thu 09 Aug 2007 03:22 AM (UTC) |
Message
| When you used the GetWorld command, did you make sure to change the name correctly to "tempolar ruin", or whatever is exactly in the world name? |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Shaun Biggs
USA (644 posts) Bio
|
Date
| Reply #3 on Thu 09 Aug 2007 05:51 AM (UTC) Amended on Thu 09 Aug 2007 05:54 AM (UTC) by Shaun Biggs
|
Message
| Try double checking the world names. If there's an error somehow, just grab the unique world id and use GetWorldById instead. Here's what you should run to get the list. It hasn't been tested, it's just a quick translation of a lua script I have.
worldlist = new VBArray(world.GetWorldIdList()).toArray();
for (i = 0; i < worldlist.length; i++)
Note(worldlist[i] + " " + GetWorldById(worldlist[i]).GetInfo(2));
[edit] : stupid forum codes eating array access. |
It is much easier to fight for one's ideals than to live up to them. | Top |
|
Posted by
| Nick Gammon
Australia (23,052 posts) Bio
Forum Administrator |
Date
| Reply #4 on Thu 09 Aug 2007 05:52 AM (UTC) |
Message
| There are two names here - the file name, and the world name. The file name (which I gather is "tempolar ruin.mcl") is the name the world is save to disk as.
The world name, which appears in the title of the world window, is not necessarily the same. If you do this:
/ world.Note (world.GetInfo (2))
Does it print, exactly, "tempolar ruin"?
If it does, then Shaun's example should now read:
noteworld = GetWorld( "tempolar ruin" )
if ( noteworld != null ) {
noteworld.Note( "This will display in world 1." )
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Shaun Biggs
USA (644 posts) Bio
|
Date
| Reply #5 on Thu 09 Aug 2007 07:55 PM (UTC) |
Message
| noteworld.ColourNote( "blue", "black", "This is blue with a black background")
Take a quick scan through this page: http://www.gammon.com.au/scripts/function.php Nick has made a LOT of functions that are quite self explanatory (and a few that are obscure). There are also great examples in each language for every scripting function listed on that page.
There is even a "see also" section after the description of the functions. ColourNote is the first other function listed in the page for Note. |
It is much easier to fight for one's ideals than to live up to them. | Top |
|
Posted by
| Nick Gammon
Australia (23,052 posts) Bio
Forum Administrator |
Date
| Reply #6 on Thu 09 Aug 2007 10:04 PM (UTC) |
Message
|
Quote:
how would i change its color? i tried
world.notecolour = 4;
and i tried (not that i read it existing)
notecolour.world = 4;
You need to get your spelling right. Your other world was "noteworld", so you might have got further with:
noteworld.notecolour = 4;
In this case "noteworld" is the world you want to do the action to, and "notecolour" is the attribute to change.
However, using ColourNote is a better idea. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Shaun Biggs
USA (644 posts) Bio
|
Date
| Reply #7 on Thu 09 Aug 2007 10:09 PM (UTC) |
Message
| The see also section is wonderful. I've spent a lot of time flipping through various functions with that section. Just try poking that bit a little more frequently. Searching the forums helps out quite a bit though, especially the faq. If all else fails, as you've seen, posting a question usually gets answered within a day. |
It is much easier to fight for one's ideals than to live up to them. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
22,250 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top