БАНК
Moderators: Murderator+, Murderator
Re: БАНК
Tiger1989 wrote:подскажите как проверить что банк открылся, не используя журнал
Code: Select all
var id_Bank = 0x12345678
If UO.GetSerial('lastcontainer') == id_Bank then
...
Endif
-
- Posts: 2259
- Joined: 2005-04-19 18:00:29
- Location: Московская область
- Contact:
Re: БАНК
Альтернативные варианты:
Ожидание 250 мс, пока не откроется
Ожидание, пока не откроется
Ожидание 250 мс, пока не откроется
Code: Select all
sub CheckBankOpened()
var idLastContainer
uo.UseObject('backpack')
wait(250)
idLastContainer = uo.GetSerial('lastcontainer')
uo.Msg('bank')
wait(250)
if uo.GetSerial('lastcontainer') <> idLastContainer then
uo.Print('opened')
else
uo.Print('not oppened. lag or another container opened.')
endif
end sub
Ожидание, пока не откроется
Code: Select all
sub CheckBankOpened()
var idLastContainer
uo.UseObject('backpack')
wait(250)
idLastContainer = uo.GetSerial('lastcontainer')
uo.Msg('bank')
repeat
wait(100)
until uo.GetSerial('lastcontainer') <> idLastContainer
uo.Print('opened')
end sub
Re: БАНК
чуть более старый и менее функциональный но более ролевой вариант

Code: Select all
sub Bank()
OpenBank()
endsub
Sub DeleteJournal(St)
While UO.InJournal(St)
UO.SetJournalLine(UO.InJournal(St)-1,'')
Wend
endsub
Sub OpenBank()
DeleteJournal('your Bank Box')
UO.ServerPrint('I want to see my account in thy bank')
Wait(3000)
If not UO.InJournal('your Bank Box') Then
UO.ServerPrint('Hey! Where is my bank account?')
Wait(3000)
If not UO.InJournal('your Bank Box') Then
UO.ServerPrint('Hurry! My bank account!!!')
Wait(3000)
EndIf
EndIf
If not UO.InJournal('your Bank Box') Then
OpenBank()
EndIf
EndSub