Page 1 of 1

Подправьте

Posted: 2005-04-22 19:42:37
by Leo
Помогите вставить, пожалуйста, в этот скрипт нормальный спирит спик, я пробовал, да он почему-то не используется.

Code: Select all

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


sub carpFishingPole()
Tools = '0x102E'
Creat = '0x0DBF'
Source = '0x1BDD'
UO.CancelMenu()
UO.AutoMenu('Carpentry','Weapons ')
UO.AutoMenu('Weapons ','fishing ')
if UO.Count(Tools) > 0 then
   UO.FindType(Tools,'-1','backpack')
   UO.AddObject('objTools','finditem')
   main()
end if
UO.CancelMenu()
end sub

sub tinkIron()
Tools = '0x1EBC'
Creat = '0x1085'
Source = '0x1BEF'
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 tinkGold()
Tools = '0x1EBC'
Creat = '0x1086'
Source = '0x1BE9'
UO.CancelMenu()
UO.AutoMenu('Tinkering','Jewelry')
UO.AutoMenu('Jewelry','bracelet')
if UO.Count(Tools) > 0 then
   UO.FindType(Tools,'-1','backpack')
   UO.AddObject('objTools','finditem')
end if
main()
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()
SpiritSpeak()
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 SpiritSpeak()
 UO.CancelMenu()
 repeat
  CheckLag()
  uo.UseSkill('Spirit Speak') 
  repeat
   wait(50)
  until UO.InJournal("You establish") or UO.InJournal("netherworld")
 until uo.Dead()
end sub

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

Posted: 2005-04-22 22:45:46
by Sfagnum
после

Code: Select all

while UO.Count(Source) > 0 

Posted: 2005-04-23 09:05:38
by Leo
Спасибо :D