Page 3 of 6

Posted: 2009-09-30 16:42:33
by Nmy
Ловить советую с корабля.

Code: Select all

sub main() 
	var x
	while 1
		submain()
		x=uo.getx()
		uo.msg('Back')
		checklag()
		repeat
			wait(100)
		until uo.getx() > x+8
		uo.msg('Stop')
		submain()
		x=uo.getx()
		uo.msg('Forward')
		checklag()
		repeat
			wait(100)
		until uo.getx() < x-8
		uo.msg('Stop')
	wend
end sub 
sub submain()
	var mx, my, mz, i, j
	mx = UO.GetX('self') 
	my = UO.GetY('self') 
	mz = UO.GetZ('self') 	
	for i = mx-4 to mx+4 
		for j = my-4 to my+4 
			Tohide() 
			UO.Print('Ловим в координатах: '+str(mx-i)+' '+str(my-j)) 
			fishing(i,j,mz)
		next 
	next 
endsub
sub fishing(mx,my,mz)
	var n
	for n=0 to 10
		checklag()
		uo.waittargettile('1341',mx,my,mz)
		uo.usetype('0x0DBF')
		if waitforfish()==1 then
			return
		endif
	next
endsub
sub waitforfish()
	var n
	for n=0 to 100
		if uo.injournal('no fish here|fishing in water|You pull out') then
			return 1
		endif
		if uo.injournal('but fail') then
			return
		endif
		wait(1000)		
	next
endsub
sub Tohide()
	while not uo.Hidden()
		uo.warmode(0)
		uo.Print('Пытаемся уйти в хайд...')
		uo.UseSkill('Hiding')
		wait(4000)
	wend
end sub
sub CheckLag() 
	repeat
		UO.DeleteJournal() 
		UO.Click('backpack') 
	until backpack()==1
endsub 
sub backpack()
	var n
	for n=0 to 200
		if uo.injournal('a backpack') then
			return 1
		endif
		wait(200)
	next
endsub

Posted: 2009-09-30 16:45:56
by Nmy

Code: Select all

sub main() 
	uo.addobject('taste') 
	while uo.targeting() 
		wait(500) 
	wend 
	while 1 
		checklag()
		uo.waittargetobject('taste') 
		uo.useskill('Taste Identification') 
		wait(5000) 
	wend 
endsub
sub checklag() 
	repeat 
		UO.DeleteJournal() 
		UO.Click('backpack') 
	until backpack()==1 
endsub 
sub backpack() 
	var n 
	for n=0 to 200 
		if uo.injournal('a backpack') then 
			return 1 
		endif 
		wait(200) 
	next 
endsub

Posted: 2009-09-30 16:54:51
by Nmy

Code: Select all

sub main()
	while 1
		checklag()
		uo.waitmenu('Tracking','Anything')
		uo.useskill('Tracking')
		wait(5000)
	wend
endsub
sub checklag() 
	repeat 
		UO.DeleteJournal() 
		UO.Click('backpack') 
	until backpack()==1 
endsub 
sub backpack() 
	var n 
	for n=0 to 200 
		if uo.injournal('a backpack') then 
			return 1 
		endif 
		wait(200) 
	next 
endsub
 

Posted: 2009-09-30 19:51:00
by Nmy

Code: Select all

var Dbag, hammer, color, ingi, fail=0
var Tbag = '0x0E76'
var dagger = '0x0F51'
var sunduk = '0x404CA4F5'

sub main()
	uo.ignore('0x4055C04D')
	uo.filterspeech('clear')
	uo.findtype('0x13E3',-1,'my')
	if uo.findcount() then
		hammer=uo.getserial('finditem')
	else
		uo.msg('hammer not found')
		return
	endif
	uo.addobject('ingi')
	while uo.targeting()
		wait(500)
	wend
	color=uo.getcolor('ingi')
	ingi=uo.getgraphic('ingi')
	uo.cancelmenu()
	if color=='0x0000' && ingi<>'0x1BE3' && ingi<>'0x1BF5' && ingi<>'0x1BE9' then
		uo.automenu('Blacksmithing','Weapons')
		uo.automenu('Weapons','Swords & Blades')
		uo.automenu('Swords & Blades','dagger')
	else
		uo.automenu('Blacksmithing','Armor & Weapons')
		uo.automenu('Armor & Weapons','Weapons')
		uo.automenu('Weapons','Swords & Blades')
		uo.automenu('Swords & Blades','Dagger')
	endif	
	getbag()
	while 1
		if uo.count(ingi,color)<10 then
			uo.findtype(ingi,color,sunduk)
			if uo.findcount() then
				uo.moveitem('finditem','100','backpack')
				checklag()
				wait(700)
			endif
		endif
		checklag()
		uo.usetype(ingi)
		waitforchange()
		if fail>=5 then
			wait(10000)
			fail=0
		endif
		uo.findtype(dagger,-1,'backpack')
		if uo.findcount() then
			uo.moveitem('finditem',0,Dbag)
			checklag()
			checkdbag()
		endif
	wend
endsub
sub waitforchange()
	var n
	for n=0 to 100
		if uo.injournal('You put') then
			return
		endif
		if uo.injournal('You have failed') then
			fail=fail+1
			return
		endif
		wait(500)
	next
endsub
sub checkdbag()
	uo.findtype(-1,-1,Dbag)
	if uo.findcount()>254 then
		uo.ignore(Dbag)
		getbag()
	endif
endsub
sub getbag()
	var flag=0
	repeat
		uo.print('Ищем мешок')
		uo.findtype(Tbag,-1,Sunduk)
		if uo.findcount() then
			Dbag=uo.getserial('finditem')
			uo.useobject(Dbag)
			checklag()
			wait(700)
			uo.findtype(-1,-1,Dbag)
			if uo.findcount()>254 then
				uo.ignore(Dbag)
			else
				uo.moveitem(Dbag,0,sunduk,18,148,0)
				checklag()
				wait(700)
				flag=1
			endif
		endif
	until flag==1
endsub 
sub checklag() 
	repeat
		UO.DeleteJournal() 
		UO.Click('backpack') 
	until backpack()==1
endsub 
sub backpack()
	var n
	for n=0 to 200
		if uo.injournal('a backpack') then
			return 1
		endif
		wait(200)
	next
endsub 

Posted: 2009-09-30 20:52:57
by Nmy

Code: Select all

sub main() # положите 200 ингов в бекпак и укажите на них
	var n, color, name
	uo.addobject('ingi')
	while uo.targeting()
		wait(500)
	wend
	color=uo.getcolor('ingi')
	name=getname('ingi')
	
	Dim full[7]
	full[1]='Plate Helm'
	full[2]='Platemail Gorget'
	full[3]='Platemail Gauntlets'
	full[4]='Platemail Arms'
	full[5]='Platemail Legs'
	full[6]='Platemail (25 '
	full[7]='Heater Shield'
	for n=1 to 7
		repeat
			uo.cancelmenu()
			uo.automenu('Blacksmithing','Colored Armor & Weapons')
			uo.automenu('Colored Armor & Weapons',name+' Armor')
			uo.automenu(name+' Armor',name+' Plate Armor & Shields')
			uo.automenu(name+' Plate Armor & Shields',name+' '+full[n])
			checklag()
			uo.useobject('ingi')
			repeat
				wait(400)
			until uo.injournal('You have failed|You put the')
		until uo.injournal('You put the')
	next
	uo.print(' Done')
