예제 #1
0
파일: Potions.java 프로젝트: Geczy/SAS2006
  public void doTheBrew(int itemId, int replaceItem, int slot) {
    if (c.duelRule[6]) {
      c.sendMessage("You may not eat in this duel.");
      return;
    }
    c.startAnimation(829);
    c.playerItems[slot] = replaceItem + 1;
    c.getItems().resetItems(3214);
    int[] toDecrease = {0, 2, 4, 6};

    for (int tD : toDecrease) {
      c.playerLevel[tD] -= getBrewStat(tD, .10);
      if (c.playerLevel[tD] < 0) {
        c.playerLevel[tD] = 1;
      }
      c.getPA().refreshSkill(tD);
      c.getPA().setSkillLevel(tD, c.playerLevel[tD], c.playerXP[tD]);
    }
    c.playerLevel[1] += getBrewStat(1, .20);
    if (c.playerLevel[1] > c.getLevelForXP(c.playerXP[1]) * 1.2 + 1) {
      c.playerLevel[1] = (int) (c.getLevelForXP(c.playerXP[1]) * 1.2);
    }
    c.getPA().refreshSkill(1);

    c.playerLevel[3] += getBrewStat(3, .15);
    if (c.playerLevel[3] > c.getLevelForXP(c.playerXP[3]) * 1.17 + 1) {
      c.playerLevel[3] = (int) (c.getLevelForXP(c.playerXP[3]) * 1.17);
    }
    c.getPA().refreshSkill(3);
  }
예제 #2
0
 public void sendSmelting() {
   for (int j = 0; j < SMELT_FRAME.length; j++) {
     c.getPA().sendFrame246(SMELT_FRAME[j], 150, SMELT_BARS[j]);
   }
   c.getPA().sendFrame164(2400);
   c.smeltInterface = true;
 }
예제 #3
0
 public boolean doaction(
     Client c,
     int toadd,
     int toremove,
     int toremove2,
     int timestomake,
     int NOTUSED,
     int NOTUSED2,
     int xp) {
   int maketimes = timestomake;
   c.getPA().closeAllWindows();
   if (c.getItems().playerHasItem(toremove, toremove2)) {
     c.startAnimation(898);
     if (maketimes > 1 && c.getItems().playerHasItem(toremove, toremove2 * 2)) {
       c.sendMessage("You make some " + c.getItems().getItemName(toadd) + "s.");
     } else {
       c.sendMessage("You make a " + c.getItems().getItemName(toadd) + ".");
     }
     while (maketimes > 0) {
       if (c.getItems().playerHasItem(toremove, toremove2)) {
         c.getItems().deleteItem2(toremove, toremove2);
         if (c.getItems().getItemName(toadd).contains("bolt")) {
           c.getItems().addItem(toadd, 10);
         } else if (c.getItems().getItemName(toadd).contains("nail")) {
           c.getItems().addItem(toadd, 15);
         } else if (c.getItems().getItemName(toadd).contains("arrow")) {
           c.getItems().addItem(toadd, 15);
         } else if (c.getItems().getItemName(toadd).contains("knife")) {
           c.getItems().addItem(toadd, 5);
         } else if (c.getItems().getItemName(toadd).contains("cannon")) {
           c.getItems().addItem(toadd, 4);
         } else {
           c.getItems().addItem(toadd, 1);
         }
         c.getPA().addSkillXP(xp, 13);
         c.getPA().refreshSkill(13);
         maketimes--;
       } else {
         break;
       }
     }
   } else {
     c.sendMessage("You don't have enough bars to make this item!");
     c.getPA().closeAllWindows();
     return false;
   }
   return true;
 }
