Hey! Very cool code.
I've also noticed that genbot drags down the framerate when running. What suggestions do you have for improving framerate, or how did you improve it with RH?
--Vexix
Moderator: MacroQuest Developers
Code: Select all
Sub Event_DragBodies(string Line)
/declare ArgNum int local 3
/declare bodycount int local
[color=yellow]:ForceHideSneak
/if (${Me.AbilityReady["Sneak"]} && !${Me.Casting.ID} && ${Me.State.NotEqual[BIND]} && !${Window[TradeWnd].Open} && !${Window[MerchantWnd].Open} && !${Window[BigBankWnd].Open}) /doability "Sneak"
/if (${Me.AbilityReady["Hide"]} && !${Me.Casting.ID} && !${Me.Moving} && ${Me.State.NotEqual[BIND]} && !${Window[TradeWnd].Open} && !${Window[MerchantWnd].Open} && !${Window[BigBankWnd].Open}) /doability "Hide"
/if (!${Me.Sneaking} || !${Me.Invis}) /goto :ForceHideSneak[/color]
:CountCorpses
/if (${Line.Arg[${ArgNum}].Length}) {
|- There's a body name for this argument
/varcalc ArgNum ${ArgNum}+1
/goto :CountCorpses
}
/varcalc ArgNum ${ArgNum}-1
/if (${ArgNum}==2) {
/echo ** No corpse names supplied!
/return
} else {
/echo ** Target self (F1) to stop dragging!
}
:DragLoop
/for bodycount 3 to ${ArgNum}
/if (${Target.CleanName.Equal[${Me.Name}]}) {
/echo ** Body dragging ceased.
/goto :CeaseDragging
}
/target ${Line.Arg[${bodycount}]}'s
/corpse
|- Lower this delay at your own risk; too many /corpse commands too fast = cheater!
/delay 4
/next bodycount
/goto :DragLoop
:CeaseDragging
/return
Code: Select all
[color=cyan]
| VERSION 5.2:
|
| This version introduced a new command as well as some enhancements for the new weapon-
| switch command. Also some a couple of bug removals and tweaks were done.
|
| . /targetswitch command added. This command toggles your settings for automatic
| switching of targets to follow the main assist's target while in autoassist mode.
| Prior to this setting, if you were using autoassist and the current assist tank
| switched targets, you would switch to their new target as well, and engage it
| if it's health was below your set assist health threshold. If targetswitch is
| FALSE, you will fight the first target the main assist chose until it is dead
| or you are. When this first target is dead, you will then resume assisting the
| main assist again on subsequent targets. Default is TRUE (meaning, switch to
| the main assist's target, always, even if the other one isn't dead yet). Use
| this switch command if you have rapid pulls and you're expected to "finish off"
| the old target while the main assist pulls a new one (or engages a new one in a
| raid).
|
| . Created a subroutine to handle generic weapon swapping. This sub is used by
| weaponswitch code to swap out a specified weapon with a specified slot.
|
| . Fixed a bug that prevented weaponswitching state to save to the INI file when
| turning weaponswitching off.
|
| . Weaponswitching has been vastly enhanced. It is no longer primary-hand dependent
| (bag to primary, bag to secondary, primary to secondary, secondary to primary
| will all work). Also, RH will interrogate the first weapon and determine if its
| spell effect is a proc-buff to the wielder or if it's a detrimental debuff to a
| combat target. If it's a debuff, it'll swap out weapons at the end of a fight.
| If it's a buff, it'll monitor your buffs and swap it back in if the buff drops.
| Command syntax for /weaponswitch has not changed. An example use of a buff-type
| proc weapon is below. For this example, it would be assumed you wanted to wield
| your Primal weapon until it procs avatar, and then have it swap out for Ifir. If
| the Avatar buff dropped at any time, the Primal weapon would be re-equiped,
| swapping out Ifir (starting the process over again).
| . Example:
| /weaponswitch "Primal Velium Spear" "Your body screams" "Ifir, Dagger of Fire"
|
| . Enhanced enrage detection by looking for your specific target becoming enraged
| instead of looking for anything enraging. This eliminates the "false positives"
| of enraging pets or other NPCs that you're not actively fighting.
|
[/color]
Code: Select all
|- Check on switching weapons (assuming it's a buff-weapon and buff is down)
/if (${doSwitch} && ${wstype.Equal[Beneficial]}) {
/varset itemspellname ${FindItem[${weapon1}].Spell}
/if [color=yellow]((${itemspellname.NotEqual[${Me.Buff[${itemspellname}]}]} || (${itemspellname.Equal[${Me.Buff[${itemspellname}]}]} && ${Me.Buff[${itemspellname}].Duration.TotalSeconds}<60)) && !${FindItem[${weapon1}].InvSlot.Name.Equal[mainhand]} && !${FindItem[${weapon1}].InvSlot.Name.Equal[offhand]}) [/color]{
/echo ** Beneficial proc-weapon swapping...
/call Weapon_Swap "${weapon1}" "${weapon2}"
}
}


If I remember correctly it spams that you have no target and have attack on. You can filter it but I used the no target as an attack off option in most of my rogue macros for this reason. That and it made sence to not attack when you don't have a target :P.Jerle69 wrote:Programmer:
Really? Hitting escape while fighting causes RH to spam? If so, I must never have actually done this--I'll try that tonight and see what happens. You said you may have attacked something you shouldn't on a raid. Is that due to not targeting the right thing and manually assisting, or did you discover RH doing something strange while autoassisting?
Thanks,