фывфывф

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
vavanu4
Posts: 43
Joined: 2009-01-18 15:08:53

фывфывф

Post by vavanu4 »

Code: Select all

VAR Cont1 = '0x4023FEB7' ;ресурсы и пустые мешки 
VAR Cont2 = '0x4023FEA6' ;сундук де будут лежать полные мешки
VAR Count = 300 ;какое количество ресусров бёрем
var Tools = '0x1EBC' ;инструмент, при котором появляется
var Creat = '0x1085' ;тип созданной вещи(удочка, даггер и т.д.)
VAR Food = '0x097B' ;тип еды, кторую будем кушать
var Bag = '0x0E76' ;тип мешочков
var Source = '0x1BEF'
var BagSer, i=0, fizl=0, control=5, time, z


sub tinkIron()
UO.CancelMenu()
UO.AutoMenu('Tinkering','Jewelry')
UO.AutoMenu('Jewelry','necklace')
if UO.Count(Tools) > 0 then
   UO.FindType(Tools,'-1','backpack')
   UO.AddObject('objTools','finditem')
   main()
end if
UO.CancelMenu()
end sub

sub main()
var CountSource = 1 ;кол-во разных типов сырья, которые мы возьмем из сундука
Open('backpack')
NewBag()
if UO.Count(Source) then
   UO.FindType(Source,'0x0000', 'backpack')
   UO.MoveItem('finditem','-1',Cont1)
   wait(1000)
end if
UO.FindType(Source,'0x0000', Cont1)
UO.Grab(STR(Count),'finditem')
wait(1000)
CheckLag()       
while UO.Count(Source) > 0
   if UO.Count(Source) < 2 then
      UO.FindType(Source,'0x0000', Cont1)
      UO.Grab(STR(Count),'finditem')
      wait(1000)
   endif
   UO.DeleteJournal()
   UO.UseObject('objTools')
   Repeat
      wait(500)
   Until UO.InJournal('You put ') OR UO.InJournal('failed') or UO.InJournal('You fail ')   
   While UO.Count(Creat)>0
      UO.FindType(Creat,'-1',-1)
      UO.MoveItem('finditem','0',BagSer)
      If UO.Count(Creat)>0 then
         FastLootCheck()
      endif
      if UO.InJournal("Too many items") then
         NewBag()
      endif
   Wend     
Wend
UO.CancelMenu()
;Detect_Hidden()
end sub

sub Open(Container)
   UO.DeleteJournal()
   UO.UseObject(Container)
   wait(500)
end sub

sub FastLootCheck()
   UO.DeleteJournal()
   wait(450)
   If UO.InJournal("FastLoot") OR UO.InJournal("World save") then
      UO.Click('backpack')
      repeat
         wait(300)
      until UO.InJournal('backpack')
   Endif
end sub

sub NewBag()
   Open(Cont1)
   Open(Cont2)
   ToEat()
   UO.FindType(Bag, -1, Cont1)
   UO.Print('Ok')
   ;if UO.FindCount() < 1 then
   ;   Detect_Hidden()
   ;end if
   BagSer=UO.GetSerial('finditem')     
   UO.MoveItem(BagSer, 0, Cont2)
   wait(1000)
end sub

sub ToEat()
   UO.FindType('0x097B', '0x0000',Cont1)
   if UO.FindCount() > 0 then
      UO.MoveItem('finditem','20','backpack')
   else
      return
   end if
   repeat     
      CheckLag()
      uo.UseType('0x097B')
      while not uo.InJournal("can't") and not uo.InJournal('full') and not uo.InJournal('stuffed') and not uo.InJournal('hungry') and not uo.InJournal('satiated') and not UO.Dead()
         wait(100)
      wend
   until uo.InJournal('too full') or UO.Dead() or uo.InJournal("can't")
   UO.FindType('0x097B', '0x0000','backpack')
   if UO.FindCount() > 0 then
      UO.MoveItem('finditem','20','Cont1')     
   end if
end sub


sub CheckLag()
   UO.DeleteJournal()
   UO.Click('backpack')
   repeat
      wait(50)
   until UO.InJournal('backpack')
end sub   

ето дагеры


##################
# Black Smithing #
##################
#
# Ignots on the ground. Smith hammer on the right hand.
# We're standing near a forge, which we'll target and
# near ingots. If you can't find ingots - ,set finddistance 10
# When a quantity of produced item more than 20 -smelthing
# for ingots.
# 21.12.06 .Tested on shard Dragon World
#
var kls=0
var Container='0x4023FEA2' ;Сундук с ингами
var Containerb='0x4023FEA2' ;Сундук с багами
var Unload='0x4023FEA6' ;Куда все кидать
var CountIng=300 ; Сколько ингов брать
var meshok='0x0E76' ;Тип бага)
var smeshok

sub main()
var Exit=0, LastTimer
uo.useobject(Container)
wait(1000)
uo.useobject(Containerb)
wait(1000)
uo.useobject(Unload)
wait(1000)
var MenuIron="'Blacksmithing' 'Weapons'"
var MenuOther="'Colored' 'Weapons'"
var MenuSwords="Weapons' 'Swords'"
var MenuDagger="'Swords' 'Dagger'"
var MenuDagger1="'Swords' 'Dagger'"

