hero3128 Posted March 23, 2015 Share Posted March 23, 2015 (edited) Show up**** The local script i made will correctly show up on my desktop osbot. But when i try to transfer it to my laptop OSBot. It will not work. They dont show up. Any help? Script is in spoiler. package net.hero3128; import org.osbot.rs07.api.ui.Tab; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; import java.util.concurrent.TimeUnit; @ScriptManifest(name = "hAFK", author = "Hero3128", version = 1.0, info = "AFK's 24 hours", logo = "") public final class hAFK extends Script { private long timeBegan; private long timeRan; private long newStartTime = 0;// new start time private long newSleepTime = 0;// Time till next private long timeTillNext = 0; public int ACTIONS = 0; private static Tab[] Tabs = {Tab.ATTACK, Tab.INVENTORY, Tab.CLANCHAT, Tab.EMOTES, Tab.EQUIPMENT, Tab.FRIENDS, Tab.IGNORES, Tab.LOGOUT, Tab.MAGIC, Tab.MUSIC, Tab.PRAYER, Tab.QUEST, Tab.SETTINGS, Tab.SKILLS}; private State state = State.Idle; @Override public void onStart() { timeBegan = System.currentTimeMillis(); newSleepTime = random(60000, 180000); log("hAFK Started"); } @Override public void onExit() { log("hAFK has stopped!"); } @Override public int onLoop() throws InterruptedException { switch (state = whatDo()) { case Idle: return 100; case Action: if (tabs.open(Tabs[random(Tabs.length)])) { ACTIONS++; newStartTime = System.currentTimeMillis(); newSleepTime = random(60000, 180000); return 100; } else return 100; } return 100; } private State whatDo() { if (System.currentTimeMillis() - newStartTime > newSleepTime) return State.Action; return State.Idle; } @Override public void onPaint(Graphics2D g) { //START: Code generated using Enfilade's Easel timeRan = System.currentTimeMillis() - timeBegan; timeTillNext = newSleepTime - (System.currentTimeMillis() - newStartTime); final Color color1 = new Color(153, 153, 153); final Color color2 = new Color(0, 0, 0); final Color color3 = new Color(255, 255, 255); final BasicStroke stroke1 = new BasicStroke(1); final Font font1 = new Font("Comic Sans MS", 1, 10); //Graphics2D g = (Graphics2D)g1; g.setColor(color1); g.fillRect(282, 4, 236, 115); g.setColor(color2); g.setStroke(stroke1); g.drawRect(282, 4, 236, 115); g.setFont(font1); g.setColor(color3); g.drawString("Time Running: " + ft(timeRan), 288, 20); g.drawString("State: " + state, 288, 40); g.drawString("Actions Done: " + ACTIONS, 288, 60); g.drawString("Time Till Next Action: " + ft(timeTillNext), 288, 80); g.drawString("hAFK By Hero3128", 412, 116); //END: Code generated using Enfilade's Easel } private enum State { Idle("Idling..."), Action("Changing Action"); State(String name) { this.name = name; } private final String name; @Override public String toString() { return name; } } private String ft(long duration) { String res = ""; long days = TimeUnit.MILLISECONDS.toDays(duration); long hours = TimeUnit.MILLISECONDS.toHours(duration) - TimeUnit.DAYS.toHours(TimeUnit.MILLISECONDS.toDays(duration)); long minutes = TimeUnit.MILLISECONDS.toMinutes(duration) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS .toHours(duration)); long seconds = TimeUnit.MILLISECONDS.toSeconds(duration) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS .toMinutes(duration)); if (days == 0) { res = (hours + ":" + minutes + ":" + seconds); } else { res = (days + ":" + hours + ":" + minutes + ":" + seconds); } return res; } } Edited March 23, 2015 by hero3128 Quote Link to comment Share on other sites More sharing options...
Precise Posted March 23, 2015 Share Posted March 23, 2015 Show up**** The local script i made will correctly show up on my desktop osbot. But when i try to transfer it to my laptop OSBot. It will not work. They dont show up. Any help? did you place it in the OSBot scripts folder on your laptop? Quote Link to comment Share on other sites More sharing options...
hero3128 Posted March 23, 2015 Author Share Posted March 23, 2015 did you place it in the OSBot scripts folder on your laptop? yes... where else would i put them Quote Link to comment Share on other sites More sharing options...
Oliver Posted March 23, 2015 Share Posted March 23, 2015 yes... where else would i put them He means, did you seperately download them on your laptop and placed them in your script folder (extra on your laptop) ? 1 Quote Link to comment Share on other sites More sharing options...
hero3128 Posted March 23, 2015 Author Share Posted March 23, 2015 (edited) He means, did you seperately download them on your laptop and placed them in your script folder (extra on your laptop) ? Yes, i put them on my flashdrive and threw them into OSbot/scripts I tried it with the class files and building a .jar both of which work on my desktop, but my laptop they dont show up to run Edited March 23, 2015 by hero3128 Quote Link to comment Share on other sites More sharing options...
Oliver Posted March 23, 2015 Share Posted March 23, 2015 Yes, i put them on my flashdrive and threw them into OSbot/scripts I tried it with the class files and building a .jar Try to just download the local .jar again on your laptop, add them to the script folder start osbot, click refresh and let me know if they appear. Maybe something went wrong by transfering via flashdrive. Just try to download them ok? Quote Link to comment Share on other sites More sharing options...
hero3128 Posted March 23, 2015 Author Share Posted March 23, 2015 (edited) Try to just download the local .jar again on your laptop, add them to the script folder start osbot, click refresh and let me know if they appear. Maybe something went wrong by transfering via flashdrive. Just try to download them ok? uploaded it via dropbox and downloaded it. Still nothing. Then OsBot updated to the 2.3.53. Still nothing. here ill post the script. I highly doubt anythings wrong with it though package net.hero3128; import org.osbot.rs07.api.ui.Tab; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; import java.util.concurrent.TimeUnit; @ScriptManifest(name = "hAFK", author = "Hero3128", version = 1.0, info = "AFK's 24 hours", logo = "") public final class hAFK extends Script { private long timeBegan; private long timeRan; private long newStartTime = 0;// new start time private long newSleepTime = 0;// Time till next private long timeTillNext = 0; public int ACTIONS = 0; private static Tab[] Tabs = {Tab.ATTACK, Tab.INVENTORY, Tab.CLANCHAT, Tab.EMOTES, Tab.EQUIPMENT, Tab.FRIENDS, Tab.IGNORES, Tab.LOGOUT, Tab.MAGIC, Tab.MUSIC, Tab.PRAYER, Tab.QUEST, Tab.SETTINGS, Tab.SKILLS}; private State state = State.Idle; @Override public void onStart() { timeBegan = System.currentTimeMillis(); newSleepTime = random(60000, 180000); log("hAFK Started"); } @Override public void onExit() { log("hAFK has stopped!"); } @Override public int onLoop() throws InterruptedException { switch (state = whatDo()) { case Idle: return 100; case Action: if (tabs.open(Tabs[random(Tabs.length)])) { ACTIONS++; newStartTime = System.currentTimeMillis(); newSleepTime = random(60000, 180000); return 100; } else return 100; } return 100; } private State whatDo() { if (System.currentTimeMillis() - newStartTime > newSleepTime) return State.Action; return State.Idle; } @Override public void onPaint(Graphics2D g) { //START: Code generated using Enfilade's Easel timeRan = System.currentTimeMillis() - timeBegan; timeTillNext = newSleepTime - (System.currentTimeMillis() - newStartTime); final Color color1 = new Color(153, 153, 153); final Color color2 = new Color(0, 0, 0); final Color color3 = new Color(255, 255, 255); final BasicStroke stroke1 = new BasicStroke(1); final Font font1 = new Font("Comic Sans MS", 1, 10); //Graphics2D g = (Graphics2D)g1; g.setColor(color1); g.fillRect(282, 4, 236, 115); g.setColor(color2); g.setStroke(stroke1); g.drawRect(282, 4, 236, 115); g.setFont(font1); g.setColor(color3); g.drawString("Time Running: " + ft(timeRan), 288, 20); g.drawString("State: " + state, 288, 40); g.drawString("Actions Done: " + ACTIONS, 288, 60); g.drawString("Time Till Next Action: " + ft(timeTillNext), 288, 80); g.drawString("hAFK By Hero3128", 412, 116); //END: Code generated using Enfilade's Easel } private enum State { Idle("Idling..."), Action("Changing Action"); State(String name) { this.name = name; } private final String name; @Override public String toString() { return name; } } private String ft(long duration) { String res = ""; long days = TimeUnit.MILLISECONDS.toDays(duration); long hours = TimeUnit.MILLISECONDS.toHours(duration) - TimeUnit.DAYS.toHours(TimeUnit.MILLISECONDS.toDays(duration)); long minutes = TimeUnit.MILLISECONDS.toMinutes(duration) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS .toHours(duration)); long seconds = TimeUnit.MILLISECONDS.toSeconds(duration) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS .toMinutes(duration)); if (days == 0) { res = (hours + ":" + minutes + ":" + seconds); } else { res = (days + ":" + hours + ":" + minutes + ":" + seconds); } return res; } } Edited March 23, 2015 by hero3128 Quote Link to comment Share on other sites More sharing options...
GSC Posted March 23, 2015 Share Posted March 23, 2015 Do you have any other scripts in the folder? Removing all scripts, adding just the script that didn't show up and refreshing did the trick for me. Quote Link to comment Share on other sites More sharing options...
hero3128 Posted March 23, 2015 Author Share Posted March 23, 2015 Do you have any other scripts in the folder? Removing all scripts, adding just the script that didn't show up and refreshing did the trick for me. My script is the only one in there Quote Link to comment Share on other sites More sharing options...
Rumb Posted March 23, 2015 Share Posted March 23, 2015 Did you place this above the public class? @ScriptManifest(author = "Rumble", info = "Smelts Ores", logo = "", name = "OreSmelter", version = 1.01) Quote Link to comment Share on other sites More sharing options...
hero3128 Posted March 23, 2015 Author Share Posted March 23, 2015 Did you place this above the public class? @ScriptManifest(author = "Rumble", info = "Smelts Ores", logo = "", name = "OreSmelter", version = 1.01) Yes i do have that in there. I posted the script. you can see for yourself Quote Link to comment Share on other sites More sharing options...
frostbitee Posted March 23, 2015 Share Posted March 23, 2015 i'm having the exact same problem.. Quote Link to comment Share on other sites More sharing options...
hero3128 Posted March 23, 2015 Author Share Posted March 23, 2015 Still Looking for a fix @Oliver @Precise did you place it in the OSBot scripts folder on your laptop? Do you know any other fixes? Quote Link to comment Share on other sites More sharing options...
hero3128 Posted March 26, 2015 Author Share Posted March 26, 2015 Found solution. Please Close. Quote Link to comment Share on other sites More sharing options...