Yoko

All sides of Injection
It is currently 2024-03-28 16:57:42

All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: 2009-01-27 10:13:47 
Offline
User avatar

Joined: 2005-01-13 07:20:54
Posts: 528
Писалось для 1 человека на Оскоме для кача паладиновского скила.
Разливает бутылки с химией из кегов в круглые мешочки .
Кеги сложены в сундук или сумку.
Аналогично берутся пустые мешки и бутылки из сундучка.
Все это разливается и складывается по 250 в каждый мешочек и убирается в сундук.
(требуется разделить сундуки с пустыми и с полными мешками.

Скрипт жесть тк работает 100% но при этом с такой скорость разливает что бедный мой лоптоп начинает жутко лагать :)

Интресно со стороны смотреть как в секунду проносится по 30 бутылей :)

Запускать sub rasliv() предварительно поменять все параметры в настройках

Code:
# Mega Rasliv po sumkam po 250 banochek
# AdmiR 2008 FoReVeR
# Version 1.0 Oskom Opay Shard
###########################


##### --- Options - Настройки --- ####

var SundukGotovieSumki="0x40065A42"  # Сюда складываем наполненные мешочки
var BagPustieKegi="0x4019F2F9"   # Сюда скалыдваем пустые кеги
var BagPolnieKegi="0x402469AE"   # Тут наполненные кеги
var SundukPustieSumki="0x40010335"    # Тут храним пустые сумочки и пустые баночки

var PustoyBag="0x0E76"  # Круглая сумочка
var BottleType="0x0F0C"      # TYPE. Type Bottle will craft (GH). Тип изготовленных бутылок
var BottleColor=0

### --- End of options  - Конец настроек --- ###

var EmptyBottle="0x0F0E"
var keg="0x1940"

var kegID
var bagID
var bottle_num
var kol

#Открываем все необходимые сундуки для инициализации предметов.
#uo.useobject('backpack')
#uo.useobject(BagPolnieKegi)

Sub GetKeg()
  # Берем Полный кег
  uo.print("berem keg")
  uo.useobject(BagPolnieKegi)
  CheckLag()
  uo.findtype(keg,-1,BagPolnieKegi)
    if uo.findcount() then
     uo.moveitem("finditem",0,'backpack')
      wait(100)
   else
     uo.print("Нету полных кегов")
   end if
end sub

Sub GetBottle()
  # Считаем количество пустых банок в паке.
  uo.useobject('backpack')
  bottle_num=uo.count(EmptyBottle)
 
  # Берем пустые бутылки чтоб в паке было 55
  if bottle_num < 55 then
    uo.useobject(SundukPustieSumki)
    CheckLag()
    uo.findtype(EmptyBottle,0,SundukPustieSumki)
     if uo.findcount() then
       if uo.GetQuantity("finditem") > (55 - bottle_num) then
          kol= 55 - bottle_num
      else
          kol=0
      end if
        uo.moveitem("finditem",kol,'backpack')
      wait(200)
     else
       uo.print("В сундуке кончились пустые банки")
     end if
  end if
End sub
 
Sub GetBag()
  # Берем пустую сумочку
  uo.useobject(SundukPustieSumki)
  CheckLag()
  uo.findtype(PustoyBag,-1,SundukPustieSumki)
    if uo.findcount() then
     bagID=uo.getserial("finditem")
     uo.moveitem(bagID,0,SundukGotovieSumki)
      wait(100)
   else
     uo.print("Нету пустых сумочек")
     return 0
   end if
end sub

Sub PutKeg(kegID)
  # Кладем пустой кег в сумку с кегами.
  uo.moveitem(kegID,0,BagPustieKegi)
  uo.print("kladem keg")
end sub
 
 
Sub PutBottle()
  uo.findtype(-1,-1,bagID)
    if uo.findcount() < 250 then
     uo.findtype(BottleType,BottleColor,'backpack')
     uo.moveitem("finditem",0,bagID)
     #uo.print("ok Bottle")
   else
     GetBag()
     wait(100)
   end if
end sub

sub rasliv()
 
  var NumBottleInBag
 
  uo.useobject(SundukGotovieSumki)
  CheckLag()
   
  # Перекладываем пустую сумочку в сундук с полными сумками
    GetBag()
   
   
  # Разливаем в сумки .
  while 1
    if not uo.count(EmptyBottle) then
      GetBottle()
     CheckLag()
    end if
   CheckLag()
    uo.findtype(keg,-1,'backpack')
    if uo.findcount() then
     uo.print("nackalo")
     kegID=uo.getserial("finditem")
     uo.deletejournal()
     while uo.count(EmptyBottle) and not uo.injournal("You can't think")
       uo.deletejournal()
       uo.waittargettype(EmptyBottle)
      uo.useobject(kegID)
      while not uo.injournal("You can't think|You put the")
        wait(30)
      wend
      wait(50)
      wend
     uo.print("bottle")
     while uo.count(BottleType,BottleColor)
        PutBottle()
        wait(100)
     wend
      if uo.injournal("You can't think") then
       PutKeg(kegID)
      wait(100)
      end if
   else
     GetKeg()
   end if
  wend
 
end sub

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

Sub del(msg)
while uo.injournal(msg)
uo.setjournalline(uo.injournal(msg)-1,'')
wend
end sub

_________________
все для альфы , [url=http://newvlad.nm.ru/prog]здесь[/url]
модернизация ремонт продажа игровых консолей
Sky: admirka1 Москва


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