Yoko

All sides of Injection
It is currently 2024-04-28 08:26:01

All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: 2007-04-24 22:09:09 
Offline

Joined: 2007-04-16 14:35:51
Posts: 2
Здравствуйте, я несколько дней назад обратилась здесь с просьбой написать скрипт, отозвался один человек, написал, взял плату, но скрипт по какой-то неизвестной причине перестал работать. Вот так он выглядит:
Code:
sub BlackSmith()
#Первый прицел на инги
#Второй прицел на сундук в котором они находятся
#Третий прицел на мешок в котором сумки куда складывать скованные вещи
#Четвертый прицел на мешок, в который будут складываться заполненные сумки [255]
#
#
#
var colorIng, typeIng, BagForDaggers,BagType,k=0,a=0
var item=0x0F51 #Тип того что куём

  uo.AddObject('Ing')
  while uo.Targeting()
    wait(100)
  wend
 
  uo.AddObject('Sunduk')
  while uo.Targeting()
    wait(100)
  wend

  uo.AddObject('SundukWith')
  while uo.Targeting()
    wait(100)
  wend
 
  uo.AddObject('SundukTo')
  while uo.Targeting()
    wait(100)
  wend
 
  colorIng=uo.GetColor('Ing')
  typeIng=uo.GetGraphic('Ing')
  uo.FindType(typeIng,colorIng,'Sunduk')
  if uo.FindCount() then
    uo.Print('There are '+str(uo.GetQuantity('finditem'))+' ingots in a chest.')
    uo.FindType(typeIng,colorIng,'backpack')
    if uo.GetQuantity('finditem')<30 then
      uo.FindType(typeIng,colorIng,'Sunduk')
      if uo.FindCount() then
        uo.moveitem('finditem','30')
        wait(750)
      else
        uo.Print('There are no more ingot to smith.')
        wait(100)
      end if
    end if
  else
    uo.Print('There are no more ingot to smith.')
  end if
 
  uo.UseObject('SundukWith')
  wait(500)
  uo.UseObject('SundukTo')
  wait(500)
  uo.FindType('-1','-1','SundukWith')
  if uo.FindCount() then
    BagType=uo.GetGraphic('finditem')
  end if
  uo.FindType(BagType,'-1','SundukWith')
  if uo.FindCount() then
    uo.Print('There are ' + str(uo.FindCount()) + ' bag in a chest')
    wait(100)
  end if

  Menu()
 
  repeat
    uo.FindType(BagType,'-1','SundukWith')
    if uo.FindCount() then 
      BagForDaggers=uo.GetSerial('finditem')
      wait(100)
      uo.moveitem(BagForDaggers,'-1','backpack')
      wait(750)
    end if
    uo.UseObject(BagForDaggers)
    wait(500)
    repeat
      uo.DeleteJournal()
      k=0
      uo.UseType(typeIng)
      wait(100)
      repeat
        wait(100)
        k=k+1
      until uo.InJournal('put') || uo.InJournal('make') || (k>200)
      if uo.InJournal('put') then
        uo.FindType(item,colorIng,'backpack')
        if uo.FindCount() then
          uo.moveitem('finditem','all',BagForDaggers)
          wait(750)
          CheckLag()
        end if
        a=a+1
        wait(250)
      end if
      CheckLag()
      uo.FindType(typeIng,colorIng,'backpack')
      if uo.FindCount() && uo.GetQuantity('finditem')<10 then
        uo.FindType(typeIng,colorIng,'Sunduk')
        uo.Print('There are '+str(uo.GetQuantity('finditem'))+' ingots in a chest.')
        wait(50)
        if uo.FindCount() && uo.GetQuantity('finditem')>10 then
          uo.moveitem('finditem','30')
          wait(750)
        end if
        wait(50)
      else
        uo.Print('There are '+str(uo.GetQuantity('finditem'))+' ingots in a pack.')
        wait(50)
      end if
    until a>254
    a=0
    uo.moveitem(BagForDaggers,'-1','SundukTo')
    wait(500)
    CheckLag()
  until uo.Dead()   
end sub

sub Menu() #Функция меню
  uo.CancelMenu()
  uo.AutoMenu('Blacksmithing','Weapons') 
  uo.AutoMenu('Colored','Weapon')
  uo.AutoMenu('Weapons','Swords')
  uo.AutoMenu('Swords','Dagger') 
end sub

sub CheckLag()
  uo.DeleteJournal()
  uo.Click('backpack')
  repeat
    wait(100)
  until uo.InJournal('backpack')
end sub

Скрипт до недавнего времени, играю на шарде Dragon World, работал исправно, но затем чар перестал перекладывать кинжалы из бэкпака, в лежащий в бэкпаке мешок.
Будьте добры помоите исправить скрипт, чтобы он работал примерно так: были вписаны в скрипт айди сундука, в котором лежат слитки, айди слитков, из которых будут коваться вещи, сумка с пустыми мешками, сумка, куда складывались бы заполненные готовыми изделиями мешки. Заранее спасибо отозвавшимся.


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 52 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