процедурки

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
omi4
Posts: 457
Joined: 2005-07-10 21:53:05

процедурки

Post by omi4 »

Процедуры AI бота, может, кому и сгодится.
(Примечание: написано не под инжу)

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

Контейнеры

Code: Select all

			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: Select all

			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: Select all

			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);
					}
				}
			}
Post Reply