То, что ищут многие...

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

DRW. Простой мининг в вип шахте.

Code: Select all

sub ViP_Mining()

  var MaxWeight=550
  var CaveTile='1339'
  var k,i,x,y,pickaxe
 
  var msg1='put'
  var msg2='loosen'
  var msg3='too far away'
  var msg4='try mining'
  var msg5='no ore'
  var BagOre='0x40390B2D'
  var Sunduk='0x40260661'
  var pick='0x0E85' 

  DIM ore[4]
 
  ore[0]='0x19B7'
  ore[1]='0x19BA'
  ore[2]='0x19B8'
  ore[3]='0x19B9'
 
  uo.AddObject('Pickaxe')
  while uo.Targeting()
    wait(100)
  wend
 
  while not uo.Dead()
    for x=-3 to 3
      for y=-3 to 3
        uo.DeleteJournal()
        k=0
        uo.WaitTargetTile(CaveTile,uo.GetX('self')+x,uo.GetY('self')+y,uo.GetZ('self'))
        uo.UseObject('Pickaxe')
        repeat
          wait(250)
          k=k+1
        until uo.InJournal(msg1) or uo.InJournal(msg2) or uo.InJournal(msg3) or uo.InJournal(msg4) or uo.InJournal(msg5) or (k>100)
        if uo.InJournal('put') then
          if uo.Weight < MaxWeight then
            uo.DeleteJournal()
            CheckLag()
          else
            for i=0 to 3
              uo.FindType(ore[i],'-1','backpack')
              while uo.FindCount()
                uo.moveitem('finditem','all',BagOre)
                wait(1000)
                CheckLag()
                uo.FindType(ore[i],'-1','backpack')
              wend
              wait(50)
            next
          end if
        end if
        if not uo.Hidden() then
          while not uo.Hidden()
            uo.UseSkill('Hiding')
            wait(3500)
          wend
        end if
        wait(500)
      next
    next
  wend
end sub
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

DRW. Прототип функции крафта potion.

Code: Select all

Sub Alchemy(type,quantity,name)
  var i,k
  var msg1='put'
  var msg2='toss'
  for i=0 to quantity
    uo.FindType(type,'-1','backpack')
    if uo.FindCount() then
      uo.DeleteJournal()
      k=0
      uo.WaitMenu('What',name)
      uo.UseType(type)
      repeat
        wait(100)
        k=k+1
      until uo.InJournal(msg1) || uo.InJournal(msg2) || (k>100)
      wait(500)
    end if
  next
end sub

Пример:

Code: Select all

sub Create_Total_Mana()
  Alchemy('0x0F87',25,'Total')
end sub


Code: Select all

sub Create_Total_Refresh()
  Alchemy('0x0F7A',10,'Total')
end sub


Code: Select all

sub Create_Greater_Heal()
  Alchemy('0x0F85',10,'Greater')
end sub


Code: Select all

sub Create_Deadly_Poison()
  Alchemy('0x0F88',10,'Deadly')
end sub


DRW. Прототип функции крафта скролов.

Code: Select all

Sub Inscription(circle,name,quantity)
  var blanc=0x0E34
  var msg1='put'
  var msg2='fail'
  var k,i
  uo.FindType(blanc,'-1','backpack')
  for i=0 to quantity
    k=0
    uo.DeleteJournal()
    uo.WaitMenu('Spell',Circle,'Spell',name)
    uo.UseType(blanc)
    repeat
      wait(100)
      k=k+1
    until uo.InJournal(msg1) || uo.InJournal(msg2) || (k>100)
    wait(50)
  next
end sub


Пример :

Code: Select all

sub Create_Paralyze()
  Inscription('Fifth','Paralyze',10)
end sub


Code: Select all

sub Create_Feeblemind()
  Inscription('First','Fee',15)
end sub
Last edited by Scripts Writer on 2007-07-16 10:57:03, edited 1 time in total.
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

DRW. Прокачка Forensic Evaluation. Стоим на месте и атакуем нпс по типу, пока не появится его труп. Далее пока сущ-ет труп используем скил и так по циклу.

Code: Select all

sub ForensicEvaluation() 
  uo.Set('finddistance','15')
  var corpse=0x2006
  var type=0x0190
  var k,i, corpseforskill , npc

while not uo.Dead()
  uo.FindType(type,'-1','ground')
  if uo.FindCount() then
    npc=uo.GetSerial('finditem')
    wait(50)
    uo.Attack(npc)
    repeat
      i=i+1
      wait(500)
      uo.FindType(corpse,'-1','ground')     
    until uo.FindCount() || (i>30)   
  else
    wait(50)
  end if
  uo.DeleteJournal()
  uo.FindType(corpse,'-1','ground')
  if uo.FindCount() then
    uo.WarMode(0)
   m:
    corpseforskill=uo.GetSerial('finditem')
    while uo.FindCount()
      uo.DeleteJournal()
      k=0
      uo.WaitTargetObject(corpseforskill)
      uo.UseSkill('Forensic Evaluation')
      repeat
        wait(100)
        k=k+1
      until uo.InJournal('can') || uo.InJournal('looks') || (k>100)
      uo.FindType(corpse,'-1','ground')
    wend
  else
    wait(50)
  end if
