Проблема!!!
Posted: 2009-12-16 13:16:04
Вот код:, когда запускаешь FindPlayer (чар должен реколится от любого игрока) и идешь рубить, чар при появлении игрока пишет *реколимся от атаки* и стоит на месте,( делаешь шаг он рекоится) не пойму в чем проблема
в инже стоят галки:

в инже стоят галки:

Code: Select all
sub FindPlayer()
VAR a, b
DIM Chars[2]
uo.ignore('self', 'on')
Chars[0] = '0x0190' #тип игрока мужского пола#
Chars[1] = '0x0191' #тип игрока женского пола#
while not uo.dead()
for a = 0 to 1
uo.set('finddistance', '15')
uo.findtype(Chars[a], '-1', '1')
if uo.findcount() > 0 then
Pause()
RecallAtAttack()
UO.Exec( 'terminate PermResend' )
endif
wait ( 200 )
next
wait ( 200 )
wend
uo.IgnoreReset()
end sub
sub RecallAtAttack()
var d = uo.getx('self')
uo.Exec('terminate ToHide')
uo.print('Реколимся от атаки...')
if uo.Waiting() then
uo.CancelTarget()
end if
repeat
uo.deletejournal()
uo.waittargetobject('runeHome')
if UO.Count("0x1f4c") > 0 then
UO.Exec("usetype 0x1f4c")
else
uo.cast('Recall')
EndIf
repeat
wait( 200 )
until d <> uo.getx('self') or uo.injournal('The spell fizzles.')
until not uo.injournal('The spell fizzles.')
if RecallDrop == 1 then
DropLogs()
end if
UO.print('Ждем 3 минуты, и реколимся обратно')
wait(60000)
UO.print('Ждем еще 2 минуты.')
wait(60000)
UO.print('Ждем еще 1 минуту.')
wait(50000)
UO.print('Ждем еще 10 секунд.')
wait(5000)
UO.print('4 ...')
wait(1000)
UO.print('3 ...')
wait(1000)
UO.print('2 ...')
wait(1000)
UO.print('1 ...')
wait(1000)
uo.DeleteJournal()
RecallToLumber()
Resume()
end sub