Boolen compare trigger?
Posted: Wed Oct 04, 2017 3:02 am
So I'm kind of a schlub when it comes to coding(I do some SQL stuff for work but outside of that, not too familiar with anything else, sadly).
What I'm trying to do is build an IF statement to look at a string in my score(Lifeforce: 100 / 100) and compare the first number to the second number and then initiate a trigger if the first number matches the second number.
I've got a super rudimentary set of triggers gimmicked up right now and a timer set for every minute or so to throw the Score command up and it sorta works, but it feels super inelegant and clunky and requires that the Lifeforce string stays the same(which it won't given I'm setting up triggers to stat train, which is completely allowable in this MUD).
Example here is that I've got it setup with multiple triggers to go north and sleep when it sees the string indicating I cannot train anymore, then the timer throws Score in there every minute until it sees Lifeforce [100 / 100] and then that will wake me up, move me south, and throw the command "gravtrain int 1000" until the process starts again, but this prevents me from training stats that would increase lifeforce.
I'm just kind of at a loss here and can't figure out exactly what to do. I feel like it should be possible given some of the reading but I'm not sure how to implement it. Would anyone be able to help me out?
What I'm trying to do is build an IF statement to look at a string in my score(Lifeforce: 100 / 100) and compare the first number to the second number and then initiate a trigger if the first number matches the second number.
I've got a super rudimentary set of triggers gimmicked up right now and a timer set for every minute or so to throw the Score command up and it sorta works, but it feels super inelegant and clunky and requires that the Lifeforce string stays the same(which it won't given I'm setting up triggers to stat train, which is completely allowable in this MUD).
Example here is that I've got it setup with multiple triggers to go north and sleep when it sees the string indicating I cannot train anymore, then the timer throws Score in there every minute until it sees Lifeforce [100 / 100] and then that will wake me up, move me south, and throw the command "gravtrain int 1000" until the process starts again, but this prevents me from training stats that would increase lifeforce.
I'm just kind of at a loss here and can't figure out exactly what to do. I feel like it should be possible given some of the reading but I'm not sure how to implement it. Would anyone be able to help me out?