Defense echos

by Munsia

Back to Mechanic's Corner.

Munsia2005-12-17 10:33:30
How would I go about putting in a thing that would show echo's of the defences I was missing from a list of defences I already had up and a list of defences I should have?
Tias2005-12-19 09:46:02
Dunna what client you use so I'll just give you the basic idea of how I did it

Have a variable for each of your defenses. Then make an alias to def that will first set all those variables to 0 then turn on a group of triggers that will fire on the defense lines and set the variables to 1. Finally have a tirgger on 'You are protected by * defences.' that will show what list which variables didn't get set to 1.


Hopefully this explains things
Munsia2005-12-19 10:09:00
huh.gif I use zmud by the way
Unknown2005-12-19 21:23:39
In order to make the coding easier, I would actually create a string list variable that contained every defence you should have up. Set up a group of triggers like Tias was talking about which adds each def to a variable of current defences. On the the "you are protected by * defences" line, simply compare the variables and echo any defences that are in your "should have" variable and not in your "current def" variable.

I use this because it makes it very easy to set up an auto-def alias that simply scrolls through the list of defs you should have and executes each one. TIas' suggestion will work as will, I just find this approach easier to integrate into the rest of my system.