View Categories

Fishing

17 min read

Details #

All scripts have been collected over the years and if available will still contain the creators details, these scripts may run well or not.

Scripts #

fishing.sc #

sub fishing()   
VAR q = 0   
VAR r = 0
dim FishArray[27]
FishArray[0]="6041 1881 2054 -5"
FishArray[1]="6041 1880 2054 -5"
FishArray[2]="6041 1879 2054 -5"
FishArray[3]="6041 1878 2054 -5"
FishArray[4]="6041 1877 2054 -5"
FishArray[5]="6041 1876 2054 -5"
FishArray[6]="6041 1875 2054 -5"
FishArray[7]="6041 1874 2054 -5"
FishArray[8]="6041 1873 2054 -5"
FishArray[9]="6041 1872 2054 -5"
FishArray[10]="6042 1881 2054 -5"
FishArray[11]="6042 1880 2054 -5"
FishArray[12]="6042 1879 2054 -5"
FishArray[13]="6042 1878 2054 -5"
FishArray[14]="6042 1877 2054 -5"
FishArray[15]="6042 1876 2054 -5"
FishArray[16]="6042 1875 2054 -5"
FishArray[17]="6042 1874 2054 -5"
FishArray[18]="6042 1873 2054 -5"
FishArray[19]="6042 1872 2054 -5"
FishArray[20]="6043 1872 2054 -5"
FishArray[21]="6043 1873 2054 -5"
FishArray[22]="6043 1874 2054 -5"
FishArray[23]="6043 1875 2054 -5"
FishArray[24]="6043 1876 2054 -5"
FishArray[25]="6043 1877 2054 -5"
FishArray[26]="6043 1878 2054 -5"
FishArray[27]="6043 1879 2054 -5"


Repeat   
  
  for q = 0 to 27
    UO.Print("Spot Number: " + str(q))   
    UO.Print("Location: " + FishArray[q])
    r = 0
    	Repeat
    	   UO.Print("Repeating Spot #" + str(q) + " for the " + str(r) + "th time")
           UO.Usetype(0x0dbf)  
           UO.exec("waittargettile " + FishArray[q])  
           Wait(5200)
           r = r + 1
        Until UO.InJournal('no fish') OR UO.InJournal('seem to get any fish here') OR UO.InJournal('biting')
        UO.DeleteJournal()
      Next   
    Until FALSE    
   
end sub  

fishingyoko.sc #

sub main() 
uo.deletejournal() 

pescar1: 
uo.exec("usetype 0x0dbf") 
uo.lclick(322,161) 
wait(6000) 
if UO.InJournal("You can't seem to get any fish here.") OR UO.InJournal("You can't fish there") then 
wait(1000)
uo.print( 'Changing to Fish tile 2')
uo.deletejournal() 
go to pescar2 
else 
go to pescar1 
end if 

pescar2: 
uo.exec("usetype 0x0dbf") 
uo.lclick(294,190) 
wait(6000) 
if UO.InJournal("You can't seem to get any fish here.") OR UO.InJournal("You can't fish there") then
wait(1000)
uo.print( 'Changing to Fish tile 3')
uo.deletejournal() 
go to pescar3 
else 
go to pescar2 
end if 

pescar3: 
uo.exec("usetype 0x0dbf") 
uo.lclick(267,216) 
wait(6000) 
if UO.InJournal("You can't seem to get any fish here.") OR UO.InJournal("You can't fish there") then
wait(1000)
uo.print( 'Changing to Fish tile 4')
uo.deletejournal() 
go to pescar4 
else 
go to pescar3 
end if 

pescar4: 
uo.exec("usetype 0x0dbf") 
uo.lclick(233,243) 
wait(6000) 
if UO.InJournal("You can't seem to get any fish here.") OR UO.InJournal("You can't fish there") then 
wait(1000)
uo.print( 'Changing to Fish tile 5')
uo.deletejournal() 
go to pescar5 
else 
go to pescar4 

pescar5: 
uo.exec("usetype 0x0dbf") 
uo.lclick(241,177) 
wait(6000) 
if UO.InJournal("You can't seem to get any fish here.") OR UO.InJournal("You can't fish there") then 
wait(1000)
uo.print( 'Changing to Fish tile 6')
uo.deletejournal() 
go to pescar6
else 
go to pescar5 

pescar6: 
uo.exec("usetype 0x0dbf") 
uo.lclick(217,261) 
wait(6000) 
if UO.InJournal("You can't seem to get any fish here.") OR UO.InJournal("You can't fish there") then 
wait(1000)
uo.print( 'Changing to Fish tile 7')
uo.deletejournal() 
go to pescar7
else 
go to pescar6 

