Прошу помощи.
Скрипт на магию :
Code:
sub Train_Magery()
var tim, k, flag
VAR SpiritTime = UO.Timer()
repeat
tim=UO.Timer()
flag=false
While not flag
If ( UO.Timer() - SpiritTime ) / 600 > 5 Then
;Ïðîøëî 5 ìèíóò ñ ìîìåíòà ïîñëåäíåé ïðîêà÷êè Spirit Speak
SpSpeak()
SpiritTime = UO.Timer()
Else
wait(500)
Endif
UO.DeleteJournal()
if ((UO.Timer()-tim) > 18000)then
tim=UO.Timer()
endif
While not ((UO.Mana<14) or flag)
CheckLag()
UO.Cast('Poison','self')
MyWait(500)
if UO.InJournal('lack') then
CheckLag()
UO.Cast('Poison','self')
MyWait(500)
if UO.InJournal('lack') then
flag=true
uo.Print("1")
endif
endif
MyWait(2000)
Wend
CheckLag()
While UO.Mana<UO.INT
UO.Warmode(0)
UO.UseSkill('Meditation')
k=0
Repeat
k=k+1
MyWait(200)
Until UO.InJournal("You are") or UO.InJournal("You lose") or k>200
UO.DeleteJournal()
MyWait(20000)
Wend
Wend
CheckLag()
until UO.Dead() OR uo.skillval('Magery',1)==1000
end sub # TrainMagery
Sub MyWait(time)
var i, i1, count
count = time/100
i1 = 1
for i = 1 to count
if (i-i1)>=10 then
i1 = i
endif
if UO.Life < (UO.Str - 5) then ; and ((i-i1) == 0) then
UO.Say("Guards !!!")
Wait(1000)
endif
Wait(100)
next
; else
; wait(time)
;endif
end sub # MyWait
Sub SpSpeak()
;Spirit Speak v.1.00b (c) Edred
;Ðàçîâàÿ ïðîêà÷êà ñïèðèò ñïèêà. Ïðåäíàçíà÷åíà äëÿ âûçîâà èç äðóãèõ ñêðèïòîâ.
VAR mod = UO.WarMode(), num1
VAR fizzle = 'You fail your attempt'
VAR success = 'You establish a connection'
UO.WarMode( 0 )
DeleteJournal( success )
repeat
DeleteJournal( fizzle )
UO.UseSkill( 'Spirit Speak' )
num1 = 1
repeat
wait(100)
num1 = num1 + 1
until UO.InJournal( fizzle ) OR UO.InJournal( success ) OR num1 > 600
until UO.InJournal( success )
UO.WarMode( mod )
end sub
Sub CheckLag()
DeleteJournal( 'backpack' )
UO.Click( 'backpack' )
repeat
wait(100)
until UO.InJournal( 'backpack' )
return
end sub
Sub DeleteJournal( string1 )
VAR nom = UO.InJournal( string1 )
If nom > 0 Then
UO.SetJournalLine( Nom - 1, 'string replaced' )
DeleteJournal( string1 )
Endif
end sub
Реконнектор :
Code:
sub Reconnect()
var ReconnectTime,rFlag
ReconnectTime='0'
rFlag=1
repeat
while (uo.ObjAtLayer('Bpack')=='')
if rFlag then
rFlag=0
end if
wait(20000)
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.TextOpen()
uo.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
rFlag=1
ReconnectTime='0'
end if
until false
end sub
Реконектор перезаходит в ультиму, но скрипт на магию не включается.
Как их прикрутить правильно друг к другу, я уже измотался эксперементировать

[/code]