Compatibility unverified
This community Razor script has not been tested in game by the Hub. Read its setup and client requirements before use.
~# "Oaks [KoU] - Easy Backstab Script" #~# Discord: Oakman8490 - Message me if you encounter any errors not addressed below.
BardHidingStealthTracking
Easy Backstab Script.razor
1# This is an automated backup - check out https://outlands.uorazorscripts.com/script/9fc1386e-a5c2-42e1-9fb9-867fa366c4f2 for latest2# Automation by Jaseowns3## Script: Easy Backstab Script4## Created by: oakman8490#05#############################################6 7#~# "Oaks [KoU] - Easy Backstab Script" #~#8# Discord: Oakman8490 - Message me if you encounter any errors not addressed below.9 10 11#Pre-Requisites for script to work correctly12 13 ## Cooldowns to set up inside UO14 15 // WeaponAbility : Triggers upon sysmsg "Weapon ability ready." to 016 // SmokeBomb Used : Triggers upon adding the buff "Smoke Bomb Cooldown" to 517 18 ## Agents Required inside Razor will still work without the Agents but QoL improvements19 // Dress Agent named "Burst" where you add the weapon you use. This will prevent wrestling the mob if you forget to equip weapon.20 // Organizer Agent 1 - I use this for Moving Gold, Leather, and Black Goods into a specific bag.21 // Organizer Agent 2 - I use this for Moving Rares "Cores, MCDs etc" into a trapped pouch. 22 23 ## forceTracking will turn on tracking (if you have skill) and stop the script after, if tracking is not on ##24 25#How Script works26 ## You assign the script to a Hot-Key. Hit the hotkey and you will hide & attempt to use a smoke bomb if that fails.27 ## The script will give you overhead messages to tell you when it is ok to move/attack.28 ## After the kill, the script will auto skin the corpse if you have that active.29 ## While not hidden, it will apply bandages, consume potions & cleansing brews as needed. When you have the appropriate skill.30 ## In order to re-hide, you will hit the Hot-Key again or use a separate Hide Hotkey (but not a script)31 32#Overhead Messages - There are times where the System Messages that drive these do not process fast enough, so its possible you could show the wrong status "BE CAREFUL"33 ## "Waiting for Stealth" - You will unhide if you move, attacks will not be Backstabs34 ## "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 after35 ## "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.36 37 38 39 40#############################################################################"SETTINGS"################################################################################################41 42clearignore43clearall 44@setvar! stealthStatus 045 46// Overhead Timer = How many milliseconds between overhead alerts47 @setvar! OverheadTimerCD 500048 49######################################################################################################################################################################################################################################################################################################################################################################################################################################50/////////////////////////51// "TARGETING" //52/////////////////////////53 54// AttackRange: Melee = 1 , Ranged Attack should enter their attack range based upon weapon & Codex55 @setvar! AttackRange 156 57// AutoTarget: 1 = Closest target is automatically selected (tab out of warmode to reset), 0 = Manual Target Selection58 @setvar! AutoTarget 159 60######################################################################################################################################################################################################################################################################################################################################################################################################################################61/////////////////////////62//"SKINNING & TRACKING"//63/////////////////////////64 65// autoSkinning = 0 to deactivate, 1 for only grey corpses, 2 for all corpses66 @setvar! autoSkinning 167// auto open corpses68 @setvar! autoOpenCorpses 069 70// force tracking to start if you have >= 80 skill71 @setvar! forceTracking 172 73#########################################################################################################################################################################################################################################################################################################################################################################################################################################################74/////////////////////////75// "Cleansing Brew" //76///////////////////////// 77 78// Do you have points in Panacea and want to use cure pots instead of brews? 1 = Cure Pots, 0 = Brews79 @setvar! codexPanacea 080 81/////////////////////////82// "POTIONS" //83/////////////////////////84 85// auto treat poison/bleed/disease with potion or brew.86 @setvar! autoTreat 1 87 88#############################################################################################################################################################################################################################################################################################89/////////////////////////90// "Weapon Abilites:" //91///////////////////////// 92 93// Show the hotbar for the weapon Codex94 @setvar! showCodexHotbar 195 96// Weapon Ability to use (0=off)97 @setvar! myWeaponAbility 298 99#############################################################################################################################################################################################################################################################################################100/////////////////////////101// "Codex & WizHat" //102/////////////////////////103 104// codex points into Without a Trace105 @setvar! codexWithoutTrace 3106 107// WizHatMode: 0 = off, 1 = Wizard Hat will be used to keep stamina less than full (to prevent walking through creatures)108 ## Must be wearing your normal headgear upon starting the script ##109 @setvar! WizHatMode 1110 111##############################################################################################################################################################################################################################################################################################################################################################################################################################################112/////////////////////////113// "AGENTS & GOLD" //114/////////////////////////115 116// Organize Agents Timer Cooldown (in milliseconds)117 @setvar! OrganizeTimerCD 30000118 119// Overweight: Gold Toss Amount 120 @setvar! OverWeightGold 1234121 122######################################################################################################################################################################################################################################################################################################################123/////////////////////////124// "TRASH ITEM LIST" //125///////////////////////// 126 127// Items to Throw on Ground if looted (add as many items as you want) # 128 if not listexists "TrashItems"129 createlist "TrashItems"130 endif131 clearlist "TrashItems"132 # Trash Items #133 pushlist "TrashItems" "cut%s% of raw ribs"134 pushlist "TrashItems" "raw fish steak%s%"135 pushlist "TrashItems" "raw chicken leg%s%"136 pushlist "TrashItems" "feather%s"137 # Trash Scrolls #138 pushlist "TrashItems" 8013|8014|8015|8018|8019|8020|8021|8025|8026|8027|8028139 140 141##########################################################################"DO NOT ADJUST BELOW THIS LINE"###############################################################################142 143# "Script starts here"#144 145clearsysmsg146if hidden147 @setvar! stealthStatus 1148else 149 @setvar! stealthStatus 0150 useskill "Hiding"151endif152 153if skill "Archery" >= 80154 // Will use Range Settings Above155else 156 // Will override to 1 in case of error157 @setvar! AttackRange 1158endif159if not varexist my_head160 setvar my_head 0161endif162if find my_head self163 // do nothing164elseif findlayer self head as item165 setvar my_head item166else 167 overhead "Headpiece not equipped" 33168endif169if WizHatMode = 1 170 if findtype 5912 self as item171 setvar my_wizhat item172 else 173 overhead "No WizHat Found" 33174 setvar my_wizhat 0175 @setvar! WizHatMode 0176 endif177 if not timerexists "WizHatTimer"178 createtimer "WizHatTimer"179 settimer "WizHatTimer" 4000180 endif181else 182 setvar my_wizhat 0183endif184if my_head = my_wizhat185 overhead "Wizard Hat is equipped, unable to set Headgear" 33186 @setvar! WizHatMode 0187 setvar my_head 0188endif189 190 191if not timerexists "OverheadTimer"192 createtimer "OverheadTimer"193 settimer OverheadTimer OverheadTimerCD194endif195if hidden196 @setvar! stealthStatus 1197else 198## Applying Bandages if damaged ## 199 if diffhits > 0 and skill "Healing" >= 10200 if not bandaging201 if findtype "clean bandage%s%" self202 hotkey "Bandage Self"203 wait 200204 else 205 overhead "No Bandages"206 endif207 endif208 endif209## Taking Heal Potion if low health ## 210 if diffhits > 40 and autoTreat = 1211 if findtype "Yellow Potion" self212 hotkey "Drink Heal"213 wait 1000214 else 215 overhead "No Heal Pots"216 endif217 endif218 219 if autoTreat = 1 220## Poisoned ##221 for 10222 if poisoned223 if findtype "Orange Potion" self224 hotkey "Drink Cure"225 wait 200226 else227 overhead "No Cure Pots"228 break229 endif230 else231 break232 endif233 endfor234## Disease / Bleed ##235 if findbuff "Disease" or findbuff "Bleed"236 if codexPanacea = 1 and skill "Alchemy" >= 80237 if findtype "Orange Potion" self238 hotkey "Drink Cure"239 wait 200240 else241 overhead "No Cure Pots"242 if findtype 50675 self 2935 as cBrew243 dclick cBrew244 wait 200245 else246 overhead "No Brew"247 endif 248 endif249 else 250 if findtype 50675 self 2935 as cBrew251 dclick cBrew252 wait 200253 else254 overhead "No Brew"255 endif256 endif 257 endif258 endif259## Hiding ## 260 if targetexists 261 hotkey "cancel current target"262 endif263 warmode "off"264 useskill "hiding"265 wait 400266 ## Smoke Bomb if Hide didn't work ## 267 if not hidden 268 if findtype 52149 backpack 2876269 say "[SmokeBomb"270 wait 600271 else272 overhead "No Smokebombs found" 33273 endif274 endif 275## Still not hidden ## 276 if not hidden277 @setvar! stealthStatus 0278 overhead "Run for it!!! - Break Line of Sight and try again." 33279 stop280 else 281 @setvar! stealthStatus 1282 endif283endif284 285while not dead286 287 if not hidden288 if stealthStatus != 0289 @setvar! stealthStatus 0290 endif291 ## Applying Bandages if damaged or poisoned ## 292 if diffhits > 0 or poisoned 293 if not bandaging and skill "Healing" > 10294 if findtype "clean bandage%s%" self295 hotkey "Bandage Self"296 wait 200297 else 298 overhead "No Bandages"299 endif300 endif301 endif302 ## Taking Heal Potion if low health ## 303 if diffhits > 40 and autoTreat = 1304 if findtype "Yellow Potion" self305 hotkey "Drink Heal"306 wait 1000307 else 308 overhead "No Heal Pots"309 endif310 endif311 if autoTreat = 1 312 ## Poisoned ##313 for 10314 if poisoned315 if findtype "Orange Potion" self316 hotkey "Drink Cure"317 wait 200318 else319 overhead "No Cure Pots"320 break321 endif322 else323 break324 endif325 endfor326 ## Disease / Bleed ##327 if findbuff "Disease" or findbuff "Bleed"328 if codexPanacea = 0329 if findtype 50675 self 2935 as cBrew330 dclick cBrew331 wait 200332 else333 overhead "No Brew"334 endif335 else336 if findtype "Orange Potion" self337 hotkey "Drink Cure"338 wait 200339 else340 overhead "No Cure Pots"341 endif342 endif 343 endif344 endif345## Auto-Skinning any corpses around ## 346 if autoSkinning = 2347 if findtype "Elven Spellblade" backpack and findtype 8198 ground -1 -1 2 as aCorpse348 getlabel aCorpse desc349 if "the remains" in desc350 overhead "Skipping: {{desc}}" 11 aCorpse351 // do nothing352 @ignore aCorpse353 else354 overhead "Skinning: {{desc}}" 88 aCorpse355 while not targetexists 356 useskill "forensicevaluation"357 endwhile358 if targetexists 359 target aCorpse360 @ignore aCorpse361 endif362 endif363 endif364 endif365 if autoSkinning = 1366 if findtype 8198 ground -1 -1 2 as aCorpse367 if findtype "Elven Spellblade" backpack368 dclicktype "Elven Spellblade" backpack369 waitfortarget 1500370 target "self"371 if insysmsg "You carve materials from the corpse"372 ignore aCorpse373 elseif insysmsg "That corpse has already been carved"374 ignore aCorpse375 endif376 else377 overhead "No Skinning Knife!"378 endif379 endif380 endif381 if autoOpenCorpses = 1382 if findtype "corpse|bones" ground -1 -1 2 as jorpse383 getlabel jorpse desc384 dclick jorpse385 @ignore jorpse386 wait 650387 endif 388 endif 389 endif390 if hidden391 if mounted392 hotkey "Dismount"393 endif394 if insysmsg "Vanish activated."395 @setvar! stealthStatus 3396 overhead "Warmode to Attack - Aspect Proc" 167397 @settimer "OverheadTimer" 0398 clearsysmsg399 elseif insysmsg "You will automatically stealth when out of steps."400 @setvar! stealthStatus 3 401 overhead "Warmode to Attack" 167402 @settimer "OverheadTimer" 0 403 clearsysmsg404 elseif cooldown "SmokeBomb Used"405 @setvar! stealthStatus 2406 overhead "Move into Place" 253407 cooldown "SmokeBomb Used" 0408 @settimer "OverheadTimer" 0409 clearsysmsg410 elseif insysmsg "You feel comfortable enough to begin stealthing."411 skill "Stealth"412 @setvar! stealthStatus 2413 overhead "Move into Place" 253414 @settimer "OverheadTimer" 0 415 clearsysmsg416 elseif insysmsg "You begin to move quietly."417 @setvar! stealthStatus 2418 overhead "Move into Place" 253419 @settimer "OverheadTimer" 0 420 clearsysmsg421 endif422 if stealthStatus = 0423 @setvar! stealthStatus 1424 endif425 if stealthStatus = 1 and not cooldown "skill"426 wait 100427 skill "Stealth"428 endif429 if not warmode 430 @setvar! MyTarget 0431 endif432 elseif stealthStatus != 0433 @setvar! stealthStatus 0434 endif435 if timer "OverheadTimer" > OverheadTimerCD436 if stealthStatus = 0437 overhead "Not Hidden" 33438 elseif stealthStatus = 1439 overhead "Waiting for Stealth" 33440 elseif stealthStatus = 2441 overhead "Move into Place" 253442 elseif stealthStatus = 3443 overhead "Warmode to Attack" 167444 else 445 overhead "Error in determining stealth status" 33446 endif447 settimer "OverheadTimer" 0448 endif449 if hidden and WizHatMode = 1450 if timer "WizHatTimer" > 3000451 if maxstam = stam 452 dclick my_wizhat453 wait 200454 dclick my_head455 settimer "WizHatTimer" 0456 endif457 endif458 endif459 if not timerexists "TrackingRedminder"460 createtimer "TrackingRedminder"461 settimer "TrackingRedminder" 10000462 endif463 if hidden and skill "Tracking" >= 80464 if not findbuff "tracking"465 if forceTracking = 1466 while cooldown "skill"467 wait 100468 endwhile 469 while not gumpexists 4267467659470 useskill "tracking"471 wait 250472 endwhile473 if gumpexists 4267467659474 while not insysmsg "You will now hunt all hostile players."475 gumpresponse 8 4267467659476 waitforgump 4267467659 5000477 endwhile478 gumpresponse 6 4267467659479 wait 1000480 clearsysmsg 481 endif482 gumpclose 4267467659483 elseif timer "TrackingRedminder" > 10000484 overhead "Turn on Tracking" 33485 settimer "TrackingRedminder" 0486 while cooldown "skill"487 wait 100488 endwhile 489 useskill "Stealth" 490 endif491 endif492 endif 493 if not timerexists TargetTimer494 createtimer TargetTimer495 settimer TargetTimer 0496 endif497 498 if hidden and warmode and stealthStatus != 1499 if lhandempty and rhandempty500 overhead "No Weapon Equipped"501 dress! "Burst"502 else 503 if AutoTarget = 1504 if not find MyTarget ground any505 hotkey "Target Closest Non-Friendly Monster"506 wait 200507 @setvar! MyTarget lasttarget508 endif509 else 510 if not find MyTarget ground any511 @setvar! MyTarget512 wait 200513 endif 514 endif515 if find MyTarget ground -1 -1 AttackRange516 if findbuff "Stationary Penalty"517 overhead "Stationary Penalty - Move Around"518 else519 attack MyTarget520 wait 1000521 endif522 elseif timer TargetTimer > 2500523 overhead "� OUT OF RANGE �" 88 lasttarget524 settimer TargetTimer 0525 endif526 endif527 endif528 if not hidden and find MyTarget ground any529 if not cooldown "WeaponAbility"530 if myWeaponAbility = 0531 // auto ability turned off532 else 533 if myWeaponAbility = 1534 say "[weaponability1"535 elseif myWeaponAbility = 2536 say "[weaponability2"537 elseif myWeaponAbility = 3538 say "[weaponability3" 539 endif540 cooldown "WeaponAbility" 120000541 endif542 endif543 endif544 if showCodexHotbar = 1 and not gumpexists 2016719803545 say "[codexhotbar"546 endif 547 if hidden548 if not timerexists "OrganizeTimer"549 createtimer "OrganizeTimer"550 settimer "OrganizeTimer" OrganizeTimerCD551 wait 100552 endif553 if timer "OrganizeTimer" > OrganizeTimerCD554 overhead "Organizing Pack" 46555 organizer 1556 while queued557 wait 100558 endwhile 559 organizer 2560 while queued561 wait 100562 endwhile 563 foreach item in "TrashItems"564 while findtype item self565 if findtype item self as found566 @drop self567 lift found 60000568 droprelloc 0 0 0569 @ignore found570 endif571 while queued572 wait 50573 endwhile574 endwhile575 endfor576 if not varexist WizSatchel577 @setvar! WizSatchel 0578 wait 100579 endif580 if not find WizSatchel self 581 if findtype 30765 self as found582 setvar! WizSatchel found583 wait 100584 endif585 endif586 if find WizSatchel self587 menu WizSatchel 0588 endif589 settimer "OrganizeTimer" 0590 endif591 endif592 if weight > maxweight 593 if findtype "gold coin" backpack as myMoney594 @drop self595 lift myMoney OverWeightGold596 droprelloc 0 0 0597 @ignore myMoney598 wait 500599 endif600 endif601 602@clearignore 603 604endwhile