pescar7: 
uo.exec("usetype 0x0dbf") 
uo.lclick(298,146) 
wait(6000) 
if UO.InJournal("You can't seem to get any fish here.") OR UO.InJournal("You can't fish there") then 
wait(1000)
uo.print( 'Changing to Fish tile 8')
uo.deletejournal() 
go to pescar8
else 
go to pescar7 

pescar8: 
uo.exec("usetype 0x0dbf") 
uo.lclick(272,171) 
wait(6000) 
if UO.InJournal("You can't seem to get any fish here.") OR UO.InJournal("You can't fish there") then 
wait(1000)
uo.print( 'Changing to Fish tile 9')
uo.deletejournal() 
go to pescar9
else 
go to pescar8 

pescar9: 
uo.exec("usetype 0x0dbf") 
uo.lclick(249,198) 
wait(6000) 
if UO.InJournal("You can't seem to get any fish here.") OR UO.InJournal("You can't fish there") then 
wait(1000)
uo.print( 'Changing to Fish tile 10')
uo.deletejournal() 
go to pescar10
else 
go to pescar9 

pescar10: 
uo.exec("usetype 0x0dbf") 
uo.lclick(226,222) 
wait(6000) 
if UO.InJournal("You can't seem to get any fish here.") OR UO.InJournal("You can't fish there") then 
wait(1000)
uo.print( 'Changing to Fish tile 11')
uo.deletejournal() 
go to pescar11
else 
go to pescar10

pescar11: 
uo.exec("usetype 0x0dbf") 
uo.lclick(184,239) 
wait(6000) 
if UO.InJournal("You can't seem to get any fish here.") OR UO.InJournal("You can't fish there") then 
wait(1000)
uo.print( 'Changing to Fish tile 12')
uo.deletejournal() 
go to pescar12
else 
go to pescar11

pescar12: 
uo.exec("usetype 0x0dbf") 
uo.lclick(279,125) 
wait(6000) 
if UO.InJournal("You can't seem to get any fish here.") OR UO.InJournal("You can't fish there") then 
wait(1000)
uo.print( 'Changing to Fish tile 13')
uo.deletejournal() 
go to pescar13
else 
go to pescar12

pescar13: 
uo.exec("usetype 0x0dbf") 
uo.lclick(245,161) 
wait(6000) 
if UO.InJournal("You can't seem to get any fish here.") OR UO.InJournal("You can't fish there") then 
wait(1000)
uo.print( 'Changing to Fish tile 14')
uo.deletejournal() 
go to pescar14
else 
go to pescar13

pescar14: 
uo.exec("usetype 0x0dbf") 
uo.lclick(223,195) 
wait(6000) 
if UO.InJournal("You can't seem to get any fish here.") OR UO.InJournal("You can't fish there") then 
wait(1000)
uo.print( 'Changing to Fish tile 15')
uo.deletejournal() 
go to pescar1
else 
go to pescar14 #usually goto moverse

#last loop needs 'go to moverse' insted of goto next
#moverse: 
#if UO.weight>300 then 
#go to Descartar 
#else 
#uo.press(36) 
#uo.press(36) 
#uo.press(33) 
#uo.press(33) 
#uo.press(33) 
#uo.press(33) 
#uo.press(33) 
#uo.press(33) 
#go to pescar1 
#endif 
#Descartar: 
#UO.FindType('0x09ce') 
#if UO.GetQuantity('finditem')>0 then 
#UO.Moveitem('finditem','0','ground') 
#endif 
#wait(500) 
#UO.FindType('0x09cf') 
#if UO.GetQuantity('finditem')>0 then 
#UO.Moveitem('finditem','0','ground') 
#endif 
#wait(500) 
#UO.FindType('0x09cd') 
#if UO.GetQuantity('finditem')>0 then 
#UO.Moveitem('finditem','0','ground') 
#endif 
#wait(500) 
#UO.FindType('0x09cc') 
#if UO.GetQuantity('finditem')>0 then 
#UO.Moveitem('finditem','0','ground') 
#go to pescar1 
endif 
end sub

fishingandtracking evil pigeon.sc #

