shtknt Posted May 17, 2015 Share Posted May 17, 2015 Hey there, started to play around with scripting, although I can't find where to test my script, nothing is shown within the client, i'm assuming something is not right with my script manifest?, my code; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(name = "Cow Killer", author = "programer", version = 1.0, info = "", logo = "") public class CowKiller extends Script{ private String message; @Override public void onStart() throws InterruptedException { for(NPC n : npcs.getAll()){ if(n != null) message = n.getName() + ", " + n.getId(); System.out.println(message); } } @Override public int onLoop() throws InterruptedException { return 0; } } Quote Link to comment Share on other sites More sharing options...
Twin Posted May 17, 2015 Share Posted May 17, 2015 (edited) import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(name = "Cow Killer", author = "programer", version = 1.0, info = "", logo = "") public class CowKiller extends Script { private String message; @Override public void onStart() { //Code here will execute before the loop is started } @Override public void onExit() { //Code here will execute after the script ends } @Override public int onLoop() { for(NPC n : npcs.getAll()) { if(n != null) message = n.getName() + ", " + n.getId(); System.out.println(message); } return 100; //The amount of time in milliseconds before the loop starts over } @Override public void onPaint(Graphics2D g) { //This is where you will put your code for paint(s) } } Edited May 17, 2015 by twin 763 Quote Link to comment Share on other sites More sharing options...
shtknt Posted May 17, 2015 Author Share Posted May 17, 2015 That's not my issue, also the information im gathering really only needs to sit within the onStart method as it is only needed to run once, for data collection, not repetitively Quote Link to comment Share on other sites More sharing options...
strange_sts Posted May 18, 2015 Share Posted May 18, 2015 Okay so I am not too familiar with eclipse or OSbot so my answer may sound very stupid or may be hard to follow... however i encountered the same problem, but messed with setting inside eclipse and then it suddenly loaded my local scripts after exporting my script for the 20th time hahahah. So my advice may be completely garbage to you, but this is what i did. I freshly installed eclipse, made my basic script (used multiple templates and none would load in my local scripts in OSbot directory after exporting) I began getting very frustrated and figured something had to be messed up with how it was compiling, so I clicked on my PROJECT folder(NOT the main.java file or whatever name you chose) then went to the FILE tab on the top left, then clicked PROPERTIES, and then a window will pop up. From there i clicked on Java Compiler and unchecked the 2nd box from the top so that it would allow me to manually change the settings to 1.7 for the first 2 boxes, then decided to apply those settings. Finally I clicked the box that makes it so i cant change those settings (2nd box from top) then hit apply again. Whenever i hit apply the first time it had to change my project around and ever since i did that i could export fine and it would read my scripts. I think this had something to do with eclipse, i had set setting to 1.7 when i created my project however it didn't set it up that way i guess and when i applied the settings after messing with compiler it worked. I know my directions are confusing and seem pointless because technically all i did was change the settings a bit then change them back, but it worked for me and i hope it helps you hahahahaha, otherwise i am just going to sound way stupider than i already do BTW i compiled your script as well and it loaded in my directory so your script itself is fine. it has to be your compiling options or you're not exporting it to the OSbot/scripts folder Quote Link to comment Share on other sites More sharing options...