Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Color;
- import java.awt.Graphics;
- import java.awt.Graphics2D;
- import java.awt.Point;
- import com.rsbuddy.event.listeners.PaintListener;
- import com.rsbuddy.script.ActiveScript;
- import com.rsbuddy.script.Manifest;
- import com.rsbuddy.script.methods.Camera;
- import com.rsbuddy.script.methods.Mouse;
- import com.rsbuddy.script.methods.Objects;
- import com.rsbuddy.script.methods.Players;
- import com.rsbuddy.script.methods.Walking;
- import com.rsbuddy.script.util.Random;
- import com.rsbuddy.script.util.Timer;
- @Manifest(name = "Paint an Npc", authors = { "Prestige" }, version = 1.0, keywords = { "misc." }, description = "Paint your player!")
- public class PaintNpc extends ActiveScript implements PaintListener {
- @Override
- public int loop() {
- antiban();
- sleep (0, 60000);
- return 0;
- }
- private void antiban() {
- int rnd = Random.nextInt(0, 35);
- switch (rnd) {
- case 1:
- Camera.setCompassAngle(Random.nextInt(0, 360));
- break;
- case 2:
- Mouse.moveRandomly(0, 35);
- case 3:
- Objects.getLoaded()[Random.nextInt(0, Objects.getLoaded().length -1 ])
- break;
- }
- }
- public void paintPlayer(Graphics g) {
- if (Players.getLocal() != null) {
- g.setColor(Color.BLUE);
- Players.getLocal().draw(g);
- }
- }
- public void paintObject(Graphics g) {
- if (Objects.getNearest(38786) != null) {
- g.setColor(Color.RED);
- Objects.getNearest(38786).draw(g);
- }
- }
- private void drawMouse(Graphics g) {
- Point x = Mouse.getLocation();
- g.drawLine(x.x - 1000, x.y, x.x + 1000, x.y);
- g.drawLine(x.x, x.y - 1000, x.x, x.y + 1000);
- }
- int colorint = 0;
- public Color[] colors = {
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)),
- new Color(Random.nextInt(0, 255), Random.nextInt(0, 255),
- Random.nextInt(0, 255)) };
- Timer t = new Timer(5000);
- public void onRepaint(Graphics g1) {
- Graphics2D g = (Graphics2D) g1;
- g.setColor(colors[colorint]);
- if (!t.isRunning()) {
- if (colorint < colors.length - 1)
- colorint++;
- else
- colorint = 0;
- t.reset();
- }
- drawMouse(g);
- }
- }
Add Comment
Please, Sign In to add comment