Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, 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.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Trigger -> script throwing popup
Trigger -> script throwing popup
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Zook
(2 posts) Bio
|
Date
| Sat 23 Oct 2004 04:21 AM (UTC) |
Message
| Here's my RegEx:
((?:.*) (?:damaged) (.*) just broke(.*))
Here's my script:
function brokenItem(name, line, wildcardsVB) {
wildcards = VBArray(wildcardsVB).toArray();
world.Note("Broken " + wildcards[1] + " detected...");
world.Execute("drop " + wildcards[1]);
world.Execute("get " + wildcards[1] + " from backpack");
world.Execute("use " + wildcards[1]);
}
Now when I test (with string below) the process works. The commands are sent to the world, but only after I clear a message box with the following information
Quote:
Error: -2146827282
Event: Execution of line 1 column 11
Description:
Expected ')'
Line in error:
(Lopthiss your damaged spear just broke!)
[\quote] | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sat 23 Oct 2004 05:04 AM (UTC) |
Message
| I have tried that and it works without the error message.
What version of MUSHclient do you have, and what version of JScript? There is a JScript Version plugin on this page:
http://www.gammon.com.au/mushclient/plugins/
That will tell you your version of JScript. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Zook
(2 posts) Bio
|
Date
| Reply #2 on Sat 23 Oct 2004 02:58 PM (UTC) |
Message
| Well, I changed my approach and now it works. Instead of calling the function from an external JS file, I simply filled in the 'Send' box with the script and now it works fine.
FYI:
MUSHclient v3.50
Javascript Engine: v5.6 | 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.
11,837 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top