August 31, 20205 yr Hi guys, When i make a jar of a script it's now showing up in the scripts folder maybe there is something wrong with the code and I don't see it. this is the code: package woodcutter; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; public class woodcutter extends Script { final String TREE_NAME = "Tree"; @ScriptManifest(info="test", logo = "", version = 0, author = "Lupy", name = "Woodcutter script") @Override public int onLoop() throws InterruptedException { if(! getInventory().isFull()) { //chop Entity tree = objects.closest(TREE_NAME); if(tree != null && tree.isVisible()) { tree.interact("Chop Down"); } else { camera.toEntity(tree); } } else { //bank } return 0; } //when script is started public void onStart() { } //when script is exited public void onExit() { } } thanks in advance
August 31, 20205 yr I don't know were you are stuck but if you follow this for top to bottom it should help you out.(steps 1 and 3) * Make sure its in the sripts folder * (your question is to vague) Edited August 31, 20205 yr by Nbacon
September 1, 20205 yr The code has nothing to do with creating the jar file. You need to create an artifact and select the output file to be the OSBot script folder. Then you can build the artifact which will convert your code to a jar file. If this confuses you google “how to build an artifact in IntelliJ” and there are very helpful resources online.
September 1, 20205 yr 21 hours ago, lupy said: Hi guys, When i make a jar of a script it's now showing up in the scripts folder maybe there is something wrong with the code and I don't see it. this is the code: package woodcutter; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; public class woodcutter extends Script { final String TREE_NAME = "Tree"; @ScriptManifest(info="test", logo = "", version = 0, author = "Lupy", name = "Woodcutter script") @Override public int onLoop() throws InterruptedException { if(! getInventory().isFull()) { //chop Entity tree = objects.closest(TREE_NAME); if(tree != null && tree.isVisible()) { tree.interact("Chop Down"); } else { camera.toEntity(tree); } } else { //bank } return 0; } //when script is started public void onStart() { } //when script is exited public void onExit() { } } thanks in advance Your script manifest is in the wrong spot. And since OsBot uses that to identify your script it will not show up in the script selector. Place it above the class and all should be fixed. Edited September 1, 20205 yr by BravoTaco
Create an account or sign in to comment