Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.scripts;
- import com.kbot2.handlers.eventSystem.eventListeners.PaintListener;
- import com.kbot2.handlers.eventSystem.eventListeners.RandomListener;
- import com.kbot2.handlers.eventSystem.eventListeners.TextPaintListener;
- import com.kbot2.scriptable.Script;
- import com.kbot2.scriptable.Random;
- import com.kbot2.UI.BotUI;
- import java.awt.*;
- /**
- * Created by IntelliJ IDEA.
- * User: Jan Ove / Kosaki
- * Date: 16.apr.2009
- * Time: 21:24:58
- */
- public class DebugAnimation extends Script implements TextPaintListener, RandomListener {
- public boolean active() {
- return true;
- }
- @Override
- public boolean onStart() {
- BotUI.setInputEnabled(getBot(), true);
- return true;
- }
- @Override
- public String[] getTags() {
- return new String[]{"Debug", "Animations"};
- }
- public int loop() {
- return 1000;
- }
- public String getName() {
- return "Debug Animation";
- }
- public String getAuthor() {
- return "Kosaki";
- }
- public String getDescription() {
- return "Paints the animation int";
- }
- /**
- * Used to make random counters or/and cancel randoms.
- *
- * @param random an instance of the random.
- * You may use the methods to get name and description.
- * And you can cast it to get internal methods for the random.
- * @return if the random shall run or not.
- * Leaving this to false without handling the random yourself may be dangerous!
- */
- public boolean onRandomActivate(Random random) {
- return false; // Its a debug script...
- }
- /**
- * Gets called on each repaint.
- *
- * @return array of strings to paint. 1 per line.
- */
- public String[] onTextRepaint() {
- return new String[]{"Animation = "+ getMyPlayer().getAnimation()};
- }
- }
Add Comment
Please, Sign In to add comment