C&C Tiberium Alliances AutoCheat

Autocheat move cool down, Autocheat repairall (Def, Off)

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        C&C Tiberium Alliances AutoCheat
// @namespace   AutoCheat
// @description Autocheat move cool down, Autocheat repairall (Def, Off)
// @include     https://prodgame18.alliances.commandandconquer.com/320/index.aspx*
// @version     2.0.6
// @author      D4rkv3nom
// @contributor leo7044
// ==/UserScript==
(function () {
    var AutoCheat_main = function () {
        try {
            function initAutoCheat() {
                console.log('C&C:Tiberium Alliances AutoCheat loaded.');
                var autoCheat = {
                    timeOutAutoCheat: function () {
                        try {
                            window.setTimeout(autoCheat.timeOutAutoCheat, 2000);
                            if (ClientLib.Data.MainData.GetInstance().get_Cities().get_CurrentOwnCity() != null) {
                                if (ClientLib.Data.MainData.GetInstance().get_Cities().get_CurrentOwnCity().get_hasCooldown()) {
                                    autoCheat.sendCheatMoveCoolDown();
                                }
                                
                                var apcl = ClientLib.Data.MainData.GetInstance().get_Cities().get_AllCities().d;
                                for (var key in apcl)
                                {
                                    var c = apcl[key];
									
									if (c.GetOffenseConditionInPercent() < 100 && c.get_LvlOffense() > 0) {
										autoCheat.sendCheatAutoRepair(c.get_Id());
									}
                                }
                                
                                if (ClientLib.Data.MainData.GetInstance().get_Player().GetCommandPointCount() < 9000) {
                                    autoCheat.sendCheatSetCommandPoints();
                                }

                            }
                        } catch (e) {
                            console.log('timeOutAutoCheat: ', e);
                        }
                    },
                    sendCheatMoveCoolDown: function () {
                        try {
                            if (qx.core.Init.getApplication().getChat() != null) {
                                qx.core.Init.getApplication().getChat().getChatWidget().send('/cheat resetmovecooldownpte');
                            }
                        } catch (e) {
                            console.log('sendCheatMoveCoolDown: ', e);
                        }
                    },
                    sendCheatAutoRepair: function (id) {
                        try {
                            if (qx.core.Init.getApplication().getChat() != null) {
                                qx.core.Init.getApplication().getChat().getChatWidget().send('/cheat repairallpte '+id);
                            }
                        } catch (e) {
                            console.log('sendCheatAutoRepair: ', e);
                        }
                    },
                    sendCheatSetCommandPoints: function () {
                        try {
                            if (qx.core.Init.getApplication().getChat() != null) {
                                qx.core.Init.getApplication().getChat().getChatWidget().send('/cheat setcommandpoints 9999');
                            }
                        } catch (e) {
                            console.log('sendCheatSetCommandPoints: ', e);
                        }
                    }
                };
                console.log('init AutoCheat');
                window.setTimeout(autoCheat.timeOutAutoCheat, 2000);
            }
        } catch (e) {
            console.log('initAutoCheat: ', e);
        }
        function AutoCheat_checkIfLoaded() {
            try {
                if (typeof qx !== 'undefined') {
                    initAutoCheat();
                } else {
                    window.setTimeout(AutoCheat_checkIfLoaded, 1000);
                }
            } catch (e) {
                console.log('AutoCheat_checkIfLoaded: ', e);
            }
        }
        window.setTimeout(AutoCheat_checkIfLoaded, 1000);
    };
    try {
        var AutoCheat = document.createElement('script');
        AutoCheat.innerHTML = '(' + AutoCheat_main.toString() + ')();';
        AutoCheat.type = 'text/javascript';
        document.getElementsByTagName('head') [0].appendChild(AutoCheat);
    } catch (e) {
        console.log('AutoCheat: init error: ', e);
    }
}) ();