end sub
sub getname(ingi)
	var n, c, t
	Dim name[27]
	name[1]=''
	name[2]='Rusty'
	name[3]='Old Copper'
	name[4]='Dull Copper'
	name[5]='Bronze'
	name[6]='Shadow'
	name[7]='Rose'
	name[8]='Agapite'
	name[9]='Blood Rock'
	name[10]='Verite'
	name[11]='Valorite'
	name[12]='Mytheril'
	name[13]='Black Rock'
	name[14]='Obsidian'
	name[15]='Plutonium'
	name[16]='Vulcan'
	name[17]='Aqua'
	name[18]='Eldar'
	name[19]='Elvin'
	name[20]='Acid'
	name[21]='Steel'
	name[22]='Sand Rock'
	name[23]='Blood Crest'
	name[24]='Gorgan'
	name[25]='Krynite'
	name[26]='Crystaline'
	name[27]='Dragon'
	
	Dim col[27]
	col[1]='0x0000'
	col[2]='0x0750'
	col[3]='0x0590'
	col[4]='0x060A'
	col[5]='0x0488'
	col[6]='0x096B'
	col[7]='0x0014'
	col[8]='0x0193'
	col[9]='0x04C2'
	col[10]='0x07D5'
	col[11]='0x00CE'
	col[12]='0x052D'
	col[13]='0x0455'
	col[14]='0x0028'
	col[15]='0x08AF'
	col[16]='0x09DA'
	col[17]='0x0060'
	col[18]='0x0BA7'
	col[19]='0x09E6'
	col[20]='0x09B9'
	col[21]='0x09D3'
	col[22]='0x008F'
	col[23]='0x09EC'
	col[24]='0x09F0'
	col[25]='0x010F'
	col[26]='0x09A4'
	col[27]='0x0085'
	
	Dim typ[3]
	typ[1]='0x1BE3'
	typ[2]='0x1BF5'
	typ[3]='0x1BE9' 
	
	Dim nam[3]
	nam[1]='Copper'
	nam[2]='Silver'
	nam[3]='Golden'
	
	t=uo.getgraphic(ingi)
	c=uo.getcolor(ingi)
	for n=1 to 3
		if typ[n]==t then
			return nam[n]
		endif
	next
	for n=2 to 27
		if col[n]==c then
			return name[n]
		endif
	next
endsub
sub CheckLag() 
	repeat
		UO.DeleteJournal() 
		UO.Click('backpack') 
	until backpack()==1
endsub 
sub backpack()
	var n
	for n=0 to 200
		if uo.injournal('a backpack') then
			return 1
		endif
		wait(200)
	next
endsub 

Posted: 2009-10-02 10:56:26
by Nmy
Кастует яд и медитирует.
Не забывайте брас маны.

Code: Select all

sub main()
	VAR NS='0x0F88'
	VAR w
	uo.addobject('Chest')
	while uo.targeting()
		wait(400)
	wend
	uo.useobject('Chest')
	wait(2000)
	While NOT UO.Dead()
		if uo.ns==0 then
			uo.findtype(NS,-1,'Chest')
			if uo.findcount() then
				uo.moveitem('finditem','50','backpack')
				checklag()
				wait(700)
			endif
		endif
		if uo.ns>0 then
			UO.Cast('Poison', 'self')
		endif
		WaitForMana()
		meditation()
	Wend
end sub
Sub WaitForMana()
	VAR w,m=uo.mana
	for w=0 to 100
		if uo.mana<m then
			return
		endif
		wait(500)
	next
endsub
sub checklag() 
	repeat
		UO.DeleteJournal() 
		UO.Click('backpack') 
	until backpack()==1
endsub 
sub backpack()
	var n
	for n=0 to 200
		if uo.injournal('a backpack') then
			return 1
		endif
		wait(200)
	next
endsub 
sub meditation()
	uo.findtype('0x0F0E','0x09DF','backpack')
	if uo.findcount() then
		uo.useobject('finditem')
		wait(700)
	else
		while uo.mana < uo.int
			if uo.Journal(0)=='You are preoccupied with thoughts of battle.' then
				uo.warmode(0)
			endif
			checklag()
			Uo.Useskill('Meditation') 
			waitformed() 
		wend
	endif
endsub 
sub waitformed()
	var n
	for n=0 to 100
		if uo.injournal('You lose|at peace') then
			return
		endif
		wait(500)
	next
endsub 

Posted: 2009-10-02 17:12:51
by Nmy

Code: Select all

sub kalxen()
	if uo.mana>24 then
		uo.waittargetobject('self')
		uo.waitmenu('What do you want to summon','Horse')
		uo.cast('Summ. Creature')
	else
		uo.print('No mana')
	endif
endsub

Posted: 2009-10-02 17:20:05
by Nmy

Code: Select all

sub filterspeech()
	uo.filterspeech("add","You put the")
	uo.filterspeech("add","Who will you use the bandages on?")
	uo.filterspeech("add","Previous Targeting Cancelled")
	uo.filterspeech("add","Unexpected target info")
	uo.filterspeech("add","You can't drink another potion yet.")
	uo.filterspeech("add","Select Target")
	uo.filterspeech("add","What do you want to use this on?")
	uo.filterspeech("add","It appears immune to your blow")	
endsub

Posted: 2009-10-02 17:27:12
by Nmy

Code: Select all

sub invis()
	uo.findtype('0x0F0E','0x0631','my')
	if uo.findcount() and not uo.hidden() then
		uo.warmode(0)
		uo.useobject('finditem')
	endif
endsub

Posted: 2009-10-13 13:44:37
by Nmy

Code: Select all

sub main()#poison
	var chest='0x404AEDFD'
	var dropbag='0x402B76B5'
	var failflag=0
	uo.cancelmenu()
	uo.automenu('Spell Circles','Third Circle')
	uo.automenu('Spell Circle 3','Poison')
	while 1
		if uo.ns<10 then
			uo.findtype('0x0F88',-1,chest)
			if uo.findcount() then
				uo.moveitem('finditem','100','backpack')
				checklag()
				wait(700)
			endif
		endif
		if uo.count('0x0E34','0x0000')<10 then
			uo.findtype('0x0E34','0x0000',chest)
			if uo.findcount() then
				uo.moveitem('finditem','100','backpack')
				checklag()
				wait(700)
			endif
		endif
		uo.usetype('0x0E34')
		checklag()
		waitforchange()
		if uo.injournal('You fail') then
			failflag=failflag+1
		endif
		if failflag==5 then
			failflag=0
			wait(10000)
		endif
		if uo.count('0x1F40','0x0000')>10 then
			uo.findtype('0x1F40','0x0000','backpack')
			while uo.findcount() 
				uo.moveitem('finditem',0,dropbag)
				checklag()
				wait(700)
				uo.findtype('0x1F40','0x0000','backpack')
			wend
		endif
	wend
