Easy Backstab Script by oakman8490
Description from the author:
#~# [KoU] - Oak's Easy Backstab Script #~#
#Pre-Requisites for script to work correctly#
## Cooldown "WeaponAbility" set up in UO. The only trigger it needs is for sysmsg: "Weapon ability ready." to 0 ##
## Dress Agent named "Burst" where you add the type of weapon you use. This will prevent "wrestling" the mob if you forget to equip weapon." ##
## Organizer Agent 20 for moving gold & black goods (and anything else you want to add) to the bag you want them. ##
## forceTracking will turn on tracking (if you have skill) and stop the script after, if tracking is not on ##
#Overhead Messages#
## "Waiting for Stealth" - You will unhide if you move, attacks will not be Backstabs ##
## "Move into place" - You may move using your stealth steps. You can attack by going into War Mode, but you will not be able to immediately hide after ##
## "Warmode to Attack" - You may move using your stealth steps, go into War Mode to attack, and you will be able to immediately re-hide after Backstab when you hit the hotkey. ##
clearsysmsg
clearall
@setvar! autoSkinning 1
@setvar! showCodexHotbar 1
@setvar! forceTracking 1
if not timerexists "TargetTimer"
createtimer "TargetTimer"
settimer TargetTimer 10000
endif
if skill "Tracking" > 0 and forceTracking = 1
if not findbuff "tracking"
overhead "i should track.."
while cooldown "Skill" != 0
wait 100
endwhile
while not gumpexists 4267467659
useskill "tracking"
wait 250
endwhile
if gumpexists 4267467659
while not insysmsg "You will now hunt all hostile players."
gumpresponse 8 4267467659
waitforgump 4267467659 5000
endwhile
gumpresponse 6 4267467659
wait 1000
clearsysmsg
endif
gumpclose 4267467659
stop
endif
endif
while not hidden
## Applying Bandages if damaged or poisoned ##
if diffhits > 0 or poisoned
if not bandaging and skill "Healing" > 10
if findtype "clean bandage%s%" self
hotkey "Bandage Self"
wait 200
else
overhead "No Bandages"
endif
endif
endif
## Taking Heal Potion if low health ##
if diffhits > 40
if findtype "Yellow Potion" self
hotkey "Drink Heal"
wait 1000
else
overhead "No Heal Pots"
endif
endif
## Hiding ##
warmode "off"
useskill "hiding"
wait 400
## Smoke Bomb if Hide didn't work ##
if not hidden
if findtype 52149 backpack 2876
say "[SmokeBomb"
wait 600
if hidden
sysmsg "You feel comfortable enough to begin stealthing."
endif
endif
endif
## Use Magery to Invis if Hiding & Smoke Bomb Failed (if able) ##
if not hidden
if skill "Magery" >= 80
while not targetexists beneficial
cast "Invisibility"
wait 50
endwhile
while targetexists
hotkey "target self"
endwhile
endif
wait 1000
if hidden
wait 9000
overhead "Hiding"
skill "Hiding"
wait 200
endif
endif
## If you still aren't Hidden, you need to break line of sight and try again ##
if not hidden
overhead "Run for it!!! - Break Line of Sight and try again." 33
stop
endif
endwhile
if hidden
organizer 20
while queued
wait 100
endwhile
if findtype 30765 self as WizSatchel
menu WizSatchel 0
endif
if mounted
hotkey "Dismount"
endif
if showCodexHotbar = 1 and not gumpexists 2016719803
say "[codexhotbar"
endif
endif
while hidden
## waiting for initial Stealth Timer ##
while not insysmsg "You feel comfortable enough to begin stealthing."
if not timerexists "StealthTimer"
createtimer "StealthTimer"
settimer "StealthTimer" 4000
endif
if timer "StealthTimer" > 4000
overhead "Waiting for Stealth" 33
settimer "StealthTimer" 0
endif
wait 100
endwhile
## Starting Re-Stealth Timer ##
wait 400
hotkey "Stealth"
clearsysmsg
## You will need need to set up a Dress Agent to equip your Weapon. This is to ensure we don't accidentally Wrestle the target ##
hotkey "Dress: Burst"
@setvar! StealthReady 0
while not warmode
wait 100
## Go into War Mode to auto-select target ##
if not timerexists "AttackTimer"
createtimer "AttackTimer"
settimer "AttackTimer" 5000
endif
if timer AttackTimer > 5000
if StealthReady = 0
overhead "Move into place" 253
settimer AttackTimer 0
elseif StealthReady = 1
overhead "Warmode to attack" 167
settimer AttackTimer 0
endif
endif
if insysmsg "You begin to move quietly."
@setvar! StealthReady 0
elseif insysmsg "You will automatically stealth when out of steps."
@setvar! StealthReady 1
endif
endwhile
if warmode
break
endif
endwhile
while hidden
if warmode
if not targetexists
hotkey "Target Closest Grey Monster" as MyTarget
endif
## Auto-Attack target when in range. This is defaulted for Mugging, but Ranged can change the distance manually ##
while find lasttarget ground any
if find lasttarget ground -1 -1 1
if findbuff "Stationary Penalty"
overhead "Stationary Penalty - Move Around"
else
hotkey "Attack Last Target"
wait 500
break
endif
elseif timer TargetTimer > 2500
overhead "▼ OUT OF RANGE ▼" 88 lasttarget
settimer TargetTimer 0
endif
endwhile
endif
endwhile
while not hidden
## If target is not dead, will attempt to finish them off. You can always run off, break LoS and hide or use smoke bomb (just hit hotkey again) ##
if cooldown "WeaponAbility" = 0
say "[weaponability3"
cooldown "WeaponAbility" 120000
endif
## Applying Bandages if damaged or poisoned ##
if diffhits > 0 or poisoned
if not bandaging and skill "Healing" > 10
if findtype "clean bandage%s%" self
hotkey "Bandage Self"
wait 200
else
overhead "No Bandages"
endif
endif
endif
## Taking Heal Potion if low health ##
if diffhits > 40
if findtype "Yellow Potion" self
hotkey "Drink Heal"
wait 1000
else
overhead "No Heal Pots"
endif
endif
## Taking Cure Potion if poisoned ##
if poisoned
if findtype "Orange Potion" self
hotkey "Drink Cure"
wait 1000
else
overhead "No Cure Pots"
endif
endif
## Auto-Skinning any corpses around ##
if autoSkinning = 2
if findtype "Elven Spellblade" backpack and findtype 8198 ground -1 -1 2 as aCorpse
getlabel aCorpse desc
if "the remains" in desc
overhead "Skipping: {{desc}}" 11 aCorpse
// do nothing
@ignore aCorpse
else
overhead "Skinning: {{desc}}" 88 aCorpse
while not targetexists
useskill 'forensicevaluation'
endwhile
if targetexists
target aCorpse
@ignore aCorpse
endif
endif
endif
endif
if autoSkinning = 1
if findtype 8198 ground -1 -1 2 as aCorpse
if findtype "Elven Spellblade" backpack
dclicktype "Elven Spellblade" backpack
waitfortarget 1500
target 'self'
if insysmsg "You carve materials from the corpse"
ignore aCorpse
elseif insysmsg "That corpse has already been carved"
ignore aCorpse
endif
else
overhead 'No Skinning Knife!'
endif
endif
endif
if not timerexists "HideReminder"
createtimer "HideReminder"
settimer "HideReminder" 0
endif
if cooldown "skill" = 0 and timer "HideReminder" > 10000
overhead "Ready to Hide"
settimer "HideReminder" 0
endif
endwhileThis script will work for backstabbers that have Healing or not.
All you do is hit the hotkey to hide: it will auto use smoke bombs if you weren't able to hide (and even cast Invis if you have the Magery).
It will auto go into Stealth once able, and all you need to do is go into War Mode to select the nearest Monster. When you are within 1 tile, it will attack.
After the Backstab, if the monster is still alive it will use a Weapon Ability to try and finish it off, while also healing & using pots.
When the monster is dead, if you have autoSkinning on, it will skin the corpses around you.
You can leave the script running to auto-heal/pot and skin while you run around.
Then when you are ready to hide/BS again just hit the hotkey.