コード例 #1
0
        private void autoLootEnable_CheckedChanged(object sender, EventArgs e)
        {
            if (World.Player == null)              // offline
            {
                if (autoLootCheckBox.Checked)
                {
                    AutoLoot.AddLog("You are not logged in game!");
                    autoLootCheckBox.Checked = false;
                }
                return;
            }

            if (autolootListSelect.Text == String.Empty)             // Nessuna lista
            {
                if (autoLootCheckBox.Checked)
                {
                    autoLootCheckBox.Checked = false;
                    AutoLoot.AddLog("Item list not selected!");
                }
                return;
            }

            if (autoLootCheckBox.Checked)
            {
                autolootListSelect.Enabled       = false;
                autolootButtonAddList.Enabled    = false;
                autoLootButtonRemoveList.Enabled = false;
                autoLootButtonListClone.Enabled  = false;
                autoLootTextBoxDelay.Enabled     = false;
                autoLootTextBoxMaxRange.Enabled  = false;

                AutoLoot.ResetIgnore();
                AutoLoot.AutoMode = true;
                AutoLoot.AddLog("Autoloot Engine Start...");
                if (showagentmessageCheckBox.Checked)
                {
                    Misc.SendMessage("AUTOLOOT: Engine Start...", false);
                }
            }
            else
            {
                autolootListSelect.Enabled       = true;
                autolootButtonAddList.Enabled    = true;
                autoLootButtonRemoveList.Enabled = true;
                autoLootButtonListClone.Enabled  = true;
                autoLootTextBoxDelay.Enabled     = true;
                autoLootTextBoxMaxRange.Enabled  = true;

                // Stop autoloot
                AutoLoot.AutoMode = false;
                if (showagentmessageCheckBox.Checked)
                {
                    Misc.SendMessage("AUTOLOOT: Engine Stop...", false);
                }
                AutoLoot.AddLog("Autoloot Engine Stop...");
            }
        }
コード例 #2
0
        private void autoLootListSelect_SelectedIndexChanged(object sender, EventArgs e)
        {
            AutoLoot.UpdateListParam(autolootListSelect.Text);

            if (autolootListSelect.Focused && autolootListSelect.Text != String.Empty)
            {
                Settings.AutoLoot.ListUpdate(autolootListSelect.Text, AutoLoot.AutoLootDelay, AutoLoot.AutoLootBag, true, AutoLoot.NoOpenCorpse, AutoLoot.MaxRange);
                AutoLoot.AddLog("Autoloot list changed to: " + autolootListSelect.Text);
            }

            AutoLoot.InitGrid();
        }
コード例 #3
0
        internal void AutolootSetBag()
        {
            if (showagentmessageCheckBox.Checked)
            {
                RazorEnhanced.Misc.SendMessage("Autoloot Select Loot Bag", false);
            }

            if (autolootListSelect.Text != String.Empty)
            {
                Targeting.OneTimeTarget(new Targeting.TargetResponseCallback(autoLootSetContainerTarget_Callback));
            }
            else
            {
                AutoLoot.AddLog("Item list not selected!");
            }
        }