Skip to content
Outlands Hub

Razor script

Small potion example

by Jaseowns · 89 lines
Download

by Jaseowns UO Outlands Stream question

Small potion example.razor
1# This is an automated backup - check out https://outlands.uorazorscripts.com/script/2988bc81-6cd4-42eb-a134-b088cc1f0ad9 for latest2# Automation by Jaseowns3## Script: Small potion example4## Created by: Jaseowns#66945#############################################6 7# Small potion example by Jaseowns8# UO Outlands9# Stream question10if poisoned11    if findtype "Orange Potion" backpack as pot 12        dclick pot13        wait 20014    endif15endif16 17if hp < maxhp18    if findtype "Yellow Potion" backpack as pot 19        getlabel pot desc20        if "next usable" in desc21            // do nothing22        else23            dclick pot24            wait 20025        endif26    endif27endif28 29 30// what we want to do... drink a regular potion if less then 10 stam missing31// else drink full refresh pot.32// need to split out regular pot with total refresh using get label33 34 35@setvar! regularRefreshPots 036@setvar! totalRefreshPots 037 38@clearignore 39while findtype "Red Potion" backpack as pot 40    getlabel pot desc41    overhead desc 8842    if "Total Refresh potion" in desc43        @setvar! totalRefreshPots pot44    else45        @setvar! regularRefreshPots pot46    endif47    @ignore pot48endwhile49@clearignore 50 51 52if stam < maxstam53    if diffstam > 554        if totalRefreshPots = 055            overhead "Drinking a regular refresh" 8856            while stam < maxstam and find regularRefreshPots backpack57                dclick regularRefreshPots    58            endwhile59        else60            overhead "Drinking a total refresh" 8861            if find totalRefreshPots backpack62                dclick totalRefreshPots63            endif64        endif65    else66        if regularRefreshPots = 067            overhead "Drinking a total refresh" 8868            if find totalRefreshPots backpack69                dclick totalRefreshPots70            endif71        else72            overhead "Drinking a regular refresh" 8873            while stam < maxstam and find regularRefreshPots backpack74                dclick regularRefreshPots    75            endwhile76        endif 77    endif78endif79 80overhead totalRefreshPots81 82 83// 385184if stam < maxstam85    if findtype "Red Potion" backpack as pot 86        dclick pot87        wait 20088    endif89endif