Сегодня утром написал скрипт для наколдовывания "Curse"-шмоток. Так как на ДРВ цитирую:
Quote:
Как правило, все статы могут расти до 100 единиц. Чтобы прокачать ту или иную характеристику выше 100 единиц, необходимо надеть курсу (англ. — curse) — проклятые вещи, которые понижают статы. При снятии курсы статы вернутся к своим истинным значениям. Разумеется, чтобы снять проклятую вещь, нужно её блесануть (освятить магическим заклинанием bless).
... то "Curse"-шмотки оччень полезны. Всего скрипта 2.
Первый делает шмот и облегчает настройку второго.
Вам понадобятся Реагенты(они же реги) и 14 вещей:
- Leather tunic.
- Leather gloves.
- Leather gorget.
- Leather sleeves.
- Cloak.
- Robe.
- Short.
- Shirt.
- Kilt.
- Half apron.
- Body sash.
- Floppy hat.
- Thigh boots.
- Pickaxe.
Вещи положите в пустой мешок.
Запустите скрипт и появившимся прицелом укажите на мешок с вещами.
При запуске вся курса должна быть в мешке!!!
Собственно скрипт№1:
Code:
var item, nameitem
#############################################
### Основная функция ############################
#############################################
sub main()
UO.AddObject('pack')
UO.Print('Укажите мешок с вещами?')
while UO.Targeting()
wait(10)
wend
uo.useobject('pack')
wait(1000)
repeat
uo.findtype(-1,-1,'pack')
item=uo.getserial('finditem')
if not uo.getgraphic(item)=='0x0000' then
recast:
if uo.mana==uo.int then
uo.deletejournal()
CheckLag()
uo.cast('Curse',item)
while not uo.injournal('darkling glow|fizzles')
wait(200)
wend
if uo.injournal('fizzles') then
goto recast
endif
else
med()
goto recast
endif
wait(3000)
uo.useobject(item)
wait(3000)
recast2:
if uo.mana==uo.int then
uo.deletejournal()
uo.cast('Bless',item)
while not uo.injournal('brilliant glow|fizzles')
wait(200)
wend
if uo.injournal('fizzles') then
goto recast2
endif
else
med()
goto recast2
endif
wait(1000)
uo.undress()
uo.disarm()
CheckLag()
endif
until uo.findcount()==0
end sub
##############################################
### Медитация ###############################
##############################################
sub med()
while uo.mana < uo.int
UO.UseSkill("Meditation")
UO.DeleteJournal()
while not uo.injournal("You are at peace") and not UO.InJournal("You lose your concentration")
wait(200)
if uo.injournal("world is saving now...") then
while not uo.injournal("world data saving")
wait(100)
if uo.injournal("You are starving") then
main()
endif
wend
endif
if uo.injournal("You are starving") then
main()
endif
wend
wend
end sub
##############################################
### CheckLag ################################
##############################################
Sub CheckLag()
uo.DeleteJournal()
uo.Click('backpack')
repeat
wait(50)
until uo.InJournal('backpack')
end sub
###############################################
### Определение и вывод в текстовое окно типов шмота ###
###############################################
sub tc()
uo.ignorereset()
uo.textclear()
var num, pickaxe, itemtype
num=0
UO.AddObject('pack')
UO.Print('Укажите мешок с вещами?')
while UO.Targeting()
wait(10)
wend
uo.useobject('pack')
wait(1000)
uo.textopen()
repeat
uo.findtype(-1,-1,'pack')
item=uo.getserial('finditem')
itemtype=uo.getgraphic(item)
uo.click('finditem')
wait(500)
nameitem=uo.getname(item)
uo.print(nameitem)
if itemtype=='0x0E85' or itemtype=='0x0E86' then
pickaxe=itemtype
num=num-1
endif
if not itemtype==pickaxe then
if itemtype=='0x0000' then
itemtype=pickaxe
endif
uo.textprint('curs['+str(num)+']="'+itemtype+'" #'+nameitem)
endif
uo.ignore(item)
num=num+1
until not uo.findcount()>0
uo.ignorereset()
end sub
После того как все шмотки прокляты и благославлены. Закиньте их опять в мешок и запустите функцию 'tc'. Появится текстовое окно с куском для второго скрипта.
Code:
curs[0]="0x1713" #a +3 floppy hat of Curse
curs[1]="0x13C7" #a +3 leather gorget of Curse
curs[2]="0x13C6" #a +3 leather gloves of Curse
curs[3]="0x1515" #a +4 cloak of Curse
curs[4]="0x13C5" #a +5 leather sleeves of Curse
curs[5]="0x1517" #a +2 shirt of Curse
curs[6]="0x1541" #a +3 body sash of Curse
curs[7]="0x1711" #a +6 thigh boots of Curse
curs[8]="0x152E" #a +2 short pants of Curse
curs[9]="0x13CC" #a +5 leather tunic of Curse
curs[10]="0x1537" #a +4 kilt of Curse
curs[11]="0x1F03" #a +4 robe of Curse
curs[12]="0x153B" #a +5 half apron of Curse
...если вы хотите прокачать силу, то...
Второй скрипт. Не совсем обычный мининг.
Code:
var kirka, a, cc
kirka = "0x0E85" ;Тип кирки.
cc=0
###########################################
###Массив с "курснутым" шмотьём ##############
###########################################
Sub Course(curs)
curs[0]="0x1713" #a +3 floppy hat of Curse
curs[1]="0x13C7" #a +3 leather gorget of Curse
curs[2]="0x13C6" #a +3 leather gloves of Curse
curs[3]="0x1515" #a +4 cloak of Curse
curs[4]="0x13C5" #a +5 leather sleeves of Curse
curs[5]="0x1517" #a +2 shirt of Curse
curs[6]="0x1541" #a +3 body sash of Curse
curs[7]="0x1711" #a +6 thigh boots of Curse
curs[8]="0x152E" #a +2 short pants of Curse
curs[9]="0x13CC" #a +5 leather tunic of Curse
curs[10]="0x1537" #a +4 kilt of Curse
curs[11]="0x1F03" #a +4 robe of Curse
curs[12]="0x153B" #a +5 half apron of Curse
return curs
end sub
#############################################
### Запускает автохайд и копалку #################
#############################################
sub main()
uo.exec("exec mine")
uo.exec("exec autohide")
end sub
#############################################
### Копалка ###############################
#############################################
sub mine() ; Копание
dim curs[13]
curs=Course(curs)
var PX, PY, PZ, IX, IY
PX=UO.GetX()
PY=UO.GetY()
PZ=UO.GetZ()
while cc<13
For Iy=-4 to 4
For Ix=-4 to 4
if uo.str>74 then
uo.usetype(curs[cc])
cc=cc+1
wait(1000)
else
while not UO.InJournal("There is no ore|You have no line|That is to far away|You can't think|You have no line of|too far away|mining in rock.")
UO.DeleteJournal()
if not uo.hidden() then
while not uo.injournal("You have hidden")
wait(200)
wend
endif
UO.WaitTargetTile(-1,Str(PX+Ix),Str(PY+Iy),Str(PZ))
uo.usetype(kirka)
while not UO.InJournal("You put the|You loosen some|You can't think|That is to far away|There is no ore|You have no line of|too far away|mining in rock.")
Wait(200)
wend
UO.DeleteJournal()
wend
endif
next
next
wend
end sub
#############################################
### Автохайд ##############################
#############################################
sub autohide()
while not uo.dead()
if not uo.hidden() then
uo.exec("warmode 0")
uo.useskill("Hiding")
endif
while not uo.injournal("You have been revealed|You can't seem")
wait(100)
wend
uo.deletejournal()
wend
uo.exec("terminate all")
end sub
#############################################
### CheckLag ##############################
#############################################
sub CheckLag()
UO.DeleteJournal() ; вытрем все сообщения в журнале (Inj, но не клиента)
UO.Click('backpack') ; одиночный клик по вашему backpack
; ждем сообщения в журнале
repeat
wait(100)
until UO.InJournal("backpack")
; этот цикл завершится, если это сообщение появится.... замечу "Backpack" и "backpack"
; регистр важен Пишите точно что ждете
end sub
Надеюсь кому-нибудь понадобится.
P.S. Помните Тип кирки в текстовом окне будет последним. Его вставлять в массив ненадо. Хотя можно и вставить, но надо будет скрипт править...
Code:
dim curs[13] -> заменить на -> dim curs[14]
uo.usetype(kirka) -> заменить на -> uo.usetype(curs[14])
P.P.S. Заманался править скрипт и пост...
P.P.P.S. Добавил в первый скрипт отображение имени "типа".