endsub
sub waitforchange()
	var n
	for n=1 to 100
		if uo.injournal('You fail|You put') then
			return
		endif
		wait(400)
	next
endsub
sub checklag() 
	repeat
		UO.DeleteJournal() 
		UO.Click('backpack') 
	until backpack()==1
endsub 
sub backpack()
	var n
	for n=0 to 200
		if uo.injournal('a backpack') then
			return 1
		endif
		wait(200)
	next
endsub 

Posted: 2009-10-13 13:49:00
by Nmy

Code: Select all

sub gohome()
	uo.warmode(0)
	wait(100)
	uo.recall('0x4020EECD','58')
	uo.exec('terminate all')
endsub

Posted: 2009-10-14 12:00:43
by Nmy

Code: Select all

sub main()#recall
	var chest='0x404AEDFD'
	var dropbag='0x402B76B5'
	var failflag=0
	uo.cancelmenu()
	uo.automenu('Spell Circles','Fourth Circle')
	uo.automenu('Spell Circle 4','Recall')
	while 1
		if uo.bp<10 then
			uo.findtype('0x0F7A',-1,chest)
			if uo.findcount() then
				uo.moveitem('finditem','100','backpack')
				checklag()
				wait(700)
			endif
		endif
		if uo.bm<10 then
			uo.findtype('0x0F7B',-1,chest)
			if uo.findcount() then
				uo.moveitem('finditem','100','backpack')
				checklag()
				wait(700)
			endif
		endif	
		if uo.mr<10 then
			uo.findtype('0x0F86',-1,chest)
			if uo.findcount() then
				uo.moveitem('finditem','100','backpack')
				checklag()
				wait(700)
			endif
		endif		
		if uo.count('0x0E34','0x0000')<10 then
			uo.findtype('0x0E34','0x0000',chest)
			if uo.findcount() then
				uo.moveitem('finditem','100','backpack')
				checklag()
				wait(700)
			endif
		endif
		uo.usetype('0x0E34')
		checklag()
		waitforchange()
		if uo.injournal('You fail') then
			failflag=failflag+1
		endif
		if failflag==5 then
			failflag=0
			wait(10000)
		endif
		if uo.count('0x1F4C','0x0000')>10 then
			uo.findtype('0x1F4C','0x0000','backpack')
			while uo.findcount() 
				uo.moveitem('finditem',0,dropbag)
				checklag()
				wait(700)
				uo.findtype('0x1F4C','0x0000','backpack')
			wend
		endif
	wend
endsub
sub waitforchange()
	var n
	for n=1 to 100
		if uo.injournal('You fail|You put') then
			return
		endif
		wait(400)
	next
endsub
sub checklag() 
	repeat
		UO.DeleteJournal() 
		UO.Click('backpack') 
	until backpack()==1
endsub 
sub backpack()
	var n
	for n=0 to 200
		if uo.injournal('a backpack') then
			return 1
		endif
		wait(200)
	next
endsub 

Posted: 2009-10-14 21:56:57
by Nmy

Code: Select all

sub main()#paralyze
	var chest='0x404AEDFD'
	var dropbag='0x402B76B5'
	var failflag=0
	uo.cancelmenu()
	uo.automenu('Spell Circles','Fifth Circle')
	uo.automenu('Spell Circle 5','Paralyze')
	while 1
		if uo.ga<10 then
			uo.findtype('0x0F84',-1,chest)
			if uo.findcount() then
				uo.moveitem('finditem','100','backpack')
				checklag()
				wait(700)
			endif
		endif
		if uo.ss<10 then
			uo.findtype('0x0F8D',-1,chest)
			if uo.findcount() then
				uo.moveitem('finditem','100','backpack')
				checklag()
				wait(700)
			endif
		endif	
		if uo.mr<10 then
			uo.findtype('0x0F86',-1,chest)
			if uo.findcount() then
				uo.moveitem('finditem','100','backpack')
				checklag()
				wait(700)
			endif
		endif		
		if uo.count('0x0E34','0x0000')<10 then
			uo.findtype('0x0E34','0x0000',chest)
			if uo.findcount() then
				uo.moveitem('finditem','100','backpack')
				checklag()
				wait(700)
			endif
		endif
		uo.usetype('0x0E34')
		checklag()
		waitforchange()
		if uo.injournal('You fail') then
			failflag=failflag+1
		endif
		if failflag==5 then
			failflag=0
			wait(10000)
		endif
		if uo.count('0x1F52','0x0000')>10 then
			uo.findtype('0x1F52','0x0000','backpack')
			while uo.findcount() 
				uo.moveitem('finditem',0,dropbag)
				checklag()
				wait(700)
				uo.findtype('0x1F52','0x0000','backpack')
			wend
		endif
	wend
endsub
sub waitforchange()
	var n
	for n=1 to 100
		if uo.injournal('You fail|You put') then
			return
		endif
		wait(400)
	next
endsub
sub checklag() 
	repeat
		UO.DeleteJournal() 
		UO.Click('backpack') 
	until backpack()==1
endsub 
sub backpack()
	var n
	for n=0 to 200
		if uo.injournal('a backpack') then
			return 1
		endif
		wait(200)
	next
endsub 

Posted: 2009-10-15 21:53:41
by Nmy
Раскидываем гп по кучкам 50к.

Code: Select all

sub main()
	var a, b
	uo.findtype('0x0EED','0x0000','lastcontainer')
	while uo.findcount()>=2
		while uo.getquantity('finditem')==50000
			uo.ignore('finditem')
			uo.findtype('0x0EED','0x0000','lastcontainer')
		wend
		if uo.findcount()>=2 then
			b=uo.getserial('finditem')
			uo.print(str(uo.findcount()))
			uo.ignore(b)
			a=50000-uo.getquantity(b)
			uo.findtype('0x0EED','0x0000','lastcontainer')
			while uo.getquantity('finditem')==50000
				uo.ignore('finditem')
				uo.findtype('0x0EED','0x0000','lastcontainer')
			wend			
			if uo.findcount() then
				uo.moveitem('finditem',str(a),b)
				wait(700)
			else
				return
			endif
		endif
		uo.findtype('0x0EED','0x0000','lastcontainer')
	wend
	uo.print('-= Done =- ')
endsub 

Posted: 2009-10-23 00:09:20
by Nmy

Code: Select all

