Yoko

All sides of Injection
It is currently 2025-11-12 19:59:12

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2006-08-03 19:50:31 
Offline
Expert!
User avatar

Joined: 2005-05-20 20:30:10
Posts: 548
пытаюсь сделать интерфейс удобнее - вот и пришла идея сделать нечто подобное..
Итак, после запуска скрипта у вас в левом верхем углу (вообще это регулируется - просто я под себя делал - мне удобно в левом верхнем) появляется интерактивная строка формата:
Code:
 [Текущее время] [время оставшееся до того, как можно выпить следующий поужен]
[кол-во поуженов последнего выпитого типа] (отображается только в том случае если оставшееся время до следующей банки >0)
Чтобы визуально представлять о чем речь - screen

1.
Code:
sub time()
var t,a,j,z,l=0,show=0
uo.setglobal('timer',0)
repeat
l=l+1
if l<5 then
j=22
uo.print(" Mihail's PvP Toolbar v1.0")
else
j=23
end if
t=uo.time()
if uo.getglobal('timer')=='0' then
uo.print(' '+Left(str(t),2)+':'+Left(Right(str(t),4),2)+':'+Right(str(t),2)+'   time left: '+uo.getglobal('timer')+' (sec); (aviable)')
show=0
else
uo.print(' '+Left(str(t),2)+':'+Left(Right(str(t),4),2)+':'+Right(str(t),2)+'   time left: '+uo.getglobal('timer')+' (sec)')
show=1
end if
if show==1 then
uo.print(' potions left: '+uo.getglobal('count'))
j=22
else
j=23
end if
for a=0 to j
uo.print(' ')
next
wait(1000)
until uo.dead()
end sub

sub zaderjka()
if not uo.getglobal('zaderjka')=='1' and not uo.dead() then
uo.setglobal('zaderjka','1')
var t=8000, d=0, p #t- время задержки между банками
repeat
d=d+1
p=t/1000 - d/10
wait(100)
uo.setglobal('timer',p)
if uo.getglobal('banka')=='1' then
uo.print('time left: ' + str(p) + ' (sec)')
uo.setglobal('banka','0')
end if
until p<=0 or uo.dead()
uo.setglobal('zaderjka','0')
#uo.print('time left: ' + str(p) + ' (sec); (potion aviable)')
end if
end sub

тут ничего трогать не надо

2.
Code:
sub manka()
############
var type='0x0F09' # тип банки
var color='0x0388' # цвет банки
############
uo.deletejournal()
uo.findtype(type,color,'backpack')
if uo.findcount() then
uo.useobject('finditem')
checklag()
uo.setglobal('count',uo.count(type))
if not uo.getglobal('zaderjka')=='1' then
uo.setglobal('zaderjka','0')
end if
if not uo.injournal('another') then
zaderjka()
end if
#uo.setglobal('banka','1')
else
uo.print('potion not found')
end if
end sub

а тут под каждую банку прописать такой вот скрипт (для корректного отображения оставшейся задержки)

для активации запустить скрипт time()
-
проблема состоит в том что этот самый скрипт time минут 5 работает нормально а дальше unhandled exception in parser.. это как-нить мона вылечить? :(


Top
   
 Post subject:
PostPosted: 2006-08-04 14:47:52 
Offline

Joined: 2006-02-10 13:26:37
Posts: 173
Михаил, а можешь выцарапать из этого скрипта только показывание оставшегося времени до след. возможности выпить бутылку? И шард какой?

_________________
Shard: Dragon World


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

All times are UTC+02:00


Who is online

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