wend
end sub
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

ап :)
I'm
Expert!
Posts: 1396
Joined: 2004-10-15 22:38:04
Location: Moscow City.
Contact:

Post by I'm »

Scripts Writer wrote:DRW. Прокачка Forensic Evaluation. Стоим на месте и атакуем нпс по типу, пока не появится его труп. Далее пока сущ-ет труп используем скил и так по циклу.

А фишка с прилоченным трупом у дома уже не пашет? :)
The End.
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Скрипт на ковку фулов + раскладка по мешкам.

Основа скрипта была взята из этой темы.

Code: Select all

############################
# edited by Scripts Writer #
# 14.07.07                 #
#####################################
# Script for skill Black Smithing.  #
# Create full armor and then        #
# put them into bags.               #
#####################################
# Find ignots into backpack. If it's found and quantity
# more than 150 then it would start to smith a full armor.
# Before creating every full armor item, it'll be check ingots.
# If the quantity of ignots less than 150, it'll find it on the ground
# near your character and get up 300 ingots if it would be found.
#
# Script look at journal to find true message for each full armor
# item , and recreate it if it would be "fail".
#
# When full armor will be created, script'll start function putitem()
# It takes a bag from the first container,put here created items, and put it
# into the second container. Repeat , until ingots could be found.
#####################################
#
# Delay -delay before creating items
# ing -type of ingots
# IngName -name of ingots
# bag -type of bags where to put created items
# Bag2 -ID of a second container
# CurrentBag -ID of a first container
#
#Array with types of created items
# full[0]=0x1413
# full[1]=0x1415
# full[2]=0x1411
# full[3]=0x1412
# full[4]=0x1410
# full[5]=0x1414
#
# i,meshok -local variables without obvious initialization
#####################################
sub Blacksmithing_Full_Rusty()
bsarm("Rusty",'0x1BEF')
end sub

sub Blacksmithing_Full_Old_Copper()
bsarm("Old Copper",'0x1BEF')
end sub

sub Blacksmithing_Full_Copper()
bsarm("Copper",'0x1BE3')
end sub

sub Blacksmithing_Full_Dull_Copper()
bsarm("Dull Copper",'0x1BEF')
end sub

sub Blacksmithing_Full_Silver()
bsarm("Silver",'0x1BF5')
end sub

sub Blacksmithing_Full_Gold()
bsarm("Golden",'0x1BE9')
end sub

sub Blacksmithing_Full_Shadow()
bsarm("Shadow",'0x1BEF')
end sub

sub Blacksmithing_Full_Rose()
bsarm("Rose",'0x1BEF')
end sub

sub Blacksmithing_Full_Agapite()
bsarm("Agapite",'0x1BEF')
end sub

sub Blacksmithing_Full_Blood_Rock()
bsarm("Blood Rock",'0x1BEF')
end sub

sub Blacksmithing_Full_Verite()
bsarm("Verite",'0x1BEF')
end sub

sub Blacksmithing_Full_Valorite()
bsarm("Valorite",'0x1BEF')
end sub

sub Blacksmithing_Full_Mytheril()
bsarm("Mytheril",'0x1BEF')
end sub

sub Blacksmithing_Full_Black_Rock()
bsarm("Black Rock",'0x1BEF')
end sub

sub Blacksmithing_Full_Obsidian()
bsarm("Obsidian",'0x1BEF')
end sub

sub Blacksmithing_Full_Plutonium()
bsarm("Plutonium",'0x08AF')
end sub

sub bsarm(IngName,ing)

  uo.Set('finddistance','3')
  var Delay=3000
 
while not uo.Dead()
  TestIng(IngName,ing)
   
  UO.cancelmenu()

  UO.AutoMenu(IngName+' Plate','Platemail (25')
  UO.AutoMenu(IngName+' Armor','Plate')
  UO.AutoMenu('Colored','Armor')
  UO.AutoMenu('Blacksmithing','Colored')

Plate:
  TestIng(IngName,ing)
  UO.DeleteJournal()
  UO.UseType(ing)

  while NOT UO.InJournal("You put") AND NOT UO.InJournal("You have failed")
    wait(500)
  wend
  if UO.InJournal("You have failed") then
    goto Plate
  endif

  UO.CancelMenu()
  wait(Delay)

  UO.AutoMenu(IngName+' Plate','Platemail Legs')
  UO.AutoMenu(IngName+' Armor','Plate')
  UO.AutoMenu('Colored','Armor')
  UO.AutoMenu('Blacksmithing','Colored')

Legs:
  TestIng(IngName,ing)
  UO.DeleteJournal()
  UO.UseType(ing)

  while NOT UO.InJournal("You put") AND NOT UO.InJournal("You have failed")
    wait(500)
  wend
  if UO.InJournal("You have failed") then
    goto Legs
  endif

  UO.CancelMenu()
  wait(Delay)

  UO.AutoMenu(IngName+' Plate','Platemail Arms')
  UO.AutoMenu(IngName+' Armor','Plate')
  UO.AutoMenu('Colored','Armor')
  UO.AutoMenu('Blacksmithing','Colored')