sub main()#flame strike
	var chest='0x404AEDFD'
	var dropbag='0x402BB954'
	var failflag=0
	uo.cancelmenu()
	uo.automenu('Spell Circles','Seventh Circle')
	uo.automenu('Spell Circle 7','Flamestrike')
	while 1
		if uo.sa<10 then
			uo.findtype('0x0F8C',-1,chest)
			if uo.findcount() then
				uo.moveitem('finditem','100','backpack')
				checklag()
				wait(700)
			endif
		endif
		if uo.ss<10 then
			uo.findtype('0x0F8D',-1,chest)
			if uo.findcount() then
				uo.moveitem('finditem','100','backpack')
				checklag()
				wait(700)
			endif
		endif			
		if uo.count('0x0E34','0x0000')<10 then
			uo.findtype('0x0E34','0x0000',chest)
			if uo.findcount() then
				uo.moveitem('finditem','100','backpack')
				checklag()
				wait(700)
			endif
		endif
		uo.usetype('0x0E34')
		checklag()
		waitforchange()
		if uo.injournal('You fail') then
			failflag=failflag+1
		endif
		if failflag==5 then
			failflag=0
			wait(10000)
		endif
		if uo.count('0x1F5F','0x0000')>10 then
			uo.findtype('0x1F5F','0x0000','backpack')
			while uo.findcount() 
				uo.moveitem('finditem',0,dropbag)
				checklag()
				wait(700)
				uo.findtype('0x1F5F','0x0000','backpack')
			wend
		endif
	wend
endsub
sub waitforchange()
	var n
	for n=1 to 100
		if uo.injournal('You fail|You put') then
			return
		endif
		wait(400)
	next
endsub
sub checklag() 
	repeat
		UO.DeleteJournal() 
		UO.Click('backpack') 
	until backpack()==1
endsub 
sub backpack()
	var n
	for n=0 to 200
		if uo.injournal('a backpack') then
			return 1
		endif
		wait(200)
	next
endsub 

Re: DRW (2009) by Dark Enemy

Posted: 2009-10-23 00:09:39
by Nmy

Code: Select all

sub main()#flame strike
	var chest='0x404AEDFD'
	var dropbag='0x402BB954'
	var failflag=0
	uo.cancelmenu()
	uo.automenu('Spell Circles','Seventh Circle')
	uo.automenu('Spell Circle 7','Flamestrike')
	while 1
		if uo.sa<10 then
			uo.findtype('0x0F8C',-1,chest)
			if uo.findcount() then
				uo.moveitem('finditem','100','backpack')
				checklag()
				wait(700)
			endif
		endif
		if uo.ss<10 then
			uo.findtype('0x0F8D',-1,chest)
			if uo.findcount() then
				uo.moveitem('finditem','100','backpack')
				checklag()
				wait(700)
			endif
		endif			
		if uo.count('0x0E34','0x0000')<10 then
			uo.findtype('0x0E34','0x0000',chest)
			if uo.findcount() then
				uo.moveitem('finditem','100','backpack')
				checklag()
				wait(700)
			endif
		endif
		uo.usetype('0x0E34')
		checklag()
		waitforchange()
		if uo.injournal('You fail') then
			failflag=failflag+1
		endif
		if failflag==5 then
			failflag=0
			wait(10000)
		endif
		if uo.count('0x1F5F','0x0000')>10 then
			uo.findtype('0x1F5F','0x0000','backpack')
			while uo.findcount() 
				uo.moveitem('finditem',0,dropbag)
				checklag()
				wait(700)
				uo.findtype('0x1F5F','0x0000','backpack')
			wend
		endif
	wend
endsub
sub waitforchange()
	var n
	for n=1 to 100
		if uo.injournal('You fail|You put') then
			return
		endif
		wait(400)
	next
endsub
sub checklag() 
	repeat
		UO.DeleteJournal() 
		UO.Click('backpack') 
	until backpack()==1
endsub 
sub backpack()
	var n
	for n=0 to 200
		if uo.injournal('a backpack') then
			return 1
		endif
		wait(200)
	next
endsub 

Posted: 2009-10-23 14:47:15
by Nmy

Code: Select all

sub fs()
	if uo.count('0x1F5F') then
		uo.waittargetobject('lastattack')
		uo.usetype('0x1F5F')
	else
		uo.cast('Flame Strike','lastattack')
	endif
endsub

Posted: 2009-10-23 14:47:49
by Nmy

Code: Select all

sub paralyze()
	if uo.count('0x1F52') then
		uo.waittargetobject('lastattack')
		uo.usetype('0x1F52')
	else
		uo.cast('Paralyze','lastattack')
	endif
endsub

Posted: 2009-10-24 14:26:55
by Nmy

Code: Select all

# ################################### 
#### Скрипт на торговлю ВЕТЕРАН 2.2 - 2.3 Nmy edition. 
# ################################### 
var rune = '0x1F14' # тип рунок 
# Отдельное спасибо ВЕТЕРАНУ за первоначальный скрипт и идею.
# #################################################################### 

# ########################## ШАПКА ###################################
# Список покупок называется buy. Имеим сундук в заборе и руну домой в 1-2 
# тайла от сундука. При запуске скрипт ищет руну в бекпаке. Она становится 
# руной домой. Открывает сундук, берет реги и 1 пустую руну. В сундуке 
# должны быть реги для рекола, мешок с рунами куда лететь (Runebag),
# мешок с бланк рунами для марка (BlankRunebag) и мешок куда кидать 
# руны (Dropbag) в процессе рекола. 
# Скрипт берет руну, кидает ее в мешок Dropbag и кастует рекол. Если 
# руна пропадает, он марчит новую. 
# Можно указать в скупке recall rune. Скрипт бланк руны автоматически 
# будет кидать в мешок для бланк рун. Эту фичу надо мониторить, если 
# мешок будет забит, скрипт зациклится и остановится. Вполне хватает 
# 10мин и у вас уже будет 100 бланк рун.
# Весь товар кидается в сундук. Если указать тип бланк мап, мапы будут
# кидаться в мешки по 255.
# Скрипт летает к вендорам и идет к ним. На это есть 10 секунд или ходилка
# будет остановлена.
# Медитирует и все такое.
# Скупает и плавит айрон. Массив вещей можно посмотреть где sub getireon()
# В скрипте что либо менять, кроме шапки или массива, искренни не рекомендую.

# ####################### ОТДЕЛЬНОЕ СПАСИБО ##########################
# Ghost King (oFF)/Sparco он приобрел этот скрипт и помогал эго довести 
# до ума, то есть не давал мне покоя. 
# Cupermag приобрел этот скрипт.
# stickman приобрел этот скрипт.
# За ранее извиняючь за публикацию скрипта, но это есть не избежно.
# фсами обкидать меня можно в игре - Dark Enemy/в скором времени Hell Knight.

