Sparing
Napsal: 08.09.2014 00:53:20
Kód: Vybrat vše
sub Training_Heal() ; Leci pocet nastavenych cilu
var HP,MHP,DMG,MIN,OBJ,TIME
var n=2 ; pocet lecenych
for var X=1 to n
UO.AddObject("OBJ"+str(X))
While UO.Targeting()
Wait(300)
Wend
next
Repeat
DMG=0
for X=1 to n
If UO.GetDistance("OBJ"+str(X))<=6 Then
MHP=UO.GetMaxHP("OBJ"+str(X))
HP=UO.GetHP("OBJ"+str(X))
If HP<MHP and (HP<MIN or NOT DMG) Then
OBJ="OBJ"+str(X)
MIN=HP
DMG=1
Endif
Endif
WAIT(50)
next
If DMG Then
UO.Print("Lecim "+UO.GetName(OBJ))
X=UO.Count("0x0e21")
Time=UO.Timer()
UO.WaitTargetObject(OBJ)
UO.UseType(0x0e21)
Repeat
Wait(100)
Until X>UO.Count("0x0e21") or (UO.Timer()-Time)>40
If (UO.Timer()-Time) < 5 Then
UO.WarMode(0)
Wait(500)
UO.WarMode(1)
Wait(500)
Endif
Endif
Wait(500)
Until UO.Dead() or UO.Count("0x0e21")<2
If NOT UO.Dead() THEN
for X=1 to 3
UO.Msg("Od sebe, dosly bandy!!")
Wait(2000)
next
Endif
end sub
Sub WaitForJournal(text)
repeat
wait(200)
until uo.inJournal(text)
wait(500)
end sub
sub Sparing() ; Mlati protivnika, kdyz ma nekdo malo HP leci
UO.AddObject('buchna')
While UO.Targeting()
Wait(300)
Wend
While NOT Uo.Dead() AND NOT Uo.GetHP('buchna') == 0
Uo.DeleteJournal()
If Uo.GetHP('self') > 50 AND Uo.GetHP('buchna') > 50 THEN
Uo.Attack('buchna')
Wait(5000)
If Uo.InJournal('World save') THEN
Wait(20000)
EndIf
Else
If Uo.GetHP('self') < Uo.GetHP('buchna') THEN
Uo.Print('Bod healu sebe')
While Uo.GetHP('self') < Uo.GetMaxHP('self')
Uo.WaitTargetSelf()
Uo.UseType('0x0E21')
Repeat
Wait(2500)
If Uo.InJournal('World save') THEN
Wait(20000)
EndIf
Until Uo.InJournal('You apply') OR Uo.InJournal('You put') Or ('Chces vytvorit')
WEnd
Wait(500)
While Uo.GetHP('buchna') < Uo.GetMaxHP('buchna')
Uo.WaitTargetObject('buchna')
Uo.UseType('0x0E21')
Repeat
Wait(2500)
If Uo.InJournal('World save') THEN
Wait(20000)
EndIf
Until Uo.InJournal('You apply') OR Uo.InJournal('You put') Or ('Chces vytvorit')
WEnd
Else
Uo.Print('Bod healu buchny')
While Uo.GetHP('buchna') < Uo.GetMaxHP('buchna')
Uo.WaitTargetObject('buchna')
Uo.UseType('0x0E21')
Repeat
Wait(2500)
If Uo.InJournal('World save') THEN
Wait(20000)
EndIf
Until Uo.InJournal('You apply') OR Uo.InJournal('You put') Or ('Chces vytvorit')
WEnd
Wait(500)
While Uo.GetHP('self') < Uo.GetMaxHP('self')
Uo.WaitTargetSelf()
Uo.UseType('0x0E21')
Repeat
Wait(2500)
If Uo.InJournal('World save') THEN
Wait(20000)
EndIf
Until Uo.InJournal('You apply') OR Uo.InJournal('You put') Or ('Chces vytvorit')
WEnd
EndIf
EndIf
WEnd
EndSub
sub Bouchani() ; Jen mlati cil
UO.AddObject('buchna')
While UO.Targeting()
Wait(300)
Wend
While NOT Uo.Dead() AND NOT Uo.GetHP('buchna') == 0
Uo.Attack('buchna')
Wait(10000)
If Uo.InJournal('World save') THEN
Wait(20000)
EndIf
WEnd
EndSub
sub Sparing_Chuze() ; Mlati cil, kdyz ma nekdo malo HP udela krok od protivnika a leci
var p
UO.AddObject('buchna')
While UO.Targeting()
Wait(300)
Wend
While NOT Uo.Dead() AND NOT Uo.GetHP('buchna') == 0
Uo.DeleteJournal()
p=0
If Uo.GetHP('self') > 50 AND Uo.GetHP('buchna') > 50 THEN
Uo.Attack('buchna')
repeat
Wait(500)
If Uo.InJournal('World save') THEN
Wait(20000)
EndIf
p=p+1
until Uo.GetHP('self') < 51 Or Uo.GetHP('buchna') < 51 Or p > 9
Else
if UO.GetX("self") < UO.GetX("buchna") and UO.GetY("self") == UO.GetY("buchna") then
repeat
UO.Press(36,1,50)
Wait(500)
until uo.getdistance('buchna')==3
endif
if UO.GetX("self") > UO.GetX("buchna") and UO.GetY("self") == UO.GetY("buchna") then
repeat
UO.Press(34,1,50)
Wait(500)
until uo.getdistance('buchna')==3
endif
if UO.GetX("self") == UO.GetX("buchna") and UO.GetY("self") < UO.GetY("buchna") then
repeat
UO.Press(33,1,50)
Wait(500)
until uo.getdistance('buchna')==3
endif
if UO.GetX("self") == UO.GetX("buchna") and UO.GetY("self") > UO.GetY("buchna") then
repeat
UO.Press(35,1,50)
Wait(500)
until uo.getdistance('buchna')==3
endif
repeat
If Uo.GetHP('self') < Uo.GetHP('buchna') THEN
Uo.Print('Bod healu sebe')
While Uo.GetHP('self') < Uo.GetMaxHP('self')
Uo.WaitTargetSelf()
Uo.UseType('0x0E21')
Repeat
Wait(2500)
If Uo.InJournal('World save') THEN
Wait(20000)
EndIf
Until Uo.InJournal('You apply') OR Uo.InJournal('You put') Or ('Chces vytvorit')
WEnd
Wait(500)
While Uo.GetHP('buchna') < Uo.GetMaxHP('buchna')
Uo.WaitTargetObject('buchna')
Uo.UseType('0x0E21')
Repeat
Wait(2500)
If Uo.InJournal('World save') THEN
Wait(20000)
EndIf
Until Uo.InJournal('You apply') OR Uo.InJournal('You put') Or ('Chces vytvorit')
WEnd
Else
Uo.Print('Bod healu buchny')
While Uo.GetHP('buchna') < Uo.GetMaxHP('buchna')
Uo.WaitTargetObject('buchna')
Uo.UseType('0x0E21')
Repeat
Wait(2500)
If Uo.InJournal('World save') THEN
Wait(20000)
EndIf
Until Uo.InJournal('You apply') OR Uo.InJournal('You put') Or ('Chces vytvorit')
WEnd
Wait(500)
While Uo.GetHP('self') < Uo.GetMaxHP('self')
Uo.WaitTargetSelf()
Uo.UseType('0x0E21')
Repeat
Wait(2500)
If Uo.InJournal('World save') THEN
Wait(20000)
EndIf
Until Uo.InJournal('You apply') OR Uo.InJournal('You put') Or ('Chces vytvorit')
WEnd
EndIf
if UO.GetX("self") < UO.GetX("buchna") and UO.GetY("self") == UO.GetY("buchna") then
repeat
UO.Press(34,1,100)
Wait(500)
until uo.getdistance('buchna')==1
endif
if UO.GetX("self") > UO.GetX("buchna") and UO.GetY("self") == UO.GetY("buchna") then
repeat
UO.Press(36,1,100)
Wait(500)
until uo.getdistance('buchna')==1
endif
if UO.GetX("self") == UO.GetX("buchna") and UO.GetY("self") < UO.GetY("buchna") then
repeat
UO.Press(35,1,100)
Wait(500)
until uo.getdistance('buchna')==1
endif
if UO.GetX("self") == UO.GetX("buchna") and UO.GetY("self") > UO.GetY("buchna") then
repeat
UO.Press(33,1,100)
Wait(500)
until uo.getdistance('buchna')==1
endif
EndIf
WEnd
EndSub
sub Archery() ; Stríli na cil kdyz ma nekdo malo HP nanda stit a leci
UO.AddObject('buchna')
While UO.Targeting()
Wait(300)
Wend
Uo.UseType("0x13B1","0x0000")
Wait(500)
While NOT Uo.Dead() AND NOT Uo.GetHP('buchna') == 0
Uo.DeleteJournal()
If Uo.GetHP('self') > 50 AND Uo.GetHP('buchna') > 50 THEN
Uo.Attack('buchna')
Wait(5000)
If Uo.InJournal('World save') THEN
Wait(20000)
EndIf
If Uo.Count("0x0F3F") < 1 THEN
Uo.UseType("0x1EA0","0x0747")
Wait(500)
EndIf
Else
Uo.Usetype("0x1B78")
Wait(500)
repeat
Uo.DeleteJournal()
If Uo.GetHP('self') < 50 OR Uo.GetHP('buchna') == Uo.GetMaxHP('buchna') THEN
Uo.WaitTargetSelf()
Uo.UseType('0x0E21')
Repeat
Wait(2500)
If Uo.InJournal('World save') THEN
Wait(20000)
EndIf
Until Uo.InJournal('You apply') OR Uo.InJournal('You put') Or ('Chces vytvorit')
Else
Uo.WaitTargetObject('buchna')
Uo.UseType('0x0E21')
Repeat
Wait(2500)
If Uo.InJournal('World save') THEN
Wait(20000)
EndIf
Until Uo.InJournal('You apply') OR Uo.InJournal('You put') Or ('Chces vytvorit')
EndIf
Wait(500)
Until Uo.GetHP('self') == Uo.GetMaxHP('self') AND Uo.GetHP('buchna') == Uo.GetMaxHP('buchna')
Uo.UseType("0x13B1","0x0000")
Wait(500)
EndIf
WEnd
EndSub