Register forum user name Search FAQ

Gammon Forum

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 ➜ multiline trigger variables

multiline trigger variables

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Aznvt33   (18 posts)  Bio
Date Sun 03 Dec 2006 01:07 PM (UTC)
Message
I'm trying to modify Nick Gammon's health bar plugin to include an XP gauge in the info bar. I'm having a problem with the variables in the multiline trigger, however.

This is the trigger:
<trigger
enabled="y"
group="Multi Line"
lines_to_match="3"
keep_evaluating="y"
match="You are level (.*?) and (.*?)\% of the way to the next level\.\nHealth\: (.*?)\/(.*?) Mana\: (.*?)\/(.*?)\nEndurance\: (.*?)\/(.*?)

Willpower\: (.*?)\/(.*?)\Z"
multi_line="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>world.setvariable "HealthMax", %4
world.setvariable "ManaMax", %6
world.setvariable "EnduranceMax", %8
world.setvariable "WillpowerMax", %10
world.setvariable "TNL", %2</send>
</trigger>

The problem is that Willpower variable is supposed to be the 10th (last) wildcard in that multiline trigger, but instead of setting the 10th wildcard, it sets the 1st wildcard and puts a 0 at the end.

For example, instead of the Willpower variable being an integer, it picks up something like "61 (Impregnable)0" (the string in the first wildcard).

Any ideas?
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 03 Dec 2006 07:22 PM (UTC)
Message
You need:


world.setvariable "WillpowerMax", %<10>


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Aznvt33   (18 posts)  Bio
Date Reply #2 on Sun 03 Dec 2006 07:53 PM (UTC)
Message
I'm getting an error:

Line 116: Element name must start with letter or underscore, but starts with "1" (problem in this file)

Line 116 is: world.setvariable "WillpowerMax", %<10>
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #3 on Mon 04 Dec 2006 07:16 AM (UTC)
Message
Plugins are stored in XML, I was giving the "raw" code. You need to do this inside a plugin:



world.setvariable "WillpowerMax", %&lt;10&gt;


- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


12,484 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.