HighLife Script API 0.9.17
The reference for writing scripts for the HighLife client. Every signature on these pages is generated from the engine the client actually runs, so what you see here is exactly what your script can call.
Start here
AbstractScript– your script's base classScriptManifest– required, or the client won't list itTaskScript·TreeScript
The world
Items
A minimal script
@ScriptManifest(category = Category.MISC, name = "My First Script",
author = "yourname", version = 1.0,
description = "Prints the local player's name once per second")
public class MyFirstScript extends AbstractScript {
@Override
public int onLoop() {
Player me = Players.getLocal();
if (me != null) log("I am %s", me.getName());
return 1000; // milliseconds until the next onLoop()
}
}
Compile against highlife-api.jar, drop the jar into
%USERPROFILE%\HighLife\Scripts\ and start the client – your script shows up in the
script list. Use the log(String, Object...) overloads; the single-argument
log(Object) family is deprecated.
To publish a script in the HighLife store, send us the full source code. We review it, build the jar ourselves and upload it. See the README that ships with this kit.
Packages
Package
Description