Arms:
  TestIng(IngName,ing)
  UO.DeleteJournal()
  UO.UseType(ing)

  while NOT UO.InJournal("You put") AND NOT UO.InJournal("You have failed")
    wait(500)
  wend
  if UO.InJournal("You have failed") then
    goto Arms
  endif
  UO.CancelMenu()
  wait(Delay)

  UO.AutoMenu(IngName+' Plate','Platemail Gauntlets')
  UO.AutoMenu(IngName+' Armor','Plate')
  UO.AutoMenu('Colored','Armor')
  UO.AutoMenu('Blacksmithing','Colored')

Gloves:
  TestIng(IngName,ing)
  UO.DeleteJournal()
  UO.UseType(ing)

  while NOT UO.InJournal("You put") AND NOT UO.InJournal("You have failed")
    wait(500)
  wend
  if UO.InJournal("You have failed") then
    goto Gloves
  endif

  UO.CancelMenu()
  wait(Delay)

  UO.AutoMenu(IngName+' Plate','Plate Helm')
  UO.AutoMenu(IngName+' Armor','Plate')
  UO.AutoMenu('Colored','Armor')
  UO.AutoMenu('Blacksmithing','Colored')

Helm:
  TestIng(IngName,ing)
  UO.DeleteJournal()
  UO.UseType(ing)

  while NOT UO.InJournal("You put") AND NOT UO.InJournal("You have failed")
    wait(500)
  wend
  if UO.InJournal("You have failed") then
    goto Helm
  endif

  UO.CancelMenu()
  wait(Delay)
   
  UO.AutoMenu(IngName+' Plate','Platemail Gorget')
  UO.AutoMenu(IngName+' Armor','Plate')
  UO.AutoMenu('Colored','Armor')
  UO.AutoMenu('Blacksmithing','Colored')

Gorget:
  TestIng(IngName,ing)
  UO.DeleteJournal()
  UO.UseType(ing)

  while NOT UO.InJournal("You put") AND NOT UO.InJournal("You have failed")
    wait(500)
  wend
  if UO.InJournal("You have failed") then
    goto Gorget
  endif

  UO.CancelMenu()
  wait(Delay)

  UO.AutoMenu(IngName+' Plate','Heater')
  UO.AutoMenu(IngName+' Armor','Plate')
  UO.AutoMenu('Colored','Armor')
  UO.AutoMenu('Blacksmithing','Colored')


putitem()

  CheckLag()
wend
end sub

Sub TestIng(IngName,ing)
  UO.FindType(ing,'-1','backpack')
  if UO.GetQuantity('finditem')<=150 then
    UO.FindType(ing,'-1','ground')
    if uo.GetQuantity('finditem') >100 then
      uo.moveitem('finditem','300','backpack')
      wait(1000)
    end if
  end if
end sub

sub putitem()

var i
var bag=0x0E76
var Bag2=0x4028ED32
var CurrentBag=0x403648C1

DIM full[6]

full[0]=0x1413
full[1]=0x1415
full[2]=0x1411
full[3]=0x1412
full[4]=0x1410
full[5]=0x1414

  var meshok
  uo.FindType(bag,'-1',CurrentBag)
  if uo.FindCount() then
    meshok=uo.GetSerial('finditem')
    uo.moveitem('finditem','all','backpack')
    wait(1000)
  end if
  uo.UseObject(meshok)
  wait(500)
 for i=0 to 5
  UO.FindType(full[i],'-1','backpack')
  if uo.FindCount() then
    uo.moveitem('finditem','-1',meshok)
    wait(1000)
    CheckLag()
  end if
 next
 wait(500)
 uo.moveitem(meshok,'-1',Bag2)
 wait(500)
end sub

sub CheckLag()
   UO.DeleteJournal()
   UO.Click('backpack')
   repeat
      wait(500)
   until UO.InJournal('backpack')
end sub

Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Code: Select all


#############################
# created by Scripts Writer #
#        Dragon World       #
#          16.07.07         #
#######################################
# Kill agressive npc without moving   #
#######################################
# Description in icq: 424131028       #
#######################################

sub main()

uo.Set('finddistance','3')

DIM sk[1]

sk[0]=0x0032
#sk[1]=

var i,npc
var weapon=0x400D5CA4
var bone=0x0F7E

repeat
 for i=0 to 0
  uo.FindType(sk[i],'-1','ground')
  if not uo.FindCount() then
    if uo.Hidden() then
      if uo.GetHp('self') <= uo.STR-10 then
        repeat
          wait(2000)
          uo.BandageSelf()
        until uo.hp>=uo.STR-10
        uo.UseObject(weapon)
        wait(500)
      else
        wait(500)
      end if
    else
      uo.UseSkill('Hiding')
      uo.print('Hiding...')
      wait(3000)
    end if
  else
    npc=uo.GetSerial('finditem')
    uo.Attack(npc)
    repeat
      wait(100)
    until uo.GetMaxHp(npc)==0
    CheckLag()
    uo.WaitTargetObject('lastcorpse')
    uo.UseObject(weapon)
    wait(500)
    uo.FindType(bone,'-1','lastcorpse')
    if uo.FindCount() then
      uo.moveitem('finditem','all')
      wait(750)
    end if
    uo.Ignore('lastcorpse')
    uo.WarMode(0)
  end if
 next
 wait(1000)
 CheckLag()
