View Full Version : Addition in a script?

04-02-2008, 02:24 AM
I was just wondering if anyone knew a way to increment a variable number in stormfrom script? I have a hunting script, but i'd like to be able to track how many critters were killed with it each run.

The only way I was thinking of doing it would be to rewrite my script and use %counter, and make another variable for the room tracker, and assign the exact room number with a setvariable for each room..but that seems like it'd be a pain in the ass and i'd rather avoid it. any ideas?

04-02-2008, 03:02 AM
Use %counter as a temporary variable. Store the values in variables like %roomNumber and %totalKilled

COUNTER SET %roomNumber
SETVARIABLE roomNumber %counter

From now on when you write a script, you should always use counter this way and you'll easily be able to do arithmetic on any numeric value you have in a variable.

04-02-2008, 03:15 AM
only way I know how to do it...

04-02-2008, 04:01 AM
ah, great. I had basically copied the movement part of my script from some other one and didn't really think about that type of stuff til it was finished. thanks