Yoko

All sides of Injection
It is currently 2024-04-16 20:50:35

All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Alchemy
PostPosted: 2004-04-07 23:41:29 
Offline
User avatar

Joined: 2004-04-03 18:39:28
Posts: 173
помню перед крашом форума был тута 1 скрипт которий в [download old forum] нету ! на алхимию под дрв где чар сам берот реги и бутилки из сундука делает тоталы и складивает их в сундук ! если у ковота он сохранился немогли бы его запостит здес ! зарания спосибо !


Top
   
 Post subject:
PostPosted: 2004-04-09 03:12:26 
Offline
User avatar

Joined: 2004-04-09 02:56:03
Posts: 5
Location: GMT+3 [MSK]
маненько переделано, намешано, но в принципе работает... поэтому менять что-то влом :wink:
четыре мешка -- для того чтоб всё раздельно. поставил вокруг себя, узнал их id, записал сюда (там где Cont)... вроде всё... да, наличие всех регов не обязательно... реги можно менять, названия напитков -- тоже.
Code:
sub main()
var i=0, itx=0, ilz=0
   DIM Regi[3]
   Regi[1]='0x0F88' #ns
   Regi[2]='0x0F85' #gs
   Regi[3]='0x0F88' #Eyes of Newt

   DIM PotName[3]
   PotName[1]='Greater Poison'
   PotName[2]='Greater Heal'
   PotName[3]='Mana'

   DIM Pot[3]
   Pot[1]='0x0998' #Greater Poison
   Pot[2]='0x09BB' #Greater Heal
   Pot[3]='0x09DF' #Mana

   DIM Cont[3]
   Cont[0]='0x00000000' #бутылки и реги
   Cont[1]='0x00000000' #Greater Poison
   Cont[2]='0x00000000' #Greater Heal
   Cont[3]='0x00000000' #Mana

 while not uo.dead()
 for i=1 to 3

  HideMe()
  UO.FindType(Regi[i],-1,'backpack')
  CheckLag()
  If UO.GetQuantity('finditem')<20 then
# загружаемся
   wait(300)
   UO.FindType(Regi[i],-1,Cont[0])
   CheckLag()
   if UO.GetQuantity('finditem')>0 then
    wait(300)
    UO.Grab('100','finditem')
    wait(800)
    test()
   else
    HideMe()
    wait(10000)
   endif
  else

# работаем
  UO.DeleteJournal()
  UO.WaitTargetType(Regi[i]) #кликаем на рег
  UO.WaitMenu('What sort of potion do you want to make?',PotName[i])
  wait(500)
  test()
  UO.UseType('0x0F0E','0x0000')
  ilz=0
  while NOT UO.InJournal("You put") AND NOT UO.InJournal("You toss the failed") AND NOT ilz>=50
   ilz=ilz+1
   wait(500)
  wend
   
# выгружаемся
    UO.FindType('0x0F0E',Pot[i])
    CheckLag()
    If UO.GetQuantity('finditem')>0 then
     wait(300)
     UO.SetReceivingContainer(Cont[i])
     wait(300)
     UO.Grab('0','finditem')
     wait(800)
     test()
     UO.UnSetReceivingContainer()
     wait(300)
    endif
   endif
  Endif
 next #i
 wend

# если нас вдруг убили пишем лог в файл, потом мстить будем:
VAR f=file("!!!injlog.txt")
f.create()
for var i=100 to 0 step -1
  f.writeLn(STR(i)+": "+uo.Journal(i))
next
f.close()

end sub

sub HideMe()
var ik=0, ijj=0
If Uo.Hidden('self')==0 then
 repeat
  Uo.Useskill('Hiding')
  ik=0
  ijj=0
  repeat
   wait(300)
   ijj=ijj+1
   if UO.InJournal("You can't seem to hide here") or UO.InJournal("You have hidden yourself well") then
    Uo.DeleteJournal()
    ik=1
   else
    ik=0
   end if
  until ik==1 or ijj>=50
  ik=0
 until Uo.Hidden('self')==1
end if
end sub

sub test()
 var ii=0
 if UO.InJournal("World save has been initiated.") then
  UO.DeleteJournal()
  UO.Click('self')
  repeat
   ii=ii+1
   wait(300)
  until UO.InJournal(UO.GetName()+": "+UO.GetName()) or ii>=120  #так имена на дрв проверяются
 endif
 if UO.InJournal("Server is being PAUSED for Resync") then
  UO.DeleteJournal()
  repeat
   ii=ii+1
   wait(300)
  until UO.InJournal("Resync Complete!") or ii>=120
 endif
end sub

sub CheckLag()
var ihd=0
   UO.DeleteJournal()
   UO.Click('backpack')
   ihd=0
   repeat
   ihd=ihd+1
      wait(50)
   until UO.InJournal('backpack') or ihd>=120
end sub


Top
   
 Post subject:
PostPosted: 2004-04-09 11:46:02 
Offline
User avatar

Joined: 2004-04-03 18:39:28
Posts: 173
он пустие бутилки не берот с яшика =(


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited