DRW (2009) by Dark Enemy

Anything and all.

Moderators: Murderator+, Murderator

Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

sub main()
	var x=1
	var y=1
	repeat
		add()
		if not uo.getserial('item')==uo.getserial('self') then
			uo.moveitem('item',0,'lastcontainer',x,y,0)
		endif
		#x=x+11
		y=y+11
	until uo.getserial('item')==uo.getserial('self')
end sub

sub add()
	uo.addobject('item')
	while uo.targeting()
		wait(500)
	wend
endsub
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

sub unloadregs()
	VAR n, q, c
	Dim Req[50] ; Requirements
	Req[0]='0x0F7A' ; regi 
	Req[1]='0x0F7B' ; regi  
	Req[2]='0x0F86' ; regi  
	Req[3]='0x0F88' ; regi  
	Req[4]='0x0F8D' ; regi 
	Req[5]='0x0F84' ; regi 
	Req[6]='0x0F85' ; regi 
	Req[7]='0x0F8C' ; regi
	Req[8]='0x0F0E' ; gh
	Req[9]='0x0F0E' ; mana
	Req[10]='0x0F0E' ; refresh
	Req[11]='0x0E21' ; bandages
	Req[12]='0x1F52' ; paralyze scrolls
	Req[13]='0x0F0E' ; poison
	Req[14]='0x0F3F' ; arrows
	Req[15]='0x0F0E' ; empty bottles
	Req[16]='0x0E20' ; bloody bandages
	Req[17]='0x1F5F' ; fs	
	Req[18]='0x1BFB' ; bolts
	if (uo.getserial('backpack') <> uo.getserial('lastcontainer')) then
		c=uo.getserial('lastcontainer')
		for n=0 to 18
			uo.findtype(Req[n],-1,'my')
			while uo.findcount()
				uo.moveitem('finditem',0,c)
				checklag()
				wait(700)
				uo.findtype(Req[n],-1,'my')
			wend
		next
	endif
	uo.print(' -= done =- ')
endsub
Last edited by Nmy on 2009-11-05 12:52:11, edited 2 times in total.
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

sub poisoning()
	var sword
	if uo.objatlayer('Rhand')<>'' then
		sword=uo.objatlayer('Rhand')
		uo.findtype('0x0F0E','0x0998','my')
		if uo.findcount() then
			uo.waittargetobject(uo.getserial(sword),'finditem')
			uo.useskill('Poisoning')
		endif
	else
		if uo.objatlayer('Lhand')<>'' then
			sword=uo.objatlayer('Lhand')
			uo.findtype('0x0F0E','0x0998','my')
			if uo.findcount() then
				uo.waittargetobject(uo.getserial(sword),'finditem')
				uo.useskill('Poisoning')
			endif
		endif	
	endif
endsub
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

sub attack()
	var enemy=uo.journalserial(uo.injournal('is attacking you')-1)
	if enemy<>'0x00000000' then
		if uo.getnotoriety(enemy)<>1 then
			uo.attack(enemy)
			uo.print(uo.getname(enemy))
		else
			uo.print(uo.getname(enemy)+'синий')
		endif
	endif
	uo.deletejournal()
endsub
Last edited by Nmy on 2009-10-23 14:42:21, edited 3 times in total.
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

sub stoneduels()
	uo.recall('~0x0EDE','0x001C')
endsub
Last edited by Nmy on 2009-12-18 00:43:20, edited 1 time in total.
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

sub portal()
	uo.usefromground('0x0F6C')
endsub
Last edited by Nmy on 2009-12-18 00:43:42, edited 1 time in total.
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

sub arms()
	if uo.objatlayer('Rhand')<>'' then
		uo.waittargetobject(uo.objatlayer('Rhand'))
		uo.useskill('Arms Lore')
	else
		if uo.objatlayer('Lhand')<>'' then
			uo.waittargetobject(uo.objatlayer('Lhand'))
			uo.useskill('Arms Lore')
		endif
	endif
endsub
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

sub antifreeze()
	uo.waittargettype('0x0F03')
	uo.cast('Magic Arrow')
endsub
Last edited by Nmy on 2009-12-18 00:45:56, edited 1 time in total.
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

