Yoko

All sides of Injection
It is currently 2024-04-27 09:56:08

All times are UTC+02:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 2012-02-29 23:28:46 
Offline

Joined: 2012-02-10 15:17:10
Posts: 53
Code:
uo.findtype(ItemType,ItemColor,'backpack')
        if uo.findcount()<=0 then
          uo.findtype(ItemType,ItemColor,'backpack')
        endif
        if uo.findcount()>0 then
***

Нашел такой кусок кода. Вопрос: защема? :)


Top
   
PostPosted: 2012-02-29 23:35:37 
Offline

Joined: 2012-02-10 15:17:10
Posts: 53
Code:
  uo.findtype(IngotType,IngotColor,2)
  while (uo.findcount()>0) or (uo.GetQuantity('finditem')>=0)

Вопрос в ту же степь. Зачем тут or ?


Top
   
PostPosted: 2012-03-01 00:07:37 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
это ты откуда взял?

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


Top
   
PostPosted: 2012-03-01 22:26:50 
Offline

Joined: 2012-02-10 15:17:10
Posts: 53
Охх... где-то скрипты майнинга смотрел )
уже точно и не вспомню, но, думаю, можно загуглить и найти :)


Top
   
PostPosted: 2012-03-02 07:13:16 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
Просто оба куска бессмысленны именно в том виде который ты выложил :)
В первом куске второй поиск дублирует первый в случае если первый ничего не дал. Не нужная вещь в таком контексте.
Второй случай крутит цикл пока найден хотя бы один предмет ИЛИ количество в стопке (как бы инги) этого предмета будет от нуля до бесконечности - взаимозаменяемые условия.

Так что ответ на твой сжатые вопросы
1) Зачем? - не зачем.
2) Для чего or? - просто так.

Более развернутый ответ - перестраховка.

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


Top
   
PostPosted: 2012-03-03 00:49:54 
Offline

Joined: 2012-02-10 15:17:10
Posts: 53
Пасиб, так и думал :)


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

All times are UTC+02:00


Who is online

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