Hosfad 155 Posted September 7, 2021 I have been getting alot of PM's asking about script paint , so i figured i might as well just throw this on the forums so everybody can have up to date examples // A method to get an image from a URL public Image getImage(String url) { try { return ImageIO.read(new URL(url)); } catch (IOException e) { e.printStackTrace(); return null; } } //Use getImage("Direct imgur URL") to paint a simi transparent paint background for example/Make your own custom frame public Image mainPaint = getImage("https://i.imgur.com/yuQc.png"); // Drawn() is our method for drawing which we will be calling in onPaint() // it would look something like this : // @Override // public void onPaint(Graphics graphics) { // try { // Here we are calling Drawn(); // Drawn(graphics); // } catch (Exception e) { // e.printStackTrace(); // } // // } public void Drawn(Graphics graphics) { // Drawing the Image / background , 0,0 Are x,y positions 0,0 being the top left corner graphics.drawImage(mainPaint, 0, 0, null); // Setting a font graphics.setFont(new Font("Century Gothic", Font.BOLD, 12)); // Setting a color R G B graphics.setColor(new Color(135, 135, 125)); // can also be for example : graphics.setColor(Color.BLACK); //Drawing a string // The string will update by it self, here im tracking smithing Exp/hour x , y // You can draw stuff like RunTime, Total gained exp , total items gained , anything you can think of really graphics.drawString("Estimated Xp/hour: " + SkillTracker.getGainedExperiencePerHour(Skill.SMITHING) , 20 , 50); }
DaffyDubz 4 Posted September 26, 2021 Thank you for this! Is there an easy way to get the coordinates or just guess and check?
Hosfad 155 Author Posted September 28, 2021 On 9/26/2021 at 2:47 AM, DaffyDubz said: Thank you for this! Is there an easy way to get the coordinates or just guess and check? Youre welcome , you can get the cords by enabling the Show mouse position tool in the client
Recommended Posts
Archived
This topic is now archived and is closed to further replies.