Moderator: MacroQuest Developers
Code: Select all
[color=cyan]
| VERSION 5.0:
|
| This version introduces a few tweaks to add to RH's stability as well as adding
| several new features, hence the major version number increment.
|
| . Moved body of code responsible for engaging a target and circle-strafing
| around it to the beginning of the state-checking loop (ForeverLoop). This
| should increase the fluidness of target engagement, as well as make circle-
| strafing a little faster.
|
| . Added a special "aggro timer" that will detect if you're getting hit and
| reset a timer to 5 seconds. For those 5 seconds, RH will assume the
| rogue is tanking (or has the potential to tank again) and will prevent it
| from circle strafing toward the target's rear as well as chaotic stab.
| This method of rogue-self-tanking detection has augmented the use of
| TargetOfTarget since not everyone has the AA skill. Keep in mind if you
| have filtered out combat messages involving the rogue (hits you), then
| this feature won't work.
|
| . Created a Check_Behind subroutine containing the method used in the
| existing circle-strafe code to generically check to see if the rogue is
| behind the target. This subroutine is now used in ALL circumstances where
| a behind-check is warrented (including backstabbing and striking). It's
| a much more reliable way of checking orientation, if a tad slower).
|
| . Added some code to ItemClick event to check for summoned items. If an
| swaped in keepup /iclick results in a summoned item, it's autoinventoried
| and the rest of the item click resumes normally. It doesn't check for a
| full inventory here, so please don't test my error handling--this was bad
| enough as is.
|
| . Added a full-inventory check just prior to looting an item when using
| autoninja. It's a bit crude, but if you are out of inventory slots, it
| will stop looting and turn autoninja OFF. It doesn't consider stackable
| loot that would/could have stacked if it were looted, nor does it take
| into account a large lootable item not fitting into a small slot, so try
| to be somewhat aware of your bag situation, particularly if you use some
| shitty containers (like a wrist pouch).
|
| . Added a state-check prior to hiding or sneaking while not fighting to make
| sure you're not dealing with a banker, merchant, looting, or trading
| (no more spam).
|
| . /autofollow [<name>] [<distance>] command added. This command will activate
| autofollowing, which will stay active until your target changes (to nothing,
| yourself, or anything else). While autofollow is engaged, RH will NOT
| DO ANYTHING ELSE, including fighting, looting, etc. but does queue events.
| . <name> is an optional parameter for a player or NPC name. Did I
| mention /autofollow doesn't care if it's a groupmember or even a player?
| If this parameter isn't supplied, you will autofollow your target.
| . <distance> is an optional parameter indicating how long a "leash" is
| allowed between you and your follow target. Anything less than 10 will
| be set to 10 (which is practically on top of your target). If this
| parameter isn't supplied, RH defaults to whatever is in the INI file
| or 30, if not yet in the INI file.
|
| . /autopick command added. This command will toggle your rogue's automatic
| execution of a pick pocket attempt during combat. If you get an item, it
| will be automatically inventoried. Full inventories will probably spill
| picked items onto the floor, so make sure you have some bag space!
|
| . /weaponswitch <weapon1> <"Trigger text to swap to second weapon"> <weapon2>
| command added. This rather elaborate command allows you to set a starting
| weapon (weapon1), some text to look for to trigger swapping out that weapon
| for a second weapon, and the name of the second weapon. After any death
| message/exp gain message is received, weapon1 is re-equiped. The weapons
| can be in a bag or on your person (doesn't matter), weaponswitch will figure
| out how to deal with it. Invalid or empty parameters will turn off any
| weaponswitching. Be sure to use "" around multiword weapons and your trigger
| text!
| . Examples:
| /weaponswitch Locustlure "yawns." "The Horn of Hsagra"
| /weaponswitch "Dart of Immobility" "screams as poison" "Ifir, Dagger of Fire"
| /weaponswitch OFF
|
| . Remote control with authentication has been added. You can now set up to
| 20 players (masters) that can send tells to the rogue using RH and have the
| rogue do whatever action was in the tell. The first character of the tell
| must be a "/" or the tell won't be processed as a potential command. Any
| tells from non-masters are simply ignored as normal tells. Be careful what
| you tell the rogue! "/tell johnnybackstabber /quit" will make you deadlink,
| assuming the tell came from an authenticated master. The list of masters is
| stored in the RHSettings.ini file. Authenticated users will get a tell-back
| verifying that the command was received and echo-back the command.
| . /addmaster <name> - Adds a player to the master controller list
| . /remmaster <name> - Removes a player from the master controller list
| . Examples: /addmaster MyOthercharacter
| /tell Myrogue /pause
| /tell Myrogue /camp
| /tell Myrogue /multiline ; /target somenpc ; /attack on
| /tell Myrogue /addmaster myfriend
|
[/color]Code: Select all
|- Do weapon swapping (back to weapon1), if applicable
/if (${doSwitch}) {
|- Is it in a Bag?
/echo ** Looking for weapon1: ${weapon1}
/if (${FindItem[${weapon1}].InvSlot.Pack}) {
:OpenPack
/if (!${Window[${FindItem[${weapon1}].InvSlot.Pack.Name}].Open}) {
/itemnotify ${FindItem[${weapon1}].InvSlot.Pack.Name} rightmouseup
/delay 2
/goto :OpenPack
}
/declare camefrom ${FindItem[${weapon1}].InvSlot}
:GrabItem
/if (!${Cursor.ID}) {
/itemnotify ${InvSlot[${camefrom}]} leftmouseup
/delay 2
/goto :GrabItem
}
/declare weaponID int local ${Cursor.ID}
:SwapIt
/if (${Cursor.ID}==${weaponID}) {
/itemnotify ${InvSlot[mainhand]} leftmouseup
/delay 2
/goto :SwapIt
}
/delay 2
/echo ** Dropping other weapon in inventory
/autoinv
:ClosePack
/if (${Window[${InvSlot[${camefrom}].Pack.Name}].Open}) {
/itemnotify ${InvSlot[${camefrom}].Pack.Name} rightmouseup
/delay 2
/goto :ClosePack
}
} else {
|- It's in the main inventory
/if (${FindItem[${weapon1}].InvSlot}) {
/itemnotify ${FindItem[${weapon1}].InvSlot} leftmouseup
/delay 2
/itemnotify ${InvSlot[mainhand]} leftmouseup
/delay 2
/echo ** Dropping other weapon in inventory
/autoinv
} else {
/echo ** "${weapon1}" not found!
}
}
Code: Select all
Sub Event_AutoHeal(string Line)
/declare InvState
/declare breastplate
/varset breastplate "Mrylokar's Breastplate"
/echo "Auto Heal"
|Open the inventory window if not already open.
/if (${Window[InventoryWindow].Open}) {
/varset InvState 0
} else {
/keypress inventory
/varset InvState -1
}
/delay 1
/itemnotify ${FindItem[${breastplate}].InvSlot} leftmouseup
/delay 1
/itemnotify "chest" leftmouseup
/delay 1
:Loop
/cast item "Mrylokar's Breastplate"
/if (${Me.PctHPs}==100) /goto :bp
/if (${Target.ID}) /goto :loop
:bp
/delay 80
/itemnotify "chest" leftmouseup
/delay 2
/autoinv
/keypress i
/return