Magery

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
rebenok
Posts: 35
Joined: 2005-06-12 14:49:58

Magery

Post by rebenok »

Code: Select all

sub Magery() 
var LastTimer 
while not uo.Dead() 
uo.DeleteJournal() 
CheckLag() 
while uo.Mana>16 
uo.Cast('Poison','self') 
wait(2700) 
wend 
while uo.Mana<uo.INT 
LastTimer=uo.Timer() 
uo.UseSkill('Meditation') 
repeat 
wait(100) 
until uo.InJournal("You are") or uo.InJournal("You lose") or uo.Timer()>LastTimer+200 
uo.DeleteJournal() 
wait(2000) 
wend 
wend 
end sub 

sub CheckLag() 
uo.DeleteJournal() 
uo.Click('backpack') 
repeat 
wait(500) 
until uo.InJournal('backpack') 
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(20000) # WorldSave Protection 
UO.Say('') 
Wait(3000) 
UO.Say('') 
Wait(3000) 
UO.Say('') 
Wait(3000) 
UO.LDblClick(357,164) 
UO.LClick(616,459) 
Wait(3000) 
WEnd 
Wait(3000) 
if (RFlag == 0) and (ReconnectTime <> '0') Then 
UO.Exec('terminate main') 
wait(1000) 
UO.Exec('exec main') 
UO.TextOpen() 
UO.TextPrint('Disconnected & Reconnected @ '+ReconnectTime) 
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 
Вот скрипт. Как его переделать, чтобы чар кастовал со скроллов пойзона 0x1F40, лежащих в бэкпэке ?
Leo
Expert!
Posts: 791
Joined: 2005-01-15 19:15:05
Location: Dragon World
Contact:

Post by Leo »

Code: Select all

sub Magery() 
var LastTimer 
while not uo.Dead() 
uo.DeleteJournal() 
CheckLag() 
while uo.Mana>16 
UO.FindType('0x1F40',-1,'my') 
If UO.GetQuantity('finditem')>0 Then 
UO.WaitTargetObject('self') 
UO.UseObject('finditem')
wait(2700) 
endif
wend 
while uo.Mana<uo.INT 
LastTimer=uo.Timer() 
uo.UseSkill('Meditation') 
repeat 
wait(100) 
until uo.InJournal("You are") or uo.InJournal("You lose") or uo.Timer()>LastTimer+200 
uo.DeleteJournal() 
wait(2000) 
wend 
wend 
end sub 

sub CheckLag() 
uo.DeleteJournal() 
uo.Click('backpack') 
repeat 
wait(500) 
until uo.InJournal('backpack') 
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(20000) # WorldSave Protection 
UO.Say('') 
Wait(3000) 
UO.Say('') 
Wait(3000) 
UO.Say('') 
Wait(3000) 
UO.LDblClick(357,164) 
UO.LClick(616,459) 
Wait(3000) 
WEnd 
Wait(3000) 
if (RFlag == 0) and (ReconnectTime <> '0') Then 
UO.Exec('terminate main') 
wait(1000) 
UO.Exec('exec main') 
UO.TextOpen() 
UO.TextPrint('Disconnected & Reconnected @ '+ReconnectTime) 
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
rebenok
Posts: 35
Joined: 2005-06-12 14:49:58

Post by rebenok »

Благодарю.:)
Post Reply