Ask Experts Questions for FREE Help !
Ask
    newsbox's Avatar
    newsbox Posts: 1, Reputation: 1
    New Member
     
    #1

    Feb 22, 2014, 04:53 AM
    How to get random Enum, where int Level == ##;?
    Hello,
    I got a enum of tasks, and i want to randomly grab one, but the one grabbed has to be the appropriate level.

    Can any1one tell me how to grab randomly and still grab the right level? (1,60 or 110)

    here's my file:
    Code:
    package com.rs.game.player.actions.slayer;
    
    public enum SlayerTasks {
    
    
        //Newsbox Task's
        //Level 1
        RATS("Rats", 1, 15, 30, "Giant rat", "Rat"),
        CRABS("Rock crabs", 1, 15, 30, "Rock crab"),
        HANDS("Crawling hands", 1, 15, 30, "Crawling hand", "Crawling Hand"),
        BANSHEE("Banshees", 1, 15, 20, "Banshee"),
        MAGE("Infernal Mages", 1, 15, 20, "Infernal Mage"),
        YAKS("Yaks", 1, 15, 30, "Yak"),
        //Level 60
        BLOODVELD("Bloodvelds", 60, 15, 20, "Bloodveld"),
        DUSTDEVIL("Dustdevils", 60, 15, 20, "Dust devil"),
        GARGOYLE("Gargoyles", 60, 10, 15, "Gargoyle"),
        NECHRYAEL("Nechryaels", 60, 10, 15, "Nechryael"),
        JADBABY("Jadinko baby's", 60, 10, 15, "Mutated jadinko baby"),
        //Level 110
        DEMON("Abyssal demons", 110, 10, 15, "Abyssal demon"),
        JADS("Big Jadinkos", 110, 10, 15, "Mutated jadinko guard", "Mutated jadinko male"),
        FROSTDRAG("Frost dragons", 110, 10, 12, "Frost dragon"),
        DRAGONS("Iron/Steel Drags", 110, 10, 15, "Iron dragon", "Steel dragon", "Bronze dragon"),
        STRYKEWYRM("Ice strykewyrms", 110, 10, 15, "Ice strykewyrm");
    
    
            
        private SlayerTasks(String simpleName, int level, int min, int max,
                String... monsters) {
            this.slayable = monsters;
            this.simpleName = simpleName;
                    this.level = level;
            this.min = min;
            this.max = max;
            }
    
    
        /**
         * A simple name for the task
         */
        public String simpleName;
    
    
        /**
         * The task set
         */
        public TaskSet type;
        /**
         * The monsters that will effect this task
         */
        public String[] slayable;
        /**
         * The minimum amount of monsters the player may be assigned to kill
         */
        public int min;
        /**
         * The maximum amount of monsters the player may be assigned to kill
         */
        public int max;
            
            /*
             * combat level for monsters
             */
            public int level;
            
            public int getLevel() {
                return level;
            }
    }

Check out some similar questions!

Can I move cold air returns to furnace at floor level from ceiling level [ 0 Answers ]

A poorly designed heating system in a room addition has left me with problems. The contractor simply ran uninsulated plastic,such as that used on dryers, into an unheated,un-insulated crawlspace causing the 3 heat vents to receive nothing but cold air. Recently I simply shut the heat vents to the...

Raising the level of a caste iron toilet flange to the level of the floor tile. [ 1 Answers ]

I have a similar problem as the person in a previous post. I installed one of those twist and sets PVC flanges right on top of my old caste iron flange but the top of the twist and set is still 3/8 inch below the tile. I am wary about using a double wax ring. Can I install one of those flange...

Nice on main level, hot on upper level [ 4 Answers ]

We live in a house that is 5 yrs old. With the A/C on, the main level of the house is very comfortable yet the upper level where the bedrooms are doesn't seem to cool down at all. I'm thinking that it has something to do with the duct work which won't be an easy fix. Could there be any other...

Bank Interest income on 1099 INT is taxable at state level [ 2 Answers ]

Hi, I have received interest on my deposits in bank. I have got 1099 INT for the same from the bank. Federal income has been withheld on some of the amount. Do I need to pay Georgia State taxes on interest earned on the bank deposits? Thanks MKV


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.