예제 #4
0
 public void openLeather(int hide) {
   for (int i = 0; i < leathers.length; i++) {
     if (leathers[i][0] == hide) {
       c.getPA().sendFrame164(8880); // leather
       c.getPA().sendFrame126("What would you like to make?", 8879);
       c.getPA().sendFrame246(8884, 250, leathers[i][1]); // middle
       c.getPA().sendFrame246(8883, 250, leathers[i][2]); // left picture
       c.getPA().sendFrame246(8885, 250, leathers[i][3]); // right pic
       c.getPA().sendFrame126("Vambs", 8889);
       c.getPA().sendFrame126("Chaps", 8893);
       c.getPA().sendFrame126("Body", 8897);
     }
   }
   c.craftingLeather = true;
   c.hideId = hide;
 }
예제 #5
0
 public void craftLeather(int id) {
   LeatherCrafting lea = LeatherCrafting.forId(id);
   if (lea == null) {
     return;
   }
   if (c.playerLevel[c.playerCrafting] >= lea.getReqLevel()) {
     if (c.getItems().playerHasItem(lea.getLeather(), lea.getReqAmt())) {
       c.startAnimation(1249);
       c.getItems().deleteItem(lea.getLeather(), lea.getReqAmt());
       c.getItems().addItem(lea.getOutcome(), 1);
       c.getPA().addSkillXP(lea.getXP(), c.playerCrafting);
       resetCrafting();
     } else {
       c.sendMessage("You do not have enough items to craft this item.");
     }
   } else {
     c.sendMessage("You need a crafting level of " + lea.getReqLevel() + " to craft this item.");
   }
   c.getPA().removeAllWindows();
 }
예제 #6
0
 public void smelt(int barType) {
   if (c.smeltAmount > 0) {
     c.getPA().closeAllWindows();
     if (hasOres(barType)) {
       c.getItems().deleteItem(oreId, c.getItems().getItemSlot(oreId), 1);
       if (oreId2 > 0) c.getItems().deleteItem(oreId2, c.getItems().getItemSlot(oreId2), 1);
       c.getItems().addItem(barId, 1);
       c.getPA().addSkillXP(exp, c.playerSmithing);
       c.getPA().refreshSkill(c.playerSmithing);
       c.smeltAmount--;
       c.smeltTimer = 1;
     } else {
       c.sendMessage("You do not have the required ores to smelt this.");
       c.getPA().closeAllWindows();
       c.getPA().removeAllWindows();
     }
   } else {
     c.getPA().resetVariables();
     c.getPA().closeAllWindows();
   }
 }
예제 #7
0
 public void startSmelting(int barType) {
   if (canSmelt(barType)) {
     // c.sendMessage("We canSmelt");
     if (hasOres(barType)) {
       // c.sendMessage("We have ores");
       this.exp = getExp(barType);
       this.oreId = getOre(barType);
       this.oreId2 = getOre2(barType);
       this.barId = barType;
       c.smeltAmount = c.getItems().getItemAmount(getOre(barType));
       smelt(barType);
     } else {
       c.sendMessage("You do not have the required ores to smelt this.");
       c.getPA().resetVariables();
       c.getPA().closeAllWindows();
     }
   } else {
     c.sendMessage("You must have a higher smithing level to smith this.");
     c.getPA().resetVariables();
     c.getPA().closeAllWindows();
   }
 }
예제 #8
0
파일: Potions.java 프로젝트: Geczy/SAS2006
 public void restoreStats() {
   for (int j = 0; j <= 6; j++) {
     if (j == 5 || j == 3) {
       continue;
     }
     if (c.playerLevel[j] < c.getLevelForXP(c.playerXP[j])) {
       c.playerLevel[j] += c.getLevelForXP(c.playerXP[j]) * .33;
       if (c.playerLevel[j] > c.getLevelForXP(c.playerXP[j])) {
         c.playerLevel[j] = c.getLevelForXP(c.playerXP[j]);
       }
       c.getPA().refreshSkill(j);
       c.getPA().setSkillLevel(j, c.playerLevel[j], c.playerXP[j]);
     }
   }
 }