sub armor()
	var n
	Dim Loot[10]
	Loot[1]='0x1415'  ; Plate Mail
	Loot[2]='0x1416'  ; Plate Mail
	Loot[3]='0x141A'  ; Platemail Legs
	Loot[4]='0x1411'  ; Platemail Legs
	Loot[5]='0x1418'  ; Platemail Gauntlets
	Loot[6]='0x1414'  ; Platemail Gauntlets
	Loot[7]='0x1419' ; Platemail Helm
	Loot[8]='0x1412' ; Platemail Helm
	Loot[9]='0x1410'  ; Platemail Arms
	Loot[10]='0x1413' ; Platemail Gorget
	if uo.objatlayer('Torso') then
		VAR Torso=uo.objatlayer('Torso')
		VAR Legs=uo.objatlayer('Legs')
		VAR Arms=uo.objatlayer('Arms')
		VAR Gloves=uo.objatlayer('Gloves')
		VAR Hat=uo.objatlayer('Hat')
		VAR Neck=uo.objatlayer('Neck')
		VAR Lhand=uo.objatlayer('Lhand')
		uo.moveitem(Torso,0,'lastcontainer')
		wait(666)
		uo.moveitem(Legs,0,'lastcontainer')
		wait(666)
		uo.moveitem(Arms,0,'lastcontainer')
		wait(666)
		uo.moveitem(Gloves,0,'lastcontainer')
		wait(666)
		uo.moveitem(Hat,0,'lastcontainer')
		wait(666)
		uo.moveitem(Neck,0,'lastcontainer')
		wait(666)		
	else
		for n=1 to 8
			uo.findtype(Loot[n],-1,'lastcontainer')
			if uo.findcount() then
				uo.equip('Neck','finditem')
				wait(666)
			else
				uo.findtype(Loot[n+1],-1,'lastcontainer')
				if uo.findcount() then
				uo.equip('Neck','finditem')
					wait(666)
				endif
			endif
			n=n+1
		next
		for n=9 to 10
			uo.findtype(Loot[n],-1,'lastcontainer')
			if uo.findcount() then
				uo.equip('Neck','finditem')
				wait(666)	
			endif
		next
	endif
endsub
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

sub repair()
	var n, h
	VAR Torso=uo.objatlayer('Torso')
	VAR Legs=uo.objatlayer('Legs')
	VAR Arms=uo.objatlayer('Arms')
	VAR Gloves=uo.objatlayer('Gloves')
	VAR Hat=uo.objatlayer('Hat')
	VAR Neck=uo.objatlayer('Neck')
	VAR Lhand=uo.objatlayer('Lhand')

	if uo.count('0x13E3') then
		h=uo.getserial('_0x13E3')
	else
		uo.msg('hammer not found! terminating..')
		return
	endif
	
	if Torso<>'' then
		uo.moveitem(Torso,-1,'backpack')
		wait(400)
		uo.deletejournal()
		uo.waittargetobject(Torso)
		uo.useobject(h)
		repeat
			wait(100)
		until uo.injournal("You can't think of a way to use that item|You repair the")		
		uo.useobject(Torso)
	endif
	if Legs<>'' then
		uo.moveitem(Legs,-1,'backpack')
		wait(400)
		uo.deletejournal()
		uo.waittargetobject(Legs)
		uo.useobject(h)
		repeat
			wait(100)
		until uo.injournal("You can't think of a way to use that item|You repair the")		
		uo.useobject(Legs)
	endif
	if Arms<>'' then
		uo.moveitem(Arms,-1,'backpack')
		wait(400)
		uo.deletejournal()
		uo.waittargetobject(Arms)
		uo.useobject(h)
		repeat
			wait(100)
		until uo.injournal("You can't think of a way to use that item|You repair the")		
		uo.useobject(Arms)
	endif
	if Gloves<>'' then
		uo.moveitem(Gloves,-1,'backpack')
		wait(400)
		uo.deletejournal()
		uo.waittargetobject(Gloves)
		uo.useobject(h)
		repeat
			wait(100)
		until uo.injournal("You can't think of a way to use that item|You repair the")		
		uo.useobject(Gloves)
	endif
	if Hat<>'' then
		uo.moveitem(Hat,-1,'backpack')
		wait(400)
		uo.deletejournal()
		uo.waittargetobject(Hat)
		uo.useobject(h)
		repeat
			wait(100)
		until uo.injournal("You can't think of a way to use that item|You repair the")		
		uo.useobject(Hat)
	endif
	if Neck<>'' then
		uo.moveitem(Neck,-1,'backpack')
		wait(400)
		uo.deletejournal()
		uo.waittargetobject(Neck)
		uo.useobject(h)
		repeat
			wait(100)
		until uo.injournal("You can't think of a way to use that item|You repair the")		
		uo.useobject(Neck)
	endif
	if Lhand<>'' then
		uo.moveitem(Lhand,-1,'backpack')
		wait(400)
		uo.deletejournal()
		uo.waittargetobject(Lhand)
		uo.useobject(h)
		repeat
			wait(100)
		until uo.injournal("You can't think of a way to use that item|You repair the")		
		uo.useobject(Lhand)
	endif
	uo.print(' -= done =- ')