# ################# ПЕРЕМЕННЫЕ которые нужно менять ################## 
# #################################################################### 
var BuyListName 	= 'buy' 			; название листа продажи (сейчас Reg) 
var Sunduk 			= '0x404AEDFD' 		; Главный сундук.
var Runebag 		= '0x402BB973' 		; Мешок с рунами куда лететь.
var Dropbag 		= '0x402B76B5' 		; Пустой мешок, куда будет кидать руны.
var BlankRunebag 	= '0x4006A346' 		; Мешок с бланк рунами.
var distance		= 6					; Расстояние на каком будем искать вендор.
var Tbag			= '0x0E76'			; Тип сумок для разгрузки мап если вы укажыте тип бланк мап.
var rb				= '0x402DBE72'		; ИД Рунбука. Если вас убили, он должен как то попасть домой.
var rh				= '73'				; Номер руны домой. Должа быть у сундука!
var helpX			= 980				; Если вас убили, чар ресается в миноке.
var helpY			= 55				; Без галки Undead это не возможно.
var iron			= 0					; Скупка айрона. 0-нет, 1-да.
var forge			= '0x404C3DA5' 		; Сериал форжы если вы будете скупать айрон.
var Nrune, BlankRune, RuniNetu, RuneHome, Dbag, flag, markflag
# ## По вопросам и предложениям обращаться на форум:
# http://forum.yoko.com.ua/viewtopic.php?t=15146
# #################################################################### 
# 2007-2009 # 
# ###     Тип итемов которые скупаем. Необходимо для выгрузки.     ####
# Макс. кол-во=15. Если у вас нету 15, заполняйте сколько есть. 
# Остальное оставите как есть.
var item1='0x0F7A' ; regi 
var item2='0x0F7B' ; regi  
var item3='0x0F86' ; regi 
var item4='0x0F88' ; regi 
var item5='0x0F8D' ; regi 
var item6='0x0F84' ; regi 
var item7='0x0F85' ; regi 
var item8='0x0F8C' ; regi 
var item9='0x0F0E' ; bottles
var item10='0x0F87' ; Eyes of Newt
var item11='0x0E34' ; blank scrolls
var item12='0x175D' ; folded cloth
var item13=''
var item14=''
var item15='' ; Blank maps
# ####################################################################
sub main()
	var n
	uo.set('buydelay','4000') 
	if not uo.getglobal('flagRes')=='1' then
		uo.exec('exec Resurrector')
		uo.setglobal('flagRes','1')
	endif
	uo.msg('Always run:on !!!')
	uo.msg('Track World Items:on !!!')
	uo.ignorereset()
	UO.Print("Поехали по магазинам.") 
	uo.findtype(rune,-1,'backpack')
	if uo.findcount() and not uo.count(rune)>1 then
		Runehome=uo.getserial('finditem')
	else
		uo.msg('Runehome not found! Terminate.')
		uo.exec('terminate all')
	endif
	Open(Sunduk)
	GrabBlankRune()	
	repeat	
		Open(Runebag)
		uo.findtype(rune,-1,RuneBag)
		while uo.findcount() 
			Nrune=uo.getserial('finditem')
			uo.moveitem('finditem',0,Dropbag)
			checklag()
			wait(700)
			RegCheck()
			RegCheck()
			if uo.mana < uo.int then
				meditation(uo.int)
			endif
			RecallRune(Nrune)
			uo.useskill('Meditation')
			if uo.injournal('The recall rune fades completely.') then
				markflag=1
				Mark(BlankRune,0)
				RuniNetu=1
			end if
			wait(500)
			BuyPRG()
			checklag()
			RecallRune(RuneHome)
			uo.useskill('Meditation') # uo.useskill('Hiding')
			if uo.injournal('The recall rune fades completely.') then
				if RuniNetu==1 then
					Open(Sunduk)
					GrabBlankRune()
				endif			
				Mark(BlankRune,1)
				GrabBlankRune()
			end if
			if RuniNetu==1 then
				Open(Sunduk)
				GrabBlankRune()
			endif
			Open(Sunduk)
			if markflag==1 then
				uo.moveitem(Nrune,0,Dropbag)
				checklag()
				wait(700)
				markflag=0
			endif
			DropItems()
			uo.findtype(rune,-1,RuneBag)
		wend
		DropbagCheck()
	until uo.dead() 
end sub
sub Resurrector()
	var oldX,oldY 
	while 1
		if uo.dead() then
			uo.exec('terminate main')
			uo.TextOpen()
			if markflag==1 then
				uo.msg('.where')
				repeat
					wait(100)
				until uo.injournal(uo.getname('self')+": I am in")
				uo.textopen()
				uo.textprint(uo.journal(uo.injournal(uo.getname('self')+": I am in")-1))
				uo.textprint('- dead - mark failed - @ '+MakeTime())
			else
				uo.TextPrint('- dead - @ '+MakeTime())
			endif
			wait(5000)
			oldX = Uo.GetX() 
			oldY = Uo.GetY()
			repeat
				uo.lclick(helpX,helpY)
				checklag()
				wait(700)
				uo.lclick(264,308)
				checklag()
				wait(700)		
				uo.lclick(175,203)
				checklag()
				wait(5000)	
			until oldX<>UO.GetX() OR oldY<>UO.GetY()
			repeat
				uo.press(39)
				wait(2000)
			until UO.GetY()<534
			repeat
				uo.useobject('0x4001BDF0')
				wait(3000)
			until uo.life>0
			Open('backpack')
			uo.print('wait 60 seconds')
			wait(60000)
			gohome()
			Open(Sunduk)
			RegCheck()
			GrabBlankRune()
			Mark(Blankrune,1)
			if uo.waiting() then 
				uo.canceltarget() 
			endif 
			uo.exec('exec main')
		endif
		wait(5000)
	wend
endsub
sub gohome()
	var oldX=uo.getx('self')
	var oldY=uo.gety('self')
	uo.recall(rb,rh)
	repeat
		wait(700)
	until oldX<>uo.getx('self') && oldY<>uo.gety('self')
endsub
sub Open(what)
	uo.useobject(what)
	checklag()
	wait(800)
endsub
sub GrabBlankRune()
	Open(BlankRunebag)
	uo.findtype(rune,-1,BlankRunebag)
	if uo.findcount() then
		Blankrune=uo.getserial('finditem')
		uo.moveitem('finditem',0,'backpack')
		checklag()
		wait(700)
		uo.print('Взяли бланк руну')
		Runinetu=0
	else
		uo.print('Бланк рун больше нету! Скрипт остановлен.')
		uo.exec('terminate all')
	endif
endsub
sub Mark(RuneID,Place) 
	repeat
		if uo.mana<33 then
			meditation(33)
		endif
		checklag()
		Uo.Cast('Mark',RuneID) 
		WaitForMana()
	until not uo.injournal('The spell fizzles')
	if Place==0 then 
		Nrune=uo.getserial(RuneID)
	else 
		Runehome=uo.getserial(RuneID)
	endif 
endsub  
Sub RecallRune(nowrune)  
	uo.Print('улетаем по руне') 
	var oldX,oldY 
	oldX = Uo.GetX() 
	oldY = Uo.GetY()
	repeat
		if uo.mana<20 then
			meditation(20)
		endif
		Uo.Cast('Recall',nowrune)
		WaitForMana()
	Until oldX<>UO.GetX() AND oldY<>UO.GetY() 
end sub 
sub WaitForMana()
	VAR w,m=uo.mana
	for w=0 to 150
		if uo.mana<m then
			wait(500)
			return
		endif
		wait(500)
	next
