예제 #1
0
        private static void btnSpawnToolSpawnTenX_Hit(object sender, EventArgs e)
        {
            StringBuilder sb = new StringBuilder();

            try
            {
                if (txtSpawnToolCommand.Text.ToString().Length == 0)
                {
                    PluginCore.MyHost.Actions.AddChatText("You must enter a command.", 1);
                    return;
                }

                if (txtSpawnToolValue.Text.ToString().Length == 0)
                {
                    PluginCore.MyHost.Actions.AddChatText("You must enter a value.", 1);
                    return;
                }

                PluginCore.ChatCommand(txtSpawnToolCommand.Text, txtSpawnToolValue.Text, "10");
            }
            catch (Exception ex)
            {
                PluginCore.LogError(ex);
            }
        }
예제 #2
0
 private static void btnSpawnToolClearSpawns_Hit(object sender, EventArgs e)
 {
     try
     {
         PluginCore.ChatCommand("clearspawns");
     }
     catch (Exception ex)
     {
         PluginCore.LogError(ex);
     }
 }
예제 #3
0
        static void lstTeleTownSearchList_Selected(object sender, MVListSelectEventArgs e)
        {
            try
            {
                String name = (String)lstTeleTownSearchList[e.Row][0][0];

                PluginCore.ChatCommand("teletown", name);
            }
            catch (Exception ex)
            {
                PluginCore.LogError(ex);
            }
        }
예제 #4
0
        static void lstSpawnModelSearchList_Selected(object sender, MVListSelectEventArgs e)
        {
            try
            {
                String id  = (String)lstSpawnModelSearchList[e.Row][0][0];
                String val = (String)lstSpawnModelSearchList[e.Row][1][0];

                PluginCore.ChatCommand("spawnmodel", id);
            }
            catch (Exception ex)
            {
                PluginCore.LogError(ex);
            }
        }
예제 #5
0
        // Syntax: @b_spawnobj 0xID or Name, Scale - Spawns an object for building things!-->
        private static void btnObjectSpawn_Hit(object sender, EventArgs e)
        {
            string id    = "";
            int    scale = 1;

            try
            {
                id    = txtObjectIDName.Text.ToString();
                scale = int.Parse(txtObjectScale.Text.ToString());
            }
            catch (Exception ex)
            {
                PluginCore.LogError(ex);
            }

            PluginCore.ChatCommand("b_spawnobj", id, scale.ToString());
        }
예제 #6
0
        private static void btnObjectSpinWZPlus_Hit(object sender, EventArgs e)
        {
            double amount = 0.1;

            try
            {
                amount = double.Parse(txtObjectSpinAmount.Text.ToString());
            }
            catch (Exception ex)
            {
                PluginCore.LogError(ex);
            }

            try
            {
                PluginCore.ChatCommand("b_spinWZ", amount.ToString());
            }
            catch (Exception ex)
            {
                PluginCore.LogError(ex);
            }
        }
예제 #7
0
        private static void btnObjectNudgeZPlus_Hit(object sender, EventArgs e)
        {
            double amount = 1;

            try
            {
                amount = double.Parse(txtObjectNudgeAmount.Text.ToString());
            }
            catch (Exception ex)
            {
                PluginCore.LogError(ex);
            }

            // Override the user input if it's nonsense
            if (amount < 0)
            {
                PluginCore.MyHost.Actions.AddChatText("Overriding user input of " + amount + " and using a value of 1 instead.", 1);
                amount = 1;
            }

            PluginCore.ChatCommand("b_nudgeZ", Math.Round((amount / 10), 2).ToString());
        }
예제 #8
0
 private static void btnObjectSpin_Hit(object sender, EventArgs e)
 {
     PluginCore.ChatCommand("b_spin");
 }
예제 #9
0
 private static void btnObjectEditableDisabled_Hit(object sender, EventArgs e)
 {
     PluginCore.ChatCommand("b_enableEditing", "0");
 }
예제 #10
0
 private static void btnObjectSolidFalse_Hit(object sender, EventArgs e)
 {
     PluginCore.ChatCommand("b_setsolid", "0");
 }
예제 #11
0
 private static void btnSpawnToolClearLastAssessed_Hit(object sender, EventArgs e)
 {
     PluginCore.ChatCommand("removethis");
 }