endsub
Last edited by Nmy on 2009-12-18 00:47:42, edited 1 time in total.
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

sub taming()
	var s, n
	Dim staff[2]
	staff[1]='0x13F8'
	staff[2]='0x13F9'
	for n=1 to 2
		uo.findtype(staff[n],-1,'my')
		if uo.findcount() then
			s=uo.getserial('finditem')
		endif
	next
	uo.addobject('animal')
	while uo.targeting()
		wait(500)
	wend
	repeat
		uo.equip('Lhand',s)
		uo.warmode(0)
		checklag()
		uo.waittargetobject('animal')
		uo.useobject(s)
		repeat
			wait(200)
		until uo.injournal('It seems to accept|You fail|already tame|see the creature|see the target|far away') or uo.Journal(0)=='You are preoccupied with thoughts of battle.'
		wait(500)
	until uo.injournal('It seems to accept|already tame|see the target')
	if uo.injournal('It seems to accept') then
		uo.useobject('animal')
	endif
endsub
Last edited by Nmy on 2009-12-18 00:48:15, edited 3 times in total.
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

### Taming для дрв. ################################
# 4776528 Nmy.
####################################################
# переменные каторые НЕнадо менять:
var Serial, flag
# переменные каторые надо менять:
var shrink = '0x0F0E' ; Тип шринка.
var colourshrink = '0x0388' ; цвет шринка.
var Chest = '0x401DBE20' ; ИД сундука.
var RuneBook = '0x402C19F1' ; ИД рунбуки.
var Tbeast = '0x00DC' ; Тип зверя каго тамим. 
var staff = '0x13F8' ; Тип палки для таминга.
var type = '0x20F6' ; Тип зверя после шринка.
var nomer1 = 21 ; Номер руны к зверю. (см. ниже)
var nomer2 = 33 ; Номер руны домой. (см. ниже)
var fish = '0x097B'
####################################################
# Номера для рекола по рунбуку номера:
# руна 1 это 21
# руна 2 это 33
# руна 3 это 46
# руна 4 это 58
# руна 5 это 64
# руна 6 это 73
# руна 7 это 88
# руна 8 это 94
# руна 9 это 1025
####################################################


sub main()
	while 1
		checklag()
		uo.print('Летим к ламе')
		GoPlace(nomer1)
		checklag()
		flag=0
		repeat
			wait(2800)
			getbeast()
			ws()
			uo.msg('guards a criminal!')
		until flag==1
		uo.print('Летим домой')
		GoPlace(nomer2)
		checklag()
		uo.print('Выгружаем зверя')
		UnLoadBeast()
	wend
endsub


sub getbeast()
	uo.set('finddistance','7')
	uo.findtype(Tbeast,-1,'ground')
	if uo.findcount() then
		uo.print('Нашли ламу')
		Serial=uo.getserial('finditem')
		flag=taming(Serial)
	endif
endsub


sub UnLoadBeast()
	grab()
	if uo.objatlayer('Horse') then
		uo.useobject('self')
		checklag()
		wait(1000)
		uo.findtype(shrink,colourshrink,'backpack')
		if uo.findcount() then
			uo.waittargetobject(Serial)
			uo.useobject('finditem')
			checklag()
			wait(1000)
		endif
		uo.set('finddistance','2')
		uo.findtype(type,-1,'ground')
		if uo.findcount() then
			uo.moveitem('finditem',0,Chest)
			checklag()
			wait(1000)
		endif
	endif
