Skip to content
Outlands Hub

Razor script

Mugger Bot (1)

by Jaseowns · 215 lines
Download

Compatibility unverified

This community Razor script has not been tested in game by the Hub. Read its setup and client requirements before use.

Mugger Bot by Jaseowns UO Outlands WIP find a target in game, client macro to attack nearest in razor

CombatThievingHidingStealth
Mugger Bot 1.razor
1# This is an automated backup - check out https://outlands.uorazorscripts.com/script/9fb827a9-137f-4fc1-91ce-22dc5929384b for latest2# Automation by Jaseowns3## Script: Mugger Bot (1)4## Created by: Jaseowns#66945#############################################6 7# Mugger Bot by Jaseowns8# UO Outlands9# WIP10// find a target 11 // in game, client macro to attack nearest12 // in razor13 14// need to be in range to mug/backstab15// but need to be hidden16// and stealthed17 18// attack with 2hander, then 2 swings with 1hander19// re-hide20  // ^ smoke bomb21  // ^ shadow aspect proc22  // ^ los/ hiding out of range23clearsysmsg 24@setvar! stealthIsOn 025@setvar! fightingSomething 026@setvar! myKillTarget 027@setvar! helperTextCooldown 200028@setvar! helperHideCooldown 250029@setvar! automaticallySkinCorpses 130 31@setvar! jaseowns_HitPointCheckForHealthPot 7032@setvar! cdSkinningCheck 300033@setvar! minimumWaitForPing 20034 35if not timerexists helperTextTimer36    settimer helperTextTimer helperTextCooldown37endif38 39if not timerexists helperHideTimer40    settimer helperHideTimer helperHideCooldown41endif42 43if not timerexists skinningCheckTimer44    settimer skinningCheckTimer cdSkinningCheck45endif46 47 48while not dead49    50    while not hidden51 52        if hp <= jaseowns_HitPointCheckForHealthPot53            if not lhandempty54                cast "magic lock"55                getlabel backpack jaseowns_PingCheck56            endif57            hotkey "Drink Heal"58            getlabel backpack jaseowns_PingCheck 59        endif60 61 62            63        if automaticallySkinCorpses = 1 and findtype "corpse" ground -1 -1 2 as jorpse64            if findtype "Elven Spellblade" backpack and timer skinningCheckTimer >= cdSkinningCheck 65                while not targetexists 66                    useskill 'forensicevaluation'67                endwhile68                if targetexists 69                    hotkey "Target Self"70                    wait minimumWaitForPing71                    settimer skinningCheckTimer 072                    settimer helperHideTimer 073                    @ignore jorpse74                endif75            endif76        endif77    78        @setvar! stealthIsOn 079        if not cooldown "skill"80            if timer helperHideTimer >= helperHideCooldown81                if not cooldown "Moving" and not queued82                    useskill "Hiding"83                endif84            endif85            86            if find myKillTarget ground -1 -1 1087                if find myKillTarget ground -1 -1 188                    overhead "1 tiles away"89                elseif find myKillTarget ground -1 -1 290                    overhead "2 tiles away"91                elseif find myKillTarget ground -1 -1 392                    overhead "3 tiles away"93                elseif find myKillTarget ground -1 -1 494                    overhead "4 tiles away"95                elseif find myKillTarget ground -1 -1 596                    overhead "5 tiles away"97                elseif find myKillTarget ground -1 -1 698                    overhead "6 tiles away"99                elseif find myKillTarget ground -1 -1 7100                    overhead "7 tiles away"101                elseif find myKillTarget ground -1 -1 8102                    overhead "8 tiles away"103                elseif find myKillTarget ground -1 -1 9104                    overhead "9 tiles away"105                else106                    overhead "10 tiles away"107                endif108            else109                hotkey "Target Closest Grey Monster"110                wait 200111                if insysmsg "no one matching"112                    // do nothing113                else114                    @setvar! myKillTarget lasttarget 115                endif116            endif117            // check target range118            // (we dont know the target tho)119            // however, we can use target nearest creature120            // ^ that should match our in game target121            122            // assuming we got a target from that, check its range123            // if its within x tiles, assume we are fighting it124            125            /// maybe use a timer to know when we pop out of hiding126            // use that timer to know for sure we are fighting127            // then re-hide and start all over128            129            // we need to be fighting or running130            // check our current weapons131            wait 200132            if not hidden133                // we cannot hide (we need to move or we are fighting)134 135    136            endif137        endif138        // we could be fighting or just popped out of stealth139    endwhile140    141    142 143    if insysmsg "You begin to move quietly."144        @setvar! stealthIsOn 1145    endif146    147    if stealthIsOn = 1148        if timer helperTextTimer > helperTextCooldown149            sysmsg "scanning for target" 77150            settimer helperTextTimer 0151        endif152        153        if findtype "halberd" backpack 1790 as item154            dclick item155            wait 200156        endif157        158        hotkey "Target Closest Grey Monster"159        wait 200160        if insysmsg "no one matching"161            // do nothing162        163            if not cooldown "skill"164                useskill "Stealth"165            endif166        else167                168            @setvar! myKillTarget lasttarget 169            170            if find myKillTarget ground -1 -1 1171                if cooldown "skill"172                    overhead "waiting for skill cooldown"173                else174                    attack myKillTarget175                    wait 200176                    settimer helperHideTimer 0177                    if findtype "katana" backpack 1790 as item178                        dclick item179                    endif180                endif181            else182                if timer helperTextTimer > helperTextCooldown183                    overhead "Out of range" 88  myKillTarget184                    settimer helperTextTimer 0185                endif186            endif187        endif188    else    189        if not cooldown "skill"190            useskill "Stealth"191        endif192        193        if timer helperTextTimer > helperTextCooldown194            sysmsg "waiting for stealth" 88195            settimer helperTextTimer 0196        endif197    endif198endwhile199// use ingame macro to attack200 201stop202 203 204 205@setvar! myMuggyTarget206 207 208while not dead myMuggyTarget209    for 10210        if find myMuggyTarget ground -1 -1 index211            overhead "We found a target in range {{index}}"212        endif213    endfor214    wait 200215endwhile