Yoko
http://forum.yoko.com.ua/

процедурки
http://forum.yoko.com.ua/viewtopic.php?f=20&t=9177
Page 1 of 1

Author:  omi4 [ 2006-10-28 00:01:31 ]
Post subject:  процедурки

Процедуры 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);
               }
            }
         }

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/