Post by minerman34288 on Aug 28, 2017 2:54:12 GMT
hi,
I'm new at uo steam and am a returning uo player that is trying to learn to script. I've been working on this script which I have that is suppose to use the pick in my hand on iron nodes and when i'm overweight it smelts the ore in a portable forge in my backpack. Then whenever the node is gone, it runs to the next node within 10 tiles. The problem i'm having is that there are 3 different graphics for iron nodes, so it will run right by some nodes until there are no more of that type are left on the screen then move to the next type. but I want it to run to the nearest node and mine it, then move to the next iron node. Any help would be much appreciated. The script is as follows so far:
useobject 'righthand'
waitfortarget 500
targetground '0x136d' '136' '2'
if weight '>' '500'
usetype '0x19b9' 'any' 'backpack'
waitfortarget 500
targettype '0xfb1' 'any' '0'
endif
if not targetground '0x136d' '136' '2'
targetground '0x1367' '136' '2'
if not targetground '0x136d' '136' '2' or targetground '0x1367' '136' '2'
targetground '0x136a' '136' '2'
endif
if weight '>' '500'
usetype '0x19b9' 'any' 'backpack'
waitfortarget 500
targettype '0xfb1' 'any' '0'
endif
if not targetground '0x136d' '136' '2' or targetground '0x1367' '136' '2'
targetground '0x136a' '136' '2'
endif
if weight '>' '500'
usetype '0x19b9' 'any' 'backpack'
waitfortarget 500
targettype '0xfb1' 'any' '0'
endif
endif
if findtype '0x136a' '136' 'ground' 'any' '12'
setalias 'iron ore' 'found'
endif
if sysmsg "targettype: type not found" 'any'
findtype '0x136d' '136' 'ground' 'any' '12'
setalias 'iron ore' 'found'
endif
if sysmsg "targettype: type not found" 'any'
findtype '0x1367' '136' 'ground' 'any' '12'
setalias 'iron ore' 'found'
endif
if not @inrange 'iron ore' '2'
if @x 'iron ore' > x 'self' and @y 'iron ore' > y 'self'
run 'Southeast'
elseif @x 'iron ore' < x 'self' and @y 'iron ore' > y 'self'
run 'Southwest'
elseif @x 'iron ore' > x 'self' and @y 'iron ore' < y 'self'
run 'Northeast'
elseif @x 'iron ore' < x 'self' and @y 'iron ore' < y 'self'
run 'Northwest'
elseif @x 'iron ore' > x 'self' and @y 'iron ore' == y 'self'
run 'East'
elseif @x 'iron ore' < x 'self' and @y 'iron ore' == y 'self'
run 'West'
elseif @x 'iron ore' == x 'self' and @y 'iron ore' > y 'self'
run 'South'
elseif @x 'iron ore' == x 'self' and @y 'iron ore' < y 'self'
run 'North'
pause 500
endif
endif
I'm new at uo steam and am a returning uo player that is trying to learn to script. I've been working on this script which I have that is suppose to use the pick in my hand on iron nodes and when i'm overweight it smelts the ore in a portable forge in my backpack. Then whenever the node is gone, it runs to the next node within 10 tiles. The problem i'm having is that there are 3 different graphics for iron nodes, so it will run right by some nodes until there are no more of that type are left on the screen then move to the next type. but I want it to run to the nearest node and mine it, then move to the next iron node. Any help would be much appreciated. The script is as follows so far:
useobject 'righthand'
waitfortarget 500
targetground '0x136d' '136' '2'
if weight '>' '500'
usetype '0x19b9' 'any' 'backpack'
waitfortarget 500
targettype '0xfb1' 'any' '0'
endif
if not targetground '0x136d' '136' '2'
targetground '0x1367' '136' '2'
if not targetground '0x136d' '136' '2' or targetground '0x1367' '136' '2'
targetground '0x136a' '136' '2'
endif
if weight '>' '500'
usetype '0x19b9' 'any' 'backpack'
waitfortarget 500
targettype '0xfb1' 'any' '0'
endif
if not targetground '0x136d' '136' '2' or targetground '0x1367' '136' '2'
targetground '0x136a' '136' '2'
endif
if weight '>' '500'
usetype '0x19b9' 'any' 'backpack'
waitfortarget 500
targettype '0xfb1' 'any' '0'
endif
endif
if findtype '0x136a' '136' 'ground' 'any' '12'
setalias 'iron ore' 'found'
endif
if sysmsg "targettype: type not found" 'any'
findtype '0x136d' '136' 'ground' 'any' '12'
setalias 'iron ore' 'found'
endif
if sysmsg "targettype: type not found" 'any'
findtype '0x1367' '136' 'ground' 'any' '12'
setalias 'iron ore' 'found'
endif
if not @inrange 'iron ore' '2'
if @x 'iron ore' > x 'self' and @y 'iron ore' > y 'self'
run 'Southeast'
elseif @x 'iron ore' < x 'self' and @y 'iron ore' > y 'self'
run 'Southwest'
elseif @x 'iron ore' > x 'self' and @y 'iron ore' < y 'self'
run 'Northeast'
elseif @x 'iron ore' < x 'self' and @y 'iron ore' < y 'self'
run 'Northwest'
elseif @x 'iron ore' > x 'self' and @y 'iron ore' == y 'self'
run 'East'
elseif @x 'iron ore' < x 'self' and @y 'iron ore' == y 'self'
run 'West'
elseif @x 'iron ore' == x 'self' and @y 'iron ore' > y 'self'
run 'South'
elseif @x 'iron ore' == x 'self' and @y 'iron ore' < y 'self'
run 'North'
pause 500
endif
endif