コード例 #1
0
ファイル: VendorSell.cs プロジェクト: madmunki/razorenhanced
        private void sellBagTarget_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid)
        {
            Assistant.Item sellBag = Assistant.World.FindItem(serial);

            if (sellBag == null)
            {
                return;
            }

            if (sellBag != null && sellBag.Serial.IsItem && sellBag.IsContainer && sellBag.RootContainer == Assistant.World.Player)
            {
                if (showagentmessageCheckBox.Checked)
                {
                    Misc.SendMessage("Container set to: " + sellBag.ToString(), false);
                }
                SellAgent.AddLog("Container set to: " + sellBag.ToString());
                SellAgent.SellBag = (int)sellBag.Serial.Value;
            }
            else
            {
                if (showagentmessageCheckBox.Checked)
                {
                    Misc.SendMessage("Invalid container, set backpack", false);
                }
                SellAgent.AddLog("Invalid container, set backpack");
                SellAgent.SellBag = (int)World.Player.Backpack.Serial.Value;
            }

            this.Invoke((MethodInvoker) delegate {
                RazorEnhanced.Settings.SellAgent.ListUpdate(sellListSelect.Text, serial, true);
                RazorEnhanced.SellAgent.RefreshLists();
            });
        }
コード例 #2
0
        private void ToolBarItemTarget_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid)
        {
            this.Invoke((MethodInvoker) delegate
            {
                int index           = toolboxcountComboBox.SelectedIndex;
                Assistant.Item item = Assistant.World.FindItem(serial);

                if (item == null)
                {
                    return;
                }

                if (item.Serial.IsItem)
                {
                    toolboxcountNameTextBox.Text = item.Name;
                    int itemgraph = item.ItemID;
                    toolboxcountGraphTextBox.Text = itemgraph.ToString("X4");
                    toolboxcountHueTextBox.Text   = item.Hue.ToString("X4");
                    RazorEnhanced.Settings.Toolbar.UpdateItem(toolboxcountComboBox.SelectedIndex, toolboxcountNameTextBox.Text, toolboxcountGraphTextBox.Text, toolboxcountHueTextBox.Text, toolboxcountHueWarningCheckBox.Checked, toolboxcountWarningTextBox.Text);
                    RazorEnhanced.ToolBar.UptateToolBarComboBox(index);
                    RazorEnhanced.ToolBar.UpdatePanelImage();
                    RazorEnhanced.ToolBar.UpdateCount();
                }
            });
        }
コード例 #3
0
 private void targetbuttonChoseBodyHue(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid)
 {
     Assistant.Mobile mob = Assistant.World.FindMobile(serial);
     if (mob != null)
     {
         targethueGridView.Invoke((MethodInvoker) delegate { targethueGridView.Rows.Add(new object[] { "0x" + mob.Hue.ToString("X4") }); });
     }
 }
コード例 #4
0
ファイル: OSIClient.cs プロジェクト: 3HMonkey/Razor-Enhanced
        public override void PathFindTo(Assistant.Point3D location)
        {
            // Uses EasyUO to do the move
            RazorEnhanced.UoWarper.UODLLHandleClass = new RazorEnhanced.UoWarper.UO();

            if (!RazorEnhanced.UoWarper.UODLLHandleClass.Open())
            {
                while (!RazorEnhanced.UoWarper.UODLLHandleClass.Open())
                {
                    Thread.Sleep(50);
                }
            }

            RazorEnhanced.UoWarper.UODLLHandleClass.Pathfind(location.X, location.Y, location.Z);
        }
コード例 #5
0
 private void DressItemTarget_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid)
 {
     Assistant.Item dressItem = Assistant.World.FindItem(serial);
     if (dressItem != null && dressItem.Serial.IsItem)
     {
         this.Invoke((MethodInvoker) delegate { RazorEnhanced.Dress.AddItemByTarger(dressItem); });
     }
     else
     {
         if (showagentmessageCheckBox.Checked)
         {
             RazorEnhanced.Misc.SendMessage("Invalid target", false);
         }
         RazorEnhanced.Dress.AddLog("Invalid target");
     }
 }
