Вторник, 24.06.2025, 20:10
[nIrVaNa]
Приветствую Вас Призывник | RSS

Меню сайта
Ultima Online
  • Ultima Online DRW
  • .::Games::.
  • EVE Online
  • Russia EVE-RU
  • Ukrainian EVE-UA
  • [6OP3bIE CAHTEXHuru] EVE
  • L2Europa.com
  • Clan Viktoria L2Europa.com
  • Мини-чат
    Главная » Статьи » Мои статьи

    Скрипт на Inscription
    ############################################################################################
    ### ###
    ### Inscription / Написание свитков ###
    ### Шард Dragon World ###
    ### v2.85 ###
    ### ###
    ### Автор Corwin ###
    ### ###
    ### Автор оригинала неизвестен ###
    ### ###
    ############################################################################################

    ############################################################################################
    ### Глобальные переменные ###
    #############################

    ## к скрипту Inscription
    var BlankType='0x0E34' ## - тип пустого свитка
    var BlankNumber=100 ## - количество свитков, забираемое из сундука за раз
    var BlankMinNumber=0 ## - минимальное количество свитков, которое надо оставить в сундуке
    var DoEating=1 ## 1 - включить потребление еды, 0 - отключить.
    var FoodType='0x097B' ## - тип еды, которую будем есть (fish steaks).
    var BagType='0x0E76' ## - тип мешка для складывания вещей
    var MaxWeight=700 ## - максимальный вес в рюкзаке
    var MaxNumber=500 ## - максимальное количество делаемых вещей в рюкзаке и для заполнения одного мешка
    var Reconnect=0 ## 1 - Включить реконнект на сервер, если выкинет, 0 - отключить реконнект.
    var UseBags=0 ## 1 - Использовать раскладывание делаемых свитков по мешкам
    var UseHide=1 ## 1 - включить уход в хайд во время крафта, 0 - отключить
    var UseHeal=1 ## 1 - включить лечение во время крафта, если здоровье падает, 0 - отключить
      ## бинты должны при этом лежать в рюкзаке

    ############################################################################################
    ### Код скрипта ###
    ###################

    sub Clumsy()
      Inscription("0x0F7B", "0x0F88", "", "", "First Circle", "Spell Circle 1", "Clumsy", "0x1F2E", 6)
    end sub

    sub CreateFood()
      Inscription("0x0F84", "0x0F85", "0x0F86", "", "First Circle", "Spell Circle 1", "Create Food", "0x1F2F", 6)
    end sub

    sub Feeblemind()
      Inscription("0x0F85", "0x0F88", "", "", "First Circle", "Spell Circle 1", "Feeblemind", "0x1F30", 6)
    end sub

    sub Heal()
      Inscription("0x0F84", "0x0F85", "0x0F8D", "", "First Circle", "Spell Circle 1", "Heal", "0x1F31", 6)
    end sub

    sub MagicArrow()
      Inscription("0x0F7A", "0x0F88", "", "", "First Circle", "Spell Circle 1", "Magic Arrow", "0x1F32", 6)
    end sub

    sub NightSight()
      Inscription("0x0F8D", "0x0F8C", "", "", "First Circle", "Spell Circle 1", "Night Sight", "0x1F33", 6)
    end sub

    sub ReactiveArmor()
      Inscription("0x0F84", "0x0F8C", "0x0F8D", "", "First Circle", "Spell Circle 1", "Reactive Armor", "0x1F2D", 6)
    end sub

    sub Weaken()
      Inscription("0x0F84", "0x0F88", "", "", "First Circle", "Spell Circle 1", "Weaken", "0x1F34", 6)
    end sub

    sub Agility()
      Inscription("0x0F7B", "0x0F86", "", "", "Second Circle", "Spell Circle 2", "Agility", "0x1F35", 10)
    end sub

    sub Cunning()
      Inscription("0x0F86", "0x0F88", "", "", "Second Circle", "Spell Circle 2", "Cunning", "0x1F36", 10)
    end sub

    sub Cure()
      Inscription("0x0F84", "0x0F85", "", "", "Second Circle", "Spell Circle 2", "Cure", "0x1F37", 10)
    end sub

    sub Harm()
      Inscription("0x0F88", "0x0F8D", "", "", "Second Circle", "Spell Circle 2", "Harm", "0x1F38", 10)
    end sub

    sub MagicTrap()
      Inscription("0x0F84", "0x0F8C", "0x0F8D", "", "Second Circle", "Spell Circle 2", "Magic Trap", "0x1F39", 10)
    end sub

    sub MagicUntrap()
      Inscription("0x0F84", "0x0F85", "0x0F8C", "", "Second Circle", "Spell Circle 2", "Magic Untrap", "0x1F3A", 10)
    end sub

    sub Protection()
      Inscription("0x0F84", "0x0F85", "0x0F8C", "", "Second Circle", "Spell Circle 2", "Protection", "0x1F3B", 10)
    end sub

    sub Strength()
      Inscription("0x0F86", "0x0F88", "", "", "Second Circle", "Spell Circle 2", "Strength", "0x1F3C", 10)
    end sub

    sub Bless()
      Inscription("0x0F84", "0x0F86", "", "", "Third Circle", "Spell Circle 3", "Bless", "0x1F3D", 15)
    end sub

    sub Fireball()
      Inscription("0x0F7A", "0x0F8C", "", "", "Third Circle", "Spell Circle 3", "Fireball", "0x1F3E", 15)
    end sub

    sub MagicLock()
      Inscription("0x0F8C", "0x0F7B", "0x0F84", "", "Third Circle", "Spell Circle 3", "Magic Lock", "0x1F3F", 15)
    end sub

    sub Poison()
      Inscription("0x0F88", "", "", "", "Third Circle", "Spell Circle 3", "Poison", "0x1F40", 15)
    end sub

    sub Telekinisis()
      Inscription("0x0F7B", "0x0F86", "", "", "Third Circle", "Spell Circle 3", "Telekinisis", "0x1F41", 15)
    end sub

    sub Teleport()
      Inscription("0x0F7B", "0x0F86", "", "", "Third Circle", "Spell Circle 3", "Teleport", "0x1F42", 15)
    end sub

    sub Unlock()
      Inscription("0x0F7B", "0x0F84", "", "", "Third Circle", "Spell Circle 3", "Unlock", "0x1F43", 15)
    end sub

    sub WallOfStone()
      Inscription("0x0F7B", "0x0F84", "", "", "Third Circle", "Spell Circle 3", "Wall of Stone", "0x1F44", 15)
    end sub

    sub ArchCure()
      Inscription("0x0F84", "0x0F85", "0x0F86", "", "Fourth Circle", "Spell Circle 4", "Archcure", "0x1F45", 25)
    end sub

    sub ArchProtection()
      Inscription("0x0F84", "0x0F85", "0x0F86", "0x0F8C", "Fourth Circle", "Spell Circle 4", "Arch Protection", "0x1F46", 25)
    end sub

    sub Curse()
      Inscription("0x0F84", "0x0F88", "0x0F8C", "", "Fourth Circle", "Spell Circle 4", "Curse", "0x1F47", 25)
    end sub

    sub FireField()
      Inscription("0x0F7A", "0x0F8D", "0x0F8C", "", "Fourth Circle", "Spell Circle 4", "Fire Field", "0x1F48", 25)
    end sub

    sub GreaterHeal()
      Inscription("0x0F84", "0x0F85", "0x0F86", "0x0F8D", "Fourth Circle", "Spell Circle 4", "Greater Heal", "0x1F49", 25)
    end sub

    sub Lightning()
      Inscription("0x0F7A", "0x0F86", "0x0F8C", "", "Fourth Circle", "Spell Circle 4", "Lightning", "0x1F4A", 25)
    end sub

    sub ManaDrain()
      Inscription("0x0F7A", "0x0F86", "0x0F8D", "", "Fourth Circle", "Spell Circle 4", "ManaDrain", "0x1F4B", 25)
    end sub

    sub Recall()
      Inscription("0x0F7A", "0x0F7B", "0x0F86", "", "Fourth Circle", "Spell Circle 4", "Recall", "0x1F4C", 25)
    end sub

    sub BladeSpirits()
      Inscription("0x0F7A", "0x0F86", "0x0F88", "", "Fifth Circle", "Spell Circle 5", "Blade Spirits", "0x1F4D", 30)
    end sub

    sub DispelField()
      Inscription("0x0F84", "0x0F7A", "0x0F8D", "0x0F8C", "Fifth Circle", "Spell Circle 5", "Dispel Field", "0x1F4E", 30)
    end sub

    sub Incognito()
      Inscription("0x0F7B", "0x0F84", "0x0F88", "", "Fifth Circle", "Spell Circle 5", "Incognito", "0x1F4F", 30)
    end sub

    sub MagicReflection()
      Inscription("0x0F84", "0x0F86", "0x0F8D", "", "Fifth Circle", "Spell Circle 5", "Magic Reflection", "0x1F50", 30)
    end sub

    sub MindBlast()
      Inscription("0x0F7A", "0x0F86", "0x0F88", "0x0F8C", "Fifth Circle", "Spell Circle 5", "Mind Blast", "0x1F51", 30)
    end sub

    sub Paralyze()
      Inscription("0x0F84", "0x0F86", "0x0F8D", "", "Fifth Circle", "Spell Circle 5", "Paralyze", "0x1F52", 30)
    end sub

    sub PoisonField()
      Inscription("0x0F7A", "0x0F88", "0x0F8D", "", "Fifth Circle", "Spell Circle 5", "Poison Field", "0x1F53", 30)
    end sub

    sub Summ.Creature()
      Inscription("0x0F7B", "0x0F86", "0x0F8D", "", "Fifth Circle", "Spell Circle 5", "Summon Creature", "0x1F54", 30)
    end sub

    sub Dispel()
      Inscription("0x0F84", "0x0F86", "0x0F8C", "", "Sixth Circle", "Spell Circle 6", "Dispel", "0x1F55", 35)
    end sub

    sub EnergyBolt()
      Inscription("0x0F7A", "0x0F88", "", "", "Sixth Circle", "Spell Circle 6", "Energy Bolt", "0x1F56", 35)
    end sub

    sub Explosion()
      Inscription("0x0F7A", "0x0F86", "0x0F8C", "", "Sixth Circle", "Spell Circle 6", "Explosion", "0x1F57", 35)
    end sub

    sub Invisibility()
      Inscription("0x0F7B", "0x0F88", "", "", "Sixth Circle", "Spell Circle 6", "Invisibility", "0x1F58", 35)
    end sub

    sub Mark()
      Inscription("0x0F7A", "0x0F7B", "0x0F86", "", "Sixth Circle", "Spell Circle 6", "Mark", "0x1F59", 35)
    end sub

    sub MassCurse()
      Inscription("0x0F84", "0x0F86", "0x0F88", "0x0F8C", "Sixth Circle", "Spell Circle 6", "Mass Curse", "0x1F5A", 35)
    end sub

    sub ParalyzeField()
      Inscription("0x0F7A", "0x0F85", "0x0F8D", "", "Sixth Circle", "Spell Circle 6", "Paralyze Field", "0x1F5B", 35)
    end sub

    sub Reveal()
      Inscription("0x0F7B", "0x0F8C", "", "", "Sixth Circle", "Spell Circle 6", "Reveal", "0x1F5C", 35)
    end sub

    sub ChainLightning()
      Inscription("0x0F7A", "0x0F86", "0x0F7B", "0x0F8C", "Seventh Circle", "Spell Circle 7", "Chain Lightning", "0x1F5D", 40)
    end sub

    sub EnergyField()
      Inscription("0x0F7A", "0x0F86", "0x0F8D", "0x0F8C", "Seventh Circle", "Spell Circle 7", "Energy Field", "0x1F5E", 40)
    end sub

    sub FlameStrike()
      Inscription("0x0F8D", "0x0F8C", "", "", "Seventh Circle", "Spell Circle 7", "Flamestrike", "0x1F5F", 40)
    end sub

    sub GateTravel()
      Inscription("0x0F7A", "0x0F86", "0x0F8C", "", "Seventh Circle", "Spell Circle 7", "Gate Travel", "0x1F60", 40)
    end sub

    sub ManaVampire()
      Inscription("0x0F7A", "0x0F7B", "0x0F86", "0x0F8D", "Seventh Circle", "Spell Circle 7", "Mana Vampire", "0x1F61", 40)
    end sub

    sub MassDispel()
      Inscription("0x0F7A", "0x0F84", "0x0F86", "0x0F8C", "Seventh Circle", "Spell Circle 7", "Mass Dispel", "0x1F62", 40)
    end sub

    sub MeteorSwarm()
      Inscription("0x0F7B", "0x0F8D", "0x0F86", "0x0F8C", "Seventh Circle", "Spell Circle 7", "Meteor Storm", "0x1F63", 40)
    end sub

    sub Polymorph()
      Inscription("0x0F7B", "0x0F86", "0x0F8D", "", "Seventh Circle", "Spell Circle 7", "Polymorph", "0x1F64", 40)
    end sub

    sub Earthquake()
      Inscription("0x0F7B", "0x0F85", "0x0F86", "0x0F8C", "Eighth Circle", "Spell Circle 8", "Earthquake", "0x1F65", 50)
    end sub

    sub EnergyVortex()
      Inscription("0x0F7A", "0x0F7B", "0x0F86", "0x0F88", "Eighth Circle", "Spell Circle 8", "Energy Vortex", "0x1F66", 50)
    end sub

    sub Resurrection()
      Inscription("0x0F7B", "0x0F84", "0x0F85", "", "Eighth Circle", "Spell Circle 8", "Resurrection", "0x1F67", 50)
    end sub

    sub AirElemental()
      Inscription("0x0F7B", "0x0F86", "0x0F8D", "", "Eighth Circle", "Spell Circle 8", "Air Elemental", "0x1F68", 50)
    end sub

    sub SummonDaemon()
      Inscription("0x0F7B", "0x0F86", "0x0F8D", "0x0F8C", "Eighth Circle", "Spell Circle 8", "Summon Daemon", "0x1F69", 50)
    end sub

    sub EarthElemental()
      Inscription("0x0F7B", "0x0F86", "0x0F8D", "", "Eighth Circle", "Spell Circle 8", "Earth Elemental", "0x1F6A", 50)
    end sub

    sub FireElemental()
      Inscription("0x0F7B", "0x0F86", "0x0F8D", "0x0F8C", "Eighth Circle", "Spell Circle 8", "Fire Elemenal", "0x1F6B", 50)
    end sub

    sub WaterElemental()
      Inscription("0x0F7B", "0x0F86", "0x0F8D", "", "Eighth Circle", "Spell Circle 8", "Water Elememental", "0x1F6C", 50)
    end sub

    ############################################################################################
    ### Процедуры поддержки ###
    ###########################

    Sub Inscription(regi1, regi2, regi3, regi4, circle1, circle2, spell, scrolls, mana)

    var Exit, AllExit=0, CExit=0, k, findnumber
    var CurrentBag
    var BlankInChest
    var tmp

      UO.Exec ('set distance 2')
      uo.Exec('set finddistance 3')
      UO.UnSetReceivingContainer()
      UO.DeleteJournal()
      UO.CancelMenu()
      uo.AutoMenu('Spell Circles', circle1)
      uo.AutoMenu(circle2, spell)

      SetObjects()
      uo.IgnoreReset()

      Open('ChestFrom')
      Open('ChestFrom2')
      Open('ChestTo')

      if Reconnect==1 then
      uo.Exec('exec Reconnect')
      endif

      while not uo.Dead() and not (AllExit==1) and not (CExit==1)
      uo.DeleteJournal()
      Exit=0

      if (UseBags==1) then
      uo.SetReceivingContainer('backpack')

      CheckLag()
      uo.print('Выбираем пустой мешок')
      uo.findtype(BagType,'-1','backpack')
      wait(100)
      if uo.findcount()<=0 then
      while Exit==0
      uo.findtype(BagType,'-1','ChestFrom')
      wait(100)
      if uo.findcount()>0 then
      CurrentBag=uo.GetSerial('finditem')
      Open(CurrentBag)
      uo.findtype('-1','-1',CurrentBag)
      wait(100)
      if uo.findcount()>0 then
      uo.Ignore(CurrentBag,'on')
      else
      uo.grab('0',CurrentBag)
      wait(1000)
      uo.IgnoreReset()
      Exit=1
      endif
      else
      uo.print('Пустые мешки закончились, скрипт остановлен')
      uo.IgnoreReset()
      Exit=1
      CExit=1
      endif
      wend
      else
      CurrentBag=uo.getserial('finditem')
      endif

      wait(1000)
      uo.UnSetReceivingContainer('backpack')
      Exit=0
      else
      CurrentBag=uo.getserial('ChestTo')
      endif

      while (Exit==0) and (CExit==0)
      if UseHeal == 1 then
      ToHeal()
      endif
      if UseHide == 1 then
      ToHide()
      endif

      CheckLag()
      uo.findtype(BlankType,'0x0000','ChestFrom')
      wait(100)
      if (uo.findcount()<=0) or (uo.GetQuantity('finditem')<0) then
      BlankInChest=0
      else
      BlankInChest=uo.GetQuantity('finditem')
      endif

      CheckLag()
      uo.findtype(BlankType,'0x0000',uo.GetSerial('backpack'))
      wait(100)
      if (uo.findcount()<=0) or (uo.GetQuantity('finditem')<1) then
      if (BlankInChest-BlankMinNumber)<BlankNumber then
      MoveItems(BlankType,'0x0000',str((BlankInChest-BlankMinNumber),0),'ChestFrom',uo.GetSerial('backpack'))
      else
      MoveItems(BlankType,'0x0000',str(BlankNumber,0),'ChestFrom',uo.GetSerial('backpack'))
      endif
      endif

      if regi1<>'' then
      CheckLag()
      wait(100)
      uo.findtype(regi1,'0x0000',uo.GetSerial('backpack'))
      if (uo.findcount()<=0) or (uo.GetQuantity('finditem')<1) then
      MoveItems(regi1,'0x0000',str(BlankNumber,0),'ChestFrom2',uo.GetSerial('backpack'))
      endif
      endif

      if regi2<>'' then
      CheckLag()
      uo.findtype(regi2,'0x0000',uo.GetSerial('backpack'))
      wait(100)
      if (uo.findcount()<=0) or (uo.GetQuantity('finditem')<1) then
      MoveItems(regi2,'0x0000',str(BlankNumber,0),'ChestFrom2',uo.GetSerial('backpack'))
      endif
      endif

      if regi3<>'' then
      CheckLag()
      uo.findtype(regi3,'0x0000',uo.GetSerial('backpack'))
      wait(100)
      if (uo.findcount()<=0) or (uo.GetQuantity('finditem')<1) then
      MoveItems(regi3,'0x0000',str(BlankNumber,0),'ChestFrom2',uo.GetSerial('backpack'))
      endif
      endif

      if regi4<>'' then
      CheckLag()
      uo.findtype(regi4,'0x0000',uo.GetSerial('backpack'))
      wait(100)
      if (uo.findcount()<=0) or (uo.GetQuantity('finditem')<1) then
      MoveItems(regi4,'0x0000',str(BlankNumber,0),'ChestFrom2',uo.GetSerial('backpack'))
      endif
      endif

      CheckLag()
      if (uo.Count(BlankType)<=0) or ((BlankInChest-BlankMinNumber)<BlankNumber) then
      uo.Print('Скрипт работу заканчивает')
      Exit=1
      AllExit=1
      endif
      if (regi1<>'') then
      if (uo.Count(regi1)<=0) and (AllExit<>1) then
      uo.Print('Скрипт работу заканчивает')
      Exit=1
      AllExit=1
      endif
      endif
      if (regi2<>'') then
      if (uo.Count(regi2)<=0) and (AllExit<>1) then
      uo.Print('Скрипт работу заканчивает')
      Exit=1
      AllExit=1
      endif
      endif
      if (regi3<>'') then
      if (uo.Count(regi3)<=0) and (AllExit<>1) then
      uo.Print('Скрипт работу заканчивает')
      Exit=1
      AllExit=1
      endif
      endif
      if (regi4<>'') then
      if (uo.Count(regi4)<=0) and (AllExit<>1) then
      uo.Print('Скрипт работу заканчивает')
      Exit=1
      AllExit=1
      endif
      endif

      if uo.Mana<mana then
      While UO.Mana<UO.INT
      UO.UseSkill('Meditation')
      k=0
      Repeat
      k=k+1
      Wait(100)
      Until UO.InJournal("You are") or UO.InJournal("You lose") or k>200
      UO.DeleteJournal()
      Wend
      endif

      if AllExit<>1 then
      k=0
      uo.DeleteJournal()
      CheckLag()
      UO.UseType(BlankType, '0x0000')
      while not UO.InJournal('You put') and not UO.InJournal('fail') and (k<200)
      wait(100)
      k=k+1
      wend
      if (uo.Weight>=MaxWeight) or (uo.Count(Scrolls)>=MaxNumber) then
      Exit=1
      endif
      endif
      wend

      if CExit==0 then
      CheckLag()
      MoveItems(Scrolls,'0x0000','0',uo.GetSerial('backpack'),CurrentBag)

      if (UseBags==1) then
      CheckLag()
      uo.SetReceivingContainer('ChestTo')
      uo.Grab('0',CurrentBag)
      wait(1000)
      uo.UnSetReceivingContainer('ChestTo')
      endif
      endif

      if DoEating==1 then
      CheckLag()
      Eating()
      endif
      wait(3000)
      wend

      uo.Print('Скрипт Inscription остановлен')

    end sub # Inscription

    ##########

    Sub SetObjects()

      UO.Print('Выберите сундук-источник с бланками, пустыми мешками и едой: ')
      UO.Exec('addobject ChestFrom')
      While UO.Targeting()
      Wait(100)
      Wend

      UO.Print('Выберите сундук-источник с реагентами: ')
      UO.Exec('addobject ChestFrom2')
      While UO.Targeting()
      Wait(100)
      Wend

      UO.Print('Выберите сундук-приемник: ')
      UO.Exec('addobject ChestTo')
      While UO.Targeting()
      Wait(100)
      Wend

    end sub # SetObjects

    ##########

    Sub CheckLag()

      while (uo.ObjAtLayer('Bpack')=='')
      wait(1000)
      wend
      if UO.Waiting() then
      UO.CancelTarget()
      endif
      uo.DeleteJournal()
      uo.Click('backpack')
      repeat
      wait(50)
      until uo.InJournal('backpack')

    end sub # CheckLag

    ##########

    Sub MoveItems(ItemType,ItemColor,ItemQuantity,FromContainer,ToContainer)

    var CurrentQuantity, flag=true

      CheckLag()
      uo.SetReceivingContainer(ToContainer)

      uo.FindType(ItemType,ItemColor,FromContainer)
      wait(100)
      CurrentQuantity=uo.GetQuantity('finditem') ## кол-во предметов в найденной стопке

      while (uo.FindCount()>0) and (flag==true) ## если что-то нашли и еще не все нужное переместили
      CheckLag()
      if val(ItemQuantity)<=CurrentQuantity then ## если переместить нужно все или меньше, чем в стопке
      uo.Grab(ItemQuantity,'finditem') ## перемещаем всю стопку или заданное кол-во
      wait(500)
      if ItemQuantity=='0' then ## если переместить надо все
      CheckLag()
      uo.FindType(ItemType,ItemColor,FromContainer) ## ищем следующую стопку
      wait(100)
      CurrentQuantity=uo.GetQuantity('finditem')
      else ## если уже переместили нужное кол-во - выход из процедуры
      flag=false
      endif
      else ## если переместить нужно не все, но больше, чем в найденной стопке
      uo.Grab('0','finditem') ## перемещаем всю стопку
      wait(500)
      ItemQuantity=str((val(ItemQuantity)-CurrentQuantity),0) ## вычисляем, сколько еще нужно
      CheckLag()
      uo.FindType(ItemType,ItemColor,FromContainer) ## ищем следующую стопку
      wait(100)
      CurrentQuantity=uo.GetQuantity('finditem')
      endif
      wend

      uo.UnSetReceivingContainer(ToContainer)

    end sub # MovingItems

    ##########

    Sub Eating()

    var flag=true

      MoveItems(FoodType,'-1','10','ChestFrom',uo.GetSerial('backpack'))

      repeat
      uo.DeleteJournal()
      uo.FindType(FoodType,'-1',uo.GetSerial('backpack'))
      wait(100)
      if uo.FindCount()>0 then
      CheckLag()
      uo.UseType(FoodType)
      repeat
      wait(100)
      until uo.InJournal('full') or uo.InJournal('stuffed') or uo.InJournal('hungry') or uo.InJournal('satiated') or uo.Dead()
      wait(1000)
      else
      flag=false
      endif
      until uo.InJournal('too full') or uo.Dead() or (flag==false)

      MoveItems(FoodType,'-1','0',uo.GetSerial('backpack'),'ChestFrom')

    end sub # Eating

    ##########

    Sub Open(Container)

      CheckLag()
      uo.UseObject(Container)
      wait(3000)

    end sub # Open

    ##########

    Sub Reconnect()

    var ReconnectTime,rFlag

      ReconnectTime='0'
      rFlag=1
      repeat
      while (uo.ObjAtLayer('Bpack')=='')
      if rFlag then
      ReconnectTime=Time()
      rFlag=0
      endif
      wait(20000)
      uo.Say('')
      wait(3000)
      uo.Say('')
      wait(3000)
      uo.Say('')
      wait(3000)
      uo.LDblClick(357,164)
      uo.LClick(616,459)
      wait(3000)
      wend

      wait(3000)
      if (rFlag==0) and (ReconnectTime<>'0') then
      uo.TextOpen()
      uo.TextPrint(ReconnectTime+' | Потеря связи с сервером, повторное подсоединение')
      rFlag=1
      ReconnectTime='0'
      endif
      until false

    end sub # Reconnect

    ##########

    Sub Time()

    var hh,mm,ss,hms,t=str(uo.Time())

      if len(t)<=2 then
      hh="0"
      mm="0"
      ss=t
      endif

      if len(t)==3 then
      hh="0"
      mm=left(t,len(t)-2)
      ss=right(t,len(t)-1)
      endif

      if len(t)==4 then
      hh="0"
      mm=left(t,len(t)-2)
      ss=right(t,len(t)-2)
      endif

      if len(t)==5 then
      hh=left(t,len(t)-4)
      hms=left(t,len(t)-2)
      mm=right(hms,len(hms)-1)
      ss=right(t,len(t)-3)
      endif

      if len(t)==6 then
      hh=left(t,len(t)-4)
      hms=left(t,len(t)-2)
      mm=right(hms,len(hms)-2)
      ss=right(t,len(t)-4)
      endif

      return hh+":"+mm+":"+ss

    end sub # Time

    ##########

    Sub ToHide()
      while not uo.Hidden()
      uo.Print('Пытаемся уйти в хайд...')
      CheckLag()
      uo.UseSkill('Hiding')
      repeat
      wait(200)
      until uo.InJournal('have hidden') or uo.InJournal('seem to hide')
      wait(100)
      wend
    end sub # ToHide

    ##########

    Sub ToHeal()
      var k
      while uo.Life < (uo.Str-10)
      CheckLag()
      uo.BandageSelf()
      k=0
      repeat
      Wait(100)
      k=k+1
      until UO.InJournal("You put") or UO.InJournal("barely help") or UO.InJournal("don't need") or k>300
      wend
    end sub # ToHeal





    Категория: Мои статьи | Добавил: -=DavidJones=- (15.11.2008)
    Просмотров: 1313 | Рейтинг: 0.0/0
    Всего комментариев: 0
    Добавлять комментарии могут только зарегистрированные пользователи.
    [ Регистрация | Вход ]

    Статистика

    Онлайн всего: 1
    Гостей: 1
    Пользователей: 0
    Наш опрос
    Как Вам наш сайт
    Всего ответов: 244
    Copyright MyCorp © 2025