Yoko

All sides of Injection
It is currently 2024-03-28 17:36:37

All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
 Post subject: процедурки
PostPosted: 2006-10-28 00:01:31 
Offline
User avatar

Joined: 2005-07-10 21:53:05
Posts: 457
Процедуры AI бота, может, кому и сгодится.
(Примечание: написано не под инжу)

Поиск ресурсов в контейнерах(учет, приборка, кучкование, автонабор и т.п.)

Контейнеры

Code:
         public bool IsContainer
         {
            get
            {
               UInt16 Item = this.m_ItemID.Value;

               if ((Item >= 0x09A8) && (Item <= 0x09AC))
               {
                  return true;
               }
               else if ((Item >= 0x09B0) && (Item <= 0x09B2))
               {
                  return true;
               }
               else if ((Item >= 0x0A2C) && (Item <= 0x0A53))
               {
                  return true;
               }
               else if ((Item >= 0x0A97) && (Item <= 0x0A9E))
               {
                  return true;
               }
               else if ((Item >= 0x0E3C) && (Item <= 0x0E43))
               {
                  return true;
               }
               else if (((Item >= 0x0E75) && (Item <= 0x0E80)) && (Item != 0x0E7B))
               {
                  return true;
               }
               else if (Item == 0x1E80)
               {
                  return true;
               }
               else if (Item == 0x1E81)
               {
                  return true;
               }
               else if (Item == 0x232A)
               {
                  return true;
               }
               else
               {
                  return (Item == 0x232B);
               }
            }
         }


Ресурсы

Code:
         public bool IsResource
         {
            get
            {
               UInt16 Item = this.m_ItemID.Value;
               if ((Item >= 0x19B7) && (Item <= 0x19BA))
               {
                  return true;
               }
               else if ((Item >= 0x9CC) && (Item <= 0x9CF))
               {
                  return true;
               }
               else if ((Item >= 0x1BDD) && (Item <= 0x1BE2))
               {
                  return true;
               }
               else if (Item == 0x1779)
               {
                  return true;
               }
               else if (Item == 0x11EA)
               {
                  return true;
               }
               else
               {
                  return (Item == 0x11EB);
               }
            }
         }


Двери. Правда через инжу нет доступа к мультиобектам. Что затрудняет вычисление открыто/закрыто

Code:
         public bool IsDoor
         {
            get
            {
               UInt16 Item = this.m_ItemID.Value;
               if ((Item >= 0x0675) && (Item <= 0x06F6))
               {
                  return true;
               }
               else if ((Item >= 0x0821) && (Item <= 0x0875))
               {
                  return true;
               }
               else if ((Item >= 0x1FED) && (Item <= 0x1FFC))
               {
                  return true;
               }
               else if ((Item >= 0x241F) && (Item <= 0x2424))
               {
                  return true;
               }
               else if (Item < 0x2A05)
               {
                  return false;
               }
               else
               {
                  return (Item <= 0x2A1C);
               }
            }
         }


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

All times are UTC+02:00


Who is online

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