コード例 #6
0
ファイル: VendorSell.cs プロジェクト: madmunki/razorenhanced
 private void SellAgentItemTarget_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid)
 {
     Assistant.Item sellItem = Assistant.World.FindItem(serial);
     if (sellItem != null && sellItem.Serial.IsItem)
     {
         if (showagentmessageCheckBox.Checked)
         {
             RazorEnhanced.Misc.SendMessage("Sell Agent item added: " + sellItem.ToString(), false);
         }
         RazorEnhanced.SellAgent.AddLog("Sell Agent item added: " + sellItem.ToString());
         this.Invoke((MethodInvoker) delegate { RazorEnhanced.SellAgent.AddItemToList(sellItem.Name, sellItem.ItemID, 999, sellItem.Hue); });
     }
     else
     {
         if (showagentmessageCheckBox.Checked)
         {
             RazorEnhanced.Misc.SendMessage("Invalid target", false);
         }
         RazorEnhanced.SellAgent.AddLog("Invalid target");
     }
 }
コード例 #7
0
        private void OrganizerDestinationContainerTarget_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid)
        {
            Assistant.Item organizerBag = Assistant.World.FindItem((Assistant.Serial)((uint)serial));

            if (organizerBag == null)
            {
                if (showagentmessageCheckBox.Checked)
                {
                    RazorEnhanced.Misc.SendMessage("Invalid Destination Container, set backpack", false);
                }
                RazorEnhanced.Organizer.AddLog("Invalid Destination Container, set backpack");
                RazorEnhanced.Organizer.OrganizerDestination = (int)World.Player.Backpack.Serial.Value;
                return;
            }

            if (organizerBag != null && organizerBag.Serial.IsItem && organizerBag.IsContainer)
            {
                if (showagentmessageCheckBox.Checked)
                {
                    RazorEnhanced.Misc.SendMessage("Destination Container set to: " + organizerBag.ToString(), false);
                }
                RazorEnhanced.Organizer.AddLog("Destination Container set to: " + organizerBag.ToString());
                RazorEnhanced.Organizer.OrganizerDestination = (int)organizerBag.Serial.Value;
            }
            else
            {
                if (showagentmessageCheckBox.Checked)
                {
                    RazorEnhanced.Misc.SendMessage("Invalid Destination Container, set backpack", false);
                }
                RazorEnhanced.Organizer.AddLog("Invalid Destination Container, set backpack");
                RazorEnhanced.Organizer.OrganizerDestination = (int)World.Player.Backpack.Serial.Value;
            }

            this.Invoke((MethodInvoker) delegate {
                RazorEnhanced.Settings.Organizer.ListUpdate(organizerListSelect.Text, RazorEnhanced.Organizer.OrganizerDelay, RazorEnhanced.Organizer.OrganizerSource, serial, true);
                RazorEnhanced.Organizer.RefreshLists();
            });
        }
コード例 #8
0
        private void RestockSourceContainerTarget_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid)
        {
            Assistant.Item restockBag = Assistant.World.FindItem((Assistant.Serial)((uint)serial));
            if (restockBag == null)
            {
                if (showagentmessageCheckBox.Checked)
                {
                    Misc.SendMessage("Invalid Source Container, set backpack", false);
                }
                Restock.AddLog("Invalid Source Container, set backpack");
                Restock.RestockSource = (int)World.Player.Backpack.Serial.Value;
                return;
            }

            if (restockBag != null && restockBag.Serial.IsItem && restockBag.IsContainer)
            {
                if (showagentmessageCheckBox.Checked)
                {
                    Misc.SendMessage("Source Container set to: " + restockBag.ToString(), false);
                }
                Restock.AddLog("Source Container set to: " + restockBag.ToString());
                Restock.RestockSource = (int)restockBag.Serial.Value;
            }
            else
            {
                if (showagentmessageCheckBox.Checked)
                {
                    Misc.SendMessage("Invalid Source Container, set backpack", false);
                }
                Restock.AddLog("Invalid Source Container, set backpack");
                Restock.RestockSource = (int)World.Player.Backpack.Serial.Value;
            }

            this.Invoke((MethodInvoker) delegate
            {
                Settings.Restock.ListUpdate(restockListSelect.Text, Restock.RestockDelay, serial, Restock.RestockDestination, true);
                Restock.RefreshLists();
            });
        }
