Another Stupid Trigger Question

Post Reply
Posts: 7
Joined: Mon Jul 06, 2015 11:21 am

Another Stupid Trigger Question

Post by gylippus »

I want my group leader to group say something, let's say "experience". I then want one of the chars in the group to 'type' score, find the number that equals experience to next level, and then group say that number back.

This is the line in the score that has the information:

Experience Needed for Remort: [whatever number in here, sometimes it will be negative]

I understand (\w+) captures a string and (\d+) captures a number and matches[2] through whatever stores those variables, but that is about it.

Posts: 1101
Joined: Wed Apr 03, 2013 2:19 am

Re: Another Stupid Trigger Question

Post by Jor'Mox »

So, the pattern you would use to match that line, as described, would be as follows: ^Experience Needed for Remort: (\-?\d+)
The ^ at the beginning is assuming that that is at the very beginning of the line, if it isn't, including blank spaces before the letters, then just remove the ^ portion.

As for how to make what you are talking about happen, you would need two triggers. The first would be to capture the text seen when the leader says "experience", which can be just a plain substring trigger, with the exact text you will be seeing. It enables the second trigger (via enableTrigger("Trigger Name Here, Exactly as Written") ), and then sends the appropriate command to view the score. The second trigger, with the pattern I gave above, would disable itself ( via disableTrigger("Trigger Name Here") ), and then sends the command to reply, perhaps something like this: send("say I need " .. matches[2] .. " experience.")

Post Reply