Skip to content

Instantly share code, notes, and snippets.

@kapb14
Last active January 23, 2019 07:42
Show Gist options
  • Save kapb14/ffbf837dc73ee980e80a4ab99a6d9440 to your computer and use it in GitHub Desktop.
Save kapb14/ffbf837dc73ee980e80a4ab99a6d9440 to your computer and use it in GitHub Desktop.
Some useful UOSteam Scripts and Snippets for UOOutlands shard
setalias 'Weapon' 'lefthand'
if not findobject 'lefthand'
equipitem 'Weapon' 1
pause 100
else
clearhands 'both'
endif
pause 600
usetype! '0xf07'
pause 600
equipitem 'Weapon' 2
pause 600
# The correct way of detecting if you are getting closer to your maxweight is using diffweight. Which is just (maxweigth - weight).
if diffweight < 10
sysmsg "You are almost encumbered!" 20
sysmsg "Stopping the macro"
stop
endif
//Grab Nearest Target
//Created by Duck Face
//Enjoy
@createlist '1'
@clearlist '1'
@createlist '2'
@clearlist '2'
@createlist '3'
@clearlist '3'
@createlist '4'
@clearlist '4'
@createlist '5'
@clearlist '5'
@createlist '6'
@clearlist '6'
@createlist '7'
@clearlist '7'
@createlist '8'
@clearlist '8'
@createlist '9'
@clearlist '9'
@createlist '10'
@clearlist '10'
@createlist '11'
@clearlist '11'
@createlist '12'
@clearlist '12'
@createlist '13'
@clearlist '13'
@createlist '14'
@clearlist '14'
@createlist '15'
@clearlist '15'
@createlist '16'
@clearlist '16'
@createlist 'inputStack'
@clearlist 'inputStack'
@unsetalias 'target'
@unsetalias 'temp'
//populate a list of potential targets
for 0 to 20
@getenemy grey criminal red next
if @inrange 'enemy' 16
@pushlist! 'inputStack' 'enemy'
endif
endfor
for 0 to 'inputStack'
@setalias 'temp' inputStack[]
//save to list based on distance
if @distance 'temp' > 15
pushlist '16' 'temp'
elseif @distance 'temp' > 14
pushlist '15' 'temp'
elseif @distance 'temp' > 13
pushlist '14' 'temp'
elseif @distance 'temp' > 12
pushlist '13' 'temp'
elseif @distance 'temp' > 11
pushlist '12' 'temp'
elseif @distance 'temp' > 10
pushlist '11' 'temp'
elseif @distance 'temp' > 9
pushlist '10' 'temp'
elseif @distance 'temp' > 8
pushlist '9' 'temp'
elseif @distance 'temp' > 7
pushlist '8' 'temp'
elseif @distance 'temp' > 6
pushlist '7' 'temp'
elseif @distance 'temp' > 5
pushlist '6' 'temp'
elseif @distance 'temp' > 4
pushlist '5' 'temp'
elseif @distance 'temp' > 3
pushlist '4' 'temp'
elseif @distance 'temp' > 2
pushlist '3' 'temp'
elseif @distance 'temp' > 1
pushlist '2' 'temp'
else pushlist '1' 'temp'
endif
endfor
//check lists for closest
if list '1' > 0
@setalias 'target' 1[0]
elseif list '2' > 0
@setalias 'target' 2[0]
elseif list '3' > 0
@setalias 'target' 3[0]
elseif list '4' > 0
@setalias 'target' 4[0]
elseif list '5' > 0
@setalias 'target' 5[0]
elseif list '6' > 0
@setalias 'target' 6[0]
elseif list '7' > 0
@setalias 'target' 7[0]
elseif list '8' > 0
@setalias 'target' 8[0]
elseif list '9' > 0
@setalias 'target' 9[0]
elseif list '10' > 0
@setalias 'target' 10[0]
elseif list '11' > 0
@setalias 'target' 11[0]
elseif list '12' > 0
@setalias 'target' 12[0]
elseif list '13' > 0
@setalias 'target' 13[0]
elseif list '14' > 0
@setalias 'target' 14[0]
elseif list '15' > 0
@setalias 'target' 15[0]
elseif list '16' > 0
@setalias 'target' 16[0]
else
stop
endif
//uncomment the following lines to grab health bar
//useobject 'target'
//pause 300
//clickscreen! 1875 260 'single' 'left'
//pause 300
//clickscreen! 1700 200 'single' 'right'
while not dead
while not hidden
useskill 'hiding'
pause 11000
while hidden
useskill 'stealth'
pause 11000
endwhile
endwhile
endwhile
///targettype (graphic) [color] [range or search level]
// targettype 0xcf // с шерстью
// targettype 0xdf // без шерсти
// targettype 0xf9f // ножницы
//if findtype (graphic) [coloзфr] [source] [amount] [range or search level]
//@headmsg "есть тут нестриженные овцы?" 413
if not @findtype 0xf9f '0' 'backpack'
sysmsg "нет ножниц в сумке!" 2
stop
endif
if @findtype '0xcf' 0 'ground'
// Alias 'found' is now available
@headmsg "нашёл овцу с шерстью!"
//usetype (graphic) [color] [source] [range or search level]
usetype! '0xf9f' 0 'backpack'
//usetype 0xf9f // ножницы
waitfortarget 5000
sysmsg "есть цель"
// targettype 0xcf // с шерстью
// targettype (graphic) [color] [range or search level]
//targettype! '0xcf' 0 3
target! 'found'
sysmsg 'я попытался состричь с неё шерсть...'
else
@headmsg "нет нестриженных овец" 15
//pause 1000
//playmacro 'AnimalLore'
for 5
useskill 'Animal Lore'
waitfortarget 5000
targettype! '0xdf' 0 10 // bald sheep
//targettype! '0xcf' 0 3 // wool sheep
pause 3000
endfor
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment