Expose methods to execute scripts

This commit is contained in:
Max Weber
2018-03-28 00:42:20 -06:00
committed by Adam
parent 0c04804d1a
commit 6e80cff926
4 changed files with 28 additions and 0 deletions

View File

@@ -91,4 +91,17 @@ public abstract class ScriptVMMixin implements RSClient
currentScript = null;
}
}
@Inject
@Override
public void runScript(int id, Object... args)
{
assert isClientThread();
Object[] cargs = new Object[args.length + 1];
cargs[0] = id;
System.arraycopy(args, 0, cargs, 1, args.length);
RSScriptEvent se = createScriptEvent();
se.setArguments(cargs);
runScript(se, 200000);
}
}