Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.scripts;
- import java.awt.*;
- import com.kbot2.handlers.eventSystem.eventListeners.PaintListener;
- import com.kbot2.handlers.eventSystem.eventListeners.ServerMessageListener;
- import com.kbot2.scriptable.Script;
- import com.kbot2.scriptable.methods.wrappers.Tile;
- import com.kbot2.scriptable.methods.wrappers.Obj;
- import com.kbot2.scriptable.methods.Calculations;
- import com.kbot2.scriptable.methods.data.Skills;
- public class AIORunecrafter extends Script implements PaintListener, ServerMessageListener {
- Tile[] AIRS1 = new Tile[]{new Tile(3013,3355), new Tile(3010,3359), new Tile(3008,3354), new Tile(3008,3349),
- new Tile(3008,3344), new Tile(3007,3339), new Tile(3007,3334), new Tile(3007,3329), new Tile(3007,3324),
- new Tile(3003,3320), new Tile(3000,3314), new Tile(2998,3309), new Tile(2997,3304), new Tile(2993,3300),
- new Tile(2991,3295), new Tile(2986,3294), };
- Tile[] AIRS2 = new Tile[]{new Tile(3012,3355), new Tile(3009,3359), new Tile(3008,3354), new Tile(3008,3349),
- new Tile(3008,3344), new Tile(3007,3339), new Tile(3007,3334), new Tile(3007,3329), new Tile(3007,3324),
- new Tile(3002,3321), new Tile(2998,3317), new Tile(2995,3313), new Tile(2996,3308), new Tile(2996,3303),
- new Tile(2993,3299), new Tile(2990,3295), new Tile(2985,3294), };
- Tile[] RAIRS1 = walking.reversePath(AIRS1);
- Tile[] RAIRS2 = walking.reversePath(AIRS2);
- Tile[] MIND1 = new Tile[]{new Tile(2946,3368), new Tile(2946,3373), new Tile(2949,3377), new Tile(2953,3381),
- new Tile(2958,3382), new Tile(2961,3386), new Tile(2964,3390), new Tile(2965,3395), new Tile(2965,3400),
- new Tile(2968,3404), new Tile(2972,3407), new Tile(2976,3411), new Tile(2979,3416), new Tile(2984,3418),
- new Tile(2987,3422), new Tile(2987,3428), new Tile(2983,3431), new Tile(2981,3437), new Tile(2978,3441),
- new Tile(2976,3446), new Tile(2976,3451), new Tile(2973,3455), new Tile(2973,3460), new Tile(2973,3465),
- new Tile(2972,3470), new Tile(2972,3475), new Tile(2973,3480), new Tile(2971,3485), new Tile(2973,3490),
- new Tile(2976,3494), new Tile(2977,3499), new Tile(2977,3504), new Tile(2979,3509), new Tile(2983,3512), };
- Tile[] MIND2 = new Tile[]{new Tile(2945,3368), new Tile(2945,3373), new Tile(2949,3376), new Tile(2953,3379),
- new Tile(2958,3379), new Tile(2961,3384), new Tile(2962,3389), new Tile(2964,3394), new Tile(2967,3398),
- new Tile(2970,3402), new Tile(2972,3407), new Tile(2976,3410), new Tile(2980,3413), new Tile(2983,3417),
- new Tile(2987,3421), new Tile(2987,3426), new Tile(2984,3430), new Tile(2981,3434), new Tile(2980,3439),
- new Tile(2976,3445), new Tile(2973,3449), new Tile(2972,3454), new Tile(2972,3459), new Tile(2972,3464),
- new Tile(2972,3469), new Tile(2972,3474), new Tile(2969,3478), new Tile(2971,3483), new Tile(2973,3488),
- new Tile(2976,3492), new Tile(2977,3497), new Tile(2980,3501), new Tile(2979,3506), new Tile(2979,3511),
- new Tile(2984,3512), };
- Tile[] RMIND1 = walking.reversePath(MIND1);
- Tile[] RMIND2 = walking.reversePath(MIND2);
- Tile[] WATER1 = new Tile[]{new Tile(3092,3244), new Tile(3096,3247), new Tile(3098,3242), new Tile(3101,3237),
- new Tile(3105,3234), new Tile(3110,3231), new Tile(3113,3227), new Tile(3115,3222), new Tile(3117,3217),
- new Tile(3120,3213), new Tile(3124,3209), new Tile(3128,3206), new Tile(3133,3205), new Tile(3138,3202),
- new Tile(3141,3198), new Tile(3146,3195), new Tile(3150,3192), new Tile(3153,3188), new Tile(3156,3183),
- new Tile(3159,3179), new Tile(3162,3175), new Tile(3164,3170), new Tile(3168,3166), new Tile(3172,3163),
- new Tile(3176,3159), new Tile(3181,3157), new Tile(3183,3163), };
- Tile[] WATER2 = new Tile[]{new Tile(3092,3243), new Tile(3095,3247), new Tile(3098,3243), new Tile(3098,3238),
- new Tile(3098,3233), new Tile(3101,3229), new Tile(3106,3227), new Tile(3111,3225), new Tile(3114,3221),
- new Tile(3117,3217), new Tile(3120,3212), new Tile(3124,3208), new Tile(3129,3206), new Tile(3134,3205),
- new Tile(3138,3202), new Tile(3139,3197), new Tile(3141,3192), new Tile(3145,3188), new Tile(3150,3186),
- new Tile(3153,3182), new Tile(3155,3177), new Tile(3159,3174), new Tile(3163,3170), new Tile(3167,3167),
- new Tile(3172,3167), new Tile(3177,3167), new Tile(3183,3165), };
- Tile[] RWATER1 = walking.reversePath(WATER1);
- Tile[] RWATER2 = walking.reversePath(WATER2);
- Tile[] EARTH1 = new Tile[]{new Tile(3253,3420), new Tile(3253,3425), new Tile(3257,3428), new Tile(3262,3428),
- new Tile(3267,3428), new Tile(3272,3429), new Tile(3275,3433), new Tile(3275,3438), new Tile(3279,3441),
- new Tile(3281,3446), new Tile(3281,3451), new Tile(3283,3456), new Tile(3286,3461), new Tile(3290,3465),
- new Tile(3295,3466), new Tile(3300,3469), new Tile(3304,3474), };
- Tile[] EARTH2 = new Tile[]{new Tile(3252,3420), new Tile(3253,3425), new Tile(3257,3428), new Tile(3262,3428),
- new Tile(3267,3429), new Tile(3272,3429), new Tile(3275,3433), new Tile(3275,3438), new Tile(3279,3441),
- new Tile(3282,3445), new Tile(3284,3450), new Tile(3286,3455), new Tile(3289,3459), new Tile(3291,3464),
- new Tile(3296,3467), new Tile(3301,3469), new Tile(3304,3473), };
- Tile[] REARTH1 = walking.reversePath(EARTH1);
- Tile[] REARTH2 = walking.reversePath(EARTH2);
- Tile[] FIRE1 = new Tile[]{new Tile(3383,3269), new Tile(3380,3266), new Tile(3375,3266), new Tile(3370,3266),
- new Tile(3365,3266), new Tile(3360,3266), new Tile(3355,3266), new Tile(3349,3266), new Tile(3344,3266),
- new Tile(3339,3266), new Tile(3334,3266), new Tile(3329,3266), new Tile(3325,3262), new Tile(3325,3257),
- new Tile(3325,3252), new Tile(3325,3247), new Tile(3324,3242), new Tile(3320,3238), new Tile(3315,3237),
- new Tile(3310,3235), new Tile(3309,3240), new Tile(3309,3245), new Tile(3309,3250), new Tile(3311,3255), };
- Tile[] FIRE2 = new Tile[]{new Tile(3383,3269), new Tile(3379,3266), new Tile(3374,3266), new Tile(3369,3266),
- new Tile(3364,3266), new Tile(3359,3266), new Tile(3354,3266), new Tile(3349,3266), new Tile(3344,3266),
- new Tile(3339,3266), new Tile(3334,3266), new Tile(3329,3266), new Tile(3325,3262), new Tile(3325,3257),
- new Tile(3325,3252), new Tile(3325,3247), new Tile(3323,3242), new Tile(3319,3239), new Tile(3314,3237),
- new Tile(3309,3239), new Tile(3309,3244), new Tile(3308,3249), new Tile(3313,3253), };
- Tile[] RFIRE1 = walking.reversePath(FIRE1);
- Tile[] RFIRE2 = walking.reversePath(FIRE2);
- Tile[] BODY1 = new Tile[]{new Tile(3094,3491), new Tile(3090,3488), new Tile(3095,3487), new Tile(3099,3484),
- new Tile(3100,3479), new Tile(3100,3474), new Tile(3099,3469), new Tile(3096,3465), new Tile(3091,3465),
- new Tile(3087,3462), new Tile(3082,3462), new Tile(3077,3461), new Tile(3074,3457), new Tile(3071,3453),
- new Tile(3071,3448), new Tile(3067,3445), new Tile(3063,3448), new Tile(3058,3450), new Tile(3055,3446), };
- Tile[] BODY2 = new Tile[]{new Tile(3094,3491), new Tile(3090,3488), new Tile(3095,3486), new Tile(3098,3482),
- new Tile(3100,3477), new Tile(3099,3472), new Tile(3099,3467), new Tile(3094,3465), new Tile(3089,3465),
- new Tile(3085,3462), new Tile(3080,3462), new Tile(3075,3459), new Tile(3072,3454), new Tile(3071,3449),
- new Tile(3070,3444), new Tile(3066,3441), new Tile(3061,3438), new Tile(3056,3440), new Tile(3055,3445), };
- Tile[] RBODY1 = walking.reversePath(BODY1);
- Tile[] RBODY2 = walking.reversePath(BODY2);
- Rectangle BANK_AIRS = new Rectangle(3009, 3355, 7, 3);
- Rectangle BANK_MIND = new Rectangle(2943, 3368, 4, 5);
- Rectangle BANK_WATER = new Rectangle(3092, 3240, 3, 6);
- Rectangle BANK_EARTH = new Rectangle(3250, 3419, 7, 4);
- Rectangle BANK_FIRE = new Rectangle(3380, 3267, 5, 6);
- Rectangle BANK_BODY = new Rectangle(3091, 3488, 4, 7);
- Rectangle RUINS_AIRS = new Rectangle(2981, 3288, 8, 8);
- Rectangle RUINS_MIND = new Rectangle(2978, 3511, 7, 6);
- Rectangle RUINS_WATER = new Rectangle(3181, 3161, 8, 7);
- Rectangle RUINS_EARTH = new Rectangle(3301, 3471, 8, 7);
- Rectangle RUINS_FIRE = new Rectangle(3309, 3251, 8, 8);
- Rectangle RUINS_BODY = new Rectangle(3049, 3441, 8, 8);
- Rectangle ALTAR_AIRS = new Rectangle(2837, 4826, 13, 15);
- Rectangle ALTAR_MIND = new Rectangle(2762, 4819, 40, 35);
- Rectangle ALTAR_WATER = new Rectangle(3475, 4822, 25, 23);
- Rectangle ALTAR_EARTH = new Rectangle(2631, 4817, 51, 39);
- Rectangle ALTAR_FIRE = new Rectangle(2574, 4830, 20, 21);
- Rectangle ALTAR_BODY = new Rectangle(2507, 4831, 26, 18);
- Rectangle MINES = new Rectangle (2970, 3270, 30, 17);
- String WHRU;
- long StartTime;
- long runTime;
- int BANKS[] = {11758, 2213, 11402, 27663, 26972};
- int RUNES[] = {556, 557, 554, 555, 558, 559};
- int RUINZ[] = {7104, 7105, 7106, 7108, 7110, 7112, 7114};
- int ALTARS[] = {2478, 2479, 2480, 2481, 2482, 2483};
- int PORTALS[] = {2465, 2466, 2467, 2468, 2469, 2470};
- int ESS = 1436;
- int status = 0;
- int RUNES_CRAFTED = 0;
- int WHICH_RUNE = 0; // 1-Air, 2-Mind, 3-Water, 4-Earth, 5-Fire, 6-Body
- int START_XP = 0;
- int AMCR = 0;
- int ESS_USED = 0;
- int CUR_XP;
- int GAINED_XP;
- boolean TO_ALTAR;
- boolean START = false;
- boolean CHECK = false;
- boolean TIME = true;
- float xpmin;
- float xphours;
- Obj BANK;
- Obj RUINS;
- Obj ALTAR;
- Obj PORTAL;
- AIOGUI GUI;
- public boolean active() {
- return true;
- }
- @Override
- public boolean onStart() {
- GUI = new AIOGUI();
- GUI.setVisible(true);
- START_XP = skills.getExperience(skills.SKILL_RUNECRAFTING);
- WHRU = ("Loading...");
- return true;
- }
- public void onServerMessage(String abc) {
- if (abc.contains("You bind the temple")) {
- CHECK = true; }
- }
- public int loop() {
- switch (status) {
- case 0://Start up Checks
- Tile myLoc = getMyPlayer().getLocation();
- Point a = new Point(myLoc.getX(), myLoc.getY());
- if (START) {
- if (TIME) {
- StartTime = System.currentTimeMillis();
- TIME = false; }
- else if (BANK_AIRS.contains(a)||BANK_MIND.contains(a)||BANK_WATER.contains(a)||
- BANK_EARTH.contains(a)||BANK_FIRE.contains(a)||BANK_BODY.contains(a)) {
- status = 1; } }
- return random(300, 500);
- case 1://Banking
- BANK = getClosestObject(7, BANKS);
- if (inventory.getCount(false, ESS) > 26) {
- TO_ALTAR = true;
- status = 2; }
- else if (!bank.isOpen()) {
- if (inventory.contains(RUNES)||!inventory.contains(ESS)) {
- if (WHICH_RUNE == 5) {
- BANK.doAction("Bank"); }
- if (!(WHICH_RUNE == 5)) {
- BANK.doAction("quickly"); }
- sleep(800, 1200); } }
- else if (bank.isOpen()) {
- if (inventory.getCount() == 0) {
- bank.withdrawItem(ESS, 28);
- sleep(400, 650); }
- if (inventory.getCount() > 0 && !inventory.contains(ESS)) {
- bank.depositInventory();
- sleep(400, 700); } }
- return random(200, 300);
- case 2://checking which paths to take
- if (walking.getEnergy() > random(30, 70)) {
- walking.setRunning(true); }
- if (WHICH_RUNE == 1) {
- status = 3; }
- if (WHICH_RUNE == 2) {
- status = 4; }
- if (WHICH_RUNE == 3) {
- status = 5; }
- if (WHICH_RUNE == 4) {
- status = 6; }
- if (WHICH_RUNE == 5) {
- status = 7; }
- if (WHICH_RUNE == 6) {
- status = 8; }
- return random(200, 300);
- case 3://Air paths
- int RAN = random(1, 2);
- if (TO_ALTAR) {
- if (RAN == 1) {
- walking.walkPath(walking.randomizePath(AIRS1, 2, 2));
- status = 9; }
- if (RAN == 2) {
- walking.walkPath(walking.randomizePath(AIRS2, 2, 2));
- status = 9; } }
- if (!TO_ALTAR) {
- if (RAN == 1) {
- walking.walkPath(walking.randomizePath(RAIRS1, 2, 2));
- status = 0; }
- if (RAN == 2) {
- walking.walkPath(walking.randomizePath(RAIRS2, 2, 2));
- status = 0; } }
- return random(200, 300);
- case 4://Mind paths
- int RAND = random(1, 2);
- if (TO_ALTAR) {
- if (RAND == 1) {
- walking.walkPath(walking.randomizePath(MIND1, 2, 2));
- status = 9; }
- if (RAND == 2) {
- walking.walkPath(walking.randomizePath(MIND2, 2, 2));
- status = 9; } }
- if (!TO_ALTAR) {
- if (RAND == 1) {
- walking.walkPath(walking.randomizePath(RMIND1, 2, 2));
- status = 0; }
- if (RAND == 2) {
- walking.walkPath(walking.randomizePath(RMIND2, 2, 2));
- status = 0; } }
- return random(200, 300);
- case 5://Water paths
- int RANDO = random(1, 2);
- if (TO_ALTAR) {
- if (RANDO == 1) {
- walking.walkPath(walking.randomizePath(WATER1, 2, 2));
- status = 9; }
- if (RANDO == 2) {
- walking.walkPath(walking.randomizePath(WATER2, 2, 2));
- status = 9; } }
- if (!TO_ALTAR) {
- if (RANDO == 1) {
- walking.walkPath(walking.randomizePath(RWATER1, 2, 2));
- status = 0; }
- if (RANDO == 2) {
- walking.walkPath(walking.randomizePath(RWATER2, 2, 2));
- status = 0; } }
- return random(200, 300);
- case 6://Earth paths
- int RANDOM = random(1, 2);
- if (TO_ALTAR) {
- if (RANDOM == 1) {
- walking.walkPath(walking.randomizePath(EARTH1, 2, 2));
- status = 9; }
- if (RANDOM == 2) {
- walking.walkPath(walking.randomizePath(EARTH2, 2, 2));
- status = 9; } }
- if (!TO_ALTAR) {
- if (RANDOM == 1) {
- walking.walkPath(walking.randomizePath(REARTH1, 2, 2));
- status = 0; }
- if (RANDOM == 2) {
- walking.walkPath(walking.randomizePath(REARTH2, 2, 2));
- status = 0; } }
- return random(200, 300);
- case 7://Fire paths
- int RANDOMS = random(1, 2);
- if (TO_ALTAR) {
- if (RANDOMS == 1) {
- walking.walkPath(walking.randomizePath(FIRE1, 2, 2));
- status = 9; }
- if (RANDOMS == 2) {
- walking.walkPath(walking.randomizePath(FIRE2, 2, 2));
- status = 9; } }
- if (!TO_ALTAR) {
- if (RANDOMS == 1) {
- walking.walkPath(walking.randomizePath(RFIRE1, 2, 2));
- status = 0; }
- if (RANDOMS == 2) {
- walking.walkPath(walking.randomizePath(RFIRE2, 2, 2));
- status = 0; } }
- return random(200, 300);
- case 8://Body paths
- int RANDOMs = random(1, 2);
- if (TO_ALTAR) {
- if (RANDOMs == 1) {
- walking.walkPath(walking.randomizePath(BODY1, 2, 2));
- status = 9; }
- if (RANDOMs == 2) {
- walking.walkPath(walking.randomizePath(BODY2, 2, 2));
- status = 9; } }
- if (!TO_ALTAR) {
- if (RANDOMs == 1) {
- walking.walkPath(walking.randomizePath(RBODY1, 2, 2));
- status = 0; }
- if (RANDOMs == 2) {
- walking.walkPath(walking.randomizePath(RBODY2, 2, 2));
- status = 0; } }
- return random(200, 300);
- case 9://enter ruins
- RUINS = getClosestObject(7, RUINZ);
- int RAN_X = random(2982, 2988);
- int RAN_Y = random(3290, 3294);
- Tile myLoca = getMyPlayer().getLocation();
- Point b = new Point(myLoca.getX(), myLoca.getY());
- if (getMyPlayer().isMoving()) {
- return random(400, 600); }
- if (MINES.contains(b)) {
- walking.walkToMM(new Tile(RAN_X, RAN_Y)); }
- if (ALTAR_AIRS.contains(b)||ALTAR_MIND.contains(b)||ALTAR_WATER.contains(b)||
- ALTAR_EARTH.contains(b)||ALTAR_FIRE.contains(b)||ALTAR_BODY.contains(b)) {
- status = 10; }
- else if (RUINS_AIRS.contains(b)||RUINS_MIND.contains(b)||RUINS_WATER.contains(b)||
- RUINS_EARTH.contains(b)||RUINS_FIRE.contains(b)||RUINS_BODY.contains(b)) {
- RUINS.doAction("Enter");
- sleep(500, 700); }
- return random(200, 300);
- case 10: //crafting runes leaving portal
- PORTAL = getClosestObject(20, PORTALS);
- ALTAR = getClosestObject(20, ALTARS);
- Tile myLocat = getMyPlayer().getLocation();
- Point c = new Point(myLocat.getX(), myLocat.getY());
- if (CHECK) {
- if (getMyPlayer().getAnimation() == -1) {
- int COUNT = inventory.getCount(true, RUNES);
- AMCR += COUNT;
- ESS_USED+= 28;
- CHECK = false; } }
- if (RUINS_AIRS.contains(c)||RUINS_MIND.contains(c)||RUINS_WATER.contains(c)||
- RUINS_EARTH.contains(c)||RUINS_FIRE.contains(c)||RUINS_BODY.contains(c)) {
- TO_ALTAR = false;
- status = 2; }
- if (getMyPlayer().isMoving()) {
- return random(400, 600); }
- if (getMyPlayer().getAnimation() != -1) {
- return random(400, 600); }
- else if (!(RUINS_AIRS.contains(c)||RUINS_MIND.contains(c)||RUINS_WATER.contains(c)||
- RUINS_EARTH.contains(c)||RUINS_FIRE.contains(c)||RUINS_BODY.contains(c))) {
- Tile port = PORTAL.getLocation();
- Tile alta = ALTAR.getLocation();
- if (inventory.contains(RUNES)) {
- if (Calculations.onScreen(getCalculations().tileToScreen(PORTAL.getLocation()))) {
- PORTAL.doAction("Use");
- sleep(400, 600);}
- if (!Calculations.onScreen(getCalculations().tileToScreen(PORTAL.getLocation()))) {
- walking.walkToMM(port); } }
- else if (Calculations.onScreen(getCalculations().tileToScreen(ALTAR.getLocation()))) {
- ALTAR.doAction("Craft");
- sleep(300, 500); }
- else if (!Calculations.onScreen(getCalculations().tileToScreen(ALTAR.getLocation()))) {
- walking.walkToMM(alta); } }
- return random(200, 300);
- }
- return random(200, 300);
- }
- void clickMouse(int x, int y, int randx, int randy, boolean button) {
- mouse.moveMouse(x, y, randx, randy);
- sleep(100);
- mouse.clickMouse(button);
- }
- public String getName() {
- return "AIO Runecrafter";
- }
- public String getAuthor() {
- return "Ryan";
- }
- public String getVersion() {
- return "1.11";
- }
- public String getDescription() {
- return "Will craft all f2p runes";
- }
- public void onStop() {
- log("Run time: "+runTime);
- log("Xp gained: "+GAINED_XP);
- log("Crafting: "+WHRU);
- log("Crafted "+AMCR +" "+WHRU);
- log("Essence used: "+ESS_USED);
- log("XP per hour: "+xphours);
- }
- public void onRepaint(Graphics g) {
- if (START) {
- runTime = System.currentTimeMillis() - StartTime;
- int secs = ((int) ((runTime / 1000) % 60));
- int mins = ((int) (((runTime / 1000) / 60) % 60));
- int hours = ((int) ((((runTime / 1000) / 60) / 60) % 60));
- float xpsec = 0;
- if ((mins > 0 || hours > 0 || secs > 0) && (skills.getExperience(Skills.SKILL_RUNECRAFTING) - START_XP) > 0) {
- xpsec = ((float) (skills.getExperience(Skills.SKILL_RUNECRAFTING) - START_XP)) / (float) (secs + (mins * 60) + (hours * 60 * 60)); }
- xpmin = xpsec * 60;
- xphours = xpmin * 60;
- int x = 0;
- int y = 0;
- CUR_XP = skills.getExperience(skills.SKILL_RUNECRAFTING);
- GAINED_XP = CUR_XP - START_XP;
- g.setColor(new Color(0, 0, 0, 100));
- g.fill3DRect(4, 220, 171, 118, true);
- g.setColor(Color.lightGray);
- x+=22;
- y+=234;
- g.drawString("AIO Runecrafter by "+getAuthor(), x, y);
- g.setColor(Color.white);
- x-=12;
- y+=20;
- g.drawString("Crafting: " + WHRU, x, y);
- y+=15;
- g.drawString("Run time: " + (hours < 10 ? "0" : "") + hours
- + ":" + (mins < 10 ? "0" : "") + mins
- + ":" + (secs < 10 ? "0" : "") + secs, x, y);
- y+=15;
- g.drawString("Essence used: "+ESS_USED, x, y);
- y+=15;
- g.drawString("Runes crafted: "+AMCR, x, y);
- y+=15;
- g.drawString("XP gained: "+ GAINED_XP, x, y);
- y+=15;
- g.drawString("XP per hour: "+ (int)xphours, x, y);
- g.setColor(Color.black);
- x+=370;
- y+=141;
- g.drawString("Version: " + getVersion(), x, y);
- } }
- public class AIOGUI extends javax.swing.JFrame {
- /** Creates new form AIOGUI */
- public AIOGUI() {
- initComponents();
- }
- /** This method is called from within the constructor to
- * initialize the form.
- * WARNING: Do NOT modify this code. The content of this method is
- * always regenerated by the Form Editor.
- */
- @SuppressWarnings("unchecked")
- // <editor-fold defaultstate="collapsed" desc="Generated Code">
- private void initComponents() {
- jInternalFrame1 = new javax.swing.JInternalFrame();
- jComboBox1 = new javax.swing.JComboBox();
- jLabel1 = new javax.swing.JLabel();
- jButton1 = new javax.swing.JButton();
- jInternalFrame1.setVisible(true);
- javax.swing.GroupLayout jInternalFrame1Layout = new javax.swing.GroupLayout(jInternalFrame1.getContentPane());
- jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);
- jInternalFrame1Layout.setHorizontalGroup(
- jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGap(0, 22, Short.MAX_VALUE)
- );
- jInternalFrame1Layout.setVerticalGroup(
- jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGap(0, 283, Short.MAX_VALUE)
- );
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle("AIO Runecrafter");
- jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Air Runes", "Earth Runes", "Mind Runes", "Water Runes", "Fire Runes", "Body Runes" }));
- jLabel1.setText("Which Rune? ");
- jButton1.setLabel("Start Script"); {
- jButton1.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- startScript();
- } });
- }
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addGap(46, 46, 46)
- .addComponent(jLabel1)
- .addGap(18, 18, 18)
- .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGroup(layout.createSequentialGroup()
- .addGap(87, 87, 87)
- .addComponent(jButton1)))
- .addContainerGap(56, Short.MAX_VALUE))
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addGap(44, 44, 44)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(jLabel1)
- .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE)
- .addComponent(jButton1)
- .addGap(24, 24, 24))
- );
- jButton1.getAccessibleContext().setAccessibleName("Start Script");
- pack();
- }
- public void startScript() {
- if (jComboBox1.getSelectedItem().toString().equals("Air Runes")) {
- WHICH_RUNE = 1;
- WHRU = ("Air Runes"); }
- if (jComboBox1.getSelectedItem().toString().equals("Mind Runes")) {
- WHICH_RUNE = 2;
- WHRU = ("Mind Runes"); }
- if (jComboBox1.getSelectedItem().toString().equals("Water Runes")) {
- WHICH_RUNE = 3;
- WHRU = ("Water Runes"); }
- if (jComboBox1.getSelectedItem().toString().equals("Earth Runes")) {
- WHICH_RUNE = 4;
- WHRU = ("Earth Runes"); }
- if (jComboBox1.getSelectedItem().toString().equals("Fire Runes")) {
- WHICH_RUNE = 5;
- WHRU = ("Fire Runes"); }
- if (jComboBox1.getSelectedItem().toString().equals("Body Runes")) {
- WHICH_RUNE = 6;
- WHRU = ("Body Runes"); }
- START = true;
- GUI.setVisible(false);
- }
- }
- // Variables declaration - do not modify
- private javax.swing.JButton jButton1;
- private javax.swing.JComboBox jComboBox1;
- private javax.swing.JInternalFrame jInternalFrame1;
- private javax.swing.JLabel jLabel1;
- // End of variables declaration
- }
Add Comment
Please, Sign In to add comment