Yoko

All sides of Injection
It is currently 2026-03-10 12:54:54

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2004-04-19 01:57:41 
Offline

Joined: 2004-04-19 01:50:19
Posts: 1
вот что я наваял:
Code:
sub shahta ()
var i=0
while UO.Life > (40)
if UO.InJournal("idu v shahtu") then
UO.DeleteJournal()
i=i+1
endif

if UO.InJournal("proba!!!!") and i==1 then
UO.DeleteJournal()
goto start1
endif

if UO.InJournal("proba!!!!") and i==2 then
UO.DeleteJournal()
goto start2
endif

if UO.InJournal("proba!!!!") and i==3 then
UO.DeleteJournal()
goto start3
endif

if UO.InJournal("proba!!!!") and i==4 then
UO.DeleteJournal()
goto start4
endif
wend

start1:
UO.Exec("cast Recall 0x40008AEB")
wait(3500)
if UO.InJournal("the spell fizzles") then
wait (500)
goto start1
UO.DeleteJournal()
endif

start2:
UO.Exec("cast Recall 0x40008AFC")
wait(3500)
if UO.InJournal("the spell fizzles") then
wait (500)
goto start2
UO.DeleteJournal()
endif

start3:
UO.Exec("cast Recall 0x400074BA")
wait(3500)
if UO.InJournal("the spell fizzles") then
wait (500)
goto start3
UO.DeleteJournal()
endif

start4:
UO.Exec("cast Recall 0x400013B2")
wait(3500)
if UO.InJournal("the spell fizzles") then
wait (500)
goto start4
UO.DeleteJournal()
i=0
endif

end sub

но у меня чар реколится по всем 4 рунам вместо того что бы остановится на какойто одной и ждать очередного появления в журнале данной фразы


Top
   
 Post subject:
PostPosted: 2004-04-20 15:19:38 
Offline
Site Admin
User avatar

Joined: 2004-04-03 16:49:38
Posts: 1964
логика у тебя какаято корявая
ну пошёл ты на start1 а выхода от туда нет. после старт1 идёт старт2 и так далее до конца всей процедуры.

ну и язык бедноват. почитай хотя бы scripting.txt а ещё лучше документацию к языку Бейсик.

заметь так же что ты в IF-ах поставил очистку журнала после GOTO в результате чего её никогда не произойдёт.

ещё и после обрыва цикла он начнёт по всем подряд рунам бегать.

короче скрипт писался бездумно.

вот кусок переписал но только для того чтобы ты посмотрел внимательно, понял где ты не прав и написал по-своему.
Code:
sub recallme(rune)
  start1:
  UO.DeleteJournal()
  UO.Exec("cast Recall "+rune)
  wait(3500)
  if UO.InJournal("the spell fizzles") then
    goto start1
  endif
end sub

sub shahta ()
DIM runes[10]
runes[1]="0x40008AEB"
runes[2]="0x40008AFC"
runes....

var i=0
while UO.Life > 40
if UO.InJournal("idu v shahtu") then
UO.DeleteJournal()
i=i+1
endif

if UO.InJournal("proba!!!!") then
 recallme(runes[i])
endif
wend

 recallme(runes[1])

end sub


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