Soandso2
Well-known member
- Joined
- Mar 13, 2023
- RedCents
- 937¢
Not so much because I need to, but because I want to, I decided to add a little snippet of code that equips a powersource when I enter combat and then removes it when combat ends. This works fine when I solo/molo, but as soon as I group, I end up with the powersource on my cursor more often than not, instead of either in the bag or equipped. I used the example from the macroquest manual. Also, I am aware that this code presumes that the powersource is stored in a fixed position in my bags. I know it can be done in a prettier way, but tihs is how it is for now.
When in combat (or rather, simply when autoattack is active) I run this:
and a similar, inverse one when combat (autoattack) ends.
a) is this the only/correct way to switch items between slots?
b) if it is, how come it works only half good?
When in combat (or rather, simply when autoattack is active) I run this:
Lua:
if not pSource then
mq.cmd("/itemnotify in pack10 32 leftmouseup")
mq.cmd("/itemnotify powersource leftmouseup")
pSource = true
end
and a similar, inverse one when combat (autoattack) ends.
a) is this the only/correct way to switch items between slots?
b) if it is, how come it works only half good?

