Мининг
Код
sub main ()
var i, x, y, z, t, x1, y1, down, pick
UO.exec('terminate reconnector')
UO.exec('exec reconnector')
save()
UO.DeleteJournal ()
UO.Print ("select place to mine")
UO.infotile ()
wait (5000)
t=UO.lasttile (0)
z=UO.lasttile (3)
down = 1
UO.unequip ("Rhand")
wait (1000)
UO.FindType ("0x0E85")
wait (1000)
pick = UO.GetSerial ("finditem")
UO.equip ("Rhand", pick)
while not UO.Dead ()
UO.DeleteJournal ()
x=UO.GetX ()
y=UO.GetY ()
UO.exec ("waittargettile '" + str(t) + "' '" + str(x) + "' '" + str(y) + "' '" + str(z) + "'")
UO.useobject (pick)
while not UO.inJournal ("no more ore") and not UO.inJournal ("tool broke") and not UO.InJournal ("stop mining") and not UO.inJournal ("cannot see that") and not UO.inJournal ("far away")
wait (1000)
if UO.InJournal ("element") then
goto theend
endif
wend
if UO.InJournal ("tool broke") then
UO.FindType ("0x0E85")
wait (1000)
pick = UO.GetSerial ("finditem")
UO.equip ("Rhand", pick)
endif
x1=x+down
y1=y
repeat:
gotoxy (x1, y1, 0)
carry ()
x=UO.GetX ()
y=UO.GetY ()
if x<>x1 or y<>y1 then
if not UO.InJournal ("You are too fatigued to move") then
y=y+1
gotoxy (x, y, 0)
down=-down
carry ()
wait (1000)
UO.findtype ("ore", -1, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.ServerPrint (".hungry")
wait (1000)
if UO.LastMessage () == "You aren't hungry at all" then
UO.exec ("usetype '0x097B'")
wait (2000)
endif
else
wait (60000)
endif
endif
wend
theend:
end sub
sub carry ()
UO.findtype (0x19B9, 0x0602, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x0000, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x0231, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x045E, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x0585, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x006F, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x0481, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x0042, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x009C, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x0602 , 1)
UO.grab (2000, "finditem")
wait (1000)
end sub
sub take ()
while not UO.Dead ()
UO.findtype (0x19B9, 0x0000, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x07DF, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x0482, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x045E, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x07D6, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x006F, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x05D7, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x094E, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x0940, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x09F9, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x094A, 1)
UO.grab (2000, "finditem")
wait (1000)
UO.findtype (0x19B9, 0x045E, 1)
UO.grab (2000, "finditem")
wait (1000)
wend
end sub
sub gotoxy(x,y,prec)
var ld=0,ldc=0
var dx,dy
var mx,my
var ox,oy,mk,k
#uo.print(">")
#uo.track("1",str(x),str(y))
start:
mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if
if dx<=prec then
return
end if
if not ldc then
uo.print(STR(dx))
end if
if dx<3 then
mk=70
else
mk=15
end if
ox=mx
oy=my
for k=1 to mk
mx=UO.GetX()
my=UO.GetY()
if mx<>ox or my<>oy then
goto sdidapl
end if
wait(10)
next
sdidapl:
mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if
if dx<=prec then
return
end if
if ld==dx then
ldc=ldc+1
if ldc>15 then
uo.print("Can not reach location!")
return
end if
else
ld=dx
end if
if mx==x then
if my==y then
return
endif
if my>y then
#UO.Print("UR")
UO.Press(33)
goto start
endif
#UO.Print("DL")
UO.Press(35)
goto start
end if
if mx<x then
if my>y then
#UO.Print("R")
UO.Press(39)
goto start
endif
if my==y then
#UO.Print("DR")
UO.Press(34)
goto start
endif
#UO.Print("D")
UO.Press(40)
goto start
end if
if my<y then
#UO.Print("L")
UO.Press(37)
goto start
endif
if my==y then
#UO.Print("LU")
UO.Press(36)
goto start
endif
#UO.Print("U")
UO.Press(38)
goto start
end sub
sub save()
if UO.injournal('Saving World State') then
UO.print('Caaa??ea ne?eioa ia 30 nae.')
UO.Print('-------------------------')
Wait(30000)
UO.deletejournal()
endif
deathchk()
end sub
sub deathchk()
if UO.dead() then
uo.print('Ou oia?!')
UO.Print('-------------------------')
UO.Snap()
UO.exec('terminate all')
endif
end sub
sub Reconnector()
var RFlag
RFlag = 1
Repeat
While (UO.ObjAtLayer('Bpack') == '')
if RFlag Then
RFlag = 0
endif
Wait(20000) # WorldSave Protection
UO.Say('')
Wait(3000)
UO.Say('')
Wait(3000)
UO.Say('')
Wait(3000)
UO.LClick(616,459)
Wait(3000)
WEnd
Wait(3000)
if (RFlag == 0) Then
RFlag = 1
endif
Until false
end sub
sub MakeTime()
VAR D, T, Ret, i
Ret = STR(UO.Time())
T = ""
For i = 0 To Len(Ret)
T = Ret[Len(Ret)-i] + T
If (I == 2) OR (I == 4) Then
T = ":" + T
EndIf
Next
Ret = STR(UO.Date())
D = ""
For i = 0 To Len(Ret)
D = Ret[Len(Ret)-i] + D
If (I == 2) OR (I == 4) Then
D = "." + D
EndIf
Next
Ret = T + " @ " + D
RETURN Ret
end sub
Маджери
Код
var i,h,g
sub main()
start:
if uo.Mana<=uo.int-40 then
UO.UseSkill("Meditation");
wait(10000)
h=UO.LastMessage()
If h=="You cant focus your concentration" Then
UO.UseSkill("Meditation");
wait (10000)
EndIf
If g=="You do not have enought mana to cast that." Then
UO.UseSkill("Meditation");
wait (10000)
EndIf
else
Uo.exec("cast 'Resurrection' self")
Wait(5000)
hungry()
EndIf
goto start
sub hungry()
UO.ServerPrint(".hungry")
Wait(500)
i=UO.LastMessage()
If i=="You aren't hungry at all" Then
UO.Exec("usetype '0x097B'")
EndIf
end sub
Фишинг
Код
sub Fishing()
var mX, mY, X, Y, Tile, TrW, TrTime, ErrorTile
mx = UO.GetX('self'smiley
my = UO.GetY('self'smiley
UO.DeleteJournal()
; -- Debug ---------------
UO.TextOpen()
UO.TextClear()
; ------------------------
for X = -4 to 4
for Y = -4 to 4
UO.Print("Now Fishing In: "+STR(mX+X)+" "+STR(mY+Y))
Tile = IsWater(mX+X, mY+Y)
if Tile then
repeat
UO.DeleteJournal()
TrTime = UO.Timer()
TrW = UO.Weight
UO.WaitTargetTile(Tile, STR(mX+X), STR(mY+Y), -5)
UO.UseType( 0x0DC0 )
repeat
wait(500)
until UO.InJournal("# 0xAD86|# 0xAD83|# 0xAD88|# 0xA4F0|# 0xAD84"smiley || TrW<>UO.Weight || UO.Timer()>TrTime+120
; ---------- Debug Tile---------------
if UO.Timer()>TrTime+120 then
UO.TextPrint(Tile); NOT Harvest_Water_Tiles
ErrorTile = Tile
else
;UO.TextPrint(Tile); Harvest_Water_Tiles
endif
; ------------------------------------
until UO.InJournal("# 0xAD88|# 0xA4F0|# 0xAD84"smiley || ErrorTile; exit NOT Harvest_Water_Tiles
ErrorTile = 0; Debug Tile
endif
next
next
end sub
sub IsWater(X,Y)
if UO.PrivateGetTile(X, Y, -1, 6039, 6065) then
for var i=6039 to 6065
if UO.PrivateGetTile(X, Y, -1, i, i) then
; ----- Patch -----------------
if i<>6047 && i<>6051 && i<>6052 && i<>6053 && i<>6054 && i<>6057 && i<>6060 && i<>6063 then
return i
else
return 0
endif
; -----------------------------
end if
next
end if
return 0
end sub
Лут итемов
Код
sub main()
var corpse,i,j
uo.set('finddistance','2'smiley
uo.set('distance','2'smiley
DIM Loot[5]
Loot[0] = 0x0EED; # Gold
Loot[1] = 0x0F3F; # Arrow
Loot[2] = 0x1BFB; # Bolt
Loot[3] = 0x0F26; # Diamond
Loot[4] = 0x0F21; # Star Sapphire
Loot[5] = 0x0F7E; # Bone
DIM Text[5]
Text[0] = 'Gold Coins'
Text[1] = 'Arrows'
Text[2] = 'Bolts'
Text[3] = 'Diamons'
Text[4] = 'Star Sapphires'
Text[5] = 'Bones'
DIM Vars[5]
Vars[0] = uo.gold
Vars[1] = uo.ar
Vars[2] = uo.bt
Vars[3] = uo.count('0x0F26'smiley
Vars[4] = uo.count('0x0F21'smiley
Vars[5] = uo.count('0x0F7E'smiley
while true
while uo.countonground('0x2006'smiley > 0
if UO.Weight > 40000 then
uo.print("Too much weight! There're "+STR(UO.Gold)+" gold coins in backpack!"smiley
uo.waittargettype('0x0EED'smiley
wait(1000)
uo.useobject('0x40157FBF'smiley
wait(1000)
goto end
end if
uo.findtype('0x2006','-1','ground'smiley
if uo.findcount() > 0 then
corpse=uo.getserial('finditem'smiley
uo.print("Found "+str(uo.findcount())+" corpse(s)!"smiley
for i=0 to 5
j=0
repeat
UO.FindType(Loot[i],-1,corpse)
if UO.GetQuantity('finditem'smiley then
UO.MoveItem('finditem','0','backpack'smiley
uo.print("Looted: "+STR(UO.GetQuantity('finditem'smiley)+" "+Text[i]+"! In All: "+STR(vars[i]+UO.GetQuantity('finditem'smiley))
wait(600)
end if
j = j + 1
if j > 15 then
goto stuck
end if
until uo.findcount()==0
next
stuck:
uo.ignore(corpse)
Else
uo.print("No Corpses Beside!!!"smiley
end if
end:
wend
wait(600)
wend
end sub
Лут костей в думе
Код
sub Bones()
var k
uo.set('finddistance','2'smiley
uo.set('distance','2'smiley
DIM Bones[8]
Bones[0] = 0x0ECA
Bones[1] = 0x0ECB
Bones[2] = 0x0ECC
Bones[3] = 0x0ECD
Bones[4] = 0x0ECE
Bones[5] = 0x0ECF
Bones[6] = 0x0ED0
Bones[7] = 0x0ED1
Bones[8] = 0x0ED2
while true
for k=0 to 8
while uo.countonground(Bones[k],'0x0000'smiley > 0
uo.findtype(Bones[k],'0x0000','ground'smiley
repeat
# uo.waittargetground('Bones[k]'smiley
uo.waittargetobject("finditem"smiley
uo.usetype("0x0F52"smiley
wait(1000)
until uo.countonground('Bones[k]'smiley == 0
wend
wait(100)
next
wend
end sub
Скрипт мага на хил , стрелки , харм
Код
Sub Hl()
if not UO.waiting() then
UO.Exec("cast Heal self"smiley
end if
if uo.injournal("cliloc# 0xA3A1"smiley then
UO.Exec("cast Heal self"smiley
wait(100)
uo.deletejournal()
end if
end sub
Sub Arrow()
uo.cast('Magic Arrow','last'smiley
if uo.injournal('cliloc# 0xA3A1'smiley then
uo.cast('Magic Arrow','lastattack'smiley
uo.deletejournal()
endif
endsub
Sub Harm()
uo.cast('Harm','last'smiley
if uo.injournal('cliloc# 0xA3A1'smiley then
uo.cast('Harm','lastattack'smiley
uo.deletejournal()
endif
endsub
Скрипт на автохил и припив Cure potion , если отравлен.
Код
sub main()
#??? ????????? ? Cliloc'?
var h="cliloc# 0xA4E9" #??????? ???
var m="cliloc# 0x55C8" #?? ?? ?????? ??????? ? ???? ?????????
var b="cliloc# 0x2D47" #????????? ???? ?????
var p="cliloc# 0x698B" #????????? ???????
var sys='0xFFFFFFFF'
#(????????)var m="cliloc# 0x2D70" #????? ?????? ???????
#(????????) var y="cliloc# 0xA4E7" #???? ??? ??????????
#(????????) var d="cliloc# 0xA4E2" #???? ????? ???? ? ????
#(????????) var r="cliloc# 0xA817" #????????? ??????? ????????
var timeout=0 #????????????? ???????
heal:
If uo.GetHp() < uo.GetMaxHp() And uo.Dead() == 0 And uo.Count('0x0E21'smiley > 0 Then
timeout=0
uo.DeleteJournal()
uo.Msg ("[bhs"smiley
REPEAT
timeout=timeout+1
uo.Exec(poison())
UNTIL uo.JournalSerial(uo.InJournal(h)-1) == sys Or uo.JournalSerial(uo.InJournal(m)-1) == sys Or uo.JournalSerial(uo.InJournal(smiley-1) == sys Or uo.JournalSerial(uo.InJournal(p)-1) == sys Or timeout > 49
GoTo heal
Else
Wait(200)
GoTo heal
EndIf
end sub
sub poison()
If uo.Poisoned() > 0 And uo.Count('0x0F07'smiley > 0 Then
uo.Msg ("[drink cure"smiley
Wait(100)
Return 1
Else
Wait(100)
Return 0
EndIf
end sub