Archery, Fencing, Mace Fighting, Parrying, Swordsmanship, Tactics, Wrestling
Code:
Var RejimSC=2 ; Режим работы скрипта, 1 - арчер, 2 - кастующий
Var Sunduk=' ' ; ИД сундука где все ресурсы, луки и стрелы, реги для вортекса или скролы для вортекса, кормёжка для чаров
Var xVortex=' ',yVortex=' ',zVortex=' ' ; Координаты куда кастуем вортекса, не далее 2х тайлов от берега
Var TBow=' ' ; Тип оружия которое будем использовать
sub main()
uo.exec("filterspeech clear")
uo.exec("filterspeech off")
uo.exec("set finddistance 3")
uo.sayu(".detail 0")
uo.useobject(Sunduk)
uo.useobject('backpack')
wait(1000)
uo.exec("exec main0"+STR(RejimSC))
uo.Exec('terminate Reconnector')
wait(1000)
uo.Exec('exec Reconnector')
wait(1000)
end sub
Sub main01()#арчер
var Vortex=' ',check = false
var arN,arT,arE,qV = 0
var sk=uo.skillval("Archery",1)
uo.exec("warmode 1")
arN = uo.count('0x0F3F','0x0000')
arE = arN
while not uo.dead()
if uo.IsNPC(Vortex) then
if uo.skillval("Archery",1) == 1000 then
uo.asmLogAdd('Training.txt', UO.asmGetDate('dd/mm/yy')+" - "+UO.asmGetTime('hh:nn:ss')+" YES!!! GM Archery!!!")
uo.closeuo()
end if
if uo.count('0x0F3F','0x0000')<50 then
arT = uo.count('0x0F3F','0x0000')
uo.findtype('0x0F3F','0x0000',Sunduk)
Cheklag()
uo.moveitem('finditem','100','backpack')
wait(1000)
arE = arE + uo.count('0x0F3F','0x0000')-arT
end if
if uo.GetGraphic(uo.ObjAtLayer('Lhand'))<>TBow then
uo.findtype(TBow,'-1','backpack')
if uo.findcount()>0 then
uo.usetype(TBow)
wait(1000)
else
uo.findtype(TBow,'-1',Sunduk)
Cheklag()
uo.moveitem('finditem','1','backpack')
wait(1000)
uo.usetype(TBow)
wait(1000)
end if
end if
if not check then
check = true
qV = qV + 1
end if
else
if check then
if sk <> uo.skillval("Archery",1) then
uo.asmLogAdd('Training.txt', UO.asmGetDate('dd/mm/yy')+" - "+UO.asmGetTime('hh:nn:ss')+" ::на поднятие скила потратил " + str(arE-ArN) + ", потребовалось " + str(qV) + " вортексов, состояние скила арчери - "+STR(uo.skillval("Archery",1)/10))
arN = uo.count('0x0F3F','0x0000')
arE = arN
qV = 0
sk = uo.skillval("Archery",1)
end if
Eda()
check = false
end if
uo.findtype('0x000D','0x000D','ground')
if uo.findcount()>0 then
Vortex=uo.getserial('finditem')
UO.attack(Vortex)
end if
end if
wait(1000) ; Опрос состояния каждую секунду
if uo.injournal('SkokaAR') then
uo.say(STR(uo.skillval("Archery",1)/10))
uo.deletejournal()
end if
wend
uo.closeuo()
end sub
Sub main02()#кастер
var Vortex='0x40043143'
var i
dim ResursCast[5]
ResursCast[1]='0x1F66' ## Energy Vortex Scroll
ResursCast[2]='0x0F7B' ## BM
ResursCast[3]='0x0F7A' ## BP
ResursCast[4]='0x0F86' ## MR
ResursCast[5]='0x0F88' ## NS
uo.exec("warmode 0")
uo.findtype('0x000D','0x000D','ground')
if uo.findcount()>0 then
Vortex=uo.getserial('finditem')
end if
while not uo.dead()
if not uo.IsNPC(Vortex) then
if ChekArcher() then
while not castuni(40,'0x1F66','Energy Vortex')
for i=2 to 5
if uo.count(ResursCast[i],'0x0000')==0 then
uo.findtype(ResursCast[i],'0x0000',Sunduk)
Cheklag()
if uo.findcount()>0 then
uo.moveitem('finditem',str(10-uo.count(ResursCast[i],'0x0000')),'backpack')
wait(1000)
end if
end if
next
wend
uo.findtype('0x000D','0x000D','ground')
if uo.findcount()>0 then
Vortex=uo.getserial('finditem')
for i=2 to 5
if uo.count(ResursCast[i],'0x0000')<10 then
uo.findtype(ResursCast[i],'0x0000',Sunduk)
Cheklag()
if uo.findcount()>0 then
uo.moveitem('finditem',str(10-uo.count(ResursCast[i],'0x0000')),'backpack')
wait(1000)
end if
end if
next
Eda()
ToMedit()
end if
end if
end if
wait(1000)
if uo.injournal('StopP!!!') then
uo.closeUO()
end if
if uo.mana==uo.int then
ToHide()
end if
uo.findtype('0x0F3F','0x0000','ground')
if uo.findcount()>0 then
Cheklag()
uo.moveitem('finditem','-1',Sunduk)
wait(1000)
end if
wend
uo.closeuo()
end sub
Sub ChekArcher()
var i
Dim Archers[5]
Archers[1]=''
Archers[2]=''
Archers[3]=''
Archers[4]=''
Archers[5]=''
for i=1 to 5
if uo.IsNPC(Archers[i]) then
if Archers[i]<>uo.getserial('self') then
return true
end if
end if
next
return false
end sub
Sub Eda()
if uo.count('0x097B','0x0000')<50 then
uo.findtype('0x097B','0x0000',Sunduk)
Cheklag()
uo.moveitem('finditem',STR(50-uo.count('0x097B','0x0000')),'backpack')
wait(1000)
end if
uo.deletejournal()
repeat
uo.usetype('0x097B','0x0000')
wait(1000)
until uo.injournal("You are stuffed!") or uo.injournal("You can't think of a way to use that item.")
end sub
Sub Cheklag()
UO.DeleteJournal()
UO.Click('backpack')
Repeat
Wait(10)
Until UO.InJournal("backpack")
end sub
Sub ToMedit()
while uo.mana<40
uo.warmode(0)
uo.deletejournal()
uo.useskill('Meditation')
repeat
wait(10)
until uo.injournal("You lose your concentration") or uo.injournal("You are at peace.") or uo.mana>40
wend
end sub
Sub ToHide()
while not uo.hidden()
uo.warmode(0)
uo.DeleteJournal()
uo.useskill("Hiding")
repeat
wait(10)
until UO.InJournal("You have hidden yourself well") or UO.InJournal("You can't seem to hide here.") or UO.InJournal("You are preoccupied with thoughts of battle.") or uo.dead()
if UO.InJournal("You are preoccupied with thoughts of battle.") then
uo.warmode(0)
end if
if uo.dead() then
return
end if
wend
end sub
Sub castuni(minMANA,sType,cName)
var t = UO.Timer(),m = UO.MANA
uo.exec("warmode 0")
repeat
UO.FindType(sType,-1,'my')
If UO.findcount()>0 then
if uo.mana<(minMANA/2) then
ToMedit()
end if
m = UO.MANA
uo.DeleteJournal()
uo.waittargettile('400',xVortex,yVortex,zVortex)
UO.UseObject('finditem')
else
if uo.mana<minMANA then
ToMedit()
end if
m = UO.MANA
uo.DeleteJournal()
uo.waittargettile('400',xVortex,yVortex,zVortex)
uo.cast(cName)
end if
t = UO.Timer()
repeat
wait(10)
until IsMyOwn('You have interrupted') or IsMyOwn(uo.getname()+': The spell fizzles.') or IsMyOwn('You lack') or t+200<uo.Timer() or m > UO.MANA
wait(500)
if IsMyOwn('You lack') then
return false
end if
until not (IsMyOwn('You have interrupted') or IsMyOwn(uo.getname()+': The spell fizzles.'))
return true
end sub
Sub IsMyOwn(msgSTR)
if not UO.InJournal(msgSTR) then
return false
end if
if msgSTR == Left(UO.Journal(UO.InJournal(msgSTR)-1),len(msgSTR)) then
return true
else
return false
end if
end sub
Sub Reconnector()
var ReconnectTime, RFlag
ReconnectTime = '0'
RFlag = 1
Repeat
While (uo.ObjAtLayer('Bpack') == '')
if RFlag Then
ReconnectTime = MakeTime()
RFlag = 0
endif
Wait(110000) # WorldSave Protection
uo.Say('')
Wait(5000)
uo.Say('')
Wait(5000)
uo.Say('')
Wait(5000)
uo.LDblClick(357,164)
uo.LClick(616,459)
Wait(5000)
WEnd
Wait(3000)
if (RFlag == 0) and (ReconnectTime <> '0') Then
UO.asmLogAdd('Training.txt', UO.asmGetDate('dd/mm/yy')+" - "+UO.asmGetTime('hh:nn:ss')+" - "+"Упс. Ребут типа !!!")
uo.Exec('terminate main01')
uo.Exec('terminate main02')
wait(5000)
uo.RClick(196,193)
wait(2000)
uo.RClick(196,193)
wait(2000)
uo.RClick(196,193)
wait(2000)
uo.RClick(196,193)
wait(2000)
uo.Exec('exec main')
wait(5000)
RFlag = 1
ReconnectTime = '0'
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
И
Code:
var x=' ' ; координата Х куда кастуем
var y=' ' ; координата Y куда кастуем
var fighter=' ' ; ИД того, кто качает боевые
var spirit='0x023E' ; тип блейд спирита
var bints='0x0E21' ; тип бинтов
var bloodbints='0x0E20' ; тип кровавых бинтов
var washbasin='0x1008' ; тип ванночки
var Svord=' ' ; тип оружия
var Shield=' ' ; тип щита
var gh='0x0F0E' ; тип ГХ
var cgh='0x09BB' ; цвет ГХ
var i=3
####################### Настройки ##########################
#Кастер #
#в пак положить необходимые реги, одеть браслет маны, #
#включить TWI, перетащить статус файтера #
#Файтер #
#в пак положить ванночку, бинты, ГХ, одеть браслет жизни, #
#положить побольше оружия, включить TWI, одеть щит и оружие#
#################### Caster Spirits ########################
sub caster()
uo.set('finddistance','14')
while not uo.dead()
if i==3 then
i=0
castparaliz()
endif
i=i+1
castbladespirit()
meditation()
waitdiespirit()
waithealfighter()
wend
endsub
Sub castbladespirit()
uo.findtype(spirit,'-1','ground')
if uo.findcount() then
while uo.findcount()
wait(1000)
uo.findtype(spirit,'-1','ground')
wend
endif
repeat
meditation()
uo.deletejournal()
uo.waittargettile('0',x,y,0)
uo.cast ('Blade Spirits')
wait(8000)
until not uo.InJournal("The spell fizzles.")
end sub
Sub castparaliz()
uo.findtype(spirit,'-1','ground')
if uo.findcount() then
while uo.findcount()
wait(1000)
uo.findtype(spirit,'-1','ground')
wend
endif
repeat
if uo.mana-24<=24 then
uo.exec('warmode 0')
repeat
uo.useskill('Meditation')
wait(4000)
until uo.mana == uo.int
endif
meditation()
uo.deletejournal()
uo.waittargettile('0',x,y,0)
uo.cast ('Paralyze Field')
wait(8000)
until not uo.InJournal("The spell fizzles.")
end sub
Sub meditation()
if UO.Mana<24 then
uo.exec('warmode 0')
repeat
uo.useskill('Meditation')
wait(4000)
until uo.mana == uo.int
endif
endsub
Sub waithealfighter()
repeat
wait(100)
until uo.GetHp(fighter) == uo.GetMaxHp(fighter)
endsub
Sub waitdiespirit()
uo.findtype(spirit,'-1','ground')
if uo.findcount() then
while uo.gethp('finditem')>0
wait(1000)
uo.findtype(spirit,'-1','ground')
wend
endif
endsub
################### Fighter Spirits #################
sub fighter()
uo.set('finddistance','14')
while not uo.dead()
healing()
sword()
killspirits()
wend
endsub
Sub healing()
UO.FindType(bints,'-1','backpack')
if UO.FindCount() then
while uo.life<>uo.str
uo.bandageself()
wait(3500)
wend
else
UO.FindType(bloodbints,'-1','backpack')
if UO.FindCount() then
uo.waittargettype(washbasin)
uo.UseType(bloodbints)
endif
endif
endsub
Sub killspirits()
uo.findtype(spirit,'-1','ground')
uo.warmode(1)
while not uo.findcount()
wait(1000)
uo.findtype(spirit,'-1','ground')
wend
wait(2000)
uo.attack('finditem')
while uo.findcount()
checksword()
checkhp()
uo.findtype(spirit,'-1','ground')
wait(1000)
wend
wait(500)
uo.findtype(spirit,'-1','ground')
if uo.findcount() then
wait(2000)
uo.attack('finditem')
while uo.findcount()
checksword()
checkhp()
uo.findtype(spirit,'-1','ground')
wait(1000)
wend
wait(500)
endif
endsub
Sub sword()
var s
UO.Equipt('Lhand',shield)
wait(2000)
uo.findtype(Svord,'-1','backpack')
if uo.findcount() then
s=uo.getserial('finditem')
uo.ignore('finditem')
else
uo.ignorereset()
uo.findtype(Svord,'-1','backpack')
s=uo.getserial('finditem')
endif
uo.useobject(s)
wait(2000)
end sub
Sub checksword()
if UO.GetGraphic(UO.ObjAtLayer('Rhand')) <> svord then
uo.findtype(svord,'-1','backpack')
if uo.findcount() then
uo.usetype('finditem')
endif
endif
endsub
Sub checkhp()
if uo.life<17 then
uo.usetype(gh,cgh)
endif
endsub