Yoko

All sides of Injection
It is currently 2025-12-03 23:27:46

All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 2006-12-24 13:10:49 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Code:
sub Timer()
  var sec=0, min=0, hour=0, day=0
  var ShowSec,ShowMin,ShowHour, ShowDay
  uo.DeleteJournal()
  uo.Print('1. show time ')
  uo.Print('2. start timer ')
  uo.Print('3. stop ')
  uo.Print('4. continue ')
  uo.Print('Timer is working ... 00:00:00:01 ')
  while uo.SkillVal('Alchemy',1) < 1000
    sec=sec+1
    wait(1000)
    if (sec>=60) then
      sec=0
      min=min+1
      if (min>=60) then
        min=0
        hour=hour+1
        if (hour>=24) then
          hour=0
          day=day+1
        end if
      end if
    end if
    if uo.InJournal('show time') then
     show:
      if (hour<10) then
        ShowHour='0'+str(hour)
      else
        ShowHour=str(hour)
      end if
      if (min<10) then
        ShowMin='0'+str(min)
      else
        ShowMin=str(min)
      end if
      if (sec<10) then
        ShowSec='0'+str(sec)
      else
        ShowSec=str(sec)
      end if
      if (day<10) then
        ShowDay='0'+str(day)
      else
        ShowDay=str(day)
      end if
      if uo.InJournal('stop') then
        uo.DeleteJournal()
        uo.Print(ShowDay + ':' + ShowHour + ':' + ShowMin + ':' + ShowSec)
        repeat
          wait(100)
          if uo.InJournal('show time') then
            uo.DeleteJournal()
            uo.Print(ShowDay + ':' + ShowHour + ':' + ShowMin + ':' + ShowSec)
            wait(100)
          end if
        until uo.InJournal('continue')
      else
        uo.DeleteJournal()
        uo.Print(ShowDay + ':' + ShowHour + ':' + ShowMin + ':' + ShowSec)
      end if
    end if
    if uo.InJournal('start timer') then
      uo.DeleteJournal()
      sec=0
      min=0
      hour=0
      day=0
    end if
    if uo.InJournal('stop') then
      goto show
    end if
  wend
end sub


Пригодится?
10 строка: До какого события проводить отсчёт времени.( по умолчанию пока скил Алхимия не станет = 100 )
У скрипта существует 4 команды которые вводятся в окне клиента.
При запуске скрипта, начинается отсчёт( по умолчанию от 00:00:00:00 / d:h:m:s )
Чтобы посмотреть время, прошедшее с начала запуска скрипта, команда : show time
Чтобы остановить отсчёт : stop
Чтобы продолжить отсчёт с того места, на котором остановили: continue
Чтобы начать отсчёт с нуля: start timer

Формат вывода: 01:23:47:03


Top
   
 Post subject:
PostPosted: 2006-12-24 16:58:05 
Offline
Expert!
User avatar

Joined: 2005-05-20 20:30:10
Posts: 548
насколько стабилен?
инжа имеет обыкновение вылетать в таких скриптах через час-два

_________________
"плагины" для инжекта


Top
   
 Post subject:
PostPosted: 2006-12-24 18:47:56 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
На часах 00:04:31:30 =)


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

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