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
➜ VBscript
➜ Variables...
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Hoss
USA (48 posts) Bio
|
Date
| Wed 30 Mar 2005 01:32 AM (UTC) |
Message
| Alright I'm trying to match on:
Wood 8 gp 0 30 gp
so I created a trigger which is:
Wood * * gp * * gp
Which should then:
world.setvariable "woodprice", "%2"
But the problem is that my variable ends up getting:
8
Which I'm trying to do is match on the 8 but I don't want all the spaces... Any ideas?
Thanks
Hoss | Top |
|
Posted by
| Hoss
USA (48 posts) Bio
|
Date
| Reply #1 on Wed 30 Mar 2005 01:35 AM (UTC) |
Message
| Sorry aperently the spaces didn't show but in the line with:
Wood 8 gp 0 30 gp
There is 5+ spaces bewteen every part except the gp after the numbers..
Hope that helps
Hoss
| Top |
|
Posted by
| Hoss
USA (48 posts) Bio
|
Date
| Reply #2 on Wed 30 Mar 2005 01:38 AM (UTC) |
Message
| Sorry again but the Variable I get has a bunch of spaces before the 8
Thanks Again
Hoss | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #3 on Wed 30 Mar 2005 04:22 AM (UTC) Amended on Wed 30 Mar 2005 04:23 AM (UTC) by Flannel
|
Message
| You can use code tags [code] and [/code] to retain spacing. (And you can edit posts, instead of having to post a bunch of new ones). |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Hoss
USA (48 posts) Bio
|
Date
| Reply #4 on Wed 30 Mar 2005 04:29 AM (UTC) |
Message
| Hmm I must have missed that then... So how do you edit post?
Alright here's what I'm trying to match on:
so I have been using a trigger which was:
Wood * * gp * * * * gp
I was hoping that it would match the spacing and such... but it hasn't been any ideas on how to match that piece of code?
Hoss | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #5 on Wed 30 Mar 2005 04:38 AM (UTC) |
Message
| Use Regular expressions.
And to edit a post, log in and click the edit button on the post (next to delete, which is next to the time). You need to be logged in (which also means you don't have to enter your name/password each time you want to post). You log in in the upper right corner. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #6 on Wed 30 Mar 2005 04:40 AM (UTC) |
Message
| Oh yeah, and the trigger:
^Wood[ ]+(\d+) gp[ ]+(\d+)[ ]+(\d+) gp$
(remember to check the "regular expression" box)
should match (you might need to have a space infront of wood or behind the last gp.
This will make %1 the first number, %2 the second, and %3 the third. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Hoss
USA (48 posts) Bio
|
Date
| Reply #7 on Wed 30 Mar 2005 01:56 PM (UTC) |
Message
| Thank you Flannel! That's exactly what I needed THANK YOU!
Hoss | 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.
23,276 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top