sub main()
	var i = 0
	var switch = 1
	var time = 0
	dim items[10]
	dim x[12]
	dim y[12]
	
	#Fish IDs - Not used yet
	items[0] = '0x09CC'
	items[1] = '0x09CD'
	items[2] = '0x09CE'
	items[3] = '0x09CF'
	items[4] = '0x0DD6'
	items[5] = '0x0DD7'
	items[5] = '0x0DD8'

	x[0]=525
	y[0]=233
	x[1]=568
	y[1]=266
	x[2]=578
	y[2]=300
	x[3]=648
	y[3]=334
	x[4]=684
	y[4]=353
	x[5]=722
	y[5]=382
	x[6]=611
	y[6]=225
	x[7]=585
	y[7]=277
	x[8]=681
	y[8]=286
	x[9]=719
	y[9]=368
	x[10]=747
	y[10]=306
	x[11]=564
	y[11]=239

	Repeat
		i = 0
		
		Repeat
			UO.DeleteJournal()
			If switch == 1 Then
				UO.WaitMenu('Select', 'People', 'Select', 'Pigeon')
				UO.UseSkill("Tracking")
				Wait(2500)
			endif
			switch = switch * -1
			
			UO.DeleteJournal()
			UO.UseType(0x0dbf)
			wait(1500)
			UO.LCLick(x[i], y[i])
			UO.LCLick(x[i], y[i])
			UO.LCLick(x[i], y[i])
			
			Repeat
				wait(200)
				time = time + 200
			Until UO.InJournal("aborted") OR UO.InJournal("finished") OR time > 10000
			time = 0
			
			i = i + 1
		Until i == 12
	Until FALSE
end sub

fishing clicks.sc #

#Fishing tiles: 6039 to 6044

sub main()
	UO.Set("quiet", "0")
	UO.IgnoreReset()
	
	var netType = 0x0DCA
	var mapType = 0x14ED
	var packType = 0x0E75
	var shellType1 = 0x0FC4
	var shellType2 = 0x0FC5
	var shellType3 = 0x0FC6
	
	setBag('Nets')
	setBag('Maps')
	setBag('Packs')
	setBag('Shells')
	
	UO.Set("quiet","1")	
	
	var i, time
	
	DIM xla[10]
	DIM yla[10]
	xla[0] = 173
	yla[0] = 486
	xla[1] = 314
	yla[1] = 391
	xla[2] = 309
	yla[2] = 385
	xla[3] = 263
	yla[3] = 354
	xla[4] = 263
	yla[4] = 401
	xla[5] = 240
	yla[5] = 407
	xla[6] = 220
	yla[6] = 351
	xla[7] = 221
	yla[7] = 397
	xla[8] = 228
	yla[8] = 472
	xla[9] = 167
	yla[9] = 517
	 
	Repeat
		For i = 0 to 9
			#UO.Print("Spot number " + str(i) + " at " + str(xla[q]) + "," + str(yla[q]))
			UO.DeleteJournal()
			UO.Usetype(0x0dbf)
			Wait(500)
			UO.Lclick(xla[i],yla[i])
			UO.Lclick(xla[i],yla[i])
			UO.Lclick(xla[i],yla[i])
			
			grab(netType,    'my',     'Nets')
			grab(mapType,    'ground', 'Maps')
			grab(packType,   'ground', 'Packs')
			grab(shellType1, 'my',     'Shells')
			grab(shellType2, 'my',     'Shells')
			grab(shellType3, 'my',     'Shells')
			
			time = 0
			Repeat
				wait(200)
				time = time + 200
			Until UO.InJournal("aborted|can't use|finished") OR time > 10000	
			If UO.InJournal("Saving World State") Then
				Repeat
					wait(200)
				Until UO.InJournal("World Saved")
			End If
		Next
	Until FALSE
end sub

sub grab(type, location, container)
	UO.Set("finddistance", 0)
	UO.FindType(type, -1, location)
	If UO.FindCount() > 0 Then
		UO.MoveItem('finditem', '1', container)
		UO.Ignore('finditem')
		Wait(100)
	End If
end sub

sub setBag(objName)
	UO.Print("Select Container for " + objName)
	UO.AddObject(objName)
	While UO.Targeting()
		Wait(500)
	Wend
end sub

fishing deep sea.sc #

#Fishing tiles: 6039 to 6044