endsub


sub taming(kago)
	var uflag=0
	repeat
		repeat	
			checklag()
			cancelwaiting()
			uo.warmode(0)
			uo.waittargetobject(kago)
			uo.usetype(staff)
			uflag=tamingresult()
		until uflag<>0
		if uflag==1 then
			uo.msg('all come')
			WalkN(0,0,Serial)
			while not uo.objatlayer('Horse')
				if uo.getx(Serial)==0 and not uo.objatlayer('Horse') then
					return 0
				endif
				uo.useobject(kago)
				wait(1000)
				if uo.injournal('own that horse') then
					return 0
				endif
			wend
		endif
		if uflag==4 then
			return 0
		endif
		if uflag==3 then
			WalkN(0,0,kago)
		endif
	until uflag==1
	return 1
endsub


sub cancelwaiting()
	if uo.waiting() then
		uo.canceltarget()
	endif
endsub


sub tamingresult()
	var n
	for n=0 to 30
		wait(500)
		ws()
		if uo.injournal('It seems') then
			return 1
		endif
		if uo.injournal('fail') then
			return 2
		endif
		if uo.injournal('see the creature') then
			return 3
		endif
		if uo.injournal('already tame|see the target') then
			return 4
		endif
	next
	return 0
endsub


sub GoPlace(num)
	checklag()
	var oldX=uo.getx('self')
	var oldY=uo.gety('self')
	uo.recall(RuneBook,num)
	repeat
		wait(1000)
		ws()
	until oldX<>uo.getx('self') && oldY<>uo.gety('self')
endsub


sub grab()
	uo.useobject(Chest)
	checklag()
	wait(1000)
	uo.findtype(shrink,colourshrink,'backpack')
	if not uo.findcount() then
		uo.findtype(shrink,colourshrink,Chest)
		if uo.findcount() then
			uo.moveitem('finditem','1','backpack')
			wait(1000)
		else
			uo.msg('Нету шринков! Скрипт остановлен.')
			uo.exec('terminate all')
		endif
	endif
	toeat()
endsub


sub toeat() 
	uo.findtype(fish,-1,Chest) 
	if uo.findcount() then 
		uo.moveitem('finditem','50','backpack') 
		checklag()
		wait(1000) 
		repeat 
			uo.usetype(fish) 
			wait(400) 
		until uo.injournal('full to eat') 
	endif 
	uo.findtype(fish,-1,'backpack') 
	if uo.findcount() then 
		uo.moveitem('finditem',0,Chest) 
		checklag()
		wait(1000) 
	endif 
endsub


sub CheckLag() 
	repeat
		UO.DeleteJournal() 
		UO.Click('backpack') 
	until backpack()==1
end sub 


sub backpack()
	var n
	for n=0 to 100
		if uo.injournal('a backpack') then
			return 1
		else
			wait(1000)
		endif
		ws()
	next
	return 0
endsub


sub ws()
	if uo.journal(0)=='World is saving now...' then
		repeat
			wait(1000)
		until uo.journal(0)<>'World is saving now...'
	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" 
   While Exit<>1    
      If Target<>"" Then 
         dx=UO.GetX(Target)-UO.GetX() 
         dy=UO.GetY(Target)-UO.GetY() 
		 If UO.GetDistance(Target)<4 OR LastTimer+200<UO.Timer() Then 
             wait(1000) 
             return 
         Endif 
      Else 
         dx=x-UO.GetX() 
         dy=y-UO.GetY() 
         If dx==0 AND dy==0 OR LastTimer+200<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=300
   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=300 
   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 
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

sub main()
	uo.addobject('beast')
	while uo.targeting()
		wait(500)
	wend
	while 1
		checklag()
		uo.waittargetobject('beast')
		uo.useskill('Animal Lore')
		wait(4000)
	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
Last edited by Nmy on 2009-11-18 15:29:19, edited 1 time in total.
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

sub main()
	uo.addobject('arms')
	while uo.targeting()
		wait(500)
	wend
	while 1
		checklag()
		uo.waittargetobject('arms')
		uo.useskill('Arms Lore')
		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
Last edited by Nmy on 2009-11-18 15:30:44, edited 2 times in total.
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

