Constuck 13 Share Posted December 27, 2016 So, I've been getting into scripting again after a six month hiatus, and I'm trying to get a test script running just to get myself back in the groove. Unfortunately, I can't get my .jar file to be recognized as a "Local Script" Any ideas what I'm doing wrong or what I'm missing? Could my manifest not be correct? Here's my source code: package testScript; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import org.dreambot.api.script.AbstractScript; import org.dreambot.api.script.Category; import org.dreambot.api.script.ScriptManifest; @ScriptManifest(author = "Constuck", description = "Testing state retrieval code.", category = Category.UTILITY, name = "Test", version = 1.0) public class Script extends AbstractScript implements MouseListener{ public int onLoop() { return 0; } public void mouseClicked(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mousePressed(MouseEvent e) { if(getClient().getMenu().getMenuOptions()[0] != null) log("[0] \"" + getClient().getMenu().getMenuOptions()[0] + "\""); if(getClient().getMenu().getMenuOptions()[1] != null) log("[1] \"" + getClient().getMenu().getMenuOptions()[1] + "\""); if(getClient().getMenu().getMenuOptions()[2] != null) log("[2] \"" + getClient().getMenu().getMenuOptions()[2] + "\""); if(getClient().getMenu().getMenuOptions()[3] != null) log("[3] \"" + getClient().getMenu().getMenuOptions()[3] + "\""); log("-----"); } public void mouseReleased(MouseEvent e) { } } Thanks! Edit: Currently I'm using the DreamBot/Scripts directory as my workspace in Eclipse. Although I believe I did this in the past, I am not totally sure. Could this cause an issue? Link to comment Share on other sites More sharing options...
Pandemic 2709 Share Posted December 27, 2016 Are you building a JAR and is it in the Scripts folder? Link to comment Share on other sites More sharing options...
Mink 16 Share Posted December 27, 2016 after exporting the jar youll have to "refresh all" in the script selection window. Link to comment Share on other sites More sharing options...
Constuck 13 Author Share Posted December 27, 2016 Yes, I am building a jar. It is in the scripts folder and I have tried refreshing. So far no progress. Tomorrow morning Ill edit this post and add a picture of my export settings. Edit (Export Settings): It is supposed to be a JAR file rather than a Runnable JAR File right? Edit: I just moved my Eclipse workspace to another folder so that the jar was the only thing in Scripts and the client found it. Curious as to why that was the issue but happy it's resolved. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.