var i=0

wait(1000)

dim ColorOfIng[10]
dim NameOre[10]
dim TypeOre[10]

NameOre[0]="' "
NameOre[1]="'Rusty "
NameOre[2]="'Old Copper "
NameOre[3]="'Dull Copper "
NameOre[4]="'Copper "
NameOre[5]="'Bronze "
NameOre[6]="'Silver "
NameOre[7]="'Shadow "
NameOre[8]="'Agapite "
NameOre[9]="'Rose "
NameOre[10]="'Blood Rock "

TypeOre[0]='0x1BEF' ; Iron
TypeOre[1]='0x1BEF' ; Rusty
TypeOre[2]='0x1BEF' ; Old Copper
TypeOre[3]='0x1BEF' ; Dull Copper
TypeOre[4]='0x1BE3' ; Copper
TypeOre[5]='0x1BEF' ; Bronze
TypeOre[6]='0x1BF5' ; Silver
TypeOre[7]='0x1BEF' ; Shadow
TypeOre[8]='0x1BEF' ; Agarite
TypeOre[9]='0x1BEF' ; Rose
TypeOre[10]='0x1BEF' ; RoseBlood Rock

ColorOfIng[0]='0x0000' ; Iron
ColorOfIng[1]='0x0750' ; Rusty
ColorOfIng[2]='0x0590' ; Old Copper
ColorOfIng[3]='0x060A' ; Dull Copper
ColorOfIng[4]='0x0000' ; Copper
ColorOfIng[5]='0x0488' ; Bronze
ColorOfIng[6]='0x0000' ; Silver
ColorOfIng[7]='0x096B' ; Shadow
ColorOfIng[8]='0x0193' ; Agarite
ColorOfIng[9]='0x0014' ; Rose
ColorOfIng[10]='0x04C2' ; Blood Rock

while not uo.dead()

for i=0 to 10
checklags()
uo.FindType(TypeOre[i],ColorOfIng[i],Container)
if uo.GetQuantity('finditem') > 10 then
uo.cancelmenu()
uo.Exec('automenu '+MenuDagger)
uo.Exec('automenu '+NameOre[i]+MenuSwords)
if i>0 Then
uo.Exec('automenu '+MenuOther)
end if
uo.Exec('automenu '+MenuDagger1)
uo.Exec('automenu '+MenuIron)
bs(TypeOre[i],ColorOfIng[i],NameOre[i])
endif
next



wend
end sub


sub bs(IngType,IngColor,NameOre)
var ext=0,vs,c=0

while ext <> 1
if kls == 0 then
checklags()
UO.UnSetCatchBag()
UO.SetCatchBag(Unload)
wait(2000)
UO.FindType( meshok, -1, Containerb )
if uo.FindCount() > 0 then
UO.Grab('1','finditem')
wait(2000)
smeshok=UO.GetSerial('finditem')
UO.UnSetCatchBag()
wait(2000)
UO.SetCatchBag(smeshok)
else
uo.print("Закончились мешки конец")
uo.exec("terminate all")
endif
kls=kls+1
wait(700)
end if

uo.FindType(IngType,IngColor,'backpack')
if uo.GetQuantity('finditem') < 10 then
checklags()
UO.UnSetCatchBag()
wait(2000)
GetItem(IngType,IngColor,CountIng,Container,'backpack')
uo.FindType(IngType,IngColor,'backpack')
if uo.GetQuantity('finditem') < 10 then
ext=1
wait(1500)
uo.print('Закончились '+NameOre+' инги берем другие')
GetItem(IngType,IngColor,'all','backpack',Container)
else
uo.print('Взяли ' + Str( UO.Count( IngType ) ) + ' ингов')
end if
UO.SetCatchBag(smeshok)
wait(1000)
end if

uo.DeleteJournal()
if ext <> 1 then
checklags()
uo.UseType(IngType)
repeat
wait(100)
until uo.InJournal('put') || uo.InJournal('fail')
endif

if uo.InJournal('put') then
checklags()
kls=kls+1
wait(500)
if kls == 256 then
kls=0
end if
end if
UO.Print('Осталось: ' + Str( UO.Count( IngType ) ) + ' ингов, сделано '+str(kls-1)+' дагеров' )



c=c+1
if c==10 then
c=0
uo.usetype('0x097B')
wait(700)
uo.usetype('0x097B')
wait(1000)
checklags()
uo.print("Spirit Speak...")
uo.useskill ("Spirit Speak")
uo.deletejournal()
repeat
wait(190)
until UO.InJournal("You establish a connection to the netherworld.") or UO.InJournal("You fail your attempt at contacting the netherworld.")
end if


wend
end sub

###########
# GetItem #
###########

sub GetItem(type, color, quantity, where , to)
uo.FindType(type,color,where)
if uo.FindCount() then
uo.moveitem('finditem',quantity,to)
wait(750)
else
return false
endif
end sub

sub checklags()
UO.DeleteJournal()
UO.Click('backpack')

Repeat
wait(700)
Until UO.InJournal('backpack')


end sub
Post Reply