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
➜ General
➜ Trigger to Automatically wear eq
Trigger to Automatically wear eq
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
Posted by
| Keith
(21 posts) Bio
|
Date
| Sun 10 May 2009 08:28 AM (UTC) |
Message
| I play a MUD that requires you to wear level eq in order to gain certain stats when you level, and i was wondering if there was a way to set a trigger to automatically wear my level eq when i reach a certain amount of exp.
This is what my prompt looks like:
<100% 100% 100% 3(0) 89%% ESWU>
The number with the 2 %% after it is my EXP and i would like to know how i would get it to set off after i hit about 98%%? is there a way to do it? | Top |
|
Posted by
| LupusFatalis
(154 posts) Bio
|
Date
| Reply #1 on Sun 10 May 2009 07:46 PM (UTC) |
Message
| Its definitely possible.
I would trigger:
<100% 100% 100% 3(0) 89%% ESWU>
And send it to a script that checks to see if the experience is >= 98%. Have a boolean variable LevelEQ. If that variable is also false have the script wear whatever it is. If the variable is true, do nothing.
Also trigger your level message. Whenever you level reset the variable, and wear your normal equipment.
Pretty simple. | Top |
|
Posted by
| Keith
(21 posts) Bio
|
Date
| Reply #2 on Mon 11 May 2009 02:15 AM (UTC) |
Message
| but all my other numbers aren't always at 100% when i level they are always at different numbers, thats why i cant seem to get it to work because my hp could be at 80% or my mana could be low to. | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #3 on Mon 11 May 2009 02:47 AM (UTC) |
Message
| |
Posted by
| Keith
(21 posts) Bio
|
Date
| Reply #4 on Mon 11 May 2009 03:03 AM (UTC) |
Message
| Im not really familiar with wildcards so i dont know how i would set them up, i read about them but it just seems kind of confusing to me. | Top |
|
Posted by
| LupusFatalis
(154 posts) Bio
|
Date
| Reply #5 on Mon 11 May 2009 04:18 AM (UTC) Amended on Mon 11 May 2009 04:22 AM (UTC) by LupusFatalis
|
Message
| You will want to trigger something like this...
^\<(\d+)\% (\d+)\% (\d+)\% (\d+)\((\d+)\) (\d+)\%\% ESWU\> $
\d means its capturing a digit
+ means your going to capture 1 or more of the previous type
\ is the escape character meaning those strange characters shouldn't be read as regular expression symbols, etc...
Then you'll want to script in some language
check to see if you already changed equipment.
if not, check to see if the 6th wildcard is greater than or equal to 98, remove your current equipment. Wear the other equipment. Store whether or not this has been done in a variable.
then you'll want a similar trigger for whatever the leveling line is... to just remove your leveling equipment and put the other equipment back on. and change the variable that showing what set of equipment you have on to its pre 98% state. | Top |
|
Posted by
| Keith
(21 posts) Bio
|
Date
| Reply #6 on Mon 11 May 2009 04:56 AM (UTC) |
Message
| Ok, thank you very much, and since the EWSU is the exits and they are not always the same would i just put in [A-Z]? for that? | Top |
|
Posted by
| Cargo
Canada (7 posts) Bio
|
Date
| Reply #7 on Mon 11 May 2009 07:53 AM (UTC) |
Message
| if this is your prompt:
<100% 100% 100% 3(0) 89%% ESWU>
make it trigger on:
<*% *% *% *(0) *%% ESWU>
and start a script
if %5 <= 98% remove_normal_eq, wear_leveling_eq
(replace: remove_normal_eq and wear_leveling_eq with the commands)
{CARGO} | Top |
|
Posted by
| Cargo
Canada (7 posts) Bio
|
Date
| Reply #8 on Mon 11 May 2009 07:55 AM (UTC) |
Message
| oh, if the ESUW is exits and is constantly changing then use a single wild card (*), also I'm just curious but what mud do you play?
{CARGO}
| Top |
|
Posted by
| Keith
(21 posts) Bio
|
Date
| Reply #9 on Mon 11 May 2009 07:56 AM (UTC) |
Message
| I play a MUD called Tempered Steel, its a Circle MUD. | Top |
|
Posted by
| Keith
(21 posts) Bio
|
Date
| Reply #10 on Mon 11 May 2009 08:32 AM (UTC) |
Message
| I think i got the trigger down now, but is there a way to only get it to fire once so i dont keep getting spammed when i reach 98%% exp because it just keeps firing once everytime it comes up. | Top |
|
Posted by
| LupusFatalis
(154 posts) Bio
|
Date
| Reply #11 on Mon 11 May 2009 05:37 PM (UTC) |
Message
| if the exits are always displayed as letters you can do what you mentioned or use ([A-Z]*) or ([A-Z]+) if a room must have at least one exit.
Beyond that...
The trigger conditions will be recognized every time. Which is why I suggested using an if statement in some scripting language. Along with a variable to tell you if the trigger has already fired or not. That is, the trigger still catches the statement and fires, its just that the effects of it firing are different: only if it hasn't already changed your equipment will it send those commands to the mud.
Maybe there is another way, but that is how I would do it. | Top |
|
Posted by
| Keith
(21 posts) Bio
|
Date
| Reply #12 on Tue 12 May 2009 01:16 AM (UTC) |
Message
| Im not really sure how to use scripts and variables though since im really new to all of it when i try to do it i just get confused | Top |
|
Posted by
| LupusFatalis
(154 posts) Bio
|
Date
| Reply #13 on Tue 12 May 2009 05:20 PM (UTC) |
Message
| download activestate python, get me the text that says you leveled, and when I get a few minutes free I'll see if I can't write you a quick plugin to do the trick. | Top |
|
Posted by
| Keith
(21 posts) Bio
|
Date
| Reply #14 on Wed 13 May 2009 06:30 AM (UTC) |
Message
| When i level it says this:
You gained some hit points.
All of a sudden, you hear trumpets and before you know it, there is a feast
honoring you for your accomplishments! You learn that you have risen a level!
You are now level 80! Congratulations!
Thats what it says after i reach a level | 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.
70,625 views.
This is page 1, subject is 2 pages long: 1 2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top