|
karis Newbie
Joined: 11 Oct 2004 Posts: 3
|
Posted: Mon Oct 11, 2004 4:46 am
#math |
I am still a beginner when it comes to the more advanced aspects of #math and could really use some help.
I would like to set up something along the lines of
#action {You receive your reward for the kill, %1 experience points.}
#math {EXP} {$$EXP+$$1}
#alias {xyz} {gt I have received # of exp TOTAL this run} |
|
|
|
jessew Apprentice
Joined: 03 Mar 2003 Posts: 141
|
Posted: Mon Oct 11, 2004 5:41 am |
Not sure what the gt is in the xyz alias but ill pretend you want to display it to the screen.
Code: |
#TRIGGER {You recieve your reward for the kill, (%n) experience points.} {#math EXP {@EXP + %1}}
#ALIAS {xyz} {#SHOW I have recieved @EXP of esp total this run}
|
Cheers |
|
_________________ I love deadlines. I like the whooshing sound they make as they fly by. |
|
|
|
karis Newbie
Joined: 11 Oct 2004 Posts: 3
|
Posted: Mon Oct 11, 2004 6:21 am thanks |
I finally got it though.
It didn't like it very much when I was using %d.
#trigger {^You receive your reward for the kill, %1 experience points.} {#add %1 exp}
#alias {xp} {gt I've gained @exp experience points}
#var exp
#alias {rc} {#var exp 0;gt Exp counter reset}
Thanks. Looks like yours might work too. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Mon Oct 11, 2004 12:29 pm |
%1 in the pattern is undocumented for a reason.
%d will match 1234567
%n will match 124,567
%n will match -123,567 |
|
|
|
|
|