Ok, I am trying to find a trigger that would match the following....
IS AC/10 (132.00t) 77
Now I have been unable to match that. The reason is that think of...
IS AC/10 (132.00t) 77 and
IS AC/2 (486.00t) 81
apearing right next to each other. I need a way to seperate the ammount of AC/10 (77) from AC/2 (81).
Anyone have any ideas?
Can you post your trigger that doesn't work? Find it in the list of triggers, click the "copy" button, and then paste it into a message here.
To be honest the only thing I have gotten to work is...
<triggers>
<trigger
enabled="y"
match="*IS AC/2 (*)*"
sequence="100"
other_text_colour="black"
other_back_colour="black"
>
<send>think %3</send>
</trigger>
</triggers>
The origional Triggered message was..
IS AC/2 (486.00t) 81
Now again the problem with this is if I have 2 side by side... IE
IS AC/2 (486.00t) 81 IS AC/10 (132.00t) 77
it matches
81 IS AC/10 (132.00t) 77
I guess I am just trying to figure out how to just match the number.
Click on "convert to regular expression" and then fiddle with it to make it match on a number. Something like this:
^.*IS AC/2 \(.*\) (\d+).*$
The \d+ bit means one or more digits. The final .* means zero or more anythings, which would catch the extra one on the end
Ok, Im still not getting it to work. I guess I should show you an example of a list I have. If you look at http://btech.virus2796.net/list.bmp youll see what I need to trigger. Now going off that example I am wanting to write a vbscript (once I get teh trigger to work) that will set variables for everything. Something like for example you see the line IS AC/10 (132.00t) <a lot of spaces> 77
I want to eventually save it in a variable called StoresISAC10 with the variable 77. The reason for this is sometimes the number changes, IE if I use some, or if I gain some. What I am looking to do is check a command that shows how much I have gained/lost in teh past 24 hours. Makeing any sense? Ok, so I have the script done, but it all starts with the trigger. I cant seem to get the trigger to run.
Now another problem I am having is we have parts called
'IS AC/10' and then its ammo 'ammo IS AC/10'. Now I need to make triggers for all the parts...blah blah. Any help would be very apreciated.
This is a start, it matches properly the first one:
<triggers>
<trigger
custom_colour="2"
enabled="y"
match="^.*?IS AC/(\d+) \(.*?\)\s+(\d+).*$"
regexp="y"
send_to="2"
sequence="100"
>
<send>%%1 = %1
%%2 = %2</send>
</trigger>
</triggers>
Your problem is your original post didn't show all the spaces. You need to put [code] and [/code] around parts of the forum posting that you need to preserve their original spacing.
The above will match on:
IS AC/2 (486.00t) 81
IS AC/2 (486.00t) 81 IS AC/10 (132.00t) 77