Resolved Script won run #onLoop

Discussion in 'Client & Site Support' started by Baddest Man on Earth, Dec 11, 2014.

  1. @Cloud

    Hope I'm not doing something stoopid.

    Only Outputs "This works"

    Code (Text):
    1. package com.wadiyan.runemate.scripts.fighter;
    2.  
    3. import com.runemate.game.api.client.paint.PaintListener;
    4. import com.runemate.game.api.hybrid.local.Skill;
    5. import com.runemate.game.api.script.framework.LoopingScript;
    6. import com.wadiyan.runemate.util.ExpTracker;
    7. import com.wadiyan.runemate.util.ExpTrackerContainer;
    8.  
    9. import java.awt.*;
    10.  
    11. /**
    12. * @author: Supreme Leader
    13. */
    14. public class SupremeFighter extends LoopingScript implements PaintListener{
    15.  
    16.     ExpTracker constiution, magic;
    17.     ExpTrackerContainer expTrackerContainer;
    18.  
    19.     @Override
    20.     public void start (String [] args) {
    21.         getEventDispatcher().addListener(this);
    22.         setLoopDelay(500, 600);
    23.         constiution = new ExpTracker(Skill.CONSTITUTION, Color.BLACK, new Color(0, 0, 0, 150), new Color(65, 4, 9), Color.WHITE);
    24.         magic = new ExpTracker(Skill.MAGIC, Color.BLACK, new Color(0,0,0, 150), new Color(0, 6, 73), Color.WHITE);
    25.         expTrackerContainer = new ExpTrackerContainer(magic, constiution);
    26.         System.out.println("This works");
    27.     }
    28.  
    29.     @Override
    30.     public void onLoop() {
    31.         System.out.println("This doesn't work");
    32.     }
    33.  
    34.     @Override
    35.     public void onPaint(Graphics2D g) {
    36.         if (expTrackerContainer != null) {
    37.             expTrackerContainer.draw(g, 0, 0);
    38.         }
    39.     }
    40.  
    41. }
    42.  
     
    #1 Baddest Man on Earth, Dec 11, 2014
    Last edited: Dec 12, 2014
  2. You're overriding start which is a framework method instead of onStart.
     
    Baddest Man on Earth and Exia like this.
  3. ROFL!
     
  4. LOL IT WORKS!

    Just don't let the people of Wadiya know, they might start questioning my qualifications.
     

Share This Page

Loading...