Буду вот потихоньку выкладывать, может кому пригодится.
Прокачка скилла Magery.
Code: Select all
; Функция для прокачки скилла Magery
; Все настройки описаны в скрипте
sub AdvancedMagery()
; Advanced magery script v1.0, (c) Destruction.
var i, spell = "Magic Arrow" ; спел который кастовать
var target = "self" ; куда прицеливаться - false если не требуется
var nmedit = true ; нужно ли медитировать?
var nheal = "0x0E21" ; тип бинтов или false, чтобы не лечиться
var b_ban = "0x0E20" ; тип кровавых бинтов
var water = "0x400524D2" ; water tub ID или false, чтобы не мыть бинты
var watertile = false ; tile type, tile x, tile y, tile z через зепятую или false чтобы не мыть
var bag = "0x40021A29" ; сумка откуда всё набирать или false
uo.useobject(bag)
checklag()
var nlen = 3 ; количество необходимых реагентов
DIM reagents[val(str(nlen))]
; реагенты
reagents[0] = "0x0F88" ; nightshade
reagents[1] = "0x0F7A" ; black pearls
reagents[2] = "0x0E21" ; bandages
while uo.skillval("Magery",1) < 1000
if bag then
for i=0 to nlen-1
GrabReag(reagents[i],bag)
next
endif
Cast(spell,target)
if nmedit then
Medit()
endif
if nheal then
Heal(nheal)
endif
if water then
CleanBTub(water,b_ban)
endif
if watertile then
CleantBTile(water,b_ban)
endif
wend
endsub
; Функция - добирает реагент r из сумки b до количества 30 шт.
Sub GrabReag(r,b)
uo.findtype(r,"-1","backpack")
var q = uo.getQuantity("finditem")
if q < 30 then
uo.findtype(r,"-1",b)
uo.moveitem("finditem",str(30-q),"backpack")
endif
endsub
; Функция - моет бинты в воде, t - координаты тайла, b - тип грязных бинтов
Sub CleantBTile(t,b)
while uo.count()
uo.exec("waittargettile "+t)
uo.usetype(b)
checklag()
wait(50)
wend
endsub
; Функция - моет бинты в тазике. w - тазик, b - тип грязных бинтов
Sub CleanBTub(w,b)
while uo.count(b)
uo.waittargetobject(w)
uo.usetype(b)
checklag()
wait(50)
wend
endsub
; Лечит персонаж до максимального количества жизней. b - тип бинтов
Sub Heal(b)
while uo.getHP() < uo.str
uo.waittargetobject("self")
uo.usetype(b)
checklag()
wait(750)
wend
endsub
; Медитирует до достижения максимального количества маны
Sub Medit()
while uo.mana < uo.int
uo.useskill("Meditation")
wait(300)
wend
endsub
; Функция кастует спелл p1 на объект p2.
Sub Cast(p1, p2)
var mana = uo.mana
if p2 then
uo.waittargetobject(p2)
endif
uo.cast(p1)
var timer = uo.timer()
repeat
wait(100)
until uo.mana < mana || uo.timer()-30 > timer
endsub
Сбивание кастов противников.
Code: Select all
; Функция сбивает касты противников
sub AntiMagic()
var tar, cast = "In Nox|Vas Flam|In Sanct Ylem|Des Sanct|Por Ort Grav|In Jux Hur Ylem|An Ex Por|An Ort|Corp Por|Vas Ort Flam|Kal Vas Flam|Ort Sanct|Vas Corp Po|Ort Rel" ; слова, на которые следует реагировать
deljournal(cast)
repeat
tar = uo.injournal(cast)
if tar then
if isCast(tar) then
if not isFriend(tar) then
killCast(tar)
endif
endif
deljournal(cast)
endif
wait(100)
until false
endsub
; Функция кидает Magic Arrow в объект tar
Sub killCast(tar)
var mana = uo.mana
uo.cast('Magic Arrow',uo.journalserial(tar-1))
while mana==uo.mana
wait(100)
wend
endsub
; Функция проверяет объект tar на дружелюбность.
Sub isFriend(tar)
var i
DIM friends[1] ; массив с указание ID друзей
friends[0] = uo.getSerial()
if uo.GetNotoriety(tar)=="1" then
return true
endif
for i=0 to 1
if tar == friends[i] then
return true
endif
next
return false
endsub
; Функция - проверяет действительно ли строка в журнале tar вызвана чьим-либо кастом.
Sub isCast(tar)
if uo.journalcolor(tar-1) == "0x03B2" then
return true
endif
return false
endsub
Лут трупов.
Code: Select all
; Собственно непосредственно функция лута, описание внутри функции. Лутит из трупов то, что НЕ указано в списке.
sub looter()
var lc, lf, i, j, summ, ig, sp, st, tt
var sp_len = 8#Для спец паков
var db_len = 130#Для игнора
var ct_len = 4#Для контейнеров
DIM cont[val(str(ct_len))]
cont[0] = '0x0E76'#Bag
cont[1] = '0x0E75'#Backpack
cont[2] = '0x0E40'#Metal Chest (Gold)
cont[3] = '0x09AB'#Metal Chest (Metal)
DIM sp_type[val(str(sp_len))]
sp_type[0] = '0x0F7A'#Black Pearl
sp_type[1] = '0x0F88'#Nightshade
sp_type[2] = '0x0F8D'#Spider's Silk
sp_type[3] = '0x0F85'#Ginseng
sp_type[4] = '0x0F84'#Garlic
sp_type[5] = '0x0F86'#Mandrake Root
sp_type[6] = '0x0F7B'#Blood Moss
sp_type[7] = '0x0F8C'#Sulphorous Ash
DIM sp_pack[val(str(sp_len))]
sp_pack[0] = '0x4001C74F'
sp_pack[1] = sp_pack[0]
sp_pack[2] = sp_pack[0]
sp_pack[3] = sp_pack[0]
sp_pack[4] = sp_pack[0]
sp_pack[5] = sp_pack[0]
sp_pack[6] = sp_pack[0]
sp_pack[7] = sp_pack[0]
DIM db[val(str(db_len))]
db[0] = '0x14EF'#Deed
db[1] = '0x13FE'#Katana
db[2] = '0x1057'#Sextant
db[3] = '0x1713'#Floppy Hat
db[4] = '0x1404'#War Fork
db[5] = '0x0F9E'#Scissors
db[6] = '0x0C7F'#Ear of corn
db[7] = '0x153B'#Half apron
db[8] = '0x13C7'#Leather Gorget
db[9] = '0x13D4'#Studded sleeves
db[10] = '0x0994'#Pear
db[11] = '0x1030'#Jointing plane 0 0x1030
db[12] = '0x0EB3'#Lute
db[13] = '#0x1EBC'#Tinker Tools
db[14] = '0x13E3'#Smith Hammer
db[15] = '0x1F7B'#Doublet
db[16] = '0x1B78'#Kite wooden shield
db[17] = '0x0C74'#Honeydew melon
db[18] = '0x1516'#Long skirt
db[19] = '0x1EFD'#Fancy shirt
db[20] = '0x0F39'#Showel
db[21] = '0x170F'#Shoes
db[22] = '0x170D'#Sandals
db[23] = '0x1539'#Long pants
db[24] = '0x13EE'#Ringmail sleeves
db[25] = '0x13EE'#Leather cap
db[26] = '0x171C'#Jester's cap
db[27] = '0x1517'#Plain shirt
db[28] = '0x0FBB'#Tongs
db[29] = '0x1541'#Body sash
db[30] = '0x0EC2'#Cleaver
db[31] = '0x1EFF'#Fancy dress
db[32] = '0x1FA1'#Tunic
db[33] = '0x0E87'#Pitchfork
db[34] = '0x0E9C'#Drum
db[35] = '0x0F9D'#Sewening kit
db[36] = '0x1C02'#Studded armor
db[37] = '0x1400'#Kryss
db[38] = '0x0F4B'#Double axe
db[39] = '0x1C08'#Leather skirt
db[40] = '0x1531'#Short skirt
db[41] = '0x1B7B'#Metal shield
db[42] = '0x172A'#Lime
db[43] = '0x1F01'#Plain dress
db[44] = '0x1F03'#Robe
db[45] = '0x1515'#Cloak
db[46] = '0x1B74'#Kite metal shield
db[47] = '0x1402'#Short spear
db[48] = '0x0EB2'#Lap Harp
db[49] = '0x1034'#Saw
db[50] = '0x0C70'#Head of lettuce
db[51] = '0x0E86'#Pickaxe
db[52] = '0x1B7B'#Metal shield
db[53] = '0x0C64'#Gourd
db[54] = '0x1711'#Thigh Boots
db[55] = '0x0EC4'#Skinning Knife
db[56] = '#0x0F43'#Hatchet
db[57] = '0x0F49'#Axe
db[58] = '0x171A'#Feather Hat
db[59] = '0x0F51'#Dagger
db[60] = '0x0F0D'#Explosion Bottle
db[61] = '0x0F0A'#Poison Bottle
db[62] = '0x0F0B'#Refresh Bottle
db[63] = '0x0F08'#Agility Bottle
db[64] = '0x0F07'#Cure Bottle
db[65] = '0x0F0C'#Heal Bottle
db[66] = '0x0F09'#Strength Bottle
db[67] = '0x0E9D'#Tambourine
db[68] = '0x13CB'#Leather Leggins
db[69] = '0x1716'#Straw Tall Hat
db[70] = '0x13CC'#Leather Tunic
db[71] = '0x13CC'#Ringmain Leggins
db[72] = '0x13D5'#Studded gloves
db[73] = '0x1442'#Two Handed Axe
db[74] = '0x13B9'#Viking Sword
db[75] = '0x1C06'#Leather Armor
db[76] = '0x1C00'#Leather Shorts
db[77] = '0x1715'#Cap
db[78] = '0x1714'#Brim Hat
db[79] = '0x13F6'#Butcher knife
db[80] = '0x1C00'#Leather Shorts
db[81] = '0x13F0'#Ringmail Leggins
db[82] = '0x1F9F'#Jester's Suit
db[83] = '0x13BE'#Chainmail Leggins
db[84] = '0x1718'#Wizards Hat
db[85] = '0x1406'#War Mace
db[86] = '0x0F60'#Long Sword
db[87] = '0x1537'#Kilt
db[88] = '0x1DB9'#Leather Cap
db[89] = '0x153F'#Bandana
db[90] = '0x0E9B'#Mortat and Pestle
db[91] = '0x13B3'#Club
db[92] = '0x0F06'#Nightsight Bottle
db[93] = '0x1543'#Scullcap
db[94] = '0x0F62'#Spear
db[95] = '0x0F5E'#Broadsword
db[96] = '0x170B'#Boots
db[97] = '0x1F49'#Short Pants
db[98] = '0x171B'#Tricone Hat
db[99] = '0x0C79'#Canteloupe
db[100] = '0x13DA'#Studded Leggins
db[101] = '0x13FA'#Large Battle Axe
db[102] = '0x1C0A'#Leather Bustier
db[103] = '0x152E'#Shrort Pants
db[104] = '0x13BB'#Chainmail Coif
db[105] = '0x13B5'#Scimitar
db[106] = '0x1B7A'#Wooden Shield
db[107] = '0x13DB'#Studded Tunic
db[108] = '0x13BF'#Ringmail Tunic
db[109] = '0x1438'#War Hammer
db[110] = '0x1C0C'#Studded Bustier
db[111] = '0x13EB'#Ringmail Gloves
db[112] = '0x13EC'#Ringmail Tunic
db[113] = '0x143E'#Halberd
db[114] = '0x13D6'#Studded Gorget
db[115] = '0x13C6'#Leather Gloves
db[116] = '0x1717'#Straw Hat
db[117] = '0x1B76'#Platemail Heater
db[118] = '0x1411'#Platemail Legs
db[119] = '0x1410'#Platemail Arms
db[120] = '0x1414'#Platemail Gloves
db[121] = '0x1415'#Platemail Chest
db[122] = '0x1412'#Platemail Helm
db[123] = '0x140E'#Nose Helm
db[124] = '0x140A'#Helmet
db[125] = '0x0F47'#Battle Axe
db[126] = '0x1413'#Platemail Gorget
db[127] = '0x0F4D'#Bardiche
db[128] = '0x1440'#Cutlass
db[129] = '0x1408'#Closed Helm
uo.exec('set injectecho 1')
uo.exec('set finddistance 2')
repeat
uo.findtype('0x2006','-1','ground')
if uo.findcount() && uo.getDistance('finditem') < 4 then
lc=uo.getSerial('finditem')
uo.useobject(lc)
checklag()
repeat
uo.findtype(-1,-1,lc)
if uo.findcount() then
ig = false
sp = false
st = false
lf = uo.getGraphic('finditem')
for i=0 to db_len-1
if lf == db[i] then
ig = true
endif
next
if ig then
uo.ignore('finditem')
else
for i=0 to sp_len-1
if lf == sp_type[i] then
sp = true
summ = i
endif
next
if sp then
repeat
uo.moveitem('finditem',0,sp_pack[i])
wait(200)
uo.findtype(-1,-1,lc)
until not uo.getGraphic('finditem')==lf
else
if uo.getQuantity('finditem') > 1 then
repeat
uo.moveitem('finditem',0,'backpack')
wait(200)
uo.findtype(-1,-1,lc)
until not uo.getGraphic('finditem')==lf
else
repeat
uo.moveitem('finditem',0,'backpack',50,130,0)
wait(200)
uo.findtype(-1,-1,lc)
until not uo.getGraphic('finditem')==lf
endif
endif
endif
endif
until not uo.findcount()
uo.ignore(lc)
uo.hide(lc)
endif
for j=0 to ct_len-1
uo.findtype(cont[j],-1,'backpack')
while uo.findcount()
lc = uo.getSerial('finditem')
uo.useobject(lc)
checklag()
uo.findtype(-1,-1,lc)
repeat
uo.findtype(-1,-1,lc)
if uo.findcount() then
ig = false
sp = false
st = false
lf = uo.getGraphic('finditem')
for i=0 to db_len-1
if lf == db[i] then
ig = true
endif
next
if ig then
uo.ignore('finditem')
else
for i=0 to sp_len-1
if lf == sp_type[i] then
sp = true
summ = i
endif
next
if sp then
repeat
uo.moveitem('finditem',0,sp_pack[i])
wait(200)
uo.findtype(-1,-1,lc)
until not uo.getGraphic('finditem')==lf
else
if uo.getQuantity('finditem') > 1 then
repeat
uo.moveitem('finditem',0,'backpack')
wait(200)
uo.findtype(-1,-1,lc)
until not uo.getGraphic('finditem')==lf
else
repeat
uo.moveitem('finditem',0,'backpack',50,130,0)
wait(200)
uo.findtype(-1,-1,lc)
until not uo.getGraphic('finditem')==lf
endif
endif
endif
endif
until not uo.findcount()
while uo.containerOf(lc)==uo.getSerial('backpack')
uo.moveitem(lc,0,'ground')
wait(100)
wend
uo.findtype(cont[j],-1,'backpack')
wend
next
wait(100)
until false
endsub
Прокачка скилла Forensic.
Code: Select all
; Собственно скрипт - включаем и он будет использовать скилл на ближайший труп.
sub forensic()
uo.set('finddistance','3')
repeat
uo.deletejournal()
uo.findtype('0x2006','-1','ground')
uo.waittargetobject('finditem')
uo.useskill('Forensic Evaluation')
repeat
wait(200)
until uo.injournal('can tell nothing|been killed by|cannot|decide')
until false
endsub
Лечение бинтами.
Code: Select all
; Функция полечит персонаж бинтами, если есть бинты и клиент не ожидает курсора.
sub selfbandage()
if not uo.waiting() then
uo.findtype('0x0E21',"-1",'backpack')
if uo.findcount() then
uo.waittargetself()
uo.useobject('finditem')
else
uo.print('Бинты не найдены!')
endif
else
uo.print('Ловушка на прицел уже установлена!')
endif
endsub
Плавка.
Code: Select all
; Функция плавит всё, что указано в списке
sub smelt_all()
uo.set('finddistance','2')
var i, item
DIM ore[11] ; список того, что нужно сплавить.
ore[0] = '0x19B7'
ore[1] = '0x19BA'
ore[2] = '0x19B8'
ore[3] = '0x19B9'
ore[4] = '0x1415'
ore[5] = '0x1411'
ore[6] = '0x1410'
ore[7] = '0x1412'
ore[8] = '0x1414'
ore[9] = '0x1413'
ore[10] = '0x13B9'
for i=0 to 10
repeat
uo.findtype(ore[i],"-1","backpack")
if uo.findcount() then
item = uo.getSerial('finditem')
uo.findtype('0x1991',"-1",'ground')
if not uo.findcount() then
uo.findtype('0x19A3',"-1",'ground')
endif
uo.waittargetobject(item)
uo.useobject('finditem')
while uo.waiting()
wait(100)
wend
endif
until not uo.findcount()
next
endsub
Прокачка скилла Bowcraft / Fletching.
Code: Select all
; Скрипт берёт по 1ому логу из контейнера и крафтит shaft'ы (заготовки стрел).
sub Bowcraft()
var q
uo.set("finddistance","1")
uo.addObject("Container with logs")
while uo.targeting()
wait(100)
wend
repeat
uo.findtype("0x1BDD","0x0000","Container with logs")
uo.moveitem("finditem","2","backpack")
while uo.count("0x1BDD","0x0000") < 1
wait(200)
wend
q = uo.getQuantity("finditem")
while uo.getQuantity("finditem") == q
uo.moveitem("finditem","1","Container with logs")
wait(100)
wend
repeat
uo.deletejournal()
uo.waittargettype("0x1BDD")
uo.waitmenu('What do you want to carve the', 'Shaft')
uo.usetype("0x0F51")
repeat
wait(100)
until uo.injournal("pack|fail")
until uo.count("0x1BDD","0x0000") == 0
if uo.weight > 200 then
uo.findtype("0x1BD4","-1","backpack")
uo.moveitem("finditem","0","Container with logs")
while uo.count("0x1BD4") > 0
wait(700)
wend
endif
until false
endsub
Прокачка скилла Stealth.
Code: Select all
; Функция прокачивает скилл Stealth посредством использования скилла и непосредственно хождения в скрытом режиме.
sub Stealth()
repeat
while not uo.hidden()
uo.useskill('Stealth')
wait(200)
wend
uo.press(36,2)
while not uo.hidden()
uo.useskill('Stealth')
wait(200)
wend
uo.press(34,2)
until false
endsub
Забивка банка.
Code: Select all
; Функция исользуя баг Sphere докладывает в банк любой предмет, не смотря на ограничения по весу. Так же может использоваться для складирования контейенров друг в друга.
sub InsertToBank()
uo.print("Укажи объект который хочешь положить в банк")
uo.addObject("To Bank")
while uo.targeting()
wait(50)
wend
uo.print("Укажи вещь в банке")
uo.addObject("Into Bank")
while uo.targeting()
wait(50)
wend
uo.exec("moveitem "+uo.getSerial("To Bank")+" 0 "+uo.getSerial("Into Bank"))
endsub
ContOptimize
Code: Select all
; Уже не помню, что это, но кажется идеей было оптимально пересложить предметы в контейнере c.
sub contOptimize(c)
var i, j, k, count
uo.findtype("-1","-1",c)
k = uo.findcount()
DIM items[val(str(k))]
for i=0 to k-1
uo.findtype("-1","-1",c)
items[i] = uo.getSerial("finditem")
uo.ignore("finditem")
next
for i=0 to k-1
uo.ignore(items[i])
next
for i=0 to k-1
for j=0 to k-1
if items[i] && (uo.getQuantity(items[i])>1 || uo.getQuantity(items[j])>1) && uo.getGraphic(items[i])==uo.getGraphic(items[j]) && uo.getColor(items[i])==uo.getColor(items[j]) then
count = uo.getQuantity(items[i])
uo.moveitem(items[j],0,items[i])
items[i] = items[j]
while count == uo.getQuantity(items[i])
wait(200)
wend
items[j] = false
endif
next
next
endsub
to be continued..