What's the problem in my Script?

Avatar

By Tsikyng Kirisame 31 August 2019 10:31

Member · 1 comments
var scriptName = "AutoReport";
var scriptAuthor = "Tsikyng Kirisame";
var scriptVersion = 1.0;

var target;

function AutoReport() {

    this.getName = function() {
        return "KS-AutoReport";
    }

    this.getCategory = function() {
        return "Player";   
    }

    this.getDescription = function() {
        return "Automatically report the player who killed you.";
    }

    this.onUpdate = function () {
		if (target != null) {
			if (mc.thePlayer.getHealth() <= 6.0) {
                mc.thePlayer.sendChatMessage("/wdr " + target.getName() + " ac ka bhop fly jesus reach velocity");
				target = null;
			}
		}
	}
	this.onAttack = function (event) {
		target = event.getTargetEntity();
	}
}

var AutoReport = new AutoReport();
var AutoReportClient;

function onEnable() {
    AutoReportClient = moduleManager.registerModule(AutoReport);
}

function onDisable() {
    moduleManager.unregisterModule(AutoReportClient);
}

It doesn't work in Hypixel China server with LB b62. How can I do for it?
这个JS在国服Hypixel没用,不过已经出现在Player栏里面了。哪里有问题?我用的是b62。

Last edited by Tsikyng Kirisame (31 August 2019 10:32)

Avatar

By Virus 31 August 2019 11:35

Member · 316 comments
this.onUpdate = function () {
		if (target != null) {
			if (mc.thePlayer.getHealth() <= 0.0) {
                mc.thePlayer.sendChatMessage("/wdr " + target.getName() + " ac ka bhop fly jesus reach velocity");
				target = null;
			}
		}
	}