Sub Lootground() 
	VAR n
	VAR Torso=uo.objatlayer('Torso')
	VAR Legs=uo.objatlayer('Legs')
	VAR Arms=uo.objatlayer('Arms')
	VAR Gloves=uo.objatlayer('Gloves')
	VAR Hat=uo.objatlayer('Hat')
	VAR Neck=uo.objatlayer('Neck')
	VAR Lhand=uo.objatlayer('Lhand')
	
	Dim Loot[39]
	Loot[1]='0x13B9' ; Viking Sword
	Loot[2]='0x0F62' ; Spear
	Loot[3]='0x0E87' ; Pitchfork
	Loot[4]='0x143E' ; Halberd
	Loot[5]='0x0F4D' ; Bardiche
	Loot[6]='0x13FA' ; Battle Axe
	Loot[7]='0x0F45' ; Executioner's Axe
	Loot[8]='0x13B1' ; Bow
	Loot[9]='0x0F4F' ; Heavy Crossbow
	Loot[10]='0x13FC' ; Crossbow
	Loot[11]='0x204E' ; Shroud
	Loot[12]='0x20D6' ; Dragon
	Loot[13]='0x0F03' ; Antifreeze
	Loot[14]='0x0F03' ; Antifreeze
	Loot[15]='0x1086' ; Braclet of Mana
	Loot[16]='0x0EED' ; Gold Coin
	Loot[17]='0x1F52' ; Paralyze Scroll
	Loot[18]='0x100C' ; Sheaf of Hay
	Loot[19]='0x100D' ; Sheaf of Hay
	Loot[20]='0x0F36' ; Sheaf of Hay
	Loot[21]='0x0E7D' ; Wooden Box
	Loot[22]='0x09AA' ; Wooden Box
	Loot[23]='0x03B6' ; Wooden Fance
	Loot[24]='0x0838' ; Wooden Fance
	Loot[25]='0x0F51' ; dagger
	Loot[26]='0x1440' ; cutlass
	Loot[27]='0x0F5E' ; broadsword
	Loot[28]='0x143C' ; hammer pick
	Loot[29]='0x143A' ; maul
	Loot[30]='0x1406' ; war mace
	Loot[31]='0x1404' ; war fork
	Loot[32]='0x1402' ; short spear
	Loot[33]='0x13FE' ; katana
	Loot[34]='0x0F5C' ; mace
	Loot[35]='0x13B5' ; scmitar
	Loot[36]='0x1400' ; kryss
	Loot[37]='0x1438' ; war hammer
	Loot[38]='0x0F60' ; longsword
	Loot[39]='0x0F4B' ; double axe
	
	Dim armor[12]
	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
	
	uo.set('finddistance','2')
	for n=1 to 12
		uo.findtype(armor[n],-1,'ground')
		if uo.findcount() then
			uo.useobject('finditem')
			wait(100)
		endif
	next
	
	if Torso<>'' then
		uo.useobject(Torso)
		wait(100)
	endif
	if Legs<>'' then
		uo.useobject(Legs)
		wait(100)
	endif
	if Arms<>'' then
		uo.useobject(Arms)
		wait(100)
	endif
	if Gloves<>'' then
		uo.useobject(Gloves)
		wait(100)
	endif
	if Hat<>'' then
		uo.useobject(Hat)
		wait(100)
	endif
	if Neck<>'' then
		uo.useobject(Neck)
		wait(100)
	endif
	if Lhand<>'' then
		uo.useobject(Lhand)
		wait(100)
	endif
	
	for n=1 to 39
		uo.findtype(Loot[n],-1,'ground')
		if uo.findcount() then
			uo.moveitem('finditem',0,'backpack')
			uo.print(' loot ')
			wait(666)
		endif
	next
	
	uo.print(' -= done =- ')	
endsub
Last edited by Nmy on 2009-10-02 17:31:26, edited 1 time in total.
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

sub healing()
	uo.waittargetobject('self')
	uo.usetype('0x0E21')
	wait(300)
	uo.exec('exec sword')
	hp()
