Yoko

All sides of Injection
It is currently 2025-10-14 20:45:17

All times are UTC+02:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
 Post subject: БАНК
PostPosted: 2011-05-28 10:41:23 
Offline

Joined: 2010-06-19 22:59:51
Posts: 35
подскажите как проверить что банк открылся, не используя журнал


Top
   
 Post subject: Re: БАНК
PostPosted: 2011-05-28 12:32:58 
Offline
User avatar

Joined: 2006-12-08 10:51:50
Posts: 718
Location: Москва
Tiger1989 wrote:
подскажите как проверить что банк открылся, не используя журнал


Code:
var id_Bank = 0x12345678
If UO.GetSerial('lastcontainer') == id_Bank then
  ...
Endif


Top
   
 Post subject: Re: БАНК
PostPosted: 2011-05-30 14:17:14 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Альтернативные варианты:

Ожидание 250 мс, пока не откроется
Code:
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:
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


Top
   
 Post subject: Re: БАНК
PostPosted: 2011-05-30 16:02:30 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
чуть более старый и менее функциональный но более ролевой вариант :D
Code:
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

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
 Post subject: Re: БАНК
PostPosted: 2011-07-01 05:43:15 
Offline
User avatar

Joined: 2006-05-06 08:42:20
Posts: 11
Я немного по другому извратился в све время - не кричать банк пока банкир не подойдет на 5 клеток :oops:


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: Bing [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited