botslave 0 Share Posted September 4, 2017 Hi Guys, For some reason the onPaint override is not being called on my script. https://imgur.com/Rnl063Y Tried both Graphics and Graphics2D Anything I did wrong? Do I need to extend/implement something? Oh and also none of the debug overlays show up for me :| Thanks For some reason the onPaint override is not being called on my script. https://imgur.com/Rnl063Y Tried both Graphics and Graphics2D Anything I did wrong? Do I need to extend/implement something? Oh and also none of the debug overlays show up for me :| Thanks EDIT: Nvm I fixed it - Dont open the client via the jar files in the install location otherwise the java engine stuff doesnt seem to run! Link to comment Share on other sites More sharing options...
Koschei 147 Share Posted September 4, 2017 On your on start have you put try { image = ImageIO.read(new URL("http://i.imgur.com/Picuture.png")); } catch (IOException e){ log("Failed to load image."); } Also for your if (image != null){ g.drawImage(image, 7,345, null); } Btw remove the logs before running the script or it will run at like 3 fps Link to comment Share on other sites More sharing options...
botslave 0 Author Share Posted September 4, 2017 On your on start have you put try { image = ImageIO.read(new URL("http://i.imgur.com/Picuture.png")); } catch (IOException e){ log("Failed to load image."); } Also for your if (image != null){ g.drawImage(image, 7,345, null); } Btw remove the logs before running the script or it will run at like 3 fps Hey I guess I should have added this snippet, I already loaded the image from the web and that seems to work fine: https://imgur.com/C1gqeKF As for the logs, I will remove them later once I can get the damn thing working lol. It's more like onPaint() isn't being called at all, I dont see the logging in the client console and no image on the screen. Nvm I fixed it - Dont open the client via the jar files in the install location otherwise the java engine stuff doesnt seem to run! Link to comment Share on other sites More sharing options...
ArmyofDragons 28 Share Posted September 4, 2017 If you are extending AbstractScript / TaskScript (I believe that is what it's called) -- do not implement PaintListener. I found out that doing that doesn't allow you to call the onPaint() method. The script classes that you use for super-classes already have PaintListener implemented so there is no need to reinvent the wheel on it. Link to comment Share on other sites More sharing options...
PatDB85 0 Share Posted September 11, 2017 EDIT: Nvm I fixed it - Dont open the client via the jar files in the install location otherwise the java engine stuff doesnt seem to run! How do you open the client without doing this? I am having the same issue Link to comment Share on other sites More sharing options...
Koschei 147 Share Posted September 12, 2017 How do you open the client without doing this? I am having the same issue Open DBLauncher.jar not Client.jar, you download DBLauncher from the website if you can't find it. Link to comment Share on other sites More sharing options...
PatDB85 0 Share Posted September 12, 2017 Open DBLauncher.jar not Client.jar, you download DBLauncher from the website if you can't find it. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.