until uo.Dead()
end sub

sub CheckLag()
  uo.DeleteJournal()
  uo.Click('backpack')
  repeat
    wait(100)
  until uo.InJournal('backpack')
end sub
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Code: Select all

sub Halb_Bow()

var first=0x143E #Halberd
var second=0x13B1 #Bow

  if uo.GetGraphic(uo.ObjAtLayer('Lhand')) == "0x143E" then #type first
    uo.Equipt('Lhand',second)
  else
    uo.Equipt('Lhand',first)
  end if

end sub
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Code: Select all

sub Viking_Bow() 

var first=0x1B76 #Heater
var first2=0x13B9 #Viking
var second=0x13B1 #Bow

  if uo.GetGraphic(uo.ObjAtLayer('Lhand')) == "0x1B76" then #type first
    uo.Equipt('Lhand',second)
  else
    uo.Equipt('Lhand',first)
    uo.Equipt('Rhand',first2)
  end if

end sub
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Ходилка по координатам.

Code: Select all

#####################
# by Scripts Writer #
# 01/08/07          #
#####################
sub Step(x,y,mx,my,forstep)
  if uo.GetX('self') <> x then
    if uo.GetY('self') <> y then
      if mx<0 then
        if my<0 then
          uo.Press(40)
          wait(forstep)
        else
          uo.Press(39)
          wait(forstep)
        end if
      else
        if my<0 then
          uo.Press(37)
          wait(forstep)
        else
          uo.Press(38)
          wait(forstep)
        end if
      end if
    else
      if mx<0 then
        uo.Press(34)
        wait(forstep)
      else
        uo.Press(36)
        wait(forstep)
      end if
    end if
  else
    if my<0 then
      uo.Press(35)
      wait(forstep)
    else
      uo.Press(33)
      wait(forstep)
    end if
  end if
end sub

sub Go_To(x,y)
var mx,my,fx,fy
  var xx=x
  var yy=y
  var DistX=0
  var DistY=1
  var forstep=300
 
  repeat
    mx=uo.GetX('self')-x
    my=uo.GetY('self')-y
    fx=mx+x
    fy=my+y
    Step(xx,yy,mx,my,forstep)
  until x==fx+DistX && y==fy+DistY || x==fx-DistX && y==fy+DistY || x==fx+DistX && y==fy-DistY || x==fx-DistX && y==fy-DistY || x==fx && y==fy
end sub
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Скрипты под шард Антарес.

Небольшая надстройка для лечения с бинтов.

Code: Select all

sub Heal_Bandage()
var bbandage=uo.Count('0x0E20')
  uo.DeleteJournal()
  uo.bandageself()
  repeat
    wait(50)
  until uo.Count('0x0E20')<>bbandage || uo.InJournal('не возымело') || uo.InJournal('мумию')
  if uo.InJournal('не возымело') then
    uo.Print('You apply a bandage but its barelly to help you.')
  else   
    if uo.Count('0x0E20')<>bbandage then
      uo.Print('You put a bloody bandage in a backpack.')
    else
      uo.Print('You have MAX hit points.')
    end if
  end if
end sub


Берём пандоры из мешка указанного таргетом и открываем их отмычками из пака.

Code: Select all

sub Pandor()

var pand=0x09AA
var color=0x002B #Цвет пандор. По умолчанию 2 lvl
uo.AddObject('pandor')
while uo.Targeting()
  wait(100)
wend

uo.FindType(pand,color,'pandor')
while uo.FindCount()
  uo.moveitem('finditem')
  wait(500)
  uo.WaitTargetObject('finditem')
  uo.UseType('0x14FB')
  wait(250)
  uo.FindType(pand,color,'pandor')
wend
end sub


Шьем мешки из кожи, указывая на набор для шитья прицелом.

Code: Select all

sub Tailor()
var msg1='положили'
var msg2='не'
var leather='0x1078'
uo.AddObject('Sew')
while uo.Targeting()
  wait(100)
wend

repeat
  uo.FindType(leather,'-1','backpack')
  if uo.FindCOunt() then
    uo.DeleteJournal()
    uo.WaitMenu('Misc','Bag')
    uo.WaitTargetObject('finditem')
    uo.UseObject('Sew')
    repeat
      wait(100)
    until uo.InJournal(msg1) || uo.InJournal(msg2)
  end if
  wait(100)
until not uo.FindCount() || uo.Count(leather) < 5
end sub


Продаём всё из мешков типа bag, дереву с сериалом stone

Code: Select all

sub Sell()
var bagg
var bag=0x0E76
var stone='0x40129E25'
uo.FindType(bag,'-1','backpack')
while uo.FindCount()
  uo.UseObject('finditem')
  wait(250)
  uo.Ignore('finditem')
  uo.FindType(bag,'-1','backpack')
wend
uo.IgnoreReset() 

uo.FindType(bag,'-1','backpack')
if uo.FindCount() then
 while uo.FindCOunt()
  bagg=uo.GetSerial('finditem')
  uo.FindType('-1','-1',bagg)
  if uo.FindCount() then
    while uo.FindCount()
      uo.FindType('-1','-1',bagg)
      if uo.FindCOunt() then
        uo.moveitem('finditem','all','backpack')
        wait(500)
        uo.WaitTargetObject('finditem')
        uo.UseObject(stone)
        wait(500)
      end if
    wend
  end if
  uo.Ignore(bagg)
  uo.FindType(bag,'-1','backpack')
 wend
end if
uo.ignorereset()
end sub
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Шард Antares.
Skinning. Срезаем кожу с овец.

Code: Select all

sub Skinning()
var pile='0x0DF8'
var leather='0x1078'
var cotton='0x0C4F'
var k
uo.Set('finddistance','15')
#Scripts Writer#Antares#
#02/08/07#
DIM sheep[2]

sheep[0]=0x00CF
sheep[1]=0x00DF

  while uo.Weight < 620
   
    uo.FindType(sheep[0],'-1','ground')     
    if uo.FindCount() then
      WalkN(uo.GetX('finditem'),uo.GetY('finditem'),uo.GetSerial('finditem'))
      k=0
      if uo.GetDistance('finditem') <= 2 then
        uo.Click('finditem')
        wait(100)
        repeat
          wait(100)
          k=k+1
        until uo.InJournal('Sheep') || k>50
        uo.WaitTargetObject('finditem')
        uo.UseObject(uo.GetSerial(uo.ObjAtLayer('Rhand')))
        wait(500)
        if uo.InJournal('Вы положили') then
          uo.Print('You get a pile of wool. There are '+STR(uo.Count(pile))+ ' piles of wool.')
        end if         
        k=0
        uo.DeleteJournal()
        uo.Click('finditem')
        wait(100)
        repeat
          wait(100)
          k=k+1
        until uo.InJournal('Lamb') || k>50       
      end if
    else
      uo.Print('There are no sheep. Start to kill lambs.')
      uo.FindType(sheep[1],'-1','ground')
      if uo.FindCount() then
        WalkN(uo.GetX('finditem'),uo.GetY('finditem'),uo.GetSerial('finditem'))
        k=0
        uo.DeleteJournal()
        if uo.GetDistance('finditem') <= 1 then
          uo.Click('finditem')
          wait(100)
          repeat
            wait(100)
            k=k+1
          until uo.InJournal('Lamb') || k>50 
          if k<50 then
            uo.WarMode(true)
            uo.Attack('finditem')
            uo.DeleteJournal()
            k=0
            wait(100)
            repeat
              wait(100)
              k=k+1
            until uo.InJournal('Тело Lamb') || k>100
            if uo.InJournal('Тело Lamb') && k<100 then
              uo.WarMode(false)
              uo.WaitTargetObject('lastcorpse')
              uo.UseObject(uo.GetSerial(uo.ObjAtLayer('Rhand')))
              uo.DeleteJournal()
              k=0
              wait(100)   
              repeat
                wait(100)
                k=k+1
              until uo.InJournal('You carve') || k>50
              uo.Click('lastcorpse')
              wait(250)
              if uo.InJournal('2 items') || uo.InJournal('3 items') then
                if uo.InJournal('2 items') then
                  wait(500)
                  uo.FindType(leather,'-1','lastcorpse')
                  if uo.FindCount() then
                    uo.moveitem('finditem')
                    wait(500)
                    uo.Print('There are '+STR(uo.Count(leather))+' leather in a backpack.')
                  end if
                else
                  uo.FindType(cotton,'-1','lastcorpse')
                  if uo.FindCount() then
                    uo.moveitem('finditem')
                    wait(500)
                    uo.Print('There are '+STR(uo.Count(cotton))+' cotton in a backpack.')
                  end if
                end if
              end if
            else
              uo.Print('There are no body. 0_0')
            end if
          end if
        end if
      end if
    end if
    wait(1000)
  wend
 
end sub
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Code: Select all

sub main() 
##########################################
# Mining v1.02                           #
# By Scripts Writer                      #
# icq : 424131028                        #
# Thx to Savage's WalkN()                #
# Thx to Mihail's date & time            #
##########################################
# Antares. http://www.uoa.ru             #
##########################################

  var f=file('C:\mining.txt') #File where tile coordinates
  var FromFile=1              #1-From file, 0-From client
  var Hiding=1                #1-To hide before moving, 0-Don't hide
  var EatFood=1               #1-To eat food, 0-Don't eat
  var RuneToHome='0x40F6BCC5' #ID of rune to home
  var RuneToMine='0x401E02F1' #ID of rune to cave
  var Sunduk='0x404425AB'     #ID of container where to put ores
  var PickAxe=0x0E85          #Type of Pickaxe
  var food=0x097B             #Type of food to eat
  var MaxWeight=600           #MaxWeight when to go unload

  var msg1='Вы положили'    #Msg 'You put'
  var msg2='Вам не удалось'  #Msg 'You fail to mine'
  var msg3='Тут ничего нету' #Msg 'There is nothing ore'

#############################################################
#В бекпеке несколько кирок, руны в дом и шахту, реагенты.         
#Устанавливаем флаг FromFile=0 и запускаем скрипт.Прицелами     
#указываем на тайлы в шахте, собирая тем самым координаты         
#по которым будем ходить и обкапывать в дальнейшем. Как только     
#собрали, копируем информацию с тайлами и вставляем в ранее       
#созданный файл mining.txt в каталое C:\ . На последней пустой 
#строке помещаем 0 в начало строки-для определения конца файла.   
#Устанавливаем флаг FromFile=1, указываем все значения #переменных
#и запускаем главную функцию main.
#############################################################
#In backpack there are some pickaxes,
#runes to the house and mine, reagents.
#We establish flag FromFile=0 and start a script.
#By targets click on tiles in cave,
#collecting that coordinates on which we shall go and
#mine in the further. As soon as have collected,
#we copy the information with tiles and it is
#inserted into earlier created file "mining.txt" in
#directory C:\. On last empty line it is placed 0 in the
#beginning of a line-for of definition of the end of a file.
#We establish flag FromFile=1, specify all
#values of variables and start main function.
#############################################################
#
# v1.01 Подправил медитацию. Добавил ведение лога в отдельном окне.
# v1.02 Изменение скрипта на вывод времени в лог.
 

  DIM ore[4]

  ore[0]='0x19B7'
  ore[1]='0x19BA'
  ore[2]='0x19B8'
  ore[3]='0x19B9' 
 
  DIM XTile[550],YTile[550],ZTile[550]
  var TileType
  var mx,my
  var i,k,l,mana
  k=0
 
  if FromFile==0 then
    uo.DeleteJournal()
    repeat
      uo.AddObject('Tile')
      wait(250)
      while uo.Targeting()
        wait(100)
      wend
      uo.WaitTargetTile('lasttile')
      uo.Say(',infotile')
      wait(500)
    until uo.InJournal('stop')
    return
  else
    f.Open()
    repeat
      TileType=safe call f.ReadNumber()
      XTile[k]=safe call f.ReadNumber()
      YTile[k]=safe call f.ReadNumber()
      ZTile[k]=safe call f.ReadNumber()
      if TileType<>0 then
        uo.Print(STR(XTile[k])+' '+STR(YTile[k])+' '+STR(ZTile[k]))
      end if
      k=k+1
    until TileType==0
    uo.Print('There are '+STR(k-1)+' tiles in a file.')
    f.Close()
  end if 
  while not uo.Dead()
    for i=0 to k-2
      if Hiding==1 then
        while not uo.Hidden()
          uo.WarMode(0)
          uo.Print('Try to hide yourself...')
          uo.UseSkill('Hiding')
          wait(3500)
        wend
      end if
      if i==0 && uo.GetX('self')==358 && uo.GetY('self')==1443 then
        WalkN(364,1438,"")
        WalkN(382,1439,"")
      end if
      WalkN(XTile[i],YTile[i],"")
      uo.Print('Start to mine '+STR(XTile[i])+' '+STR(YTile[i])+' '+STR(ZTile[i])+' tile.')
      repeat
        uo.DeleteJournal()
        l=0
        uo.WaitTargetTile('-1',XTile[i],YTile[i],ZTile[i])
        uo.UseType(PickAxe)
        repeat
          wait(100)
          l=l+1
        until uo.InJournal(msg1) || uo.InJournal(msg2) || uo.InJournal(msg3) || l>100
      until uo.InJournal(msg3) || l>100
      if uo.Weight>MaxWeight then
        repeat
          mx=uo.GetX('self')
          my=uo.GetY('self')
          mana=uo.mana
          if uo.mana < 30 then
            uo.Print('Start meditation ... ')
            uo.WarMode(0)
            repeat
              uo.UseSkill('Meditation')
              l=0
              uo.DeleteJournal()
              if uo.WarMode==1 then
                uo.WarMode(0)
              end if
              wait(250)
              repeat
                wait(100)
                l=l+1
              until uo.InJournal('Вы потеряли') || l>100 || uo.mana>=30
            until uo.mana >= 30
          end if
          l=0
          uo.Print('Start to recall home ...')
          uo.WaitTargetObject(RuneToHome)
          uo.Cast('Recall')
          repeat
            wait(100)
            l=l+1
          until mx<>uo.GetX('self') || my<>uo.GetY('self') || uo.mana<mana || l>100
        until mx<>uo.GetX('self') || my<>uo.GetY('self')   
        uo.Print('We are at home.Start to unload...')
        WalkN(uo.GetX(Sunduk),uo.GetY(Sunduk),Sunduk)
        uo.UseObject(Sunduk)
        wait(500)                     
        uo.TextOpen()
        uo.TextPrint(date(uo.date(),'.'))
        uo.TextPrint(time(uo.time(),':'))
        uo.TextPrint('------------------------')
        for k = 0 to 3
          uo.FindType(ore[k],'-1','backpack')
          while uo.FindCount()
            uo.Click('finditem')
            wait(500)
            uo.TextPrint(uo.GetName('finditem'))
            uo.moveitem('finditem','all',Sunduk)
            wait(1000)
            uo.FindType(ore[k],'-1','backpack')
          wend
        next
        uo.TextPrint('------------------------')
        uo.IgnoreReset()
        uo.Print('Upload was complete. Would you like to eat something?')
        if EatFood==1 then
          uo.DeleteJournal()
          uo.FindType(food,'-1',Sunduk)
          if uo.FindCount() then
            uo.moveitem('finditem','30','backpack')
            wait(1000)
            repeat
              wait(1000)
              uo.UseType(food)
            until uo.InJournal('You are simply')
          end if
          uo.FindType(food,'-1','backpack')
          if uo.FindCount() then
            uo.moveitem('finditem','all',Sunduk)
            wait(1000)
          end if
        end if
        repeat
          mx=uo.GetX('self')
          my=uo.GetY('self')
          mana=uo.mana
          if uo.mana < 30 then
            uo.Print('Start meditation ... ')
            uo.WarMode(0)
            repeat
              uo.UseSkill('Meditation')
              l=0
              uo.DeleteJournal()
              if uo.WarMode==1 then
                uo.WarMode(0)
              end if
              wait(250)
              repeat
                wait(100)
                l=l+1
              until uo.InJournal('Вы потеряли') || l>100 || uo.mana>=30
            until uo.mana >= 30
          end if
          l=0
          uo.Print('Start to recall mine ...')
          uo.WaitTargetObject(RuneToMine)
          uo.Cast('Recall')
          repeat
            wait(100)
            l=l+1
          until mx<>uo.GetX('self') || my<>uo.GetY('self') || uo.mana<mana || l>100
        until mx<>uo.GetX('self') || my<>uo.GetY('self')
      end if
    next
    wait(600000)
  wend
end sub

sub WalkN(x,y,Target)
  VAR i,StepSucess
  VAR dx,dy,Exit=0
  While Exit<>1
    If Target<>"" Then
      dx=UO.GetX(Target)-UO.GetX()
      dy=UO.GetY(Target)-UO.GetY()
      If UO.GetDistance(Target)<3 Then
        Exit=1
      Endif
    Else
      dx=x-UO.GetX()
      dy=y-UO.GetY()
      If dx==0 AND dy==0 Then
        Exit=1
      Endif
    Endif
    If dx<>0 AND dy<>0 Then
      If dx>0 AND dy>0 Then
        StepSucess=Go(3,40,300) ;SE - DownArrow
        If StepSucess==-1 Then
          StepSucess=Go(7,38,300) ;WN - UpArrow
          StepSucess=Go(1,39,300) ;NE - RightArrow
          If StepSucess==-1 Then
            StepSucess=Go(5,37,300) ;SW - LeftArrow
          Endif
        Endif
      Endif
      If dx>0 AND dy<0 Then
        StepSucess=Go(1,39,300) ;NE - RightArrow
        If StepSucess==-1 Then
          StepSucess=Go(5,37,300) ;SW - LeftArrow
          StepSucess=Go(3,40,300) ;SE - DownArrow
          If StepSucess==-1 Then
            StepSucess=Go(7,38,300) ;WN - UpArrow
          Endif
        Endif
      Endif
      If dx<0 AND dy>0 Then
        StepSucess=Go(5,37,300) ;SW - LeftArrow
        If StepSucess==-1 Then
          StepSucess=Go(1,39,300) ;NE - RightArrow
          StepSucess=Go(7,38,300) ;WN - UpArrow
          If StepSucess==-1 Then
            StepSucess=Go(3,40,300) ;SE - DownArrow
          Endif
        Endif
      Endif
      If dx<0 AND dy<0 Then
        StepSucess=Go(7,38,300) ;WN - UpArrow
        If StepSucess==-1 Then
          StepSucess=Go(3,40,300) ;SE - DownArrow
          StepSucess=Go(5,37,300) ;SW - LeftArrow
          If StepSucess==-1 Then
            StepSucess=Go(1,39,300) ;NE - RightArrow
          Endif
        Endif
      Endif
    Endif
    If dx<>0 AND dy==0 Then
      If dx>0 Then
        StepSucess=Go(2,34,300) ;E - PgDown
        If StepSucess==-1 Then
          StepSucess=Go(3,40,300) ;SE - DownArrow
          If StepSucess==-1 Then
            StepSucess=Go(1,39,300) ;NE - RightArrow
          Endif
          StepSucess=Go(2,34,300) ;E - PgDown
        Endif
      Endif
      If dx<0 Then
        StepSucess=Go(6,36,300) ;W - Home
        If StepSucess==-1 Then
          StepSucess=Go(7,38,300) ;WN - UpArrow
          If StepSucess==-1 Then
            StepSucess=Go(5,37,300) ;SW - LeftArrow
          Endif
          StepSucess=Go(6,36,300) ;W - Home
        Endif
      Endif
    Endif
    If dx==0 AND dy<>0 Then
      If dy>0 Then
        StepSucess=Go(4,35,300) ;S - End
        If StepSucess==-1 Then
          StepSucess=Go(3,40,300) ;SE - DownArrow
          If StepSucess==-1 Then
            StepSucess=Go(5,37,300) ;SW - LeftArrow
          Endif
          StepSucess=Go(4,35,300) ;S - End
        Endif
      Endif
      If dy<0 Then
        StepSucess=Go(0,33,300) ;N - PgUp
        If StepSucess==-1 Then
          StepSucess=Go(1,39,300) ;NE - RightArrow
          If StepSucess==-1 Then
            StepSucess=Go(7,38,300) ;WN - UpArrow
          Endif
          StepSucess=Go(0,33,300) ;N - PgUp
        Endif
      Endif
    Endif
  Wend
