Moderator: MacroQuest Developers
Code: Select all
| VERSION 5.7:
|
| Just a small update this time (it's sure been a while, hasn't it?) This update adds
| trap negotiation skills to RH. It also finally provides a month-old bug fix to the
| loading and saving of target-switch states.
|
| . /autotraps - This command will toggle the automatic sensing/disarming of traps.
| If you sense a trap, it will automatically attempt to deactivate it. Be careful
| with this switch, as sensing a trap causes the EQ client to face you in the
| trap's direction. This can be hazardous when in combat! To mitigate this
| nasty side-effect, RH remembers the direction you faced prior to discovering
| a trap and will have you return to your previous facing position after disarming
| it (or at least attempting to disarm it).
|
Code: Select all
Sub Event_FTrap
/varset lastevent Event_FTrap
/echo ** Floor Trap discovered...
/if (${Me.AbilityReady[Disarm Traps]}) {
/echo ** Disarming...
/doability "Disarm Traps"
} else {
/echo ** Can't disarm yet...
}
|- Face our "old" heading, in case we were spun around
/face nolook fast heading ${oldheading}
/return
Code: Select all
Sub Event_FTrap
|- Face our "old" heading, in case we were spun around
/face nolook fast heading ${oldheading}
/varset lastevent Event_FTrap
/echo ** Floor Trap discovered...
/if (${Me.AbilityReady[Disarm Traps]}) {
/echo ** Disarming...
/doability "Disarm Traps"
} else {
/echo ** Can't disarm yet...
}
/return
Code: Select all
/declare lastTrap int outer 1Code: Select all
|- Are we supposed to look for traps?
/if (${doTraps}) {
/varset oldheading ${Me.Heading.DegreesCCW}
/if (${Me.AbilityReady["Sense Traps"]}) {
/if (${lastTrap}==${Spawn[trap radius 150].ID}) {
/if (${Me.AbilityReady[Disarm Traps]}) {
/echo Still near the same trap...
/echo ** Disarming...
/doability "Disarm Traps"
}
} else {
/doability "Sense Traps"
/echo Looking for traps...
}
}
}Code: Select all
Sub Event_FTrap
/varset lastevent Event_FTrap
/varset lastTrap ${Spawn[trap radius 150].ID}
/echo ** Floor Trap discovered...
/if (${Me.AbilityReady[Disarm Traps]}) {
/echo ** Disarming...
/doability "Disarm Traps"
} else {
/echo ** Can't disarm yet...
}
|- Face our "old" heading, in case we were spun around
/face nolook fast heading ${oldheading}
/return
Code: Select all
/varset lastTrap 1
Code: Select all
/if (${Me.AbilityReady["Disarm"]}) /doability "Disarm"To be honest, I have disarm bound to kick.. so I do both every time (whether the mob is equipped or not). If nothing else, I do it for skillups. You probably don't need to check.What I havn't seen, is if there is a way to detect if a mob HAS something in it's hand, and THEN try to disarm.. (for example, any way to tell if he is hitting for piercing/slashing/bashing damage, instead of.. um.. punching? damage.. or maybe there is an easier way..

Which ones are you talking about? For the code to not work it would have to despawn, then respawn with the same ID. When you disarm most traps, it's still there it's just inactive. I'd need an example of a disarmable trap that does this to test it. It would depend on how the EQ server determines if you've sensed a trap or not. If it does it by ID then it wouldn't matter, because the last trap you'd sensed would have been that ID. But like I said, those conditions above would have to be met to test it, so I need an example.What about floor traps that reset every 30 seconds or so (which they do).