Yoko

All sides of Injection
It is currently 2024-03-28 20:54:59

All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: 2006-10-29 17:25:29 
Offline
Expert!
User avatar

Joined: 2004-04-04 11:13:54
Posts: 1205
Location: Балаково, Саратовская обл.
Суть скрипта вот в чем, появляется таргет им тыркаем в дерево, в пол шахты, в воду. Начинается процесс добычи ресурсов. Когда ресурс иссякнет появится новый таргет...

В переменной Instrument хранится тип инструмента, кирка, хатчет, удочка...

Сообщения прописаны не все, но по таймеру все равно выходит из цикла ожидания.

При достижении максимального веса скрипт останавливается. Для удобства юзания можно забиндить запуск скрипта на кнопку.

Code:
###############################################################
#=---===----===---===---= Harvester =---=-=-=-=-=--=-=-=-=-=-=#
#           Scripted by Savage (c) 2006 ICQ:33336141          #
#"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""#
###############################################################
sub Harvest()
   VAR Exit
   VAR LastTimer

   VAR MaxWeight=450 ;max ves
   VAR Instrument='0x0F43' ;Hatchet
;   VAR Instrument='0x0E86' ;PickAxe

   While UO.Weight<MaxWeight

      UO.DeleteJournal()
      UO.Usetype(Instrument)
      wait(100)

      While UO.Targeting()
         wait(300)
      Wend

      If NOT UO.Hidden() Then
         UO.UseSkill('Hiding')
      Endif

      LastTimer=UO.Timer()
      Repeat
         wait(100)
      Until UO.InJournal("cliloc# 0xA867|cliloc# 0x5DE0|cliloc# 0xAD03|cliloc# 0xAD00|cliloc# 0xA309|cliloc# 0xA2DE|cliloc# 0xA30D|You|cliloc# 0xA30F|cliloc# 0xAD83|cliloc# 0xA4EE|cliloc# 0xAD84") OR LastTimer+70<UO.Timer()

      If UO.InJournal("cliloc# 0xA867|cliloc# 0xAD00|cliloc# 0xA309|cliloc# 0xA2DE|cliloc# 0xAD84|cliloc# 0xA30D") Then
         Exit=1
      Else
         Exit=0
      Endif
      
      While Exit<>1
         LastTimer=UO.Timer()
         UO.DeleteJournal()
         UO.WaitTargetTile('lasttile')
         UO.UseType(Instrument)
         Repeat
            wait(100)
         Until UO.InJournal("cliloc# 0xA867|cliloc# 0x5DE0|cliloc# 0xAD03|cliloc# 0xAD00|cliloc# 0xA309|cliloc# 0xA2DE|cliloc# 0xA30D|You|cliloc# 0xA30F|cliloc# 0xAD83|cliloc# 0xA4EE|cliloc# 0xAD84") OR LastTimer+70<UO.Timer()
         If UO.InJournal("cliloc# 0xA867|cliloc# 0xAD00|cliloc# 0xA309|cliloc# 0xA2DE|cliloc# 0xAD84|cliloc# 0xA30D") Then
            Exit=1
         Endif
      Wend
      wait(500)
   Wend
   UO.Print("+++ Max Weight reached!")
end sub


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