Small potion example by Jaseowns
# Small potion example by Jaseowns
# UO Outlands
# Stream question
if poisoned
if findtype "Orange Potion" backpack as pot
dclick pot
wait 200
endif
endif
if hp < maxhp
if findtype "Yellow Potion" backpack as pot
getlabel pot desc
if "next usable" in desc
// do nothing
else
dclick pot
wait 200
endif
endif
endif
// what we want to do... drink a regular potion if less then 10 stam missing
// else drink full refresh pot.
// need to split out regular pot with total refresh using get label
@setvar! regularRefreshPots 0
@setvar! totalRefreshPots 0
@clearignore
while findtype "Red Potion" backpack as pot
getlabel pot desc
overhead desc 88
if "Total Refresh potion" in desc
@setvar! totalRefreshPots pot
else
@setvar! regularRefreshPots pot
endif
@ignore pot
endwhile
@clearignore
if stam < maxstam
if diffstam > 5
if totalRefreshPots = 0
overhead "Drinking a regular refresh" 88
while stam < maxstam and find regularRefreshPots backpack
dclick regularRefreshPots
endwhile
else
overhead "Drinking a total refresh" 88
if find totalRefreshPots backpack
dclick totalRefreshPots
endif
endif
else
if regularRefreshPots = 0
overhead "Drinking a total refresh" 88
if find totalRefreshPots backpack
dclick totalRefreshPots
endif
else
overhead "Drinking a regular refresh" 88
while stam < maxstam and find regularRefreshPots backpack
dclick regularRefreshPots
endwhile
endif
endif
endif
overhead totalRefreshPots
// 3851
if stam < maxstam
if findtype "Red Potion" backpack as pot
dclick pot
wait 200
endif
endif