Yoko

All sides of Injection
It is currently 2024-03-28 23:23:18

All times are UTC+02:00




Post new topic  Reply to topic  [ 28 posts ]  Go to page Previous 1 2
Author Message
 Post subject: Re: Если рядом
PostPosted: 2015-03-28 18:39:18 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
sub checkcolor(obj)
не запихивай и все

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
 Post subject: Re: Если рядом
PostPosted: 2015-03-28 22:22:05 
Offline

Joined: 2012-07-27 23:43:14
Posts: 249
сп-а-сибо Мираж! а чего next делает? такое ощущение, что он мешает :)


Top
   
 Post subject: Re: Если рядом
PostPosted: 2015-03-29 17:01:48 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
next меняет значение n от 1 до 14 - в твоем случае.
в общем твой скрипт должен выглядеть как то типо вот так

Code:
sub test()
var n
var distance = 20
var elem_type = 'TYPE элементаля'
var invis_type = 'TYPE инвизки'
var invis_color = 'цвет инвизки'
Dim color[14]
   color[1]='0x09DA'
   color[2]='0x0060'
блаблабла
   color[14]='0x0028'
   for n=1 to 14
     if uo.findtype(elem_type, color[n], 'ground', distance) then
        uo.usetype(invis_type, invis_color)
        wait(200)
        return ; выбьет из цикла for next
     endif
   next
end sub

ретурн остановит поиск. Туда вместо ретурна можно прописать дополнительные действия требующиеся при нахождении цветного элементаля.

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
 Post subject: Re: Если рядом
PostPosted: 2015-03-29 19:15:20 
Offline

Joined: 2012-07-27 23:43:14
Posts: 249
Мираж ну спасибо тебе большое за помощь! лайк и подписка.


Top
   
 Post subject: Re: Если рядом
PostPosted: 2015-03-29 21:27:09 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
ну тебе тут уже парни насоветовали - я просто показал как это выглядит :roll:

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
 Post subject: Re: Если рядом
PostPosted: 2015-05-31 19:13:19 
Offline

Joined: 2012-07-27 23:43:14
Posts: 249
а при вставке test() должен же инвиз пить, но чего то не пьет. Вставляю test() перед улетом на разгрузку.

вот кусок, но не пьнт зараза.

Code:
for jor = 0 to 9
ser = uo.journalserial(jor)
noto = uo.getnotoriety(ser)
if noto <> 1 and noto <> 0 and not uo.injournal("elemental") then
if uo.waiting() then
uo.canceltarget()
endif
loot()
wait(3000)
endif
next
wend
if uo.weight > 625 then ; Максимальный вес при котором домой с рудой
goto end
endif
wend
UO.DeleteJournal()
next
next
goto na4alo
end:
if uo.waiting() then
uo.canceltarget()
endif
test()
uo.exec("recall Runebook 21") ; to home
wait(10000)
loot()
wait(3000)
reccal:
uo.deletejournal()
if uo.waiting() then
uo.canceltarget()
endif
uo.exec("recall Runebook 94") ; to cave
mx = UO.GetX("self")
my = UO.GetY("self")
wait(10000)
if not UO.GetX("self") <> mx and not UO.GetY("self") <> my then
goto reccal
endif
goto na4alo
end sub


Top
   
 Post subject: Re: Если рядом
PostPosted: 2015-06-01 14:29:18 
Offline

Joined: 2012-07-27 23:43:14
Posts: 249
помогите пожалуйста, в чем может быть проблема? цвет, тип инвизки прописал. цвет, тип элемов стоит правильный.


Top
   
 Post subject: Re: Если рядом
PostPosted: 2015-06-01 17:39:08 
Offline

Joined: 2012-07-27 23:43:14
Posts: 249
проблема решена. тему можно закрыть.


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

All times are UTC+02:00


Who is online

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