sub main()
	UO.Set("quiet", "0")
	
	var netType = 0x0DCA
	var mapType = 0x14ED
	var packType = 0x0E75
	var shellType1 = 0x0FC4
	var shellType2 = 0x0FC5
	var shellType3 = 0x0FC6

	#setBag('Nets')
	#setBag('Maps')
	#setBag('Packs')
	#setBag('Shells')

	#UO.Set("quiet","1")	

	var x, y, g, i, waterCount, time

	var maxDist = 8
	var minX = UO.GetX() - maxDist
	var maxX = UO.GetX() + maxDist
	var minY = UO.GetY() - maxDist
	var maxY = UO.GetY() + maxDist
	
	waterCount = 0
	For x = minX to maxX
		For y = minY to maxY
			#If UO.PrivateGetTile(x, y, -5 , 6039, 6044) Then
			If UO.PrivateGetTile(x, y, -5 , 168, 171) Then
				waterCount = waterCount + 1
			End If
		Next
	Next
	
	If waterCount < 1 Then
		UO.Say("Gay")
		return
	End If
	
	UO.Print(STR(waterCount) + " water tiles detected")	
	dim tilesG[VAL(STR(waterCount))]
	dim tilesX[VAL(STR(waterCount))]
	dim tilesY[VAL(STR(waterCount))]
	
	i = 0
	For x = minX to maxX
		For y = minY to maxY
			#For g = 6039 to 6044
			For g = 168 to 171
				If UO.PrivateGetTile(x, y, -5 , g, g) Then
					UO.Print(STR(g))
					tilesX[i] = STR(x)
					tilesY[i] = STR(y)
					tilesG[i] = STR(g)
					i = i + 1
				End If
			Next
		Next
	Next
	
	Repeat
		For i = 0 to waterCount - 1
			UO.DeleteJournal()
			#UO.Print("Fishing at spot: " + STR(i + 1) + " out of " + STR(waterCount))
			UO.Print("X: " + tilesX[i] + " Y: " + tilesY[i] + " GFX: " + tilesG[i])
			UO.WaitTargetTile(0, tilesX[i], tilesY[i], -5)
			UO.UseType(0x0DBF)
			time = 0
			
			grab(netType,    'my',     'Nets')
			grab(mapType,    'ground', 'Maps')
			grab(packType,   'ground', 'Packs')
			grab(shellType1, 'my',     'Shells')
			grab(shellType2, 'my',     'Shells')
			grab(shellType3, 'my',     'Shells')
			
			Repeat
				wait(200)
				time = time + 200
			Until UO.InJournal("aborted|can't use|finished") OR time > 10000
			healMe()
			If UO.InJournal("Saving World State") Then
				Repeat
					wait(200)
				Until UO.InJournal("World Saved")
			End If
		Next
	Until FALSE
end sub

sub grab(type, location, container)
	UO.Set("finddistance", 0)
	UO.FindType(type, -1, location)
	If UO.FindCount() > 0 Then
		UO.MoveItem('finditem', '1', container)
		UO.Ignore('finditem')
		Wait(100)
	End If
end sub

sub setBag(objName)
	UO.Print("Select Container for " + objName)
	UO.AddObject(objName)
	While UO.Targeting()
		Wait(500)
	Wend
end sub

sub healMe()
	If UO.Hits < UO.STR Then
		UO.BandageSelf()
	End If
end sub

fishing with nets.sc #

#Fishing tiles: 6039 to 6044

