|
Detreax Newbie
Joined: 18 Jul 2003 Posts: 3
|
Posted: Sun Jul 20, 2003 5:59 am
Need help with this trigger/variable |
Okay here is my problem. I want to store into variables the max hit points, max mana, and max movement from the following string:
You have 298(298) hit, 544(544) mana and 192(192) movement points.
Here is what i did. the problem is that it only captures the end parathesis for each. I attempted to stick the max values in brackets but that didn't work at all then. here is what i attempted. Please tell me how i can fix it.
#TRIGGER {You have %1(%2) hit, %3(%4) mana and %5(%6) movement points.} {#VARIABLE maxhp %2;#VARIABLE maxmp %4;#VARIABlE maxmv %6
any help would be helpful.
THnxs,
Detreax |
|
|
|
Detreax Newbie
Joined: 18 Jul 2003 Posts: 3
|
Posted: Sun Jul 20, 2003 6:47 am |
Figured it out. all i had to do was do this:
#TRIGGER {You have %d~(%2~) hit, %d~(%4~) mana and %d(~%6~) movement points.} {#VARIABLE maxhp %2;#VARIABLE maxmp %4;#VARIABLE maxmv %6} |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Jul 20, 2003 2:50 pm |
It's surprising that you found out about %d but only used it for half the values.
#TR {You have %d~((%d)~) hit, %d~((%d)~) mana and %d~((%d)~) movement points.} {#VAR maxhp %1;#VAR maxmp %2;#VAR maxmv %3} |
|
|
|
Detreax Newbie
Joined: 18 Jul 2003 Posts: 3
|
Posted: Mon Jul 21, 2003 4:23 am |
I didn't use the %d just to keep it straight to me. I already knew about it. I'm used to zmud 4.x so getting use to 6.62 is taking a little bit.
|
|
|
|
|
|