|
Loto Apprentice
Joined: 05 May 2003 Posts: 194
|
Posted: Tue Dec 23, 2003 4:06 am
Subtracting with triggers... |
I have this:
#CLASS {reset}
#ALIAS treset {T=0}
#VAR Ttreset {0}
#TRIGGER {You get A gold quest piece from the crushed corpse} {#COLOR gold;#add T 1}
#STAT {Treasure: @T}
#CLASS 0
I need to add one more trigger to make it when it says "You sell A gold quest piece to Edward for (random number)" it subtracts 1 from T.
I don't know if it's possible to make it subtract. Also, on the statbar instead of saying "Treasure: (variable)" it says "Treasure: (variable) Treasure: (variable)" |
|
|
|
musishun00 Wanderer
Joined: 16 Dec 2003 Posts: 77 Location: USA
|
Posted: Tue Dec 23, 2003 5:58 am |
You can use the #ADD command to subtract. I just recently had a similar problem where I needed to subtract exp that I was using for something. Modifying it to your situation, it would look something like this:
#CLASS {reset}
#ALIAS treset {T=0}
#VAR Ttreset {0}
#TRIGGER {You get A gold quest piece from the crushed corpse} {#COLOR gold;#ADD T 1}
#TRIGGER {You sell A gold quest piece to} {#COLOR gold;#ADD T -1}
#STAT {Treasure: @T}
#CLASS 0
As far as having the status bar there twice, just look somewhere outside the class folder and see if there's another status effect that's causing it to show up twice. I've had so many triggers duplicate things, I know it gets hazy pretty often. Hope this works for you. |
|
|
|
SolReapr Beginner
Joined: 03 Sep 2003 Posts: 13 Location: USA
|
Posted: Tue Dec 23, 2003 5:59 am |
1. #ADD T -1
From the help file: To subtract a value, use a negative amount.
2. You may have a duplicate #STAT {Treasure: @T} command in another class |
|
|
|
musishun00 Wanderer
Joined: 16 Dec 2003 Posts: 77 Location: USA
|
Posted: Tue Dec 23, 2003 6:01 am |
Wow... we responded 8 seconds apart from each other, SolReapr.... that's crazy. *boggle*
|
|
|
|
Loto Apprentice
Joined: 05 May 2003 Posts: 194
|
Posted: Tue Dec 23, 2003 6:04 am |
I checked... I don't have a different class folder or a trigger for it... but thanks for the T -1 Sol and Mushi
|
|
|
|
SolReapr Beginner
Joined: 03 Sep 2003 Posts: 13 Location: USA
|
Posted: Tue Dec 23, 2003 6:46 am |
If you click on Menu:Show|Status Bars, then the 'All Classes' button it will show you all of the Stats Bars you have. If it isn't a duplicate status bar then i'm not sure what's causing that to appear.
|
|
|
|
Loto Apprentice
Joined: 05 May 2003 Posts: 194
|
Posted: Tue Dec 23, 2003 6:58 am |
Thanks! I don't know how it got there, but I had a status thingy not in a class folder. Thankee kindly, good sir! :D
|
|
|
|
|
|