コード例 #9
0
ファイル: Multi.cs プロジェクト: mozkandemir/RE
 internal MultiData(Assistant.Point3D position, Assistant.Point2D corner1, Assistant.Point2D corner2)
 {
     m_position = position;
     m_corner1  = corner1;
     m_corner2  = corner2;
 }
コード例 #10
0
ファイル: EN-Filters.cs プロジェクト: 3HMonkey/Razor-Enhanced
 private void remountSetMountTarget_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid)
 {
     if (serial != 0)
     {
         RazorEnhanced.Filters.AutoRemountSerial = serial;
         RazorEnhanced.Settings.General.WriteInt("MountSerial", serial);
     }
 }
コード例 #11
0
ファイル: EN-Filters.cs プロジェクト: 3HMonkey/Razor-Enhanced
        private void autocarverbladeTarget_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid)
        {
            Assistant.Item blade = Assistant.World.FindItem(serial);

            if (blade == null)
            {
                return;
            }

            if (blade != null && blade.Serial.IsItem && blade.RootContainer == Assistant.World.Player)
            {
                if (showagentmessageCheckBox.Checked)
                {
                    RazorEnhanced.Misc.SendMessage("AutoCarve Blade Set to: " + blade.ToString(), false);
                }
                RazorEnhanced.Filters.AutoCarverBlade = (int)blade.Serial.Value;
            }
            else
            {
                if (showagentmessageCheckBox.Checked)
                {
                    RazorEnhanced.Misc.SendMessage("Invalid AutoCarve Blade", false);
                }
                RazorEnhanced.Filters.AutoCarverBlade = 0;
            }

            RazorEnhanced.Settings.General.WriteInt("AutoCarverBladeLabel", RazorEnhanced.Filters.AutoCarverBlade);
        }
コード例 #12
0
        private void DressItemContainerTarget_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid)
        {
            Assistant.Item dressBag = Assistant.World.FindItem(serial);

            if (dressBag == null)
            {
                return;
            }

            if (dressBag != null && dressBag.Serial.IsItem && dressBag.IsContainer)
            {
                if (showagentmessageCheckBox.Checked)
                {
                    RazorEnhanced.Misc.SendMessage("Undress Container set to: " + dressBag.ToString(), false);
                }
                RazorEnhanced.Dress.AddLog("Undress Container set to: " + dressBag.ToString());
                RazorEnhanced.Dress.DressBag = (int)dressBag.Serial.Value;
            }
            else
            {
                if (showagentmessageCheckBox.Checked)
                {
                    RazorEnhanced.Misc.SendMessage("Invalid Undress Container, set backpack", false);
                }
                RazorEnhanced.Dress.AddLog("Invalid Undress Container, set backpack");
                RazorEnhanced.Dress.DressBag = (int)World.Player.Backpack.Serial.Value;
            }

            this.Invoke((MethodInvoker) delegate {
                RazorEnhanced.Settings.Dress.ListUpdate(dressListSelect.Text, RazorEnhanced.Dress.DressDelay, RazorEnhanced.Dress.DressBag, RazorEnhanced.Dress.DressConflict, true);
                RazorEnhanced.Dress.RefreshLists();
            });
        }
コード例 #13
0
ファイル: Geometry.cs プロジェクト: mozkandemir/RE
 internal Point3D(Assistant.Point3D point3D)
 {
     m_AssistantPoint3D = point3D;
 }
