[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Trigger to Automatically wear eq
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Trigger to Automatically wear eq

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Pages: 1 2  

Posted by Keith   (21 posts)  [Biography] bio
Date Sun 10 May 2009 08:28 AM (UTC)  quote  ]
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?
[Go to top] top

Posted by LupusFatalis   (154 posts)  [Biography] bio
Date Reply #1 on Sun 10 May 2009 07:46 PM (UTC)  quote  ]
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.
[Go to top] top

Posted by Keith   (21 posts)  [Biography] bio
Date Reply #2 on Mon 11 May 2009 02:15 AM (UTC)  quote  ]
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.
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio   Moderator
Date Reply #3 on Mon 11 May 2009 02:47 AM (UTC)  quote  ]
Message
Use wildcards.
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=5089

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Keith   (21 posts)  [Biography] bio
Date Reply #4 on Mon 11 May 2009 03:03 AM (UTC)  quote  ]
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.
[Go to top] top

Posted by LupusFatalis   (154 posts)  [Biography] bio
Date Reply #5 on Mon 11 May 2009 04:18 AM (UTC)  quote  ]

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.
[Go to top] top

Posted by Keith   (21 posts)  [Biography] bio
Date Reply #6 on Mon 11 May 2009 04:56 AM (UTC)  quote  ]
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?
[Go to top] top

Posted by Cargo   Canada  (7 posts)  [Biography] bio
Date Reply #7 on Mon 11 May 2009 07:53 AM (UTC)  quote  ]
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}
[Go to top] top

Posted by Cargo   Canada  (7 posts)  [Biography] bio
Date Reply #8 on Mon 11 May 2009 07:55 AM (UTC)  quote  ]
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}
[Go to top] top

Posted by Keith   (21 posts)  [Biography] bio
Date Reply #9 on Mon 11 May 2009 07:56 AM (UTC)  quote  ]
Message
I play a MUD called Tempered Steel, its a Circle MUD.
[Go to top] top

Posted by Keith   (21 posts)  [Biography] bio
Date Reply #10 on Mon 11 May 2009 08:32 AM (UTC)  quote  ]
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.
[Go to top] top

Posted by LupusFatalis   (154 posts)  [Biography] bio
Date Reply #11 on Mon 11 May 2009 05:37 PM (UTC)  quote  ]
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.
[Go to top] top

Posted by Keith   (21 posts)  [Biography] bio
Date Reply #12 on Tue 12 May 2009 01:16 AM (UTC)  quote  ]
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
[Go to top] top

Posted by LupusFatalis   (154 posts)  [Biography] bio
Date Reply #13 on Tue 12 May 2009 05:20 PM (UTC)  quote  ]
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.
[Go to top] top

Posted by Keith   (21 posts)  [Biography] bio
Date Reply #14 on Wed 13 May 2009 06:30 AM (UTC)  quote  ]
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
[Go to top] 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.


9,455 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]