Hey everybody! Here another snippet from your truly Josedpay. Some time i get lazy having to create paint. Many of you guys probably use that little programs (forget name). i use to use it back in the days, but franky its still too much work. So i created this paint.
Have fun everybody(for those who are wondering about that "null" sign. I cant spoon feed everybody, im making it even smarter ).
FYI some of the oldest people from OSB contributed on this painter. I use some of their idea/work but revamped it. Hopefully someone in the future could do the same
edit: just a head up it comment all over the class
LocalPaint.java //the interface is a nested static
PaintProperty.java
exmaple:
import java.awt.Shape;
import java.awt.event.MouseEvent;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import com.divine.painter.LocalPaint.LocalPaintHandler;
@ScriptManifest
public class TestScript extends Script implements LocalPaintHandler {
Shape myShape = null; //set the location to see the magic
LocalPaint localPaint;
@Override
public void handleExtras(MouseEvent e, Shape shape) {}
@Override
public PaintProperty[] getPaintData() { //LocalPaint.rsFormat(long)
return new PaintProperty[] { //LocalPaint.getFormatTimer(long)
new PaintProperty("do you even like it?"),
new PaintProperty("just let me know", 15), //the offset move the text over + 15
};
}
@Override
public int onLoop() throws InterruptedException {
if (localPaint == null) {
this.localPaint = new LocalPaint(null, this).setScriptInstance(this);
this.localPaint.enablePainter(true);
}
return 700;
}
}