Суббота, 18.05.2024, 17:26
[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
  • Мини-чат
    Главная » Статьи » Мои статьи

    Скрипт на Тренировку
    ############################################################################################
    ### Глобальные переменные ###
    #############################

    Var UseMagery = 0 ## 1 - Включить тренировку скилла Magery
    ## Необходимо наличие в рюкзаке реагента (Nightshade)

    ## Важно: все остальные скиллы, прокачка которых включена в
    ## переменных, будут качаться только после того, как в рюкзаке
    ## закончится реагент для прокачки магии

    Var UseAnatomy = 0 ## 1 - Включить тренировку скилла Anatomy

    Var UseEvaluatingIntelligence = 0 ## 1 - Включить тренировку скилла Evaluating Intelligence

    Var UseArmsLore = 0 ## 1 - Включить тренировку скилла Arms Lore
    ## Необходимо наличие в рюкзаке любого предмета

    Var UseItemID = 0 ## 1 - Включить тренировку скилла Item Identification
    ## Необходимо наличие в рюкзаке любого предмета

    Var UseTasteID = 0 ## 1 - Включить тренировку скилла Taste Identification
    ## Необходимо наличие в рюкзаке еды

    Var UseSpiritSpeak = 0 ## 1 - Включить тренировку скилла Spirit Speak

    Var UseAnimalLore = 0 ## 1 - Включить тренировку скилла Animal Lore

    Var UseDetectHidden = 0 ## 1 - Включить тренировку скилла Detect Hidden

    Var UseBegging = 0 ## 1 - Включить тренировку скилла Begging

    Var UsePeacemaking = 0 ## 1 - Включить тренировку скиллов Peacemaking и Musicianship
    ## Необходимо наличие в рюкзаке музыкального инструмента

    Var UseEnticement = 0 ## 1 - Включить тренировку скилла Enticement
    ## Необходимо наличие в рюкзаке музыкального инструмента

    Var UseHealMeditation = 0 ## 1 - Включить тренировку скиллов Healing и Meditaion
    ## Необходимо наличие в рюкзаке бинтов, тарелки с водой и проклятой вещи

    Var UseVeterinary = 0 ## 1 - Включить тренировку скилла Veterinary
    ## Необходимо наличие в рюкзаке бинтов, тарелки с водой, проклятой вещи
    ## и реагентов для полиморфа (Blood Moss, Mandrake Root, Spider's Silk).
    ## Одновременная тренировка скилла Veterinary и скиллов Heal и Meditation
    ## невозможна!!!

    Var UseTracking = 0 ## 1 - Включить тренировку скилла Tracking

    Var UseSnooping = 0 ## 1 - Включить тренировку скилла Snooping. Рядом должен стоять чар, в рюкзак
    ## которого будем смотреть, и его окно должно быть открыто для выбора рюкзака.

    Var UseStealing = 1 ## 1 - Включить тренировку скилла Stealing. Рядом должен стоять чар, из рюкзака
    ## которого будем таскать монеты, окно чара должно быть открыто для выбора рюкзака.
    ## Имеет два режима, режим задается переменной StealingMode

    Var StealingMode = 1 ## Выбор режима используется только при включенной тренировке скилла Stealing.
    ## 1 - Использовать таскание предмета из рюкзака партнера, тем самым тренируя скилл
    ## Stealing. 0 - подбирать утащенные тренирующимся партнером предметы с земли.

    Var StealingItem = 0 ## Выбор предмета используется только при включенной тренировке скилла Stealing
    ## и в режиме StealingMode = 1.
    ## StealingItem = 0 - таскать монеты. StealingItem = 1 - таскать пустые колбочки.

    Var UseEating = 1 ## 1 - Включить поедание пищи раз в полчаса

    Var GuardZone = 0 ## 1 - Территория, где происходит тренировка, охраняется. В этом случае чар
    ## будет звать охрану, если в результате нападения на него уменьшится его
    ## здоровье.

    #####

    Var UseReconnect = 0 ## 1 - Использовать переподсоединение к сфере в случае разрыва связи.

    Var tim1, tim2 ## служебные переменные

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

    sub Train()

    SetObjects()

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

    if UseMagery == 1 then
    TrainMagery()
    endif

    tim1=UO.Timer()
    tim2=UO.Timer()

    Repeat

    if ((UO.Timer()-tim1) > 18000) and (UseEating == 1) then
    Eat()
    tim1=UO.Timer()
    endif

    if (UseHealMeditation == 0) and (UseVeterinary == 0) then
    if (UseAnatomy == 1) and (uo.SkillVal('Anatomy',1)<1000) then
    TrainAnatomy()
    endif

    if (UseEvaluatingIntelligence == 1) and (uo.SkillVal('Evaluate Intelligence',1)<1000) then
    TrainEvaluatingIntelligence()
    endif

    if (UO.Timer()-tim2>1200) and (UseSpiritSpeak == 1) and (uo.SkillVal('Spirit Speak',1)<1000) then
    TrainSpiritSpeak()
    endif

    if (UseBegging == 1) and (uo.SkillVal('Begging',1)<1000) then
    TrainBegging()
    endif

    if (UseTracking == 1) and (uo.SkillVal('Tracking',1)<1000) then
    TrainTracking()
    endif

    if (UsePeacemaking == 1) and ((uo.SkillVal('Peacemaking',1)<1000) or (uo.SkillVal('Musicianship',1)<1000)) then
    TrainPeacemaking()
    endif

    if (UseEnticement == 1) and (uo.SkillVal('Enticement',1)<1000) then
    TrainEnticement()
    endif

    if (UseArmsLore == 1) and (uo.SkillVal('Arms Lore',1)<1000) then
    TrainArmsLore()
    endif

    if (UseItemID == 1) and (uo.SkillVal('Item ID',1)<1000) then
    TrainItemID()
    endif

    if (UseTasteID == 1) and (uo.SkillVal('Taste Identification',1)<1000) then
    TrainTasteID()
    endif

    if (UseAnimalLore == 1) and (uo.SkillVal('Animal Lore',1)<1000) then
    TrainAnimalLore()
    endif

    if (UseDetectHidden == 1) and (uo.SkillVal('Detect Hidden',1)<1000) then
    TrainDetectHidden()
    endif

    if (UseSnooping == 1) and (uo.SkillVal('Snooping',1)<1000) then
    TrainSnooping()
    endif

    if (UseStealing == 1) and (uo.SkillVal('Stealing',1)<1000) then
    TrainStealing(StealingMode)
    endif
    endif

    if (UseHealMeditation == 1) and ((uo.SkillVal('Healing',1)<1000) or (uo.SkillVal('Meditation',1)<1000)) and (UseVeterinary == 0) then
    TrainHealMeditation()
    endif

    if (UseVeterinary == 1) and (uo.SkillVal('Veterinary',1)<1000) and (UseHealMeditation == 0) then
    TrainVeterinary()
    endif

    UO.DeleteJournal()
    Until UO.Dead()

    endsub # Train

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

    sub SetObjects()

    if (UseAnatomy == 1) or (UseEvaluatingIntelligence == 1) or (UseAnimalLore == 1) or (UseBegging == 1) then
    UO.Print('Выбери NPC: ')
    UO.Exec('addobject NPC')
    While UO.Targeting()
    Wait(100)
    Wend
    endif
    if (UseArmsLore == 1) or (UseItemID == 1) then
    UO.Print('Выбери предмет: ')
    UO.Exec('addobject Object')
    While UO.Targeting()
    Wait(100)
    Wend
    endif
    if (UseHealMeditation == 1) or (UseVeterinary == 1) then
    UO.Print('Выбери курсу: ')
    UO.Exec('addobject Curse')
    While UO.Targeting()
    Wait(100)
    Wend
    endif
    if (UseSnooping == 1) or ((UseStealing == 1) and (StealingMode == 1)) then
    UO.Print('Выбери чужой рюкзак: ')
    UO.Exec('addobject Backpack')
    While UO.Targeting()
    Wait(100)
    Wend
    endif
    if (UseTasteID == 1) or (UseEating ==1) then
    UO.Print('Выбери еду: ')
    UO.Exec('addobject Food')
    While UO.Targeting()
    Wait(100)
    Wend
    endif

    endsub # SetObjects

    ##########

    sub TrainMagery()
    var tim, k, flag

    tim=UO.Timer()
    flag=false

    While not flag
    UO.DeleteJournal()
    if ((UO.Timer()-tim) > 18000) and (UseEating == 1) then
    Eat()
    tim=UO.Timer()
    endif

    While not ((UO.Mana<70) or flag)
    CheckLag()
    UO.Cast('Poison','self')
    MyWait(500)
    if UO.InJournal('lack') then
    CheckLag()
    UO.Cast('Poison','self')
    MyWait(500)
    if UO.InJournal('lack') then
    flag=true
    uo.Print("1")
    endif
    endif
    MyWait(2000)
    Wend

    CheckLag()

    While UO.Mana<UO.INT
    UO.UseSkill('Meditation')
    k=0
    Repeat
    k=k+1
    MyWait(100)
    Until UO.InJournal("You are") or UO.InJournal("You lose") or k>200
    UO.DeleteJournal()
    MyWait(1000)
    Wend
    Wend

    CheckLag()
    endsub # TrainMagery

    ##########

    sub TrainHealMeditation()
    var Life, Mana, dLife, dMana, k

    CheckLag()
    if UO.Waiting() then
    UO.CancelTarget()
    endif
    Life=uo.Str
    Mana=uo.Int
    uo.UseObject('Curse')
    repeat
    if (UseAnatomy == 1) and (uo.SkillVal('Anatomy',1)<1000) then
    TrainAnatomy()
    endif
    if (UseEvaluatingIntelligence == 1) and (uo.SkillVal('Evaluate Intelligence',1)<1000) then
    TrainEvaluatingIntelligence()
    endif
    if (UO.Timer()-tim2>1200) and (UseSpiritSpeak==1) and (uo.SkillVal('Spirit Speak',1)<1000) then
    TrainSpiritSpeak()
    endif
    if (UseBegging == 1) and (uo.SkillVal('Begging',1)<1000) then
    TrainBegging()
    endif
    if (UseTracking == 1) and (uo.SkillVal('Tracking',1)<1000) then
    TrainTracking()
    endif
    if (UsePeacemaking == 1) and ((uo.SkillVal('Peacemaking',1)<1000) or (uo.SkillVal('Musicianship',1)<1000)) then
    TrainPeacemaking()
    endif
    if (UseEnticement == 1) and (uo.SkillVal('Enticement',1)<1000) then
    TrainEnticement()
    endif
    if (UseArmsLore == 1) and (uo.SkillVal('Arms Lore',1)<1000) then
    TrainArmsLore()
    endif
    if (UseItemID == 1) and (uo.SkillVal('Item ID',1)<1000) then
    TrainItemID()
    endif
    if (UseTasteID == 1) and (uo.SkillVal('Taste Identification',1)<1000) then
    TrainTasteID()
    endif
    if (UseAnimalLore == 1) and (uo.SkillVal('Animal Lore',1)<1000) then
    TrainAnimalLore()
    endif
    if (UseDetectHidden == 1) and (uo.SkillVal('Detect Hidden',1)<1000) then
    TrainDetectHidden()
    endif
    if (UseSnooping == 1) and (uo.SkillVal('Snooping',1)<1000) then
    TrainSnooping()
    endif
    if (UseStealing == 1) and (uo.SkillVal('Stealing',1)<1000) then
    TrainStealing(StealingMode)
    endif
    MyWait(100)
    if (uo.SkillVal('Meditation',1)>=1000) and (uo.SkillVal('Healing',1)<1000) then
    dLife=1
    dMana=0
    else
    if (uo.SkillVal('Meditation',1)<1000) and (uo.SkillVal('Healing',1)>=1000) then
    dLife=0
    dMana=1
    else
    dLife=2
    dMana=2
    endif
    endif
    until ((Life-uo.Life)>=dLife) and ((Mana-uo.Mana)>=dMana)
    CheckLag()
    uo.SetReceivingContainer(uo.GetSerial('backpack'))
    uo.Grab('0','Curse')
    uo.UnSetReceivingContainer(uo.GetSerial('backpack'))
    MyWait(500)

    while (UO.Mana<Mana) and (uo.SkillVal('Meditation',1)<1000)
    CheckLag()
    UO.UseSkill('Meditation')
    k=0
    repeat
    Wait(100)
    k=k+1
    until UO.InJournal("You are") or UO.InJournal("You lose") or k>200
    UO.DeleteJournal()
    wend

    while (UO.Life<Life) and (uo.SkillVal('Healing',1)<1000)
    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

    UO.FindType('0x0E21','0x0000','backpack')
    if UO.GetQuantity('finditem')<50 Then
    UO.FindType('0x0E20','0x0000','backpack')
    UO.WaitTargetType('0x1008')
    UO.UseObject('finditem')
    MyWait(1000)
    endif
    endsub # TrainHealMeditation

    ##########

    sub TrainVeterinary()
    var k, Life, dLife=1

    if uo.Str<=200 then
    repeat
    Eat()
    CheckLag()
    uo.WaitMenu('What do you want to polymorph', 'Daemon')
    uo.Cast('Polymorph')
    MyWait(10000)
    if UO.InJournal('lack') then
    While UO.Mana<UO.INT
    UO.UseSkill('Meditation')
    k=0
    Repeat
    k=k+1
    MyWait(100)
    Until UO.InJournal("You are") or UO.InJournal("You lose") or k>200
    UO.DeleteJournal()
    MyWait(1000)
    Wend
    endif
    until uo.Str>200
    endif

    CheckLag()
    if UO.Waiting() then
    UO.CancelTarget()
    endif
    Life=uo.Str

    uo.UseObject('Curse')
    repeat
    if (UseAnatomy == 1) and (uo.SkillVal('Anatomy',1)<1000) then
    TrainAnatomy()
    endif
    if (UseEvaluatingIntelligence == 1) and (uo.SkillVal('Evaluate Intelligence',1)<1000) then
    TrainEvaluatingIntelligence()
    endif
    if (UO.Timer()-tim2>1200) and (UseSpiritSpeak==1) and (uo.SkillVal('Spirit Speak',1)<1000) then
    TrainSpiritSpeak()
    endif
    if (UseBegging==1) and (uo.SkillVal('Begging',1)<1000) then
    TrainBegging()
    endif
    if (UseTracking==1) and (uo.SkillVal('Tracking',1)<1000) then
    TrainTracking()
    endif
    if (UsePeacemaking == 1) and ((uo.SkillVal('Peacemaking',1)<1000) or (uo.SkillVal('Musicianship',1)<1000)) then
    TrainPeacemaking()
    endif
    if (UseEnticement == 1) and (uo.SkillVal('Enticement',1)<1000) then
    TrainEnticement()
    endif
    if (UseArmsLore == 1) and (uo.SkillVal('Arms Lore',1)<1000) then
    TrainArmsLore()
    endif
    if (UseItemID == 1) and (uo.SkillVal('Item ID',1)<1000) then
    TrainItemID()
    endif
    if (UseTasteID == 1) and (uo.SkillVal('Taste Identification',1)<1000) then
    TrainTasteID()
    endif
    if (UseAnimalLore == 1) and (uo.SkillVal('Animal Lore',1)<1000) then
    TrainAnimalLore()
    endif
    if (UseDetectHidden == 1) and (uo.SkillVal('Detect Hidden',1)<1000) then
    TrainDetectHidden()
    endif
    if (UseSnooping == 1) and (uo.SkillVal('Snooping',1)<1000) then
    TrainSnooping()
    endif
    if (UseStealing == 1) and (uo.SkillVal('Stealing',1)<1000) then
    TrainStealing(StealingMode)
    endif
    MyWait(100)
    until (Life-uo.Life)>=dLife
    CheckLag()
    uo.SetReceivingContainer(uo.GetSerial('backpack'))
    uo.Grab('0','Curse')
    uo.UnSetReceivingContainer(uo.GetSerial('backpack'))
    MyWait(500)

    while (UO.Life<uo.Str) and (uo.SkillVal('Veterinary',1)<1000)
    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

    UO.FindType('0x0E21','0x0000','backpack')
    if UO.GetQuantity('finditem')<50 Then
    UO.FindType('0x0E20','0x0000','backpack')
    UO.WaitTargetType('0x1008')
    UO.UseObject('finditem')
    MyWait(1000)
    endif
    endsub # TrainVeterinary

    ##########

    sub TrainBegging()
    if UO.Waiting() then
    UO.CancelTarget()
    endif
    UO.DeleteJournal()
    CheckLag()
    UO.WaitTargetObject("NPC")
    UO.UseSkill('Begging')
    MyWait(3000)
    endsub # TrainBegging

    ##########

    sub TrainSnooping()
    var k

    Repeat
    if UO.Waiting() then
    UO.CancelTarget()
    endif
    UO.DeleteJournal()
    CheckLag()
    UO.UseObject('Backpack')
    MyWait(300)
    k=0
    Repeat
    MyWait(100)
    k=k+1
    Until UO.InJournal("You fail") or UO.InJournal("You have lost") or k>30
    Until not UO.InJournal("You fail")

    endsub # TrainSnooping

    ##########

    sub TrainStealing(mode)
    var k

    if mode == 1 then
    UO.DeleteJournal()
    CheckLag()
    if StealingItem == 0 then
    uo.FindType('0x0EED',0x0000,'Backpack')
    else
    uo.FindType('0x0F0E',0x0000,'Backpack')
    endif
    MyWait(200)
    if uo.GetQuantity('finditem')>0 then
    uo.UseSkill('Stealing','finditem')
    k=0
    Repeat
    MyWait(500)
    if StealingItem == 0 then
    uo.FindType('0x0EED',0x0000,uo.GetSerial('backpack'))
    else
    uo.FindType('0x0F0E',0x0000,uo.GetSerial('backpack'))
    endif
    k=k+1
    Until UO.InJournal("You fail") or UO.GetQuantity('finditem')>0 or k>7
    MyWait(500)
    if UO.GetQuantity('finditem')>0 then
    uo.DropHere('finditem')
    MyWait(500)
    endif
    else
    if StealingItem == 0 then
    uo.FindType('0x0EED',0x0000,uo.GetSerial('backpack'))
    else
    uo.FindType('0x0F0E',0x0000,uo.GetSerial('backpack'))
    endif
    if UO.GetQuantity('finditem')>0 then
    uo.DropHere('finditem')
    MyWait(500)
    endif
    if UseSnooping == 1 then
    TrainSnooping()
    endif
    endif
    else
    UO.DeleteJournal()
    CheckLag()
    UO.findtype('0x0EED','0x0000','ground')
    MyWait(200)
    if uo.GetQuantity('finditem')>0 then
    UO.Grab('All','finditem')
    MyWait(500)
    endif
    CheckLag()
    UO.findtype('0x0F0E','0x0000','ground')
    MyWait(200)
    if uo.GetQuantity('finditem')>0 then
    UO.Grab('All','finditem')
    MyWait(500)
    endif
    endif

    endsub # TrainStealing

    ##########

    sub TrainTracking()
    if UO.Waiting() then
    UO.CancelTarget()
    endif
    UO.DeleteJournal()
    CheckLag()
    uo.WaitMenu('Tracking','Animals')
    UO.UseSkill('Tracking')
    MyWait(1000)
    uo.RClick(50,50)
    endsub # TrainBegging

    ##########

    sub TrainDetectHidden()
    var k

    CheckLag()
    if UO.Waiting() then
    UO.CancelTarget()
    endif
    UO.DeleteJournal()
    UO.UseSkill('Detect Hidden')
    MyWait(300)
    k=0
    Repeat
    MyWait(100)
    k=k+1
    Until UO.InJournal("You can see") or UO.InJournal("You see") or k>30
    MyWait(3000)
    endsub # TrainDetectHidden

    ##########

    sub TrainAnimalLore()
    var k

    CheckLag()
    if UO.Waiting() then
    UO.CancelTarget()
    endif
    UO.DeleteJournal()
    UO.WaitTargetObject("NPC")
    MyWait(100)
    UO.UseSkill('Animal Lore')
    MyWait(300)
    If UO.InJournal("You can't see the target") Then
    if UO.Waiting() then
    UO.CancelTarget()
    endif
    UO.WaitTargetSelf()
    MyWait(100)
    UO.UseSkill('Animal Lore')
    Endif
    k=0
    Repeat
    MyWait(100)
    k=k+1
    Until UO.InJournal("You can't think") or UO.InJournal("own master") or k>30
    MyWait(3000)
    endsub # TrainAnimalLore

    ##########

    sub TrainTasteID()
    var k

    CheckLag()
    if UO.Waiting() then
    UO.CancelTarget()
    endif
    UO.DeleteJournal()
    UO.WaitTargetObject("Food")
    MyWait(100)
    UO.UseSkill('Taste Identification')
    MyWait(300)
    k=0
    Repeat
    MyWait(100)
    k=k+1
    Until UO.InJournal("You cannot discern") or UO.InJournal("It tastes") or k>50
    MyWait(3000)
    endsub # TrainTasteID

    ##########

    sub TrainItemID()
    var k

    CheckLag()
    if UO.Waiting() then
    UO.CancelTarget()
    endif
    UO.DeleteJournal()
    UO.WaitTargetObject("Object")
    MyWait(100)
    UO.UseSkill('Item Identification')
    MyWait(300)
    k=0
    Repeat
    MyWait(100)
    k=k+1
    Until UO.InJournal("You can't think") or UO.InJournal("You estimate") or k>50
    MyWait(3000)
    endsub # TrainItemID

    ##########

    sub TrainAnatomy()
    var k

    CheckLag()
    if UO.Waiting() then
    UO.CancelTarget()
    endif
    UO.DeleteJournal()
    UO.WaitTargetObject("NPC")
    MyWait(100)
    UO.UseSkill('Anatomy')
    MyWait(300)
    if UO.InJournal("You can't see the target") Then
    if UO.Waiting() then
    UO.CancelTarget()
    endif
    UO.WaitTargetSelf()
    MyWait(100)
    UO.UseSkill('Anatomy')
    endif
    k=0
    Repeat
    MyWait(100)
    k=k+1
    Until UO.InJournal("You can't think") or UO.InJournal("looks") or k>30
    MyWait(3000)
    endsub # TrainAnatomy

    ##########

    sub TrainPeacemaking()
    UO.DeleteJournal()
    if UO.Waiting() then
    UO.CancelTarget()
    endif
    CheckLag()
    UO.UseSkill('Peacemaking')
    MyWait(6000)
    endsub # TrainPeacemaking

    ##########

    sub TrainEnticement()
    UO.DeleteJournal()
    if UO.Waiting() then
    UO.CancelTarget()
    endif
    CheckLag()
    UO.WaitTargetObject("NPC")
    MyWait(100)
    UO.UseSkill('Enticement')
    MyWait(5000)
    endsub # TrainPeacemaking

    ##########

    sub TrainArmsLore()
    var k

    CheckLag()
    if UO.Waiting() then
    UO.CancelTarget()
    endif
    UO.DeleteJournal()
    UO.WaitTargetObject("Object")
    MyWait(100)
    UO.UseSkill('Arms Lore')
    MyWait(300)
    k=0
    Repeat
    MyWait(100)
    k=k+1
    Until UO.InJournal("this item") or UO.InJournal("This item") or k>50
    MyWait(3000)
    endsub # TrainArmsLore

    ##########

    sub TrainEvaluatingIntelligence()
    var k

    if UO.Waiting() then
    UO.CancelTarget()
    endif
    UO.DeleteJournal()
    CheckLag()
    UO.WaitTargetObject('NPC')
    UO.UseSkill('Evaluating Intelligence')
    MyWait(300)
    If UO.InJournal("You can't see the target") Then
    if UO.Waiting() then
    UO.CancelTarget()
    endif
    UO.WaitTargetSelf()
    CheckLag()
    UO.UseSkill('Evaluating Intelligence')
    Endif
    k=0
    Repeat
    MyWait(100)
    k=k+1
    Until UO.InJournal("You cannot seem") or UO.InJournal("looks") or UO.InJournal("unsure") or UO.InJournal("perform") or k>60
    MyWait(4000)
    endsub # TrainEvaluatingIntelligence

    ##########

    sub TrainSpiritSpeak()
    var k

    if UO.Waiting() then
    UO.CancelTarget()
    endif
    UO.DeleteJournal()
    CheckLag()
    UO.UseSkill('Spirit Speak')
    MyWait(300)
    k=0
    Repeat
    MyWait(100)
    k=k+1
    Until UO.InJournal("You fail") or UO.InJournal("You establish") or k>30
    MyWait(3000)
    tim2=UO.Timer()
    endsub # TrainSpiritSpeak

    ##########

    sub CheckLag()

    UO.DeleteJournal()
    UO.Click('backpack')
    Repeat
    Wait(500)
    Until UO.InJournal('backpack')

    endsub # CheckLag

    ##########

    sub Eat()
    var ttt, flag

    CheckLag()
    ttt=UO.Timer()
    flag=false
    while not (UO.InJournal("You are stuffed!") or UO.InJournal("to eat any") or UO.InJournal("No item found.") or UO.InJournal("a way to use that") or flag)
    UO.Exec("useobject 'Food'")
    if (UO.Timer()-ttt>150) then
    flag=true
    endif
    Wait(500)
    wend

    endsub # Eat

    ##########

    sub MyWait(time)
    var i, i1, count

    if (GuardZone == 1) then
    count = time/100
    i1 = 1
    for i = 1 to count
    if (i-i1)>=10 then
    i1 = i
    endif
    if (UO.life < UO.str) and ((i-i1) == 0) then
    UO.Say("Guards !!!")
    endif
    Wait(100)
    next
    else
    wait(time)
    endif
    endsub # MyWait

    ##########

    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
    endsub # 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
    endsub # Time

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

    Статистика

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