sub main()
	var fishType1 = 0x09CC
	var fishType2 = 0x09CD
	var fishType3 = 0x09CE
        var fishType4 = 0x09CF
        var fishType5 = 0x0DD7
        var fishType6 = 0x0DD8
	var netType = 0x0DCA
	var mapType = 0x14ED
	var packType = 0x0E75
	var bagType = 0x0E76
	var sosType = 0x099F
	var shellType1 = 0x0FC4
	var shellType2 = 0x0FC5
	var shellType3 = 0x0FC6
	var shellType4 = 0x0FC7
	var shellType5 = 0x0FC8
	var shellType6 = 0x0FC9
	var shellType7 = 0x0FCA
	var shellType8 = 0x0FCB
	var shellType9 = 0x0FCC
	var magicFishType = 0x0DD6

	var boneArms = 0x144E	
	var boneTunic = 0x144F 
	var boneGloves = 0x1450
	var boneHelm = 0x1451
	var boneLegs = 0x1452
	
	UO.Set("quiet", 0)

	#setBag('Fish')
	#setBag('Nets')
	setBag('Magic Fish')
	setBag('Maps')
	setBag('Packs')
	setBag('Shells')
	setBag('SoS')
	setBag('Bone Armour')

	var x, y, g, i, waterCount, time, randomWait

	var maxDist = 8
	var minX = UO.GetX() - maxDist
	var maxX = UO.GetX() + maxDist
	var minY = UO.GetY() - maxDist
	var maxY = UO.GetY() + maxDist
	
	waterCount = 0
	For x = minX to maxX
		For y = minY to maxY
			If UO.PrivateGetTile(x, y, -5 , 6039, 6044) Then
				waterCount = waterCount + 1
			End If
		Next
	Next
	
	UO.Print(STR(waterCount) + " water tiles detected")	

	dim tilesG[Val(Str(waterCount))]
	dim tilesX[Val(Str(waterCount))]
	dim tilesY[Val(Str(waterCount))]
	dim bogusTiles[Val(Str(waterCount))]
	
	For i = 0 To waterCount - 1
		bogusTiles[i] = 0
	Next
	
	i = 0
	For x = minX to maxX
		For y = minY to maxY
			For g = 6039 to 6044
				If UO.PrivateGetTile(x, y, -5 , g, g) Then
					tilesX[i] = STR(x)
					tilesY[i] = STR(y)
					tilesG[i] = STR(g)
					i = i + 1
				End If
			Next
		Next
	Next

	UO.Set("quiet", 1)

	Repeat
		i = UO.Random(waterCount)
		
		If bogusTiles[i] Then
			goto continue
		End If
		
		UO.DeleteJournal()
		
		UO.Print("Fishing at spot: " + STR(i + 1) + " out of " + STR(waterCount))
		UO.Print("X: " + tilesX[i] + " Y: " + tilesY[i] + " GFX: " + tilesG[i])
		
		UO.WaitTargetTile(tilesG[i], tilesX[i], tilesY[i], -5)
		UO.UseType(0x0DCA)
		
		#grab(fishType1,  	'ground', 'Fish')
		#grab(fishType2,  	'ground', 'Fish')
		#grab(fishType3,  	'ground', 'Fish')
		#grab(fishType4,  	'ground', 'Fish')
		#grab(fishType5,  	'ground', 'Fish')
		#grab(fishType6,  	'ground', 'Fish')
		#grab(netType,    	'my',     'Nets')
		grab(mapType,    	'ground', 'Maps')
		grab(packType,   	'ground', 'Packs')
		grab(bagType,   	'ground', 'Packs')
		grab(sosType,    	'my',     'SoS')
		grab(shellType1, 	'my',     'Shells')
		grab(shellType2, 	'my',     'Shells')
		grab(shellType3, 	'my',     'Shells')
		grab(shellType4, 	'my',     'Shells')
		grab(shellType5,    'my',     'Shells')
		grab(shellType6,    'my',     'Shells')
		grab(shellType7,    'my',     'Shells')
		grab(shellType8,    'my',     'Shells')
		grab(shellType9,    'my',     'Shells')
		grab(magicFishType, 'ground', 'Magic Fish')
		grab(shellType9,    'my',     'Shells')
		
		grab(boneArms, 'my', 'Bone Armour')
		grab(boneTunic, 'my', 'Bone Armour')
		grab(boneGloves, 'my', 'Bone Armour')
		grab(boneHelm, 'my', 'Bone Armour')
		grab(boneLegs, 'my', 'Bone Armour')
		
		journalWait("caught|catch|val|find|can't|rests", 10000)
				
		If UO.InJournal("Saving World State") Then
			journalWait("World Saved", 20000)
		End If
		
		If UO.InJournal("can't use|too far") Then
			bogusTiles[i] = 1
		End If
		
		continue:
	Until FALSE
end sub

sub grab(type, location, container)
	UO.Set("finddistance", 0)
	
	UO.FindType(type, -1, location)
	
	If UO.FindCount() > 0 Then
		UO.MoveItem('finditem', '1', container)
		UO.Ignore('finditem')
		Wait(200)
	End If
end sub

sub setBag(objName)
	UO.Print("Select Container for " + objName)
	
	UO.AddObject(objName)
	
	While UO.Targeting()
		Wait(500)
	Wend
end sub

sub journalWait(journalPattern, timeout)
	var time = 0

	Repeat
		Wait(200)
		time = time + 200
	Until UO.InJournal(journalPattern) || time > timeout
end sub

fishing2.sc #

sub main()
	var maxDistance = 8
	var shoreDistance = 4
	var myX = UO.GetX()
	var myY = UO.GetY()
	var time
	var currY
	var currX
	var j = 0
	dim water[28]
	
	UO.asmTLMapClear()
	For var i = 6039 to 6066
		water[j] = i
		j = j + 1
  	Next  
	
	Repeat
		UO.Print("For X = " + STR(myX - maxDistance) + " To " + STR(myX + maxDistance))
		UO.Print("For Y = " + STR(myY - shoreDistance) + " To " + STR(myY - maxDistance))
		#Return
		For currX = myX - maxDistance To myX + maxDistance
			For currY = myY - maxDistance To myY - shoreDistance
				UO.DeleteJournal()
				UO.Print(STR(currX) + " " + STR(currY))
				UO.asmWaitTargetStaticTile(water, currX, currY, 251)
				UO.UseType(0x0DBF)
				time = 0
				Repeat
					wait(200)
					time = time + 200
				Until UO.InJournal("aborted") OR UO.InJournal("finished") OR time > 10000
			Next
		Next
	Until FALSE
end sub

fishing3.sc #

