me to im still trtying to figure out how to load all my exp and lev req for sills as scripts
|
How do you use the scripting engine in hyperion. I've never used it before. Could some one make a brief tutorial or give an example script?
me to im still trtying to figure out how to load all my exp and lev req for sills as scripts
I've tried messing with it but I still don't get it x_x I google the rhinoscript engine and java script but idk how to get started =\
This is what i've figured out x_x
Code:importClass(javax.swing.JFrame); loadGUI(); function loadGUI() { var frame = JFrame("HELLO THERE"); frame.setVisible(true); frame.setSize(100,100); }
Sorry for bumping this relatively old topic.
I pass my commands to the script engine.
Create a file called teleport.js then inside it.
Then in CommandPacketHandler you could addCode:println("Loaded teleport script."); function tele(Args,Player) { if (Args.length == 3 || Args.length == 4) { var x = parseInt(Args[1]); var y = parseInt(Args[2]); var z = Player.getLocation().getZ(); if (Args.length == 4) { z = parseInt(Args[3]); } Player.setTeleportTarget(Player.getLocation().create(x, y, z)); } else { Player.getActionSender().sendMessage("Syntax is ::tele [x] [y] & ::tele [x] [y] [z]"); } }
to your command handle function.Code:ScriptManager.getScriptManager().invoke(command, (Object)args, player);
I also have a script for reloading scripts so I can ::reload and modify or create new commands without restarting the server and modifying CommandPacketHandler.
doesnt hyperion use python scripts
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |