Yoko

All sides of Injection
It is currently 2024-05-13 03:16:05

All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: 2007-08-05 11:51:12 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Code:
sub BlackSmithing()

var Sunduk=0x404425AB #Where are ingots and empty bags
var Sunduk2=0x40C42AC9 #Where to put bags with 50 daggers
var ingot=0x1BEF #Type of ingot.
var dagger=0x0F51 #Type of item wich was created
var bag=0x0E76 #Type of a bag where to put created items
var food=0x097B #Type of food
var msg1='Вы положили' #Msg 'You put'
var msg2='не' #Msg 'You fail'

var i,k
var container

repeat
  uo.UseObject(Sunduk)
  wait(500)
  uo.UseObject(Sunduk2)
  wait(500)
  uo.FIndType(bag,'-1',Sunduk)
  if uo.FindCount() then
    uo.moveitem('finditem')
    container=uo.GetSerial('finditem')
    wait(250)
  end if

  i=0
  repeat
    uo.FindType(ingot,'-1','backpack')
    if not uo.FindCount() || uo.GetQuantity('finditem')<50 then
      uo.FindType(ingot,'-1',Sunduk)
      if uo.FindCount() && uo.GetQuantity('finditem') > 100 then
        uo.moveitem('finditem','200')
        wait(1000)
      end if
    end if
    uo.DeleteJournal()
    k=0
    uo.WaitTargetType(ingot)
    uo.WaitMenu('Black','Weapon','Weapon','Fenc','Fenc','Dagger')
    uo.UseObject(uo.GetSerial(uo.ObjAtLayer('Rhand')))
    wait(500)
    repeat
      wait(100)
      k=k+1
    until uo.InJournal(msg1) || uo.InJournal(msg2) || k>100
    if uo.InJournal(msg1) then
      uo.FindType(dagger,'-1','backpack')
      if uo.FindCount() then
        uo.moveitem('finditem','all',container)
        wait(1000)
      end if
      uo.Click(container)
      wait(250)
      if uo.InJournal('50') then
        uo.moveitem(container,'all',Sunduk2)
        wait(1000)
      end if
    end if
  until uo.InJournal('50')
  uo.FindType(food,'-1',Sunduk)
  if uo.FindCount() then
    uo.moveitem('finditem','20','backpack')
    wait(1000)
    uo.DeleteJournal()
    repeat
      uo.UseObject('finditem')
      wait(500)
    until uo.InJournal('simply')
    uo.FindType(food,'-1','backpack')
    if uo.FindCount() then
      uo.moveitem('finditem','all',Sunduk)
      wait(1000)
    end if
  end if
until uo.Dead()
end sub



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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 4 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:  
Powered by phpBB® Forum Software © phpBB Limited