Code: Select all
sub Mining()
VAR a = 0 # 0 <=> èñïîëüçóåìûå îáúåêòû óêàçàíû # 1 <=> èñïîëüçóåìûå îáúåêòû íå óêàçàíû #
uo.setglobal('recal', '1') #îòâå÷àåò çà òåëåïîðòàöèþ ïî øàõòàì#
uo.setglobal('place', '1') #îòâå÷àåò çà ïåðåìåùåíèå ÷àðà ïî øàõòå#
uo.setglobal('circle', '1') #îòâå÷àåò çà òåëåïîðòàöèþ â ñëåäóþùóþ øàõòó ïðè îáõîäå ïîëíîãî êðóãà#
uo.setglobal('back', '0') #îòâå÷àåò çà ñèíõðîíèçàöèþ âîçâðàùåíèÿ íà ìåñòî êîïêè ïîñëå ñãðóçêè#
if a == 1 then
uo.print('Óêàæèòå ñóíäóê ñ ðåãàìè, êèðêàìè, èíâèçêàìè, ìàíêàìè')
uo.exec('addobject Sunduk1')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ñóíäóê äëÿ ðóäû')
uo.exec('addobject Sunduk2')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó ê äîìó')
uo.exec('addobject Home')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 1')
uo.exec('addobject mine1')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 2')
uo.exec('addobject mine2')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 3')
uo.exec('addobject mine3')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 4')
uo.exec('addobject mine4')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 5')
uo.exec('addobject mine5')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 6')
uo.exec('addobject mine6')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 7')
uo.exec('addobject mine7')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 8')
uo.exec('addobject mine8')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 9')
uo.exec('addobject mine9')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 10')
uo.exec('addobject mine10')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 11')
uo.exec('addobject mine11')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 12')
uo.exec('addobject mine12')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 13')
uo.exec('addobject mine13')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 14')
uo.exec('addobject mine14')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 15')
uo.exec('addobject mine15')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 16')
uo.exec('addobject mine16')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 17')
uo.exec('addobject mine17')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 18')
uo.exec('addobject mine18')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 19')
uo.exec('addobject mine19')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 20')
uo.exec('addobject mine20')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 21')
uo.exec('addobject mine21')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 22')
uo.exec('addobject mine22')
while uo.targeting()
wait(100)
wend
wait(1000)
uo.print('Óêàæèòå ðóíó â øàõòó 23')
uo.exec('addobject mine23')
while uo.targeting()
wait(100)
wend
return
endif
uo.exec('exec CheckingItems')
end sub
sub CheckingItems()
VAR b
uo.findtype('0x0F0E') #òèï ïóñòûõ áóòûëîê#
if uo.findcount() > 0 then
uo.moveitem('finditem', '-1', 'Sunduk1')
wait(1000)
checklag()
endif
DIM Ore[4]
Ore[0] = '0x19B9' #òèï 4åõ è áîëåå îðîâ#
Ore[1] = '0x19B8' #òèï 3åõ îðîâ#
Ore[2] = '0x19BA' #òèï 2óõ îðîâ#
Ore[3] = '0x19B7' #òèï 1ãî îðà#
for var a = 0 to 3
uo.findtype(Ore[a])
while uo.findcount() > 0
uo.moveitem('finditem', '-1', 'Sunduk2')
wait(1000)
checklag()
uo.findtype(Ore[a])
wend
next
uo.useobject('Sunduk1')
wait(1000)
checklag()
DIM Reg[3]
Reg[0] = '0x0F7A' #Black Pearl#
Reg[1] = '0x0F7B' #Bood Moss#
Reg[2] = '0x0F86' #Mandrake Root#
for b = 0 to 2
if uo.count(Reg[b]) < 50 then
uo.findtype(Reg[b], '-1', 'Sunduk1')
if uo.findcount() > 0 then
uo.moveitem('finditem', '50')
wait(1000)
checklag()
else
uo.print('Íåò íåîáõîäèìîãî êîëè÷åñòâà ðåãîâ â ñóíäóêå')
return
endif
endif
next
if uo.count('0x0F08') < 5 then #òèï èíâèçîê#
uo.findtype('0x0F08', '-1', 'Sunduk1')
if uo.findcount() > 0 then
uo.moveitem('finditem', '5')
wait(1000)
checklag()
else
uo.print('Íåò íåîáõîäèìîãî êîëè÷åñòâà èíâèçîê â ñóíäóêå')
;return
endif
endif
uo.findtype('0x0E85') #òèï êèðîê#
while uo.findcount() < 7
uo.findtype('0x0E85', '-1', 'Sunduk1')
if uo.findcount() > 0 then
uo.moveitem('finditem', '1')
else
uo.print('Íåò íåîáõîäèìîãî êîëè÷åñòâà êèðîê â ñóíäóêå')
return
endif
wait(1000)
checklag()
uo.findtype('0x0E85')
wend
if val(uo.getglobal('back')) == 1 then
wait(50)
else
uo.exec('exec Teleportation')
endif
end sub
sub Teleportation()
VAR a, b, c
VAR d = uo.getx('self')
repeat
while uo.mana < 11
uo.warmode('0')
uo.useskill('Meditation')
wait(1000)
wend
a = 0
if uo.injournal('GM') or uo.injournal('Admin') or uo.injournal('Seer') or uo.injournal('Counselor') or uo.injournal('Developer') then
uo.usetype('0x0F08')
uo.closeuo()
else
wait(50)
endif
uo.deletejournal()
if val(uo.getglobal('recal')) == 1 then
uo.waittargetobject('mine1')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 2 then
uo.waittargetobject('mine2')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 3 then
uo.waittargetobject('mine3')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 4 then
uo.waittargetobject('mine4')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 5 then
uo.waittargetobject('mine5')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 6 then
uo.waittargetobject('mine6')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 7 then
uo.waittargetobject('mine7')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 8 then
uo.waittargetobject('mine8')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 9 then
uo.waittargetobject('mine9')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 10 then
uo.waittargetobject('mine10')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 10 then
uo.waittargetobject('mine10')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 11 then
uo.waittargetobject('mine11')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 12 then
uo.waittargetobject('mine12')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 13 then
uo.waittargetobject('mine13')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 14 then
uo.waittargetobject('mine14')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 15 then
uo.waittargetobject('mine15')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 16 then
uo.waittargetobject('mine16')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 17 then
uo.waittargetobject('mine17')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 18 then
uo.waittargetobject('mine18')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 20 then
uo.waittargetobject('mine20')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 21 then
uo.waittargetobject('mine21')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 22 then
uo.waittargetobject('mine22')
uo.cast('Recall')
else
wait(50)
endif
if val(uo.getglobal('recal')) == 23 then
uo.waittargetobject('mine23')
uo.cast('Recall')
else
wait(50)
endif
repeat
wait(100)
a = a + 1
until a > 35 or d <> uo.getx('self') or uo.injournal('The spell fizzles.')
wait(500)
until not uo.injournal('The spell fizzles.')
b = val(uo.getglobal('recal')) + 1
uo.setglobal('recal', str(b))
if val(uo.getglobal('recal')) > 23 then
uo.setglobal('recal', '1')
endif
uo.set('finddistance', '7')
uo.findtype('0x000E', '-1', '1') #òèï ýëåìåíòàëÿ#
if uo.findcount() > 0 then
uo.usetype('0x0F08')
uo.exec('exec Teleportation')
return
endif
if val(uo.getglobal('back')) == 0 then
uo.exec('exec CheckingPlayers')
uo.setglobal('place', '1')
uo.setglobal('circle', '1')
uo.exec('exec Obkopka')
else
uo.setglobal('back', '0')
endif
end sub
sub CheckingPlayers()
VAR a, b
uo.ignore('self', 'on')
DIM Chars[2]
Chars[0] = '0x0190' #òèï èãðîêà ìóæñêîãî ïîëà#
Chars[1] = '0x0191' #òèï èãðîêà æåíñêîãî ïîëà#
while not uo.dead()
for a = 0 to 1
if uo.injournal('GM') or uo.injournal('Admin') or uo.injournal('Seer') or uo.injournal('Counselor') or uo.injournal('Developer') then
uo.usetype('0x0F08')
uo.closeuo()
else
wait(50)
endif
while val(uo.getglobal('find')) == 1
wait(50)
wend
uo.set('finddistance', '15')
uo.findtype(Chars[a], '-1', '1')
if uo.findcount() > 0 then
uo.usetype('0x0F08')
uo.exec('terminate Teleportation')
uo.exec('terminate Obkopka')
uo.exec('terminate ChengePlace')
uo.exec('exec Teleportation')
return
else
wait(500)
endif
next
wend
end sub
sub Obkopka()
VAR mx, my, mz, a, b, c, d, e, f
while not uo.dead()
if uo.injournal('GM') or uo.injournal('Admin') or uo.injournal('Seer') or uo.injournal('Counselor') or uo.injournal('Developer') then
uo.usetype('0x0F08')
uo.closeuo()
else
wait(50)
endif
uo.deletejournal()
mx = uo.getx('self')
my = uo.gety('self')
mz = uo.getz('self')
for a = mx-2 to mx+2
for b = my-2 to my+2
while not uo.Hidden()
c = 0
uo.warmode('0')
uo.useskill('Stealth')
repeat
wait(100)
c = c + 1
until uo.Hidden() or c > 40
wend
uo.print('!!!КОПАЕМ ТУТ!!!>>> : '+str(mx-a)+' '+str(my-b))
d = val(uo.getglobal('place')) + 1
uo.setglobal('place', str(d))
while not uo.injournal('no ore here') and not uo.injournal('location') and not uo.injournal('far away') and not uo.injournal('in rock') and not uo.injournal('You broke')
if uo.injournal('GM') or uo.injournal('Admin') or uo.injournal('Seer') or uo.injournal('Counselor') or uo.injournal('Developer') then
uo.usetype('0x0F08')
uo.closeuo()
else
wait(50)
endif
uo.deletejournal()
if uo.waiting() then
uo.canceltarget()
else
wait(50)
endif
uo.waittargettile('1341', str(a), str(b), str(mz))
uo.usetype('0x0E85') #тип кирки#
while not uo.injournal('You put') and not uo.injournal('location') and not uo.injournal('no ore') and not uo.injournal('but fail') and not uo.injournal('far away') and not uo.injournal('in rock') and not uo.injournal('You broke')
wait(500)
wend
uo.setglobal('find', '1')
wait(200)
uo.set('finddistance', '7')
uo.findtype('0x000E', '-1', '1') #тип элементаля#
if uo.findcount() > 0 then
uo.setglobal('find', '0')
uo.usetype('0x0F08')
uo.exec('exec Teleportation')
uo.exec('terminate CheckingPlayers')
return
else
uo.setglobal('find', '0')
endif
if val(uo.getglobal('place')) > 25 then
uo.setglobal('place', '1')
uo.exec('exec ChengePlace')
return
else
wait(50)
endif
if uo.weight > 600 then #максимальный вес#
uo.setglobal('back', '1')
uo.exec('terminate CheckingPlayers')
GoHome()
CheckingItems()
Teleportation()
Back()
uo.exec('exec CheckingPlayers')
else
wait(50)
endif
wend
if uo.injournal('GM') or uo.injournal('Admin') or uo.injournal('Seer') or uo.injournal('Counselor') or uo.injournal('Developer') then
uo.usetype('0x0F08')
uo.closeuo()
else
wait(50)
endif
uo.deletejournal()
next
next
wend
end sub
sub ChengePlace()
VAR a, b, c, d, e, f, g, h, i, j, k
if val(uo.getglobal('circle')) > 3 then
uo.setglobal('circle', '1')
uo.exec('terminate CheckingPlayers')
uo.exec('exec Teleportation')
return
endif
if val(uo.getglobal('circle')) == 1 then
if uo.getdir('self') == 3 then
a = 1
else
a = 2
endif
for b = 1 to a
uo.press(40)
wait(300)
next
for c = 1 to 3
uo.press(34)
wait(300)
next
for d = 1 to 2
uo.press(39)
wait(300)
next
endif
endif
if val(uo.getglobal('circle')) == 2 then
if uo.getdir('self') == 1 then
a = 1
else
a = 2
endif
for e = 1 to a
uo.press(39)
wait(300)
next
for f = 1 to 3
uo.press(33)
wait(300)
next
for g = 1 to 2
uo.press(38)
wait(300)
next
endif
if val(uo.getglobal('circle')) == 3 then
if uo.getdir('self') == 7 then
a = 1
else
a = 2
endif
for h = 1 to a
uo.press(38)
wait(300)
next
for i = 1 to 3
uo.press(36)
wait(300)
next
for j = 1 to 2
uo.press(37)
wait(300)
next
endif
k = val(uo.getglobal('circle')) + 1
uo.setglobal('circle', str(k))
uo.exec('exec Obkopka')
end sub
sub checklag()
uo.click('backpack')
while not uo.injournal('backpack')
wait(100)
wend
uo.deletejournal('backpack')
end sub
sub GoHome()
VAR a, b, c, d, e
uo.warmode('0')
a = uo.getx('self')
repeat
while uo.mana < 11
uo.warmode('0')
uo.useskill('Meditation')
wait(1000)
wend
if uo.injournal('GM') or uo.injournal('Admin') or uo.injournal('Seer') or uo.injournal('Counselor') or uo.injournal('Developer') then
uo.usetype('0x0F08')
uo.closeuo()
else
wait(50)
endif
b = 0
uo.deletejournal()
uo.waittargetobject('Home')
uo.cast('Recall')
repeat
wait(100)
b = b + 1
until b > 35 or a <> uo.getx('self') or uo.injournal('The spell fizzles.')
until not uo.injournal('The spell fizzles.')
for c = 1 to 6
uo.press(33)
wait(300)
next
uo.opendoor()
wait(500)
uo.press(33)
wait(300)
uo.opendoor()
for d = 1 to 6
uo.press(33)
wait(300)
next
e = val(uo.getglobal('recal')) - 1
uo.setglobal('recal', str(e))
end sub
sub Back()
VAR a, b, c, d, e, f, g, h, i, j
if val(uo.getglobal('circle')) > 1 then
if uo.getdir('self') == 3 then
f = 1
else
f = 2
endif
for a = 1 to f
uo.press(40)
wait(300)
next
for b = 1 to 3
uo.press(34)
wait(300)
next
for c = 1 to 2
uo.press(39)
wait(300)
next
endif
endif
if val(uo.getglobal('circle')) > 2 then
if uo.getdir('self') == 1 then
f = 1
else
f = 2
endif
for d = 1 to f
uo.press(39)
wait(300)
next
for e = 1 to 3
uo.press(33)
wait(300)
next
for g = 1 to 2
uo.press(38)
wait(300)
next
endif
if val(uo.getglobal('circle')) > 3 then
if uo.getdir('self') == 7 then
f = 1
else
f = 2
endif
for h = 1 to f
uo.press(38)
wait(300)
next
for i = 1 to 3
uo.press(36)
wait(300)
next
for j = 1 to 2
uo.press(37)
wait(300)
next
endif
end sub
sub TestPlace()
VAR a, b, c, d, e, f, g, h, i
for a = 1 to 2
uo.press(40)
wait(300)
next
for b = 1 to 3
uo.press(34)
wait(300)
next
for c = 1 to 3
uo.press(39)
wait(300)
next
for d = 1 to 3
uo.press(33)
wait(300)
next
for e = 1 to 3
uo.press(38)
wait(300)
next
for f = 1 to 3
uo.press(36)
wait(300)
next
for g = 1 to 3
uo.press(37)
wait(300)
next
for h = 1 to 3
uo.press(35)
wait(300)
next
for i = 1 to 2
uo.press(40)
wait(300)
next
end sub
И имеется антимакрос
Code: Select all
sub OneClick()
dim reindex[8]
reindex[0] = 11
reindex[1] = 12
reindex[2] = 13
reindex[3] = 10
reindex[4] = 16
reindex[5] = 14
reindex[6] = 17
reindex[7] = 15
var GumpID = 0
var ButtonID = 0
var ButtonText
var i = 18
if uo.LastGump('text', 4) <> "0" then
i = 19
end if
GumpID = val(Mid(uo.LastGump('command', i), 16, 4))
ButtonID = reindex[GumpID-2225]
ButtonText = uo.LastGump('command', ButtonID)
uo.LClick(Val(Mid(ButtonText, 7, 3)), Val(Mid(ButtonText, 11, 3)))
while not uo.LastGump('replyed')
wait(100)
wend
end sub
sub AntiMacro()
while not uo.Dead()
if not uo.LastGump('replyed') then
if uo.LastGump('text', 0) == 'Antimacros System' then
OneClick()
end if
endif
wait(500)
wend
Как вставить скрипт антимакроса в вышеуказанный скрипт на копание ???
А то я пробовал запускать его отдельно ( антимакрос ) - работает только один раз , а мне надо чтобы он запускался с каждым ударом кирки