예제 #9
0
파일: Potions.java 프로젝트: Geczy/SAS2006
 public void drinkPrayerPot(int itemId, int replaceItem, int slot, boolean rest) {
   c.startAnimation(829);
   c.playerItems[slot] = replaceItem + 1;
   c.getItems().resetItems(3214);
   c.playerLevel[5] += c.getLevelForXP(c.playerXP[5]) * .33;
   if (rest) {
     c.playerLevel[5] += 1;
   }
   if (c.playerLevel[5] > c.getLevelForXP(c.playerXP[5])) {
     c.playerLevel[5] = c.getLevelForXP(c.playerXP[5]);
   }
   c.getPA().refreshSkill(5);
   if (rest) {
     restoreStats();
   }
 }
예제 #10
0
 public void cutGem(int id) {
   GemCrafting gem = GemCrafting.forId(id);
   if (gem == null) {
     return;
   }
   if (c.getItems().playerHasItem(gem.getUncut(), 1)) {
     if (c.playerLevel[c.playerCrafting] >= gem.getReq()) {
       c.getItems().deleteItem(gem.getUncut(), 1);
       c.sendMessage("You carefully cut the gem.");
       c.getItems().addItem(gem.getCut(), 1);
       c.getPA().addSkillXP(gem.getXP(), c.playerCrafting);
       c.startAnimation(gem.getAnim());
     } else {
       c.sendMessage("You need a crafting level of " + gem.getReq() + " to cut this gem.");
     }
   }
 }
