Thread: [PI] Mining.JAVA!

Results 1 to 2 of 2
  1. #1 [PI] Mining.JAVA! 
    Registered Member
    Join Date
    Jan 2013
    Posts
    41
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    public class Mining {

    Client c;

    private final int VALID_PICK[] = {1265,1267,1269,1273,1271,1275};
    private final int[] PICK_REQS = {1,1,6,6,21,31,41,61};
    private final int[] RANDOM_GEMS = {1623,1621,1619,1617,1631};
    private int oreType;
    private int exp;
    private int levelReq;
    private int pickType;
    private final int EMOTE = 625;

    public Mining(Client c) {
    this.c = c;
    }
    That's My Code It's Kinda Funky I Needa Make it So I can have the right.. pick like if i have rune pick in my inv it uses it insted of bronze how could i add em?
    Reply With Quote  
     

  2. #2  
    Super Donator
    Haskell Curry's Avatar
    Join Date
    Nov 2009
    Posts
    850
    Thanks given
    602
    Thanks received
    247
    Rep Power
    0
    i'm not entirely sure of what you're asking; i think it's something along the lines of emote for pickaxe used?
    Code:
    Object[][]pickaxes = {{pickaxeID, new Animation(x)}};
    or alternatively, u could use an enum to define pickaxe data:
    Code:
    private enum Pickaxe{
    final Map<Pickaxe, Integer> data = new HashMap<Pickaxe, Integer>();
    static {
    for(Pickaxe p: Pickaxe.values())
    data.put(p.pickaxe,p);
    }
    static final Pickaxe forPickaxe(int pickaxe) {
    return data.get(pickaxe);
    }
    BRONZE(new Item(ID), new Animation(ANIM));
    public Item pickaxe;
    public Animation anim;
    private Pickaxe(Item i, Animation a) {
    i = pickaxe;
    a = anim;
    }
    }
    
    usage:
    
    code to play animation: Pickaxe.forPickaxe(779).anim.getId(); code to get item id: Pickaxe.forPickaxe(779).pickaxe.getId(); etc
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 14
    Last Post: 11-01-2010, 11:29 PM
  2. Replies: 19
    Last Post: 01-02-2010, 11:59 PM
  3. Errors in my Mining.java :\
    By Brandon42792 in forum Help
    Replies: 3
    Last Post: 12-29-2009, 10:54 AM
  4. Replies: 7
    Last Post: 09-06-2009, 06:05 AM
  5. Replies: 24
    Last Post: 05-06-2008, 11:35 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •