Yoko

All sides of Injection
It is currently 2025-11-05 06:30:59

All times are UTC+02:00




Post new topic  Reply to topic  [ 40 posts ]  Go to page Previous 1 2
Author Message
 Post subject:
PostPosted: 2008-03-23 01:01:24 
Offline

Joined: 2007-04-26 23:35:15
Posts: 220
rvk wrote:
Вот здесь parse error
Code:
DIM WandT[WC] 


Исправь на

Code:
DIM WandT[ val( str( WC ) ) ]


Top
   
 Post subject:
PostPosted: 2008-03-23 01:11:24 
Offline

Joined: 2008-03-03 09:19:21
Posts: 71
Location: SPB
rvk wrote:
Вот здесь parse error
Code:
DIM WandT[WC] 


Code:
DIM WandT[тут просто вбей число с количесвом типов] 


Top
   
 Post subject:
PostPosted: 2008-03-23 01:11:53 
Offline

Joined: 2008-03-20 07:31:02
Posts: 20
Ипсравил, кастует лишь со свитков и с книги. С ванды отказывается. Возможно я что-то не так вписал.
Code:
sub explosion()
var i=1,wandT=0
var NN='a Magic wand of Explosion'
UO.DeleteJournal()
UO.Set('lasttarget','laststatus')
begin:
if uo.Waiting() then
uo.canceltarget()
endif
wandT=wandsearch(NN)
if wandT<>0 then
i=1
if uo.ObjAtLayer('Rhand')=="" and uo.ObjAtLayer('Lhand')<>"" then
uo.addobject('weapon',uo.ObjAtLayer('Lhand'))
else
if uo.ObjAtLayer('Rhand')<>"" then
uo.addobject('weapon',uo.ObjAtLayer('Rhand'))
else
i=0
endif
endif
UO.WaitTargetObject('lasttarget')
UO.UseObject(WandT)
wait(500)
if UO.InJournal("It seems to be out of charges") then
UO.Deletejournal()
UO.Ignore(WandT)
if i<>0 then
uo.waittargetself()
UO.UseObject('weapon')
wait(500)
endif
goto begin
endif
if i<>0 then
uo.waittargetself()
UO.UseObject('weapon')
endif
else
UO.FindType('0x1F57',-1,'my')
If UO.GetQuantity('finditem')>0 then
if UO.Mana>=14 then
UO.WaitTargetObject('lasttarget')
UO.UseObject('finditem')
UO.Print("Scroll")
else
UO.Print("Low mana!!! Scroll!")
endif
else
if UO.Mana>=28 then
UO.Cast('Explosion','laststatus')
UO.Print("Spell")
else
UO.Print("Low mana!!! Spell!")
endif
endif
endif
end sub

sub wandsearch(NugnoeName)
var WC = 3 ;сколько типов
DIM WandT[ val( str( WC ) ) ]
WandT[0] ='0x0DF3'
wandT[1] ='0x0DF4'
wandT[2] ='0x0DF5'
var x
For x=0 to WC-1
UO.findtype()
While UO.FindCount() <>0
if NugnoeName==UO.GetName('finditem') then
return 'finditem'
else
UO.Ignore('finditem')
UO.FindType(WandT[x])
endif
wend
next
uo.print(NugnoeName + ' Ne naideno')
return 0
Endsub


Или вместо
Code:
NugnoeName
надо вписывать само название ванды?


Top
   
 Post subject:
PostPosted: 2008-03-23 01:17:04 
Offline

Joined: 2008-03-03 09:19:21
Posts: 71
Location: SPB
Code:
sub wandsearch(NugnoeName) 
var WC = 3 ;ñêîëüêî âñåãî òèïîâ
DIM WandT[ val( str( WC ) ) ]
WandT[0] ='0x0DF3'
wandT[1] ='0x0DF4'
wandT[2] ='0x0DF5'
var x
For x=0 to WC-1
UO.findtype(WandT[X])
While UO.FindCount() <>0
if NugnoeName==UO.GetName('finditem') then
return 'finditem'
else
UO.Ignore('finditem')
UO.FindType(WandT[x])
endif
wend
next
uo.print(NugnoeName + ' Ne naideno')
return 0
Endsub


Top
   
 Post subject:
PostPosted: 2008-03-23 01:20:13 
Offline

Joined: 2008-03-20 07:31:02
Posts: 20
Нет, Юр. Не кастует с ванды. Лишь со свитка или с книги.


Top
   
 Post subject:
PostPosted: 2008-03-23 01:26:43 
Offline

Joined: 2008-03-03 09:19:21
Posts: 71
Location: SPB
rvk wrote:
Нет, Юр. Не кастует с ванды. Лишь со свитка или с книги.

Вариант 1
Code:
For x=0 to WC-1
UO.findtype(WandT[X])
###########
UO.print(UO.GetName('finditem'))
###########
blablabla

2
Code:
For x=0 to WC-1
UO.findtype(WandT[X])
#########
uo.click('finditem')
UO.print(UO.GetName('finditem'))
##########
blablabla


В каком варианте он выдает правильное имя?


Last edited by Yura on 2008-03-23 01:37:10, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2008-03-23 01:30:59 
Offline

Joined: 2008-03-20 07:31:02
Posts: 20
Code:
For x=0 to WC-1
UO.findtype(WandT[X])
While UO.FindCount() <>0
if NugnoeName==UO.GetName('finditem') then
return 'finditem'
else
UO.Ignore('finditem')
UO.FindType(WandT[x])
endif
wend
next
uo.print(NugnoeName + ' Ne naideno')
return 0
Endsub

в этом пишет что "a Magic wand of Explosion" не найдена


Last edited by rvk on 2008-03-23 01:35:12, edited 2 times in total.

Top
   
 Post subject:
PostPosted: 2008-03-23 01:33:43 
Offline

Joined: 2008-03-03 09:19:21
Posts: 71
Location: SPB
rvk wrote:
Code:
For x=0 to WC-1
UO.findtype(WandT[X])
While UO.FindCount() <>0

в этом пишет что такая то ванда не найдена


Прочитай внимательней предыдущий пост, там добавились команды вывода.


Top
   
 Post subject:
PostPosted: 2008-03-23 01:36:46 
Offline

Joined: 2008-03-20 07:31:02
Posts: 20
Я не понимаю, что из этих строчек надо заменить, а что оставить, то, как я заменил вывело ошибку:
Code:
Label defined outside proc- BEGIN

в строчке 6


Top
   
 Post subject:
PostPosted: 2008-03-23 01:54:31 
Offline

Joined: 2008-03-03 09:19:21
Posts: 71
Location: SPB
rvk wrote:
Я не понимаю, что из этих строчек надо заменить, а что оставить, то, как я заменил вывело ошибку:
Code:
Label defined outside proc- BEGIN

в строчке 6


Что то я закосячил... исправим для начала
Code:
if NugnoeName==UO.GetName('finditem') then 
return 'finditem'
else

на
Code:
if NugnoeName==UO.GetName('finditem') then 
return UO.getserial('finditem')
else


У меня данный скриптик заработал...

с begin странно... ты все ковычки закрыл когда переменные
объявлял?

Code:
sub wandsearch(NugnoeName) 
var WC = 3 ;ñêîëüêî âñåãî òèïîâ
DIM WandT[ val( str( WC ) ) ]
WandT[0] ='0x0DF3'
wandT[1] ='0x0DF4'
wandT[2] ='0x0DF5'
var x
For x=0 to WC-1
UO.findtype(WandT[X])
UO.Print(UO.GetName('finditem'))
While UO.FindCount() <>0
if NugnoeName==UO.GetName('finditem') then
return UO.getserial('finditem')
else
UO.Ignore('finditem')
UO.FindType(WandT[x])
endif
wend
next
uo.print(NugnoeName + ' Ne naideno')
return 0
Endsub


Он так что выводит на экран?


Last edited by Yura on 2008-03-23 01:58:53, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2008-03-23 01:57:15 
Offline

Joined: 2008-03-20 07:31:02
Posts: 20
Во втором варианте. он берет в руки все ванды по очереди, чем физлит начатый каст.


Top
   
 Post subject:
PostPosted: 2008-03-23 02:00:52 
Offline

Joined: 2008-03-20 07:31:02
Posts: 20
исправил, как ты написал ранее, не кастует почему-то с ванды. со свитка и книги- легко, с ванды никак. Пишет не найдено
Code:
sub explosion()
var i=1,wandT=0
var NN='a Magic wand of Explosion'
UO.DeleteJournal()
UO.Set('lasttarget','laststatus')
begin:
if uo.Waiting() then
uo.canceltarget()
endif
wandT=wandsearch(NN)
if wandT<>0 then
i=1
if uo.ObjAtLayer('Rhand')=="" and uo.ObjAtLayer('Lhand')<>"" then
uo.addobject('weapon',uo.ObjAtLayer('Lhand'))
else
if uo.ObjAtLayer('Rhand')<>"" then
uo.addobject('weapon',uo.ObjAtLayer('Rhand'))
else
i=0
endif
endif
UO.WaitTargetObject('lasttarget')
UO.UseObject(WandT)
wait(500)
if UO.InJournal("It seems to be out of charges") then
UO.Deletejournal()
UO.Ignore(WandT)
if i<>0 then
uo.waittargetself()
UO.UseObject('weapon')
wait(500)
endif
goto begin
endif
if i<>0 then
uo.waittargetself()
UO.UseObject('weapon')
endif
else
UO.FindType('0x1F57',-1,'my')
If UO.GetQuantity('finditem')>0 then
if UO.Mana>=14 then
UO.WaitTargetObject('lasttarget')
UO.UseObject('finditem')
UO.Print("Scroll")
else
UO.Print("Low mana!!! Scroll!")
endif
else
if UO.Mana>=28 then
UO.Cast('Explosion','laststatus')
UO.Print("Spell")
else
UO.Print("Low mana!!! Spell!")
endif
endif
endif
end sub

sub wandsearch(NugnoeName)
var WC = 3
DIM WandT[ val( str( WC ) ) ]
WandT[0] ='0x0DF3'
wandT[1] ='0x0DF4'
wandT[2] ='0x0DF5'
var x
For x=0 to WC-1
UO.findtype(WandT[X])
While UO.FindCount() <>0
if NugnoeName==UO.GetName('finditem') then
return 'finditem'
else
UO.Ignore('finditem')
UO.FindType(WandT[x])
endif
wend
next
uo.print(NugnoeName + ' Ne naideno')
return 0
End sub

У меня все правильно?


Top
   
 Post subject:
PostPosted: 2008-03-23 02:10:45 
Offline

Joined: 2008-03-20 07:31:02
Posts: 20
Yura wrote:
Code:
sub wandsearch(NugnoeName) 
var WC = 3 ;ñêîëüêî âñåãî òèïîâ
DIM WandT[ val( str( WC ) ) ]
WandT[0] ='0x0DF3'
wandT[1] ='0x0DF4'
wandT[2] ='0x0DF5'
var x
For x=0 to WC-1
UO.findtype(WandT[X])
UO.Print(UO.GetName('finditem'))
While UO.FindCount() <>0
if NugnoeName==UO.GetName('finditem') then
return UO.getserial('finditem')
else
UO.Ignore('finditem')
UO.FindType(WandT[x])
endif
wend
next
uo.print(NugnoeName + ' Ne naideno')
return 0
Endsub


Он так что выводит на экран?

Тоже самое. a Magic wand of Explosion Ne naideno


Top
   
 Post subject:
PostPosted: 2008-03-23 02:12:02 
Offline

Joined: 2008-03-03 09:19:21
Posts: 71
Location: SPB
а перед этим ниче не пишет?


Top
   
 Post subject:
PostPosted: 2008-03-23 02:16:38 
Offline

Joined: 2008-03-20 07:31:02
Posts: 20
Yura wrote:
а перед этим ниче не пишет?

абсолютно нет


Top
   
 Post subject:
PostPosted: 2008-03-23 02:28:40 
Offline

Joined: 2008-03-03 09:19:21
Posts: 71
Location: SPB
rvk wrote:
Yura wrote:
а перед этим ниче не пишет?

абсолютно нет

В начале скрипта поставь
Code:
UO.IgnoreReset()


Top
   
 Post subject:
PostPosted: 2008-03-23 02:33:51 
Offline

Joined: 2008-03-20 07:31:02
Posts: 20
Yura wrote:
rvk wrote:
Yura wrote:
а перед этим ниче не пишет?

абсолютно нет

В начале скрипта поставь
Code:
UO.IgnoreReset()


Code:
Unhandled exeption in parser


:(


Top
   
 Post subject:
PostPosted: 2008-03-23 11:01:43 
Offline

Joined: 2008-03-03 09:19:21
Posts: 71
Location: SPB
Обнови инжект


Top
   
 Post subject:
PostPosted: 2008-03-23 11:30:23 
Offline
Expert!
User avatar

Joined: 2006-02-07 08:51:40
Posts: 1348
Location: г. Старый Оскол
Может в домино? :lol:


Top
   
 Post subject:
PostPosted: 2008-03-23 11:37:30 
Offline

Joined: 2008-03-03 09:19:21
Posts: 71
Location: SPB
Мне кажется, Вашу любовь к домино нужно обсуждать здесь
viewforum.php?f=6


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 40 posts ]  Go to page Previous 1 2

All times are UTC+02:00


Who is online

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