예제 #11
0
  private void CheckRune(Client c, int level, int amounttomake, String type) {
    remove = 2363;

    if (type.equalsIgnoreCase("1359") && level >= 86) // Axe
    {
      xp = 75;
      item = 1359;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equalsIgnoreCase("1213") && level >= 85) // Dagger
    {
      xp = 75;
      item = 1213;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1432") && level >= 87) // Mace
    {
      xp = 75;
      item = 1432;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1147") && level >= 88) // Med helm
    {
      xp = 75;
      item = 1147;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("9144") && level >= 89) // Dart tips
    {

      xp = 75;
      item = 9144;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1289") && level >= 89) // Sword (s)
    {
      xp = 75;
      item = 1289;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("4824") && level >= 89) // Nails
    {
      xp = 75;
      item = 4824;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("44") && level >= 90) // Arrow tips
    {
      xp = 75;
      item = 44;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1333") && level >= 90) // Scim
    {
      xp = 150;
      item = 1333;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("1303") && level >= 91) // Longsword
    {
      xp = 150;
      item = 1303;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("868") && level >= 92) // Knives
    {
      xp = 75;
      item = 868;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1163") && level >= 92) // Full Helm
    {
      xp = 150;
      item = 1163;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("1185") && level >= 93) // Square shield
    {
      xp = 150;
      item = 1185;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("1347") && level >= 94) // Warhammer
    {
      xp = 225;
      item = 1347;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1373") && level >= 95) // Battle axe
    {
      xp = 225;
      item = 1373;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1113") && level >= 96) // Chain
    {
      xp = 225;
      item = 1113;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1201") && level >= 97) // Kite
    {
      xp = 225;
      item = 1201;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1319") && level >= 99) // 2h Sword
    {
      xp = 225;
      item = 1319;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1079") && level >= 99) // Platelegs
    {
      xp = 225;
      item = 1079;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1093") && level >= 99) // PlateSkirt
    {
      xp = 225;
      item = 1093;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1127") && level >= 99) // Platebody
    {
      xp = 313;
      item = 1127;
      removeamount = 5;
      maketimes = amounttomake;
    } else {
      c.sendMessage("You don't have a high enough level to make this armour!");
      c.getPA().closeAllWindows();
      return;
    }

    doaction(c, item, remove, removeamount, maketimes, -1, -1, xp);
  }
예제 #12
0
  @Override
  public void processPacket(Client c, int packetType, int packetSize) {
    c.playerIndex = 0;
    c.npcIndex = 0;
    switch (packetType) {

        /** Attack player */
      case ATTACK_PLAYER:
        c.playerIndex = c.getInStream().readSignedWordBigEndian();
        if (PlayerHandler.players[c.playerIndex] == null) {
          break;
        }

        if (c.respawnTimer > 0) {
          break;
        }

        if (c.autocastId > 0) {
          c.autocasting = true;
        }

        if (!c.autocasting && c.spellId > 0) {
          c.spellId = 0;
        }
        c.mageFollow = false;
        c.spellId = 0;
        c.usingMagic = false;
        boolean usingBow = false;
        boolean usingOtherRangeWeapons = false;
        boolean usingArrows = false;
        boolean usingCross = c.playerEquipment[c.playerWeapon] == 9185;
        for (int bowId : c.BOWS) {
          if (c.playerEquipment[c.playerWeapon] == bowId) {
            usingBow = true;
            for (int arrowId : c.ARROWS) {
              if (c.playerEquipment[c.playerArrows] == arrowId) {
                usingArrows = true;
              }
            }
          }
        }
        for (int otherRangeId : c.OTHER_RANGE_WEAPONS) {
          if (c.playerEquipment[c.playerWeapon] == otherRangeId) {
            usingOtherRangeWeapons = true;
          }
        }
        if (c.duelStatus == 5) {
          if (c.duelCount > 0) {
            c.sendMessage("The duel hasn't started yet!");
            c.playerIndex = 0;
            return;
          }
          if (c.duelRule[9]) {
            boolean canUseWeapon = false;
            for (int funWeapon : Config.FUN_WEAPONS) {
              if (c.playerEquipment[c.playerWeapon] == funWeapon) {
                canUseWeapon = true;
              }
            }
            if (!canUseWeapon) {
              c.sendMessage("You can only use fun weapons in this duel!");
              return;
            }
          }

          if (c.duelRule[2] && (usingBow || usingOtherRangeWeapons)) {
            c.sendMessage("Range has been disabled in this duel!");
            return;
          }
          if (c.duelRule[3] && !usingBow && !usingOtherRangeWeapons) {
            c.sendMessage("Melee has been disabled in this duel!");
            return;
          }
        }

        if ((usingBow || c.autocasting)
            && c.goodDistance(
                c.getX(),
                c.getY(),
                PlayerHandler.players[c.playerIndex].getX(),
                PlayerHandler.players[c.playerIndex].getY(),
                6)) {
          c.usingBow = true;
          c.stopMovement();
        }

        if (usingOtherRangeWeapons
            && c.goodDistance(
                c.getX(),
                c.getY(),
                PlayerHandler.players[c.playerIndex].getX(),
                PlayerHandler.players[c.playerIndex].getY(),
                3)) {
          c.usingRangeWeapon = true;
          c.stopMovement();
        }
        if (!usingBow) {
          c.usingBow = false;
        }
        if (!usingOtherRangeWeapons) {
          c.usingRangeWeapon = false;
        }

        if (!usingCross
            && !usingArrows
            && usingBow
            && c.playerEquipment[c.playerWeapon] < 4212
            && c.playerEquipment[c.playerWeapon] > 4223) {
          c.sendMessage("You have run out of arrows!");
          return;
        }
        if (c.getCombat().correctBowAndArrows() < c.playerEquipment[c.playerArrows]
            && Config.CORRECT_ARROWS
            && usingBow
            && !c.getCombat().usingCrystalBow()
            && c.playerEquipment[c.playerWeapon] != 9185) {
          c.sendMessage(
              "You can't use "
                  + c.getItems().getItemName(c.playerEquipment[c.playerArrows]).toLowerCase()
                  + "s with a "
                  + c.getItems().getItemName(c.playerEquipment[c.playerWeapon]).toLowerCase()
                  + ".");
          c.stopMovement();
          c.getCombat().resetPlayerAttack();
          return;
        }

        if (c.getCombat().checkReqs()) {
          c.followId = c.playerIndex;
          if (!c.usingMagic && !usingBow && !usingOtherRangeWeapons) {
            c.followDistance = 1;
            c.getPA().followPlayer();
          }
          if (c.attackTimer <= 0) {
            // c.sendMessage("Tried to attack...");
            // c.getCombat().attackPlayer(c.playerIndex);
            // c.attackTimer++;
          }
        }
        break;

        /** Attack player with magic */
      case MAGE_PLAYER:
        if (!c.mageAllowed) {
          c.mageAllowed = true;
          break;
        }
        // c.usingSpecial = false;
        // c.getItems().updateSpecialBar();

        c.playerIndex = c.getInStream().readSignedWordA();
        int castingSpellId = c.getInStream().readSignedWordBigEndian();
        c.usingMagic = false;
        if (PlayerHandler.players[c.playerIndex] == null) {
          break;
        }

        if (c.respawnTimer > 0) {
          break;
        }

        for (int i = 0; i < c.MAGIC_SPELLS.length; i++) {
          if (castingSpellId == c.MAGIC_SPELLS[i][0]) {
            c.spellId = i;
            c.usingMagic = true;
            break;
          }
        }

        if (c.autocasting) {
          c.autocasting = false;
        }

        if (!c.getCombat().checkReqs()) {
          break;
        }
        if (c.duelStatus == 5) {
          if (c.duelCount > 0) {
            c.sendMessage("The duel hasn't started yet!");
            c.playerIndex = 0;
            return;
          }
          if (c.duelRule[4]) {
            c.sendMessage("Magic has been disabled in this duel!");
            return;
          }
        }

        for (int r = 0; r < c.REDUCE_SPELLS.length; r++) { // reducing
          // spells,
          // confuse
          // etc
          if (PlayerHandler.players[c.playerIndex].REDUCE_SPELLS[r]
              == c.MAGIC_SPELLS[c.spellId][0]) {
            if (System.currentTimeMillis()
                    - PlayerHandler.players[c.playerIndex].reduceSpellDelay[r]
                < PlayerHandler.players[c.playerIndex].REDUCE_SPELL_TIME[r]) {
              c.sendMessage("That player is currently immune to this spell.");
              c.usingMagic = false;
              c.stopMovement();
              c.getCombat().resetPlayerAttack();
            }
            break;
          }
        }

        if (System.currentTimeMillis() - PlayerHandler.players[c.playerIndex].teleBlockDelay
                < PlayerHandler.players[c.playerIndex].teleBlockLength
            && c.MAGIC_SPELLS[c.spellId][0] == 12445) {
          c.sendMessage("That player is already affected by this spell.");
          c.usingMagic = false;
          c.stopMovement();
          c.getCombat().resetPlayerAttack();
        }

        /*
         * if(!c.getCombat().checkMagicReqs(c.spellId)) {
         * c.stopMovement(); c.getCombat().resetPlayerAttack(); break; }
         */

        if (c.usingMagic) {
          if (c.goodDistance(
              c.getX(),
              c.getY(),
              PlayerHandler.players[c.playerIndex].getX(),
              PlayerHandler.players[c.playerIndex].getY(),
              7)) {
            c.stopMovement();
          }
          if (c.getCombat().checkReqs()) {
            c.followId = c.playerIndex;
            c.mageFollow = true;
            if (c.attackTimer <= 0) {
              // c.getCombat().attackPlayer(c.playerIndex);
              // c.attackTimer++;
            }
          }
        }
        break;
    }
  }
예제 #13
0
파일: Potions.java 프로젝트: Geczy/SAS2006
 public void enchanceStat(int skillID, boolean sup) {
   c.playerLevel[skillID] += getBoostedStat(skillID, sup);
   c.getPA().refreshSkill(skillID);
 }
예제 #14
0
  private void CheckIron(Client c, int level, int amounttomake, String type) {
    remove = 2351;

    if (type.equalsIgnoreCase("1349") && level >= 16) // Axe
    {
      xp = 25;
      item = 1349;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equalsIgnoreCase("1203") && level >= 15) // Dagger
    {
      xp = 25;
      item = 1203;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1420") && level >= 17) // Mace
    {
      xp = 25;
      item = 1420;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1137") && level >= 18) // Med helm
    {
      xp = 25;
      item = 1137;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("9140") && level >= 19) // Dart tips
    {
      xp = 25;
      item = 9140;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1279") && level >= 19) // Sword (s)
    {
      xp = 25;
      item = 1277;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("4820") && level >= 19) // Nails
    {
      xp = 25;
      item = 4820;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("40") && level >= 20) // Arrow tips
    {
      xp = 25;
      item = 40;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1323") && level >= 20) // Scim
    {
      xp = 50;
      item = 1323;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("1293") && level >= 21) // Longsword
    {
      xp = 50;
      item = 1293;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("863") && level >= 22) // Knives
    {
      xp = 25;
      item = 863;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1153") && level >= 22) // Full Helm
    {
      xp = 50;
      item = 1153;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("1175") && level >= 23) // Square shield
    {
      xp = 50;
      item = 1175;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("1335") && level >= 24) // Warhammer
    {
      xp = 38;
      item = 1335;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1363") && level >= 25) // Battle axe
    {
      xp = 75;
      item = 1363;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1101") && level >= 26) // Chain
    {
      xp = 75;
      item = 1101;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1191") && level >= 27) // Kite
    {
      xp = 75;
      item = 1191;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1309") && level >= 29) // 2h Sword
    {
      xp = 75;
      item = 1309;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1067") && level >= 31) // Platelegs
    {
      xp = 75;
      item = 1067;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1081") && level >= 31) // PlateSkirt
    {
      xp = 75;
      item = 1081;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1115") && level >= 33) // Platebody
    {
      xp = 100;
      item = 1115;
      removeamount = 5;
      maketimes = amounttomake;
    } else {
      c.sendMessage("You don't have a high enough level to make this armour!");
      c.getPA().closeAllWindows();
      return;
    }

    doaction(c, item, remove, removeamount, maketimes, -1, -1, xp);
  }
예제 #15
0
  private void CheckBronze(Client c, int level, int amounttomake, String type) {
    if (type.equalsIgnoreCase("1351") && level >= 1) {
      xp = 13;
      item = 1351;
      remove = 2349;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equalsIgnoreCase("1205") && level >= 1) {
      xp = 13;
      item = 1205;
      remove = 2349;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1422") && level >= 2) {
      xp = 13;
      item = 1422;
      remove = 2349;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1139") && level >= 3) {
      xp = 13;
      item = 1139;
      remove = 2349;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("819") && level >= 4) {
      xp = 13;
      item = 819;
      remove = 2349;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1277") && level >= 4) {
      xp = 13;
      item = 1277;
      remove = 2349;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("4819") && level >= 4) {
      xp = 13;
      item = 4819;
      remove = 2349;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("39") && level >= 5) {
      xp = 13;
      item = 39;
      remove = 2349;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1321") && level >= 5) {
      xp = 25;
      item = 1321;
      remove = 2349;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("1291") && level >= 6) {
      xp = 25;
      item = 1291;
      remove = 2349;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("864") && level >= 7) {
      xp = 25;
      item = 864;
      remove = 2349;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1155") && level >= 7) {
      xp = 25;
      item = 1155;
      remove = 2349;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("1173") && level >= 8) {
      xp = 25;
      item = 1173;
      remove = 2349;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("1337") && level >= 9) {
      xp = 38;
      item = 1337;
      remove = 2349;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1375") && level >= 10) {
      xp = 38;
      item = 1375;
      remove = 2349;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1103") && level >= 11) {
      xp = 38;
      item = 1103;
      remove = 2349;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1189") && level >= 12) {
      xp = 38;
      item = 1189;
      remove = 2349;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1307") && level >= 14) {
      xp = 38;
      item = 1307;
      remove = 2349;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1075") && level >= 16) {
      xp = 38;
      item = 1075;
      remove = 2349;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1087") && level >= 16) {
      xp = 38;
      item = 1087;
      remove = 2349;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1117") && level >= 18) {
      xp = 63;
      item = 1117;
      remove = 2349;
      removeamount = 5;
      maketimes = amounttomake;
    } else {
      c.sendMessage("You don't have a high enough level to make this armour!");
      c.getPA().closeAllWindows();
      return;
    }

    doaction(c, item, remove, removeamount, maketimes, -1, -1, xp);
  }
예제 #16
0
  private void CheckAddy(Client c, int level, int amounttomake, String type) {
    remove = 2361;

    if (type.equalsIgnoreCase("1357") && level >= 71) // Axe
    {
      xp = 63;
      item = 1357;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equalsIgnoreCase("1211") && level >= 70) // Dagger
    {
      xp = 63;
      item = 1211;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1430") && level >= 72) // Mace
    {
      xp = 63;
      item = 1430;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1145") && level >= 73) // Med helm
    {
      xp = 63;
      item = 1145;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("9143") && level >= 74) // Dart tips
    {
      xp = 63;
      item = 9143;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1287") && level >= 74) // Sword (s)
    {
      xp = 63;
      item = 1287;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("4823") && level >= 74) // Nails
    {
      xp = 63;
      item = 4823;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("43") && level >= 75) // Arrow tips
    {
      xp = 63;
      item = 43;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1331") && level >= 75) // Scim
    {
      xp = 125;
      item = 1331;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("1301") && level >= 76) // Longsword
    {
      xp = 125;
      item = 1301;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("867") && level >= 77) // Knives
    {
      xp = 63;
      item = 867;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1161") && level >= 77) // Full Helm
    {
      xp = 125;
      item = 1161;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("1183") && level >= 78) // Square shield
    {
      xp = 125;
      item = 1183;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("1345") && level >= 79) // Warhammer
    {
      xp = 188;
      item = 1345;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1371") && level >= 80) // Battle axe
    {
      xp = 188;
      item = 1371;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1111") && level >= 81) // Chain
    {
      xp = 188;
      item = 1111;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1199") && level >= 82) // Kite
    {
      xp = 188;
      item = 1199;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1317") && level >= 84) // 2h Sword
    {
      xp = 188;
      item = 1317;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1073") && level >= 86) // Platelegs
    {
      xp = 188;
      item = 1073;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1091") && level >= 86) // PlateSkirt
    {
      xp = 188;
      item = 1091;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1123") && level >= 88) // Platebody
    {
      xp = 313;
      item = 1123;
      removeamount = 5;
      maketimes = amounttomake;
    } else {
      c.sendMessage("You don't have a high enough level to make this armour!");
      c.getPA().closeAllWindows();
      return;
    }

    doaction(c, item, remove, removeamount, maketimes, -1, -1, xp);
  }
예제 #17
0
  private void CheckSteel(Client c, int level, int amounttomake, String type) {
    remove = 2353;

    if (type.equalsIgnoreCase("1353") && level >= 31) // Axe
    {
      xp = 38;
      item = 1353;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equalsIgnoreCase("1207") && level >= 30) // Dagger
    {
      xp = 50;
      item = 1207;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1424") && level >= 32) // Mace
    {
      xp = 50;
      item = 1424;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1141") && level >= 33) // Med helm
    {
      xp = 50;
      item = 1141;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("9141") && level >= 34) // Dart tips
    {
      xp = 50;
      item = 9141;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1281") && level >= 34) // Sword (s)
    {
      xp = 50;
      item = 1281;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1539") && level >= 34) // Nails
    {
      xp = 50;
      item = 1539;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("41") && level >= 35) // Arrow tips
    {
      xp = 50;
      item = 41;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1325") && level >= 35) // Scim
    {
      xp = 75;
      item = 1325;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("1295") && level >= 36) // Longsword
    {
      xp = 75;
      item = 1295;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("865") && level >= 37) // Knives
    {
      xp = 50;
      item = 865;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1157") && level >= 37) // Full Helm
    {
      xp = 75;
      item = 1157;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("1177") && level >= 38) // Square shield
    {
      xp = 75;
      item = 1177;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("1339") && level >= 39) // Warhammer
    {
      xp = 113;
      item = 1339;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1365") && level >= 40) // Battle axe
    {
      xp = 113;
      item = 1365;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1105") && level >= 41) // Chain
    {
      xp = 113;
      item = 1105;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1193") && level >= 42) // Kite
    {
      xp = 113;
      item = 1193;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1311") && level >= 44) // 2h Sword
    {
      xp = 113;
      item = 1311;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1069") && level >= 46) // Platelegs
    {
      xp = 113;
      item = 1069;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1083") && level >= 46) // PlateSkirt
    {
      xp = 113;
      item = 1083;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1119") && level >= 48) // Platebody
    {
      xp = 188;
      item = 1119;
      removeamount = 5;
      maketimes = amounttomake;
    } else {
      c.sendMessage("You don't have a high enough level to make this armour!");
      c.getPA().closeAllWindows();
      return;
    }

    doaction(c, item, remove, removeamount, maketimes, -1, -1, xp);
  }
예제 #18
0
  private void CheckMith(Client c, int level, int amounttomake, String type) {
    remove = 2359;

    if (type.equalsIgnoreCase("1355") && level >= 51) // Axe
    {
      xp = 50;
      item = 1355;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equalsIgnoreCase("1209") && level >= 50) // Dagger
    {
      xp = 50;
      item = 1209;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1428") && level >= 52) // Mace
    {
      xp = 50;
      item = 1428;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1143") && level >= 53) // Med helm
    {
      xp = 50;
      item = 1143;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("9142") && level >= 54) // Dart tips
    {
      xp = 50;
      item = 9142;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1285") && level >= 54) // Sword (s)
    {
      xp = 50;
      item = 1285;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("4822") && level >= 54) // Nails
    {
      xp = 50;
      item = 4822;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("42") && level >= 55) // Arrow tips
    {
      xp = 50;
      item = 42;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1329") && level >= 55) // Scim
    {
      xp = 100;
      item = 1329;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("1299") && level >= 56) // Longsword
    {
      xp = 100;
      item = 1299;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("866") && level >= 57) // Knives
    {
      xp = 50;
      item = 866;
      removeamount = 1;
      maketimes = amounttomake;
    } else if (type.equals("1159") && level >= 57) // Full Helm
    {
      xp = 100;
      item = 1159;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("1181") && level >= 58) // Square shield
    {
      xp = 100;
      item = 1181;
      removeamount = 2;
      maketimes = amounttomake;
    } else if (type.equals("1343") && level >= 59) // Warhammer
    {
      xp = 150;
      item = 1343;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1369") && level >= 60) // Battle axe
    {
      xp = 150;
      item = 1369;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1109") && level >= 61) // Chain
    {
      xp = 150;
      item = 1109;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1197") && level >= 62) // Kite
    {
      xp = 150;
      item = 1197;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1315") && level >= 64) // 2h Sword
    {
      xp = 150;
      item = 1315;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1071") && level >= 66) // Platelegs
    {
      xp = 150;
      item = 1071;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1085") && level >= 66) // PlateSkirt
    {
      xp = 150;
      item = 1085;
      removeamount = 3;
      maketimes = amounttomake;
    } else if (type.equals("1121") && level >= 68) // Platebody
    {
      xp = 250;
      item = 1121;
      removeamount = 5;
      maketimes = amounttomake;
    } else {
      c.sendMessage("You don't have a high enough level to make this armour!");
      c.getPA().closeAllWindows();
      return;
    }

    doaction(c, item, remove, removeamount, maketimes, -1, -1, xp);
  }