internal void ExecuteScript()
        {
            try
            {
                parent.CheckScript();
                (parent.script[parent.scriptFunction] as NLua.LuaFunction).Call(this);
            }
            catch (Exception e)
            {
            }

            if (minDmg > maxDmg)
            {
                maxDmg = minDmg;
            }
            if (bGenerateMaxDmg)
            {
                maxDmg = (int)(minDmg * 1.3f);
            }
        }
        private void button16_Click(object sender, EventArgs e)
        {
            if (listBox1.SelectedIndex != -1)
            {
                OpenFileDialog ofd = new OpenFileDialog();
                ofd.Filter           = "Lua file|*.lua";
                ofd.InitialDirectory = TBAGW.Game1.rootContent;
                ofd.Title            = "open Lua";
                DialogResult dia = ofd.ShowDialog();
                if (DialogResult.OK == dia && ofd.FileName.Contains(ofd.InitialDirectory))
                {
                    String fi = ofd.FileName;
                    selectedAbility.scriptLoc = fi.Replace(ofd.InitialDirectory, "");
                    selectedAbility.CheckScript();

                    FillLuaBox();
                }
                else if (System.Windows.Forms.DialogResult.Cancel == dia)
                {
                    System.Windows.Forms.MessageBox.Show("Cancelled, returning to Editor.");
                }
            }
        }