コード例 #14
0
 internal static void GetInfoTarget_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid)
 {
     if (loc)             // Target on ground or static
     {
         Engine.MainWindow.SafeAction(s =>
         {
             RazorEnhanced.UI.EnhancedStaticInspector inspector = new RazorEnhanced.UI.EnhancedStaticInspector(pt);
             inspector.TopMost = true;
             inspector.Show();
         });
     }
     else              // Target item or mobile
     {
         Assistant.Item assistantItem = Assistant.World.FindItem(serial);
         if (assistantItem != null && assistantItem.Serial.IsItem)
         {
             Engine.MainWindow.SafeAction(s =>
             {
                 RazorEnhanced.UI.EnhancedItemInspector inspector = new RazorEnhanced.UI.EnhancedItemInspector(assistantItem);
                 inspector.TopMost = true;
                 inspector.Show();
             });
         }
         else
         {
             Assistant.Mobile assistantMobile = Assistant.World.FindMobile(serial);
             if (assistantMobile != null && assistantMobile.Serial.IsMobile)
             {
                 Assistant.Engine.MainWindow.SafeAction(s => {
                     RazorEnhanced.UI.EnhancedMobileInspector inspector = new RazorEnhanced.UI.EnhancedMobileInspector(assistantMobile);
                     inspector.TopMost = true;
                     inspector.Show();
                 });
             }
         }
     }
 }
コード例 #15
0
 internal static void HideItem_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid)
 {
     RazorEnhanced.Items.Hide(serial);
 }
コード例 #16
0
 internal Point3D(int x, int y, int z)
 {
     m_AssistantPoint3D = new Assistant.Point3D(x, y, z);
 }
コード例 #17
0
ファイル: AutoLoot.cs プロジェクト: mozkandemir/RazorEnhanced
        private void autoLootSetContainerTarget_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid)
        {
            Assistant.Item autoLootBag = Assistant.World.FindItem(serial);

            if (autoLootBag == null)
            {
                return;
            }

            if (autoLootBag != null && autoLootBag.Serial.IsItem && autoLootBag.IsContainer && autoLootBag.RootContainer == Assistant.World.Player)
            {
                if (showagentmessageCheckBox.Checked)
                {
                    RazorEnhanced.Misc.SendMessage("Autoloot Container set to: " + autoLootBag.ToString(), false);
                }
                RazorEnhanced.AutoLoot.AddLog("Autoloot Container set to: " + autoLootBag.ToString());
                AutoLoot.AutoLootBag = (int)autoLootBag.Serial.Value;
            }
            else
            {
                if (showagentmessageCheckBox.Checked)
                {
                    RazorEnhanced.Misc.SendMessage("Invalid Autoloot Container, set backpack", false);
                }
                RazorEnhanced.AutoLoot.AddLog("Invalid Autoloot Container, set backpack");
                AutoLoot.AutoLootBag = (int)World.Player.Backpack.Serial.Value;
            }
            BeginInvoke((MethodInvoker) delegate {
                RazorEnhanced.Settings.AutoLoot.ListUpdate(autolootListSelect.Text, RazorEnhanced.AutoLoot.AutoLootDelay, serial, true, RazorEnhanced.AutoLoot.NoOpenCorpse, RazorEnhanced.AutoLoot.MaxRange);
                RazorEnhanced.AutoLoot.RefreshLists();
            });
        }
コード例 #18
0
        private void BandageHeakMobileTarget_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid)
        {
            Assistant.Mobile mobile = Assistant.World.FindMobile(serial);

            if (mobile == null)
            {
                if (showagentmessageCheckBox.Checked)
                {
                    RazorEnhanced.Misc.SendMessage("Invalid Target!", false);
                }
                RazorEnhanced.BandageHeal.AddLog("Invalid Target!");
                return;
            }

            if (mobile.Serial.IsMobile)
            {
                if (showagentmessageCheckBox.Checked)
                {
                    RazorEnhanced.Misc.SendMessage("Bandage Heal target set to: " + mobile.Name, false);
                }
                RazorEnhanced.BandageHeal.AddLog("Bandage Heal target set to: " + mobile.Name);
                BandageHeal.TargetSerial = mobile.Serial;
                RazorEnhanced.Settings.General.WriteInt("BandageHealtargetLabel", mobile.Serial);
            }
            else
            {
                if (showagentmessageCheckBox.Checked)
                {
                    RazorEnhanced.Misc.SendMessage("Invalid Target!", false);
                }
                RazorEnhanced.Scavenger.AddLog("Invalid Target!");
            }
        }