sub main()
	var time
	var x
	var y
	var i
	dim gfx[21]
	var xStart = 520
	var yStart = 2049

	gfx[0] = 6039 #c
	gfx[1] = 6042 #c
	gfx[2] = 6040 #c
	gfx[3] = 6039 #c
	gfx[4] = 6042 #c
	gfx[5] = 6044 #c
	gfx[6] = 6039 #c
	gfx[7] = 6039 #c
	gfx[8] = 6042 #c
	gfx[9] = 6040 #c
	gfx[10] = 6040 #c
	gfx[11] = 6042 #c
	gfx[12] = 6043 #c
	gfx[13] = 6042 #c
	gfx[14] = 6040 #c
	gfx[15] = 6042 #c
	gfx[16] = 6039 #c
	gfx[17] = 6044 #c
	gfx[18] = 6041 #c
	gfx[19] = 6041 #c
	gfx[20] = 6039 #c
	
	Repeat
		i = 0
		For x = xStart To xStart + 6
			For y = yStart To yStart + 2
				UO.DeleteJournal()
				UO.Print("Fishing at spot: " + STR(i))
				UO.Print("X: " + STR(x) + " Y: " + STR(y) + " GFX: " + STR(gfx[i]))
			
				UO.WaitTargetTile(gfx[i], x, y, -5)
				#UO.WaitTargetTile(6040, 524, 2050, -5)
				i = i + 1
				UO.UseType(0x0DBF)
				time = 0
				Repeat
					wait(200)
					time = time + 200
				Until UO.InJournal("aborted") OR UO.InJournal("can't use") OR UO.InJournal("finished") OR time > 10000
				If UO.InJournal("Saving World State") Then
					Repeat
						wait(200)
					Until UO.InJournal("World Saved")
				End If
			Next
		Next
	Until FALSE
end sub

fishing6.sc #

sub main()
	var time
	var x
	var y
	var i
	
	var xLength = 7
	var yLength = -3
	var shoreOffset = -4
	
	var xStart = UO.GetX() - ((xLength - 1) / 2)
	var xEnd   = UO.GetX() + ((xLength - 1) / 2)
	var yStart = UO.GetY() + shoreOffset + yLength + 1
	var yEnd   = UO.GetY() + shoreOffset
	
	UO.Print("Current Pos: " + STR(UO.GetX()) + ", " + STR(UO.GetY()))
	UO.Print("Start Pos: " + STR(xStart) + ", " + STR(yStart))
	UO.Print("End Pos: " + STR(xEnd) + ", " + STR(yEnd))	

	#This ruins the whole script, need to find alternative
	dim gfx[21]
	gfx[0] = 6039 #com
	gfx[1] = 6042 #com
	gfx[2] = 6040 #com
	gfx[3] = 6041 #com
	gfx[4] = 6044 #com
	gfx[5] = 6040 #com
	gfx[6] = 6043 #com
	gfx[7] = 6039 #com
	gfx[8] = 6041 #com
	gfx[9] = 6040 #com
	gfx[10] = 6039 #com
	gfx[11] = 6042 #com
	gfx[12] = 6039 #com
	gfx[13] = 6041 #com
	gfx[14] = 6044 #com
	gfx[15] = 6039 #com
	gfx[16] = 6042 #com
	gfx[17] = 6043 #com
	gfx[18] = 6042 #com
	gfx[19] = 6041 #com
	gfx[20] = 6041 #com
	
	Repeat
		i = 0
		For x = xStart To xEnd
			For y = yStart To yEnd
				UO.DeleteJournal()
				UO.Print("Fishing at spot: " + STR(i))
				UO.Print("X: " + STR(x) + " Y: " + STR(y) + " GFX: " + STR(gfx[i]))
				UO.WaitTargetTile(gfx[i], x, y, -5)
				i = i + 1
				UO.UseType(0x0DBF)
				time = 0
				Repeat
					wait(200)
					time = time + 200
				Until UO.InJournal("aborted") OR UO.InJournal("can't use") OR UO.InJournal("finished") OR time > 10000
				If UO.InJournal("Saving World State") Then
					Repeat
						wait(200)
					Until UO.InJournal("World Saved")
				End If
			Next
		Next
	Until FALSE
end sub

fishing7.sc #

#Fishing tiles: 6039 to 6044

