Yoko

All sides of Injection
It is currently 2026-01-23 12:27:08

All times are UTC+02:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 2007-10-23 09:56:59 
Offline
User avatar

Joined: 2007-10-20 07:45:56
Posts: 40
Суть такая: в бэкпаке лежит две шкатулки с ключами, изначально закрытые, на полу отмычки. Юзаем отмычки на первую шкатулку, если открылась, то закрываем, если же нет, то пытаемся открыть вторую шкатулку. И так по кругу. Инжект ругается на строку "if i = 1 then". Это скорее всего как то по другому нужно писать, но в уроках я не нашла, подправьте пожалуйста. Это первый мой скрипт не собранный из кусочков, написанный полностью моими ручками. Так что жду помощи :wink:


Last edited by Kitten on 2007-10-23 10:13:04, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2007-10-23 10:08:34 
Offline
User avatar

Joined: 2007-10-20 07:45:56
Posts: 40
С этим разобралась ))) Теперь говорит что ошибка в строке которой тут нет даже, что может быть? Посмотрите пожалуйста...


Top
   
 Post subject:
PostPosted: 2007-10-23 10:18:17 
Offline
User avatar

Joined: 2007-10-20 07:45:56
Posts: 40
Кароче все сама с собой тут попереписывалась, все исправила, все робит вроде как, вот скрипт, если кому то надо:
Code:
##Берем два сундука или шкатулки с ключами в бэкпак
##Кладем кучу отмычек рядом на пол
##Закрываем оба контейнера, запускаем скрипт
##Lockpicking v1.00 Kitten

sub Lockpicking()

uo.exec('addobject Sunduk1')
while uo.targeting()
wait(100)
wend

uo.exec('addobject Key1')
while uo.targeting()
wait(100)
wend

uo.exec('addobject Sunduk2')
while uo.targeting()
wait(100)
wend

uo.exec('addobject Key2')
while uo.targeting()
wait(100)
wend

VAR i = 1
VAR k = 1
##################################################################
repeat

if i == 1 then
         UO.WaitTargetObject('Sunduk1')
         uo.usefromground(0x14FB) ;Lockpick
         uo.deletejournal()
         CheckLag()
         wait(7600)
endif

if uo.injournal('You opened the lock!') then
   i = 0
   uo.deletejournal()
   while i == 0
      uo.deletejournal()
      UO.WaitTargetObject('Sunduk1')
        UO.Useobject('Key1')
        CheckLag()
        wait(1000)
           if uo.injournal('You lock it.') then
              i = 1
              uo.deletejournal()
           endif
   wend
endif
   
if k == 1 then
         UO.WaitTargetObject('Sunduk2')
         uo.usefromground(0x14FB) ;Lockpick
         uo.deletejournal()
         CheckLag()
         wait(7600)
endif

if uo.injournal('You opened the lock!') then
   k = 0
   while k == 0
      uo.deletejournal()
      UO.WaitTargetObject('Sunduk2')
        UO.Useobject('Key2')
        CheckLag()
        wait(1000)
           if uo.injournal('You lock it.') then
              k = 1
              uo.deletejournal()
           endif
   wend
endif
until 1==0
endsub

sub CheckLag()
UO.DeleteJournal()
UO.Click('backpack')
repeat
wait(100)
until UO.InJournal('backpack')
end sub


Top
   
 Post subject:
PostPosted: 2007-10-23 11:26:28 
Offline

Joined: 2006-11-25 17:44:44
Posts: 258
красиво то как ;)


Top
   
 Post subject:
PostPosted: 2007-10-23 11:37:47 
Offline
User avatar

Joined: 2007-10-20 07:45:56
Posts: 40
grundick wrote:
красиво то как ;)
спасибо


Top
   
 Post subject:
PostPosted: 2007-10-23 12:24:07 
Offline
User avatar

Joined: 2007-10-12 20:48:07
Posts: 100
Хехе, все бы так решали проблемы ;-)

_________________
Image
Image


Top
   
 Post subject:
PostPosted: 2007-10-23 15:21:45 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
grundick wrote:
красиво то как ;)


Если смотреть с программистской точки зрения то табуляция просто на бум и вся красота уплывает


Top
   
 Post subject:
PostPosted: 2007-10-23 17:31:01 
Offline

Joined: 2006-11-25 17:44:44
Posts: 258
давно уж пора понять что я далёек от программирования ;)


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

All times are UTC+02:00


Who is online

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