コード例 #19
0
 private static void GetSerialTarget_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid)
 {
     Assistant.Client.Instance.ForceSendToClient(new UnicodeMessage(0xFFFFFFFF, -1, MessageType.Regular, 0x25, 3, Language.CliLocName, "System", "Serial: 0x" + serial.Value.ToString("X8")));
 }
コード例 #20
0
        private void autoLootSetContainerTarget_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid)
        {
            Assistant.Item autoLootBag = Assistant.World.FindItem(serial);

            if (autoLootBag == null)
            {
                return;
            }

            bool   bagOfSending = false;
            string prop         = Items.GetPropStringByIndex(serial, 0);

            if (prop.IndexOf("bag of sending", 0, StringComparison.CurrentCultureIgnoreCase) != -1)
            {
                bagOfSending = true;
            }

            if (autoLootBag != null && autoLootBag.Serial.IsItem && autoLootBag.IsLootableTarget && (!bagOfSending))
            {
                if (showagentmessageCheckBox.Checked)
                {
                    RazorEnhanced.Misc.SendMessage("Autoloot Container set to: " + autoLootBag.ToString(), false);
                }
                RazorEnhanced.AutoLoot.AddLog("Autoloot Container set to: " + autoLootBag.ToString());
                AutoLoot.AutoLootBag = (int)autoLootBag.Serial.Value;
            }
            else
            {
                if (showagentmessageCheckBox.Checked)
                {
                    RazorEnhanced.Misc.SendMessage("Invalid Autoloot Container, set backpack", false);
                }
                RazorEnhanced.AutoLoot.AddLog("Invalid Autoloot Container, set backpack");
                AutoLoot.AutoLootBag = (int)World.Player.Backpack.Serial.Value;
            }
            BeginInvoke((MethodInvoker) delegate {
                RazorEnhanced.Settings.AutoLoot.ListUpdate(autolootListSelect.Text, RazorEnhanced.AutoLoot.AutoLootDelay, serial, true, RazorEnhanced.AutoLoot.NoOpenCorpse, RazorEnhanced.AutoLoot.MaxRange);
                RazorEnhanced.AutoLoot.RefreshLists();
            });
        }
コード例 #21
0
 public abstract void PathFindTo(Assistant.Point3D location);
コード例 #22
0
 private static void GetInfoTarget_Callback(bool loc, Assistant.Serial serial, Assistant.Point3D pt, ushort itemid)
 {
     Assistant.Item assistantItem = Assistant.World.FindItem(serial);
     if (assistantItem != null && assistantItem.Serial.IsItem)
     {
         Assistant.Engine.MainWindow.BeginInvoke((MethodInvoker) delegate
         {
             RazorEnhanced.UI.EnhancedItemInspector inspector = new RazorEnhanced.UI.EnhancedItemInspector(assistantItem);
             inspector.TopMost = true;
             inspector.Show();
         });
     }
     else
     {
         Assistant.Mobile assistantMobile = Assistant.World.FindMobile(serial);
         if (assistantMobile != null && assistantMobile.Serial.IsMobile)
         {
             Assistant.Engine.MainWindow.BeginInvoke((MethodInvoker) delegate
             {
                 RazorEnhanced.UI.EnhancedMobileInspector inspector = new RazorEnhanced.UI.EnhancedMobileInspector(assistantMobile);
                 inspector.TopMost = true;
                 inspector.Show();
             });
         }
     }
 }