sub main()
       #UO.Set("quiet","1")	

	var x, y, g, i, waterCount, time

	var maxDist = 8
	var minX = UO.GetX() - maxDist
	var maxX = UO.GetX() + maxDist
	var minY = UO.GetY() - maxDist
	var maxY = UO.GetY() + maxDist
	
	waterCount = 0
	For x = minX to maxX
		For y = minY to maxY
			If UO.PrivateGetTile(x, y, -5 , 6039, 6044) Then
				waterCount = waterCount + 1
			End If
		Next
	Next
	
	UO.Print(STR(waterCount) + " water tiles detected")	
	dim tilesG[VAL(STR(waterCount))]
	dim tilesX[VAL(STR(waterCount))]
	dim tilesY[VAL(STR(waterCount))]
	
	i = 0
	For x = minX to maxX
		For y = minY to maxY
			For g = 6039 to 6044
				If UO.PrivateGetTile(x, y, -5 , g, g) Then
					tilesX[i] = x
					tilesY[i] = y
					tilesG[i] = g
					i = i + 1
				End If
			Next
		Next
	Next

	Repeat
		For i = 0 to waterCount - 1
			UO.DeleteJournal()
			UO.Print("Fishing at spot: " + STR(i + 1) + " out of " + STR(waterCount))
			UO.Print("X: " + STR(tilesX[i]) + " Y: " + STR(tilesY[i]) + " GFX: " + STR(tilesG[i]))
			UO.WaitTargetTile(tilesG[i], tilesX[i], tilesY[i], -5)
			UO.UseType(0x0DBF)
			time = 0
			grab(0x0E75)
			grab(0x14ED)
			Repeat
				wait(200)
				time = time + 200
			Until UO.InJournal("aborted") OR UO.InJournal("can't use") OR UO.InJournal("finished") OR time > 10000	
			If UO.InJournal("Saving World State") Then
				Repeat
					wait(200)
				Until UO.InJournal("World Saved")
			End If
		Next
	Until FALSE
end sub

sub grab(item)
	UO.Set("finddistance", 1)
	UO.FindType(item, -1, 'ground')
	If UO.FindCount() > 0 Then
		UO.Grab(0, 'finditem')
		Wait(100)
	End If
end sub

fishing9.sc #

#Fishing tiles: 6039 to 6044

sub main()
	UO.Set("quiet", "0")
	
	var netType = 0x0DCA
	var mapType = 0x14ED
	var packType = 0x0E75
	var shellType1 = 0x0FC4
	var shellType2 = 0x0FC5
	var shellType3 = 0x0FC6

	setBag('Nets')
	setBag('Maps')
	setBag('Packs')
	setBag('Shells')

	UO.Set("quiet","1")	

	var x, y, g, i, waterCount, time

	var maxDist = 8
	var minX = UO.GetX() - maxDist
	var maxX = UO.GetX() + maxDist
	var minY = UO.GetY() - maxDist
	var maxY = UO.GetY() + maxDist
	
	waterCount = 0
	For x = minX to maxX
		For y = minY to maxY
			If UO.PrivateGetTile(x, y, -5 , 6039, 6044) Then
				waterCount = waterCount + 1
			End If
		Next
	Next
	
	UO.Print(STR(waterCount) + " water tiles detected")	
	dim tilesG[VAL(STR(waterCount))]
	dim tilesX[VAL(STR(waterCount))]
	dim tilesY[VAL(STR(waterCount))]
	dim bogusTiles[VAL(STR(waterCount))]
	
	For i = 0 To waterCount - 1
		bogusTiles[i] = 0
	Next
	
	i = 0
	For x = minX to maxX
		For y = minY to maxY
			For g = 6039 to 6044
				If UO.PrivateGetTile(x, y, -5 , g, g) Then
					tilesX[i] = STR(x)
					tilesY[i] = STR(y)
					tilesG[i] = STR(g)
					i = i + 1
				End If
			Next
		Next
	Next

	Repeat
		For i = 0 to waterCount - 1
			If bogusTiles[i] Then
				goto continue
			End If
			UO.DeleteJournal()
			#UO.Print("Fishing at spot: " + STR(i + 1) + " out of " + STR(waterCount))
			#UO.Print("X: " + STR(tilesX[i]) + " Y: " + STR(tilesY[i]) + " GFX: " + STR(tilesG[i]))
			UO.WaitTargetTile(tilesG[i], tilesX[i], tilesY[i], -5)
			UO.UseType(0x0DBF)
			time = 0
			
			grab(netType,    'my',     'Nets')
			grab(mapType,    'ground', 'Maps')
			grab(packType,   'ground', 'Packs')
			grab(shellType1, 'my',     'Shells')
			grab(shellType2, 'my',     'Shells')
			grab(shellType3, 'my',     'Shells')
			
			Repeat
				wait(200)
				time = time + 200
			Until UO.InJournal("aborted|can't use|finished") OR time > 10000	
			If UO.InJournal("Saving World State") Then
				Repeat
					wait(200)
				Until UO.InJournal("World Saved")
			End If
			If UO.InJournal("can't use") Then
				bogusTiles[i] = 1
			End If
			continue:
		Next
	Until FALSE
end sub

sub grab(type, location, container)
	UO.Set("finddistance", 0)
	UO.FindType(type, -1, location)
	If UO.FindCount() > 0 Then
		UO.MoveItem('finditem', '1', container)
		UO.Ignore('finditem')
		Wait(100)
	End If
end sub

