 |
trpstrife Novice
Joined: 26 Jul 2005 Posts: 34
|
Posted: Wed Jul 27, 2005 2:15 pm
help with variables |
In the world of Merentha, your max vitals are only displayed with certain commands. I'm trying to create variables for these maxes so my health stamina and mana gauge maxes will automaticly adjest themselves without me having to change it everytime the value is increased or decreased.
The line looks like this when your maxes are displayed.
| Code: |
| You say: I have 2098/2098 hp, 1011/1011 sp, 1400/1400 mp |
This is what my trigger looks like so far.
| Code: |
#TR {You say: I have (d)/(%d) hp, (d)/(%d) sp, (d)/(%d)mp } {
#VAR hpsmax %4
#VAR spmax %5
#VAR mpmax %6
} {} |
I'm useing 4 5 6 because 1 2 3 is used in another trigger to capture my current vitals for the guage from prompt. I'm not sure if this is the correct way to do it but it doesn't seem to work reguardless of what I change those to.
My problem is this. No matter what I do the variables simply contain a value of % and the number, instead of captureing a real number. Any assistance in this would be greatly appreciated. |
|
|
|
 |
Maelstrom Apprentice
Joined: 10 Feb 2005 Posts: 158
|
Posted: Wed Jul 27, 2005 2:33 pm |
(d) will look for a literal "d" in the trigger line so this trigger is (probably) never firing.
The %1, %2 etc are the matches from the trigger line which is in parenths. In your example above they would be spmax, the literal d, and mpmax...
Try this:
#TRIGGER {^You say: I have %d/(%d) hp, %d/(%d) sp, %d/(%d)mp} {
#VAR hpsmax %1
#VAR spmax %2
#VAR mpmax %3
} |
|
|
|
 |
trpstrife Novice
Joined: 26 Jul 2005 Posts: 34
|
Posted: Wed Jul 27, 2005 2:52 pm |
Ok thanks for the info. After trying your code it still wasn't working but after remove the ^ and realizeing there needed to be a space between the last (%d) and mp it fired right up. Thanks for all your help and thanks for teaching me a lil more about how to code.
|
|
|
|
 |
|
|
|