Ok, not sure if its intentional or not, but right now power sources are only draining while NOT in active combat. Me, I'm kinda lazy and generally forget to pull my power sources out when I go afk or am tweaking my UI or any number of stupid things I do.
I remember at one point someone asking about some plugin that manages power supplies and only leaves them equipped while in combat to extend the life. This sounded easy enough to me, so I wrote a VERY ugly and quick macro to do the same thing... sorta.
Anyway, there is is.
I do intend on improving this quite a bit, and I fully realize that its coded like complete crap. The point is, I play a melee character, and I solo alot, and this works extremely well for that. I put in a delay only so it didn't try to eat the CPU alive, not sure if its really needed or not.
Ideally, this works in a group and should work in a raid environment. I can just run it in the background and simply play as I normally would. I've run this as long as 3 hours without it going wrong.
Some bugs I do have so far, I carry two power sources of the same name, and it will continuosly swap them for some reason if thats the case. Not sure if thats noticable at all to any authority figure.
Is there a better way to detect if the player is in combat? The Me.Combat function only seems to return true if auto attack is on, not when something is agro on the character. If I could figure out a better way to detecting that, this would be more useful for pure casters that are unlikely to ever melee.
Right now, as is, this effectively drains a power source for a max of 2 seconds for every kill the player engages in, and should average 1 second. Since my drain rate is only 5 per second, this will retain my single power supply that I got for 10 orux for 200,000 total kills, roughly, if I kept this running all the time.
Thoughts?
I remember at one point someone asking about some plugin that manages power supplies and only leaves them equipped while in combat to extend the life. This sounded easy enough to me, so I wrote a VERY ugly and quick macro to do the same thing... sorta.
Anyway, there is is.
Rich (BB code):
|PowerManager.mac
|Author: Fenix
|(10-27-08) First version and attempt
|
|
| Ideally, this should swap out the power supply indicated in the variables into place only
|while actually in combat, to prevent the burnout of a power supply. As of right now in the game
|a power supply only drains while OUT of combat, so if this is used correctly it should make a single
|power supply last exponentially longer than it would if just left plugged in.
|This REQUIRES the use of the mq2exchange plugin.
#turbo
#Event InCombat "Auto attack is on."
#Event OutOfCombat "Auto attack is off."
#Event EXP "You gain experience#*#"
#Event EXP "You gain party experience#*#"
#Event EXP "You gain raid experience#*#"
Sub Main
|Edit this to reflect the name of the power supply you want to use, spelling is important
/declare PowerSupply string outer Translucent Energeian Elemental Orb
/declare incombat bool outer FALSE
:Start
/doevents
/call InstallPower
/delay 2s
/goto :Start
/return
Sub InstallPower
/if (${incombat}) {
/squelch /exchange "${PowerSupply}" powersource
}
/if (!${incombat}) {
/squelch /unequip powersource
}
/return
Sub Event_EXP
/if (${Me.Combat}) /varset incombat TRUE
/if (!${Me.Combat}) /varset incombat FALSE
/return
Sub Event_InCombat
/varset incombat TRUE
/return
Sub Event_OutOfCombat
/varset incombat FALSE
/return
I do intend on improving this quite a bit, and I fully realize that its coded like complete crap. The point is, I play a melee character, and I solo alot, and this works extremely well for that. I put in a delay only so it didn't try to eat the CPU alive, not sure if its really needed or not.
Ideally, this works in a group and should work in a raid environment. I can just run it in the background and simply play as I normally would. I've run this as long as 3 hours without it going wrong.
Some bugs I do have so far, I carry two power sources of the same name, and it will continuosly swap them for some reason if thats the case. Not sure if thats noticable at all to any authority figure.
Is there a better way to detect if the player is in combat? The Me.Combat function only seems to return true if auto attack is on, not when something is agro on the character. If I could figure out a better way to detecting that, this would be more useful for pure casters that are unlikely to ever melee.
Right now, as is, this effectively drains a power source for a max of 2 seconds for every kill the player engages in, and should average 1 second. Since my drain rate is only 5 per second, this will retain my single power supply that I got for 10 orux for 200,000 total kills, roughly, if I kept this running all the time.
Thoughts?

