[TOOL] Interactions Enabler

05/04/2010 06:09 BEanErzzz#1
using [Only registered and activated users can see links. Click Here To Register...] I have made an interactions enabler to automatically enable the actions "removed" by TQ.

Simple to use, just put it in your Conquer Online 2.0 directory ("C:\Program Files\Conquer Online 2.0" by default) and run.

Scan if you want.

Made using C# and .NET 2.0 so if you STILL don't have the .NET framework shoot yourself in the face.
Code:
using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace InteractionsEnabler {
    static class Program {
        /// <summary>
        /// 1024x768 GUI file RELATIVE location.
        /// </summary>
        const string GUI_FILE_1024 = "ini/GUI.ini";
        /// <summary>
        /// 800x600 GUI file RELATIVE location.
        /// </summary>
        const string GUI_FILE_800 = "ini/GUI800X600.ini";
        /// <summary>
        /// Ini Setting block
        /// Section, Key, and Value
        /// </summary>
        struct IniSettingBlock {
            public string Section;
            public string Key;
            public string Value;
            public IniSettingBlock(string s, string k, string v) {
                Section = s;
                Key = k;
                Value = v;
            }
        }

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main() {
            List<IniSettingBlock> settingsList = initList();
            if (!checkPatch(GUI_FILE_1024, settingsList)) {
                applyPatch(GUI_FILE_1024, settingsList);
            }
            if (!checkPatch(GUI_FILE_800, settingsList)) {
                applyPatch(GUI_FILE_800, settingsList);
            }
            Console.WriteLine("Interactions enabled, you may now reload the ini values by changing resolution or restarting client");
            
            Console.WriteLine("Press any key to close...");
            Console.ReadKey();
        }

        /// <summary>
        /// Build list of ini blocks
        /// </summary>
        /// <returns>list of ini blocks</returns>
        private static List<IniSettingBlock> initList() {
            List<IniSettingBlock> ret = new List<IniSettingBlock>();
            ret.Add(new IniSettingBlock("360-2432", "x", "15"));

            ret.Add(new IniSettingBlock("360-2433", "x", "130"));

            ret.Add(new IniSettingBlock("360-2434", "y", "30"));

            ret.Add(new IniSettingBlock("360-2435", "x", "130"));

            ret.Add(new IniSettingBlock("360-2436", "y", "60"));

            ret.Add(new IniSettingBlock("360-2437", "y", "60"));

            ret.Add(new IniSettingBlock("360-2438", "x", "15"));
            ret.Add(new IniSettingBlock("360-2438", "y", "90"));
            return ret;
        }
        /// <summary>
        /// Check status of patch, returns true if the values are the patched values, false otherwise
        /// </summary>
        /// <param name="file">path to file</param>
        /// <param name="lst">list of ini blocks to check</param>
        /// <returns></returns>
        private static bool checkPatch(string file, List<IniSettingBlock> lst) {
            IniFile gui = new IniFile(file);
            bool patched = false;
            Console.WriteLine("Checking patch status of \"{0}\"...", file);
            foreach (IniSettingBlock block in lst) {
                patched = (gui.IniReadValue(block.Section, block.Key) == block.Value);
                if (!patched) {
                    break;
                }
            }

            Console.WriteLine("\"{0}\" is {1}", file, (patched ? "patched" : "not patched"));
            return patched;
        }
        /// <summary>
        /// Patch file
        /// </summary>
        /// <param name="file">path to file</param>
        /// <param name="lst">list of ini blocks to apply</param>
        private static void applyPatch(string file, List<IniSettingBlock> lst) {
            Console.WriteLine("Patching \"{0}\"...", file);
            IniFile gui = new IniFile(file);
            foreach (IniSettingBlock block in lst) {
                gui.IniWriteValue(block.Section, block.Key, block.Value);
            }
            Console.WriteLine("File: \"{0}\" patched successfully", file);
        }
    }
}
05/04/2010 07:07 alfron201014#2
nice work :D
05/05/2010 00:19 gabrola#3
AntivirusVersionLast UpdateResult
a-squared4.5.0.502010.05.04-
AhnLab-V32010.05.04.002010.05.04-
AntiVir8.2.1.2242010.05.04-
Antiy-AVL2.0.3.72010.04.30-
Authentium5.2.0.52010.05.04-
Avast4.8.1351.02010.05.04-
Avast55.0.332.02010.05.04-
AVG9.0.0.7872010.05.04-
BitDefender7.22010.05.04-
CAT-QuickHeal10.002010.05.04-
ClamAV0.96.0.3-git2010.05.04-
Comodo47652010.05.04-
DrWeb5.0.2.033002010.05.04-
eSafe7.0.17.02010.05.03-
eTrust-Vet35.2.74682010.05.04-
F-Prot4.5.1.852010.05.04-
F-Secure9.0.15370.02010.05.04-
Fortinet4.0.14.02010.05.03-
GData212010.05.04-
IkarusT3.1.1.84.02010.05.04-
Jiangmin13.0.9002010.05.04-
Kaspersky7.0.0.1252010.05.04-
McAfee5.400.0.11582010.05.04-
McAfee-GW-Edition2010.12010.05.04-
Microsoft1.57032010.05.04-
NOD3250862010.05.04-
Norman6.04.122010.05.04-
nProtect2010-05-04.012010.05.04-
Panda10.0.2.72010.05.04-
PCTools7.0.3.52010.05.04-
Prevx3.02010.05.05-
Rising22.46.01.012010.05.04-
Sophos4.53.02010.05.04-
Sunbelt62612010.05.04-
Symantec20091.2.0.412010.05.04-
TheHacker6.5.2.0.2752010.05.03-
TrendMicro9.120.0.10042010.05.04-
TrendMicro-HouseCall9.120.0.10042010.05.04-
VBA323.12.12.42010.05.04-
ViRobot2010.5.4.23032010.05.04-
VirusBuster5.0.27.02010.05.04-
05/05/2010 14:32 alfron201014#4
thnx :D
05/05/2010 16:24 Die Schnittstelle#5
It's working fine! :D
05/05/2010 18:19 gabrola#6
Checked the code also and it's clean.
Good work :)
05/05/2010 19:10 BEanErzzz#7
Quote:
Originally Posted by gabrola View Post
Checked the code also and it's clean.
Good work :)
yeah, pretty simple program.
01/14/2011 03:47 lilfabbro#8
sorry to bumb but is there anyway to make this work agian, it doesnt anymore the icons are there but i cant click them
01/25/2011 11:25 abohamed#9
what is this do ?