end sub

sub Go(dir,key,walkwait)
  VAR x,y, OldDir
  x=UO.GetX()
  y=UO.GetY()
  OldDir=UO.GetDir()
  If UO.GetDir()<>dir Then
    UO.Press(key)
    wait(walkwait)
    If UO.GetDir()<>dir Then
      CheckLag()
    Endif
  Endif
  UO.Press(key)
  wait(walkwait)
  If x==UO.GetX() AND y==UO.GetY() Then
    CheckLag()
  Endif
  If x==UO.GetX() AND y==UO.GetY() AND OldDir<>UO.GetDir() Then
    UO.Press(key)
    wait(walkwait)
  Endif
  If x==UO.GetX() AND y==UO.GetY() Then
    CheckLag()
  Endif
  If x==UO.GetX() AND y==UO.GetY() Then
    UO.Print("Zasada!")
    return -1
  Else
    return 1
  Endif
end sub
#########################################
sub CheckLag()
  UO.DeleteJournal()
  UO.Click('backpack')
  repeat
    wait(500)
  until UO.InJournal('Backpack')
end sub

sub date(jor,n)
  var ser=str(jor), t=''
  if len(ser)==5 then
    ser='0'+ser
  end if
  t=right(ser,2)+n+mid(ser,2,2)+n+left(ser,2)
  return t
end sub

sub time(jor,n)
var ser=str(jor),t=''
  if len(ser)==5 then
    ser='0'+ser
  end if
  t=left(ser,2)+n+mid(ser,2,2)+n+right(ser,2)
  return t
end sub
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Blacksmithing.Antares.

Code: Select all

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

Kynep
Expert!
Posts: 1348
Joined: 2006-02-07 08:51:40
Location: г. Старый Оскол
Contact:

Post by Kynep »

Всем ПРЕВЕД !!!!! :lol:
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Привет :)
Kynep
Expert!
Posts: 1348
Joined: 2006-02-07 08:51:40
Location: г. Старый Оскол
Contact:

Post by Kynep »

Scripts Writer wrote:Привет :)


Даааа давненько я тут не был..... Все позабыл :(
Шесяд две с половиной тысячи просмотров... клева!!! Вот что значит правильное название темы... Всем удачи скора я к вам вернусь, тока интернет подключю...
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Цикл скриптов для Оскома

Только те, на которых качался сам.


Healing

Code: Select all

sub Train_Heal()
; Attacking bees until hp=20, and then heal yourself.
; Get clean bandages from Sunduk, and move bloody
; bandage to Sunduk

var Bee=0x401AEC4B
var Sunduk=0x4001EFCD
var Bandage=0x0E21
var BBandage=0x0E20
var life, k
while not uo.Dead()
  while uo.life > 20
    uo.UseObject(Bee)
    wait(450)
    repeat
      wait(100)
    until uo.InJournal('backpack')
  wend
  if uo.Count(Bandage) then
    while uo.life < uo.str && uo.Count(Bandage)>0
      k=0
      uo.Bandageself()
      uo.DeleteJournal()
      life=uo.life
      repeat
        wait(100)
        k=k+1
      until uo.life <> life || uo.InJournal('помогли|кладете') || k>100
    wend
    uo.FindType(BBandage,'-1','backpack')
    if uo.FindCount() then
      uo.moveitem('finditem','all',Sunduk)
      wait(750)
    end if
  else
    uo.FindType(Bandage,'-1',Sunduk)
    if uo.FindCount() then
      uo.moveitem('finditem','250')
      wait(750)
    end if
  end if
wend
end sub
Kynep
Expert!
Posts: 1348
Joined: 2006-02-07 08:51:40
Location: г. Старый Оскол
Contact:

Post by Kynep »

Scripts Writer wrote:
Одевалка для ПвП альфы вам в помощь, или скрипты на Анти макро


Привет брат! почисти топег, а то хлама многа, особенно последне посты
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Kynep wrote:
Scripts Writer wrote:
Одевалка для ПвП альфы вам в помощь, или скрипты на Анти макро


Привет брат! почисти топег, а то хлама многа, особенно последне посты


Как сам, играешь ? :)
Post Reply