Yoko

All sides of Injection
It is currently 2026-01-16 16:45:40

All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: 2007-02-06 11:00:13 
Offline

Joined: 2007-02-06 09:58:52
Posts: 2
sub Cartograph()
VAR Sunduk1 = '0x495A8754' ; Сериал сундука с мешками с картами
VAR Trash = '0x49E8E2CE' ; Сериал мусорного ведра
VAR Meshok = '0x0E75' ; Тип мешка
VAR Map = '0x14EB' ; Тип карты
VAR Fizzle = 'You are not familiar enough with the area to draw the map'
VAR Success = 'You place a map in your backpack'
VAR MeshSer, j, k, MapSer, flag
UO.CancelMenu()
UO.IgnoreReset()
UO.AutoMenu( 'What you you want to create', 'Local Map' )
UO.FindType( Meshok, -1, Sunduk1 )
While UO.FindCount() > 0
MeshSer = UO.GetSerial( 'finditem' )
UO.UseObject( MeshSer )
wait(500)
CheckLag()
UO.FindType( Map, -1, MeshSer )
While UO.FindCount() > 0
MapSer = UO.GetSerial( 'finditem' )
UO.Grab( '1', 'finditem' )
repeat
wait(100)
until UO.Count( Map ) == 1
flag = 0
While flag == 0
DeleteJournal( Fizzle )
DeleteJournal( Success )
UO.UseObject( MapSer )
k = 0
repeat
k = k + 1
wait(100)
until UO.InJournal( Fizzle ) OR UO.InJournal( Success ) OR k > 600
If UO.InJournal( Success ) OR k > 600 Then
flag = 1
Endif
Wend
UO.FindType( Map )
While UO.FindCount() > 0
UO.MoveItem( 'finditem', 0, Trash )
wait(1000)
CheckLag()
UO.FindType( Map )
Wend
UO.FindType( Map, -1, MeshSer )
Wend
UO.Ignore( MeshSer )
UO.FindType( Meshok, -1, Sunduk1 )
Wend
UO.IgnoreReset()
UO.CancelMenu()
endsub

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
endsub


Все работает, только когда происходит физл макрос останавливаеться. Это наверно из за разновидности шадров. У меня на шадре когда физл бланк карта пропадает. Можно в этом макросе убрать вообше проверку на физл, чтобы просто он писал и выкидывал а в случаи физла брал новую бланк памы и писал... зарание сенк
з.ы. пробывал сам разбираться не получилось... :(


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB® Forum Software © phpBB Limited