endsub
sub BuyPRG()
	DIM Vens[2] 
	Vens[1]='0x0190'
	Vens[2]='0x0191' 
	var mx, my, mz, g, d 
	mx = UO.GetX('self') 
	my = UO.GetY('self') 
	mz = UO.GetZ('self') 
	uo.ignorereset() 
	uo.ignore('self') 
	UO.print('Начанаем Закупку!') 
	for d=1 to distance
		uo.set('finddistance',d)	
		for g=1 to 2 
			repeat 
				wait(100) 
				UO.FindType(Vens[g],-1,'ground') 
				If uo.FindCount()> 0 then
					if uo.getz('finditem')<uo.getz('self')+3 and uo.getz('finditem')>uo.getz('self')-3 then
						UO.Print(uo.GetName('finditem')+ ' Замечен, иду к нему.') 
						WalkN(0,0,'finditem')  
						If UO.GetDistance('finditem')<=2 then 
							UO.Print('Закупаю....')  
							uo.Buy(BuyListName,UO.GetName('finditem')) 
							checklag() 
							uo.msg(uo.GetName('finditem')+ ' bye guards') 
						else 
							UO.Print(uo.GetName('finditem')+ ' заныкался!, В &@$#% его.') 
						end if 
					endif
					uo.ignore('finditem') 
				end if 
			until uo.FindCount()==0 
		next 
	next
end sub 
sub DropbagCheck()
	uo.print('Проверяем мешок Dropbag')
	Open(Dropbag)
	uo.findtype(rune,-1,Dropbag)
	while uo.findcount()
		uo.moveitem('finditem',0,Runebag)
		checklag()
		wait(700)
		uo.print('Нашли руну. Кладем их в сумку Runebag.')
		uo.findtype(Rune,-1,Dropbag)
	wend
endsub
sub RegCheck()
	VAR i,q
	VAR kol=10
	Dim Regs[3]
	Regs[0]='0x0F7A'      ; Black Pearl 
	Regs[1]='0x0F7B'      ; Bood Moss 
	Regs[2]='0x0F86'      ; Mandrake Root
	
	for i=0 to 2
		if uo.count(Regs[i])<>kol then
			q=kol-uo.count(Regs[i])
			if q<>0 then
				if q>0 then
					uo.findtype(Regs[i],-1,Sunduk)
					if uo.findcount() then
						uo.moveitem('finditem',STR(q),'backpack')
						checklag()
						wait(700)
						uo.print('Берем реги для рекола...')
					else
						uo.msg('No regs')
						return
					endif
				else
					q=q*-1				
					uo.findtype(Regs[i],-1,'my')	
					if uo.findcount() then
						uo.moveitem('finditem',STR(q),Sunduk)
						checklag()
						wait(700)
						uo.print('Регов больше чем надо. Кидаем лишнее в сундук')
					endif
				endif
			endif
		endif
	next
endsub
sub meditation(mn)
	while uo.mana < mn
		if uo.Journal(0)=='You are preoccupied with thoughts of battle.' then
			uo.warmode(0)
		endif
		if uo.mana==uo.int then
			return
		endif
		checklag()
		Uo.Useskill('Meditation') 
		waitformed(mn) 
		wait(1000)
	wend
endsub 
sub waitformed(mn)
	var n
	for n=0 to 100
		if uo.injournal('You lose|You are at peace') or uo.mana>=mn then
			return
		endif
		wait(500)
	next
endsub 
sub DropItems()
	uo.ignore(Runebag)
	uo.ignore(Dropbag)
	uo.ignore(BlankRunebag)
	uo.print('Выкладываем купленное')
	if iron==1 then
		getiron()
	endif
	if item1<>'' then
		uo.findtype(item1,-1,'backpack')
		while uo.findcount()
			uo.moveitem('finditem',0,Sunduk)
			checklag()
			wait(700)
			uo.findtype(item1,-1,'backpack')
		wend
	endif
	if item2<>'' then
		uo.findtype(item2,-1,'backpack')
		while uo.findcount()
			uo.moveitem('finditem',0,Sunduk)
			checklag()
			wait(700)
			uo.findtype(item2,-1,'backpack')
		wend
	endif
	if item3<>'' then
		uo.findtype(item3,-1,'backpack')
		while uo.findcount()
			uo.moveitem('finditem',0,Sunduk)
			checklag()
			wait(700)
			uo.findtype(item3,-1,'backpack')
		wend
	endif
	if item4<>'' then
		uo.findtype(item4,-1,'backpack')
		while uo.findcount()
			uo.moveitem('finditem',0,Sunduk)
			checklag()
			wait(700)
			uo.findtype(item4,-1,'backpack')
		wend
	endif
	if item5<>'' then
		uo.findtype(item5,-1,'backpack')
		while uo.findcount()
			uo.moveitem('finditem',0,Sunduk)
			checklag()
			wait(700)
			uo.findtype(item5,-1,'backpack')
		wend
	endif
	if item6<>'' then
		uo.findtype(item6,-1,'backpack')
		while uo.findcount()
			uo.moveitem('finditem',0,Sunduk)
			checklag()
			wait(700)
			uo.findtype(item6,-1,'backpack')
		wend
	endif
	if item7<>'' then
		uo.findtype(item7,-1,'backpack')
		while uo.findcount()
			uo.moveitem('finditem',0,Sunduk)
			checklag()
			wait(700)
			uo.findtype(item7,-1,'backpack')
		wend
	endif
	if item8<>'' then
		uo.findtype(item8,-1,'backpack')
		while uo.findcount()
			uo.moveitem('finditem',0,Sunduk)
			checklag()
			wait(700)
			uo.findtype(item8,-1,'backpack')
		wend
	endif
	if item9<>'' then
		uo.findtype(item9,-1,'backpack')
		while uo.findcount()
			uo.moveitem('finditem',0,Sunduk)
			checklag()
			wait(700)
			uo.findtype(item9,-1,'backpack')
		wend
	endif
	if item10<>'' then
		uo.findtype(item10,-1,'backpack')
		while uo.findcount()
			uo.moveitem('finditem',0,Sunduk)
			checklag()
			wait(700)
			uo.findtype(item10,-1,'backpack')
		wend
	endif
	if item11<>'' then
		uo.findtype(item11,-1,'backpack')
		while uo.findcount()
			uo.moveitem('finditem',0,Sunduk)
			checklag()
			wait(700)
			uo.findtype(item11,-1,'backpack')
		wend
	endif
	if item12<>'' then
		uo.findtype(item12,-1,'backpack')
		while uo.findcount()
			uo.moveitem('finditem',0,Sunduk)
			checklag()
			wait(700)
			uo.findtype(item12,-1,'backpack')
		wend
	endif
	if item13<>'' then
		uo.findtype(item13,-1,'backpack')
		while uo.findcount()
			uo.moveitem('finditem',0,Sunduk)
			checklag()
			wait(700)
			uo.findtype(item13,-1,'backpack')
		wend
	endif
	if item14<>'' then
		uo.findtype(item14,-1,'backpack')
		while uo.findcount()
			uo.moveitem('finditem',0,Sunduk)
			checklag()
			wait(700)
			uo.findtype(item14,-1,'backpack')
		wend
	endif
	if item15<>'' then
		GetBag()
		uo.findtype(item15,-1,'backpack')
		while uo.findcount()
			uo.moveitem('finditem',0,Dbag)
			checklag()
			wait(700)
			CheckDbag()
			uo.findtype(item15,-1,'backpack')
		wend
	endif
	if uo.count(rune)>2 then
		Dbag=uo.getserial(BlankRunebag)
		uo.findtype(rune,-1,'backpack')
		while uo.findcount()
			uo.moveitem('finditem',0,Dbag)
			checklag()
			wait(700)
			uo.findtype(rune,-1,'backpack')
		wend
		uo.moveitem(RuneHome,0,'backpack')
		checklag()
		wait(700)
		uo.moveitem(BlankRune,0,'backpack')
		checklag()
		wait(700)	
	endif
endsub
sub getiron()
	var n
	Dim armor[50]
	armor[1]='0x1B77'  ; Heater Sheild
	armor[2]='0x1B76'  ; Heater Sheild
	armor[3]='0x1415'  ; Plate Mail
	armor[4]='0x1416'  ; Plate Mail
	armor[5]='0x141A'  ; Platemail Legs
	armor[6]='0x1411'  ; Platemail Legs
	armor[7]='0x1418'  ; Platemail Gauntlets
	armor[8]='0x1414'  ; Platemail Gauntlets
	armor[9]='0x1410'  ; Platemail Arms
	armor[10]='0x1419' ; Platemail Helm
	armor[11]='0x1412' ; Platemail Helm
	armor[12]='0x1413' ; Platemail Gorget
	armor[13]='0x13BF' ; Chainmail Tunic
	armor[14]='0x13BE' ; Chainmail Leggings
	armor[15]='0x13BB' ; Chainmail Coif
	armor[16]='0x13EB' ; ringmail gloves
	armor[17]='0x13F0' ; ringmail leggings
	armor[18]='0x13EE' ; ringmail sleeves
	armor[19]='0x13EC' ; ringmail tunic
	
	for n=1 to 19 # <-- не забываем указать макс. кол-во.
		uo.findtype(armor[n],'0x0000','backpack')
		while uo.findcount()
			uo.waittargetobject('finditem')
			uo.useobject(forge)
			checklag()
			wait(500)
			uo.findtype('0x1BEF',-1,'backpack')
			if uo.findcount() then
				uo.moveitem('finditem',0,Sunduk)
				checklag()
				wait(500)
			endif
			uo.findtype(armor[n],'0x0000','backpack')
		wend
	next
	uo.set('finddistance','1')
	uo.findtype('0x1BEF',-1,'ground')
	if uo.findcount() then
		uo.moveitem('finditem',0,Sunduk)
		checklag()
		wait(600)
	endif
endsub 
sub GetBag()
	flag=0
	repeat
		uo.print('Ищем мешок')
		uo.findtype(Tbag,-1,Sunduk)
		if uo.findcount() then
			Dbag=uo.getserial('finditem')
			Open(Dbag)
			uo.findtype(-1,-1,Dbag)
			if uo.findcount()>254 then
				uo.ignore(Dbag)
			else
				flag=1
			endif
		endif
	until flag==1
endsub
sub CheckDbag()
	uo.findtype(-1,-1,Dbag)
	if uo.findcount()>254 then
		uo.ignore(Dbag)
		GetBag()
	endif
endsub
sub WalkN(x,y,Target) ########################################## Ходилка 
	VAR LastTimer 
	LastTimer=UO.Timer() 
	VAR i 
	VAR dir,ldir,rdir,key,olddir 
	VAR dx,dy,Exit=0 
	VAR CacheLimit=9,CacheIndex="Text" 
	DIM CacheX[10], CacheY[10] 
	
	CacheX[0]="Test" 
	uo.say('')
	While Exit<>1

		If Target<>"" Then 
			dx=UO.GetX(Target)-UO.GetX() 
			dy=UO.GetY(Target)-UO.GetY()         
			If UO.GetDistance(Target)<2 OR LastTimer+100<UO.Timer() Then 
				wait(1000) 
				return
			Endif 
		Else 
			dx=x-UO.GetX() 
			dy=y-UO.GetY() 
			If dx==0 AND dy==0 OR LastTimer+100<UO.Timer() Then 
				return 
			Endif 
		Endif    
		If dx<>0 AND dy<>0 Then 
			If dx>0 AND dy>0 Then ; GoSE 
				dir=3 
				ldir=2 
				rdir=4 
				key=40 ; DownArrow 
				olddir=UO.GetDir() 
				If StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) Then 
					If olddir==2 Then ; GoNE 
						dir=1 
						ldir=0 
						rdir=1 
						key=39 ; RightArrow 
						While UO.GetDir()<>1 
							StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) 
						Wend 
					Else ; GoSW 
						dir=5 
						ldir=5 
						rdir=6 
						key=37 ; LeftArrow 
						While UO.GetDir()<>5 
							StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) 
						Wend 
					Endif 
				Endif 
			Endif 
			If dx>0 AND dy<0 Then ; GoNE 
				dir=1 
				ldir=0 
				rdir=2 
				key=39 ; RightArrow 
				olddir=UO.GetDir() 
				If StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) Then 
					If olddir==0 Then ; GoWN 
						dir=7 
						ldir=6 
						rdir=7 
						key=38 ; UpArrow 
						While UO.GetDir()<>7 
							StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) 
						Wend 
					Else ; GoSE 
						dir=3 
						ldir=3 
						rdir=4 
						key=40 ; DownArrow 
						While UO.GetDir()<>3 
							StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) 
						Wend 
					Endif 
				Endif 
			Endif 
			If dx<0 AND dy>0 Then ; GoSW 
				dir=5 
				ldir=4 
				rdir=6 
				key=37 ; LeftArrow 
				olddir=UO.GetDir() 
				If StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) Then 
					If olddir==6 Then ; GoWN 
						dir=7 
						ldir=7 
						rdir=0 
						key=38 ; UpArrow 
						While UO.GetDir()<>7 
							StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) 
						Wend 
					Else ; GoSE 
						dir=3 
						ldir=2 
						rdir=3 
						key=40 ; DownArrow 
						While UO.GetDir()<>3 
							StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) 
						Wend 
					Endif 
				Endif 
			Endif 
			If dx<0 AND dy<0 Then ; GoWN 
				dir=7 
				ldir=6 
				rdir=0 
				key=38 ; UpArrow 
				olddir=UO.GetDir() 
				If StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) Then 
					If olddir==0 Then ; GoNE 
						dir=1 
						ldir=1 
						rdir=2 
						key=39 ; RightArrow 
						While UO.GetDir()<>1 
							StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) 
						Wend 
					Else ; GoSW 
						dir=5 
						ldir=4 
						rdir=5 
						key=37 ; LeftArrow 
						While UO.GetDir()<>5 
							StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) 
						Wend 
					Endif 
				Endif 
			Endif 
		Endif 
		If dx<>0 AND dy==0 Then 
			If dx>0 Then ; GoE 
				dir=2 
				key=34 ; PgDown 
				olddir=UO.GetDir() 
				If StepEdit(UO.GetX(),UO.GetY(),dir,key) Then 
					If olddir==2 Then ; GoSE 
						dir=3 
						ldir=3 
						rdir=4 
						key=40 ; DownArrow 
						While UO.GetDir()<>3 
							StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) 
						Wend 
					Else ; GoNE 
						dir=1 
						ldir=1 
						rdir=0 
						key=39 ; RightArrow 
						While UO.GetDir()<>1 
							StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) 
						Wend 
					Endif 
				Endif 
			Endif        
			If dx<0 Then ; GoW 
				dir=6 
				key=36 ; Home key 
				olddir=UO.GetDir() 
				If StepEdit(UO.GetX(),UO.GetY(),dir,key) Then 
					If olddir==0 Then ; GoWN 
						dir=7 
						ldir=7 
						rdir=0 
						key=38 ; UpArrow 
						While UO.GetDir()<>7 
							StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) 
						Wend 
					Else ; GoSW 
						dir=5 
						ldir=4 
						rdir=5 
						key=37 ; LeftArrow 
						While UO.GetDir()<>5 
							StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) 
						Wend 
					Endif 
				Endif 
			Endif 
		Endif 
		If dx==0 AND dy<>0 Then 
			If dy>0 Then ; GoS 
				dir=4 
				key=35 ; End 
				If StepEdit(UO.GetX(),UO.GetY(),dir,key) Then 
					If olddir==2 Then ; GoSE 
						dir=3 
						ldir=2 
						rdir=3 
						key=40 ; DownArrow 
						While UO.GetDir()<>3 
							StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) 
						Wend 
					Else ; GoSW 
						dir=5 
						ldir=6 
						rdir=5 
						key=37 ; LeftArrow 
						While UO.GetDir()<>5 
							StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) 
						Wend 
					Endif 
				Endif 
			Endif     
			If dy<0 Then ;GoN 
				dir=0 
				key=33 ; PgUp 
				olddir=UO.GetDir() 
				If StepEdit(UO.GetX(),UO.GetY(),dir,key) Then 
					If olddir==2 Then ; GoNE 
						dir=1 
						ldir=1 
						rdir=2 
						key=39 ; RightArrow 
						While UO.GetDir()<>1 
							StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) 
						Wend 
					Else ; GoWN 
						dir=7 
						ldir=7 
						rdir=6 
						key=38 ; UpArrow 
						While UO.GetDir()<>7 
							StepArrow(UO.GetX(),UO.GetY(),dir,ldir,rdir,key) 
						Wend 
					Endif 
				Endif 
			Endif 
		Endif 
	Wend 
