Welcome to TRiBot Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Final Calibur

[Beginner Friendly] FC Paint System

4 posts in this topic

Today I will be sharing an extremely simple and easy to use paint system for your scripts. Some of you may have seen it in my open sourced scripts, but I think it would be beneficial to have a thread specifically for it.

 

This system allows for a nice, clean, easy to use paint. You can implement it within seconds when creating new scripts, and don't have to worry whatsoever about lining things up coordinate by coordinate.
 
What you will be adding (example)
 


1cad0c2d84.png


Implementation
 


To implement the FC Paint system, you will need two files:

After you have the two files, you must make your main script class implement Painting & FCPaintable. For example:


public class FCAIOMiner extends Script implements Painting, FCPaintable

 
Once you have that done, you must include these two methods in your main script class:

@Overridepublic String[] getPaintInfo(){   return new String[]{};[email protected] void onPaint(Graphics g){    PAINT.paint(g);}

After that, you need to instantiate an FCPaint object in your main script class, as so (you can choose whatever color you want):


final FCPaint PAINT = new FCPaint(this, Color.GREEN);

 


Usage
 


After following the steps above, you simply have to fill out your getPaintInfo() method. For example, here is a basic paint:

@Overridepublic String[] getPaintInfo(){	return new String[]{"Time ran: " + PAINT.getTimeRan(), "Planks made: " + planksMade,			"Planks per hour: " + PAINT.getPerHour(planksMade), "Status: " + Vars.get().status};}
2 people like this

Share this post


Link to post
Share on other sites

Thanks for doing things like this, giving incentives so others can get motivated with scripting :)

 

No problem, it's my pleasure. I hope people will find it to be useful!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.