sub setBag(objName)
	UO.Print("Select Container for " + objName)
	UO.AddObject(objName)
	While UO.Targeting()
		Wait(500)
	Wend
end sub

fishing12.sc #

#Fishing tiles: 6039 to 6044

sub main()
	var fishType1 = 0x09CC
	var fishType2 = 0x09CD
	var fishType3 = 0x09CE
        var fishType4 = 0x09CF
        var fishType5 = 0x0DD7
        var fishType6 = 0x0DD8
	var netType = 0x0DCA
	var mapType = 0x14ED
	var packType = 0x0E75
	var sosType = 0x099F
	var shellType1 = 0x0FC4
	var shellType2 = 0x0FC5
	var shellType3 = 0x0FC6
	var shellType4 = 0x0FC7
	var shellType5 = 0x0FC8
	var magicFishType = 0x0DD6
	
	UO.Set("quiet", 0)

	#setBag('Fish')
	setBag('Nets')
	setBag('Maps')
	setBag('Packs')
	setBag('Shells')
	setBag('SoS')
	#setBag('Magic Fish')

	var x, y, g, i, waterCount, time, randomWait

	var maxDist = 8
	var minX = UO.GetX() - maxDist
	var maxX = UO.GetX() + maxDist
	var minY = UO.GetY() - maxDist
	var maxY = UO.GetY() + maxDist
	
	waterCount = 0
	For x = minX to maxX
		For y = minY to maxY
			If UO.PrivateGetTile(x, y, -5 , 6039, 6044) Then
				waterCount = waterCount + 1
			End If
		Next
	Next
	
	UO.Print(STR(waterCount) + " water tiles detected")	

	dim tilesG[Val(Str(waterCount))]
	dim tilesX[Val(Str(waterCount))]
	dim tilesY[Val(Str(waterCount))]
	dim bogusTiles[Val(Str(waterCount))]
	
	For i = 0 To waterCount - 1
		bogusTiles[i] = 0
	Next
	
	i = 0
	For x = minX to maxX
		For y = minY to maxY
			For g = 6039 to 6044
				If UO.PrivateGetTile(x, y, -5 , g, g) Then
					tilesX[i] = STR(x)
					tilesY[i] = STR(y)
					tilesG[i] = STR(g)
					i = i + 1
				End If
			Next
		Next
	Next

	UO.Set("quiet", 1)

	Repeat
		i = UO.Random(waterCount)
		
		If bogusTiles[i] Then
			goto continue
		End If
		
		UO.DeleteJournal()
		
		UO.Print("Fishing at spot: " + STR(i + 1) + " out of " + STR(waterCount))
		UO.Print("X: " + tilesX[i] + " Y: " + tilesY[i] + " GFX: " + tilesG[i])
		
		UO.WaitTargetTile(tilesG[i], tilesX[i], tilesY[i], -5)
		UO.UseType(0x0DBF)
		
		#grab(fishType1,  	'ground', 'Fish')
		#grab(fishType2,  	'ground', 'Fish')
		#grab(fishType3,  	'ground', 'Fish')
		#grab(fishType4,  	'ground', 'Fish')
		#grab(fishType5,  	'ground', 'Fish')
		#grab(fishType6,  	'ground', 'Fish')
		grab(netType,    	'my',     'Nets')
		grab(mapType,    	'ground', 'Maps')
		grab(packType,   	'ground', 'Packs')
		grab(sosType,    	'my',     'SoS')
		grab(shellType1, 	'my',     'Shells')
		grab(shellType2, 	'my',     'Shells')
		grab(shellType3, 	'my',     'Shells')
		grab(shellType4, 	'my',     'Shells')
		grab(shellType5,    'my',     'Shells')
		#grab(magicFishType, 'ground', 'Magic Fish')
		
		journalWait("aborted|can't use|finished", 10000)
				
		If UO.InJournal("Saving World State") Then
			journalWait("World Saved", 20000)
		End If
		
		If UO.InJournal("can't use|too far") Then
			bogusTiles[i] = 1
		End If
		
		continue:
	Until FALSE
end sub

sub grab(type, location, container)
	UO.Set("finddistance", 0)
	
	UO.FindType(type, -1, location)
	
	If UO.FindCount() > 0 Then
		UO.MoveItem('finditem', '1', container)
		UO.Ignore('finditem')
		Wait(200)
	End If
end sub

sub setBag(objName)
	UO.Print("Select Container for " + objName)
	
	UO.AddObject(objName)
	
	While UO.Targeting()
		Wait(500)
	Wend
end sub

sub journalWait(journalPattern, timeout)
	var time = 0

	Repeat
		Wait(200)
		time = time + 200
	Until UO.InJournal(journalPattern) || time > timeout
end sub

Powered by BetterDocs