end sub 
sub StepEdit(x,y,dir,key) 
	VAR walkwait=250
	VAR ErrLevel=0 
	If UO.GetDir()<>dir Then 
		UO.Press(key) 
		wait(walkwait) 
		If UO.GetDir()<>dir Then 
			CheckLag() 
		Endif 
	Endif 
	UO.Press(key) 
	wait(walkwait) 
	If x==UO.GetX() AND y==UO.GetY() Then 
		CheckLag() 
		If x==UO.GetX() AND y==UO.GetY() Then 
			;zatik 
			ErrLevel=1 
		Endif 
	Endif 
	Return ErrLevel 
end sub 
sub StepArrow(x,y,dir,ldir,rdir,key) 
	VAR walkwait=250 
	VAR ErrLevel=0 
	If UO.GetDir()<>dir Then 
		UO.Press(key) 
		wait(walkwait) 
		If UO.GetDir()<>dir AND UO.GetDir()<>ldir AND UO.GetDir()<>rdir Then 
			CheckLag() 
		Endif 
	Endif 
	If UO.GetX()==x AND UO.GetY()==y Then 
		UO.Press(key) 
		wait(walkwait) 
		If UO.GetDir()==dir AND UO.GetX()==x AND UO.GetY()==y Then 
			CheckLag() 
			If UO.GetDir()==dir AND UO.GetX()==x AND UO.GetY()==y Then 
				;zatik          
				ErrLevel=1 
			Endif 
		Endif 
	Endif 
	Return ErrLevel 
end sub 
sub checklag() 
	repeat
		UO.DeleteJournal() 
		UO.Click('backpack') 
	until backpack()==1
endsub 
sub backpack()
	var n
	for n=0 to 200
		if uo.injournal('a backpack') then
			return 1
		endif
		wait(200)
	next
endsub 
sub Reconnector() 
	var ReconnectTime, RFlag 
	ReconnectTime = '0' 
	RFlag = 1 
	Repeat 
		While (UO.ObjAtLayer('Bpack') == '') 
			if RFlag Then 
				ReconnectTime = MakeTime() 
				RFlag = 0 
			endif 
			UO.Say('') 
			Wait(3000) 
			UO.Say('') 
			Wait(3000) 
			UO.Say('') 
			Wait(3000) 
			UO.LDblClick(357,164) 
			UO.LClick(616,459) 
			Wait(3000) 
		WEnd 
		Wait(3000) 
		if (RFlag == 0) and (ReconnectTime <> '0') Then 
			;UO.Exec('terminate all') 
			;UO.Exec('exec autoload') 
			UO.TextOpen() 
			UO.TextPrint('Disconnected & Reconnected @ '+ReconnectTime) 
			RFlag = 1 
			ReconnectTime = '0' 
		endif 
	Until false 
end sub 
sub MakeTime() 
	VAR D, T, Ret, i 
	Ret = STR(UO.Time()) 
	T = "" 
	For i = 0 To Len(Ret) 
		T = Ret[Len(Ret)-i] + T 
		If (I == 2) OR (I == 4) Then 
			T = ":" + T 
		EndIf 
	Next 
	Ret = STR(UO.Date()) 
	D = "" 
	For i = 0 To Len(Ret) 
		D = Ret[Len(Ret)-i] + D 
		If (I == 2) OR (I == 4) Then 
			D = "." + D 
		EndIf 
	Next 
	Ret = T + " @ " + D 
	RETURN Ret 
end sub 

Posted: 2009-10-26 18:05:04
by Nmy

Code: Select all

sub main()
	var chest='0x404AEDFD'
	
	uo.cancelmenu()
	uo.automenu('Cloth','Misc')
	uo.automenu('Misc','body sash')
	
	uo.useobject(chest)
	wait(1000)
	while 1
		uo.findtype('0x0E21',-1,'backpack')
		if uo.getquantity('finditem')>100 then
			uo.moveitem('finditem',0,chest)
			checklag()
			wait(600)
		endif	
		if uo.count('0x175D')<12 then
			uo.findtype('0x175D',-1,chest)
			if uo.findcount() then
				uo.moveitem('finditem','100','backpack')
				checklag()
				wait(600)
			endif
		endif
		uo.waittargettype('0x175D')
		uo.usetype('0x0F9D')
		waitforchange()
		uo.findtype('0x1541',-1,'backpack')
		if uo.findcount() then
			uo.waittargettype('0x1541')
			uo.usetype('0x0F9E')
			waitforchange()
		endif
	wend
endsub 
sub waitforchange()
	var n
	checklag()
	for n=1 to 100
		if uo.injournal('Tailoring failed|You put') then
			return
		endif
		wait(400)
	next
endsub
sub checklag() 
	repeat
		UO.DeleteJournal() 
		UO.Click('backpack') 
	until backpack()==1
endsub 
sub backpack()
	var n
	for n=0 to 400
		if uo.injournal('a backpack') then
			return 1
		endif
		wait(200)
	next
endsub