endsub
sub hp()
	var life=uo.life
	var n, h	
	for n=0 to 60
		if uo.life>life+10  || uo.life>=uo.str || uo.injournal('they barely help|Healing was interrupted') then
			h=uo.life-life
			if uo.hidden() then
				uo.print('+'+STR(h))
			else
				uo.fontcolor('0x0044')
				uo.msg(STR(h))
			endif
			return
		endif
		if uo.life<life then
			return
		endif
		wait(100)
	next
endsub
sub sword()
	var n
	Dim weapon[20]
	weapon[1]='0x1B76' ; Shield
	weapon[2]='0x1B77' ; Shield
	weapon[3]='0x0F5E' ; broadsword
	weapon[4]='0x143A' ; maul
	weapon[5]='0x13B9' ; Viking Sword
	weapon[6]='0x0F60' ; longsword
	weapon[7]='0x0F62' ; Spear
	weapon[8]='0x0E87' ; Pitchfork	
	weapon[9]='0x143E' ; Halberd
	weapon[10]='0x0F4D' ; Bardiche
	weapon[11]='0x0F45' ; Executioner's Axe
	weapon[12]='0x0F4B' ; double axe
	weapon[13]='0x13FA' ; Despise

	for n=1 to 2
		uo.findtype(weapon[n])
		if uo.findcount() then
			uo.useobject('finditem')
		endif
	next
	for n=3 to 13
		uo.findtype(weapon[n],-1,'backpack')
		if uo.findcount() then
			uo.equip('Rhand','finditem')
			return
		endif
	next	
endsub
Last edited by Nmy on 2009-12-18 00:49:47, edited 7 times in total.
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

sub bow()
	var n
	Dim bow[3]
	bow[1]='0x13B1' ; bow
	bow[2]='0x0F4F' ; crossbow
	bow[3]='0x13FC' ; heavy crossbow
	
	for n=1 to 3
		uo.findtype(bow[n],-1,'backpack')
		if uo.findcount() then
			uo.useobject('finditem')
			return
		endif
	next
endsub
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

var pickaxe
sub main() 
	var mx, my, mz, i, j, f
	mx = UO.GetX('self') 
	my = UO.GetY('self') 
	mz = UO.GetZ('self') 
	GetPickaxe()
	while 1
		for i = mx-4 to mx+4 
			for j = my -4 to my+4 
				repeat
					if uo.injournal('You loosen some rocks but fail') then
						wait(10000)
					endif
					Tohide() 
					UO.Print('Копаем в координатах: '+str(mx-i)+' '+str(my-j))
					DigAhole(i,j,mz)
				until not uo.injournal('You loosen some rocks but fail')
			next 
		next 
	wend
endsub 
sub Tohide()
	while not uo.Hidden()
		uo.warmode(0)
		uo.Print('Пытаемся уйти в хайд...')
		uo.UseSkill('Hiding')
		wait(4000)
	wend
end sub
sub GetPickaxe()
	var n
	dim instrument[4]
	instrument[1]='0x0F39'
	instrument[2]='0x0F3A'
	instrument[3]='0x0E86'
	instrument[4]='0x0E85'
	for n=1 to 4
		uo.findtype(instrument[n],-1,'my')
		if uo.findcount() then
			pickaxe=uo.getserial('finditem')
			return
		endif
	next	
	while 1
		uo.print(' pickaxe not found ')
		wait(3000)
	wend
endsub
sub DigAhole(i,j,mz)
	var f
	for f=0 to 10
		checklag()
		uo.waittargettile('1341',i,j,mz) 
		uo.useobject(pickaxe)
		if waitforore()==1 then
			return
		endif
	next
endsub
sub waitforore()
	var n
	for n=0 to 50
		if uo.injournal('no ore here|location|far away|in rock|You have been revealed|You put') then
			return 1
		endif
		if uo.injournal('but fail') 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
Last edited by Nmy on 2009-12-14 22:58:15, edited 2 times in total.
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

sub main()
	uo.addobject('music')
	while uo.targeting()
		wait(500)
	wend
	while 1
		checklag()
		uo.useobject('music')
		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
Last edited by Nmy on 2009-11-18 15:33:47, edited 1 time in total.
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Post by Nmy »

Code: Select all

sub main()
	while 1
		checklag()
		uo.useskill('Peacemaking')
		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
Last edited by Nmy on 2009-11-18 15:34:23, edited 1 time in total.
Post Reply