Yoko

All sides of Injection
It is currently 2025-11-02 00:05:03

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 2007-04-25 13:07:03 
Offline

Joined: 2007-04-19 16:47:21
Posts: 7
Code:
sub carpentryD() 
   VAR MyTrash = '0x400BF9BE'    ; мусорка
   VAR Sunduk = '0x400BF7E6';
   VAR Logi = '0x1BDD'    ; logs type
   VAR Rubanok = '0x1030'    ;  smoothing plane
   VAR predmet = '0x0DF0'    ;  "black staff"
   VAR Kolvo = 30; (сколько брать логов)
   VAR j, k, sum = 0
   UO.Exec ("cancelmenu")
   UO.Exec ("unsetreceivingcontainer")
   UO.Exec ("automenu 'Carpentry' 'Weapons & Tools'")
   UO.Exec ("automenu 'Weapons & Tools' 'black staff'")
   UO.UseObject( Sunduk )
   wait(1000)
   While UO.SkillVal( 'Carpentry' ) < 1000
      UO.FindType( Logi, '-1', Sunduk );
      UO.Grab( Str( Kolvo ), 'finditem' ) ;
      wait( 1000 )
      If UO.FindCount() == 0 Then
         UO.Print("Logs not found, script terminated")
         return
      Endif
      While UO.Count( Logi ) > 27;
         UO.Print('Ostalos ' + Str( UO.Count( Logi ) ) + ' logov' )
         UO.DeleteJournal()
         UO.UseType( Rubanok )
         k = 0
         repeat
            k = k + 1
            wait(500)
         until UO.InJournal('You put') OR UO.InJournal('fail') OR ( k > 30 )
         If UO.InJournal('You put') Then
            sum = sum + 1
            UO.Print( 'Crafted ' + str(sum) + ' fishing poles' )
         Endif
         while UO.Count( predmet ) > 0
            UO.FindType( predmet )
            UO.MoveItem( 'finditem', '0', MyTrash )
            wait( 500 )
         Wend
      Wend
   Wend
endsub


Code:
Вопрос такой,можно ли зделать так чтобы при максимальном количестве итемов в сундуке (не мусорка а сундук,с целью подальшей продажы скрафченых итемов) когда сундук забиваеться и пишет что немогу перемистить потому что больше не помещается,чтобы скрипт переходил на другой сундук и так на еще один...

[/code]
Code:


Top
   
 Post subject:
PostPosted: 2007-04-28 18:49:17 
Offline
User avatar

Joined: 2005-07-17 15:30:52
Posts: 308
Location: www.drw.ru
Code:
var a = 0
***
UO.MoveItem( 'finditem', '0', MyTrash )
wait(1000)
if uo.injournal('Сообщение о переполнении') then
  uo.deletejournal()
  if a == 0 then
    MyTrash = 'ID второго сундука'
    a = a + 1
  else
    MyTrash = 'ID третьего сундука'
  endif
endif


Top
   
 Post subject:
PostPosted: 2007-04-28 22:58:46 
Offline

Joined: 2007-04-19 16:47:21
Posts: 7
Code:
Зделай пожалуйста на 10 сундуков,я добавляю в скрипт а оно работает только на два так как ты написал,спасибо за твой труд.


Top
   
 Post subject:
PostPosted: 2007-04-28 23:01:11 
Offline
User avatar

Joined: 2007-02-21 20:15:57
Posts: 479
Велосипед придумать хочешь???
Можно и двумя сундуками обойтись. В одом пустые мешки, во втором заполненые.

_________________
Шард Антарес
Ururu


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 8 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