Added unlock levels for repairing Iron/Gold/Stone. Added configurable

ranks for Arcane Forging.
This commit is contained in:
GJ 2012-02-21 14:19:11 -05:00
parent 9ef9ffd16f
commit 5c63e9779e
13 changed files with 37 additions and 37 deletions

View File

@ -45,8 +45,6 @@ public class RepairCommand implements CommandExecutor {
player.sendMessage(mcLocale.getString("m.ArcaneForgingRank", new Object[] { Repair.getArcaneForgingRank(PP) }));
player.sendMessage(mcLocale.getString("m.ArcaneEnchantKeepChance", new Object[] { Repair.getEnchantChance(Repair.getArcaneForgingRank(PP)) }));
player.sendMessage(mcLocale.getString("m.ArcaneEnchantDowngradeChance", new Object[] { Repair.getDowngradeChance(Repair.getArcaneForgingRank(PP)) }));
player.sendMessage(mcLocale.getString("m.ArcaneForgingMilestones"));
player.sendMessage(mcLocale.getString("m.ArcaneForgingMilestones2"));
return true;
}

View File

@ -49,7 +49,8 @@ public class LoadProperties {
pvpxp, miningrequirespickaxe, excavationRequiresShovel,
woodcuttingrequiresaxe, anvilmessages, mayDowngradeEnchants,
mayLoseEnchants, fishingDrops, aDisplayNames, pDisplayNames, enableSmoothToMossy,
enableDirtToGrass, statsTracking, eventCallback, herbalismHungerBonus;
enableDirtToGrass, statsTracking, eventCallback, herbalismHungerBonus,
repairArmor, repairTools;
public static String MySQLtablePrefix, MySQLuserName,
MySQLserverName, MySQLdbName, MySQLdbPass, nWood, nStone,
@ -72,7 +73,8 @@ public class LoadProperties {
levelCapAcrobatics, levelCapArchery, levelCapAxes, levelCapExcavation,
levelCapFishing, levelCapHerbalism, levelCapMining, levelCapRepair,
levelCapSwords, levelCapTaming, levelCapUnarmed, levelCapWoodcutting,
anvilID, saveInterval, fishingTier1, fishingTier2, fishingTier3, fishingTier4, fishingTier5;
anvilID, saveInterval, fishingTier1, fishingTier2, fishingTier3, fishingTier4, fishingTier5,
repairStoneLevel, repairIronLevel, repairGoldLevel, arcaneRank1, arcaneRank2, arcaneRank3, arcaneRank4;
public static double xpbackground_r, xpbackground_g, xpbackground_b,
xpborder_r, xpborder_g, xpborder_b, fishing_r, fishing_g,
@ -318,7 +320,12 @@ public class LoadProperties {
miningrequirespickaxe = readBoolean("Skills.Mining.Requires_Pickaxe", true);
excavationRequiresShovel = readBoolean("Skills.Excavation.Requires_Shovel", true);
woodcuttingrequiresaxe = readBoolean("Skills.Woodcutting.Requires_Axe", true);
repairArmor = readBoolean("Skills.Repair.Can_Repair_Armor", true);
repairTools = readBoolean("Skills.Repair.Can_Repair_Tools", true);
repairdiamondlevel = readInteger("Skills.Repair.Diamond.Level_Required", 50);
repairIronLevel = readInteger("Skills.Repair.Iron.Level_Required", 0);
repairGoldLevel = readInteger("Skills.Repair.Gold.Level_Required", 0);
repairStoneLevel = readInteger("Skills.Repair.Stone.Level_Required", 0);
tamingxpmodifier = readDouble("Experience.Formula.Multiplier.Taming", 1.0);
miningxpmodifier = readDouble("Experience.Formula.Multiplier.Mining", 1.0);
@ -369,11 +376,15 @@ public class LoadProperties {
downgradeRank2 = readInteger("Arcane_Forging.Downgrades.Chance.Rank_2", 50);
downgradeRank3 = readInteger("Arcane_Forging.Downgrades.Chance.Rank_3", 25);
downgradeRank4 = readInteger("Arcane_Forging.Downgrades.Chance.Rank_4", 15);
mayLoseEnchants = readBoolean("Arcane_Forging.May_Lose_Enchants.Enabled", true);
mayLoseEnchants = readBoolean("Arcane_Forging.May_Lose_Enchants", true);
keepEnchantsRank1 = readInteger("Arcane_Forging.Keep_Enchants.Chance.Rank_1", 10);
keepEnchantsRank2 = readInteger("Arcane_Forging.Keep_Enchants.Chance.Rank_2", 20);
keepEnchantsRank3 = readInteger("Arcane_Forging.Keep_Enchants.Chance.Rank_3", 30);
keepEnchantsRank4 = readInteger("Arcane_Forging.Keep_Enchants.Chance.Rank_4", 40);
arcaneRank1 = readInteger("Arcane_Forging.Rank_Levels.Rank_1", 100);
arcaneRank2 = readInteger("Arcane_Forging.Rank_Levels.Rank_2", 250);
arcaneRank3 = readInteger("Arcane_Forging.Rank_Levels.Rank_3", 500);
arcaneRank4 = readInteger("Arcane_Forging.Rank_Levels.Rank_4", 750);
fishingDrops = readBoolean("Fishing.Drops_Enabled", true);
fishingTier1 = readInteger("Fishing.Tier_Levels.Tier1", 0);

View File

@ -76,7 +76,7 @@ public class Repair {
/*
* REPAIR ARMOR
*/
if(isArmor(is)){
if(isArmor(is) && LoadProperties.repairArmor){
//DIAMOND ARMOR
if(isDiamondArmor(is) && hasItem(player, rDiamond) && PP.getSkillLevel(SkillType.REPAIR) >= LoadProperties.repairdiamondlevel){
@ -94,7 +94,7 @@ public class Repair {
}
//IRON ARMOR
else if (isIronArmor(is) && hasItem(player, rIron)){
else if (isIronArmor(is) && hasItem(player, rIron) && PP.getSkillLevel(SkillType.REPAIR) >= LoadProperties.repairIronLevel){
removeItem(player, rIron);
repairItem(player, enchants, enchantsLevel);
@ -109,7 +109,7 @@ public class Repair {
}
//GOLD ARMOR
else if (isGoldArmor(is) && hasItem(player, rGold)){
else if (isGoldArmor(is) && hasItem(player, rGold) && PP.getSkillLevel(SkillType.REPAIR) >= LoadProperties.repairGoldLevel){
removeItem(player, rGold);
repairItem(player, enchants, enchantsLevel);
@ -147,10 +147,10 @@ public class Repair {
/*
* REPAIR TOOLS
*/
if(isTools(is)){
if(isTools(is) && LoadProperties.repairTools){
//STONE TOOLS
if(isStoneTools(is) && hasItem(player, rStone)){
if(isStoneTools(is) && hasItem(player, rStone) && PP.getSkillLevel(SkillType.REPAIR) >= LoadProperties.repairStoneLevel){
removeItem(player, rStone);
repairItem(player, enchants, enchantsLevel);
@ -188,7 +188,7 @@ public class Repair {
}
//IRON TOOLS
else if(isIronTools(is) && hasItem(player, rIron)){
else if(isIronTools(is) && hasItem(player, rIron) && PP.getSkillLevel(SkillType.REPAIR) >= LoadProperties.repairIronLevel){
removeItem(player, rIron);
repairItem(player, enchants, enchantsLevel);
@ -231,7 +231,7 @@ public class Repair {
}
//GOLD TOOLS
else if(isGoldTools(is) && hasItem(player, rGold)){
else if(isGoldTools(is) && hasItem(player, rGold) && PP.getSkillLevel(SkillType.REPAIR) >= LoadProperties.repairGoldLevel){
removeItem(player, rGold);
repairItem(player, enchants, enchantsLevel);
@ -291,16 +291,16 @@ public class Repair {
public static int getArcaneForgingRank(PlayerProfile PP){
int rank = 0;
if(PP.getSkillLevel(SkillType.REPAIR) >= 750)
if(PP.getSkillLevel(SkillType.REPAIR) >= LoadProperties.arcaneRank4)
rank = 4;
else if (PP.getSkillLevel(SkillType.REPAIR) >= 500)
else if (PP.getSkillLevel(SkillType.REPAIR) >= LoadProperties.arcaneRank3)
rank = 3;
else if(PP.getSkillLevel(SkillType.REPAIR) >= 250)
else if(PP.getSkillLevel(SkillType.REPAIR) >= LoadProperties.arcaneRank2)
rank = 2;
else if (PP.getSkillLevel(SkillType.REPAIR) >= 100)
else if (PP.getSkillLevel(SkillType.REPAIR) >= LoadProperties.arcaneRank1)
rank = 1;
return rank;

View File

@ -48,14 +48,18 @@ Items:
# Settings for Arcane Forging
###
Arcane_Forging:
May_Lose_Enchants: true
Rank_Levels:
Rank_1: 100
Rank_2: 250
Rank_3: 500
Rank_4: 750
Keep_Enchants:
Chance:
Rank_4: 40
Rank_3: 30
Rank_2: 20
Rank_1: 10
May_Lose_Enchants:
Enabled: true
Downgrades:
Enabled: true
Chance:
@ -113,6 +117,8 @@ Skills:
Level_Cap: 0
Anvil_Messages: true
Anvil_ID: 42
Can_Repair_Armor: true
Can_Repair_Tools: true
Leather:
Name: Leather
ID: 334
@ -121,15 +127,18 @@ Skills:
ID: 287
Stone:
Name: Cobblestone
Level_Required: 0
ID: 4
Wood:
Name: Wood Planks
ID: 5
Gold:
Name: Gold Bars
Level_Required: 0
ID: 266
Iron:
Name: Iron Bars
Level_Required: 0
ID: 265
Diamond:
Name: Diamond
@ -216,7 +225,7 @@ Experience:
###
Fishing:
Drops_Enabled: true
Tier_Level2:
Tier_Levels:
Tier1: 0
Tier2: 200
Tier3: 400

View File

@ -374,8 +374,6 @@ m.EffectsRepair5_1=[[AQUA]]Verzauberte Gegenstaende reparieren
m.ArcaneForgingRank=[[YELLOW]]Arkanes Schmieden: [[GREEN]]Rang {0}/4
m.ArcaneEnchantKeepChance=[[AQUA]]AS Erfolgs-Chance: [[GREEN]]{0}%
m.ArcaneEnchantDowngradeChance=[[AQUA]]AS Downgrade-Chance: [[GREEN]]{0}%
m.ArcaneForgingMilestones=[[YELLOW]][TIP]Arkanes Schmieden: [[AQUA]]Rang 1 = 100+, Rang 2 = 250+,
m.ArcaneForgingMilestones2=[[AQUA]] Rang 3 = 500+, Rang 4 = 750+
Fishing.MagicFound=[[AQUA]]Du hast etwas magisches gefunden...
Fishing.ItemFound=[[AQUA]]Du hast einen Schatz gefunden!
m.SkillFishing=Angeln (Fishing)

View File

@ -367,8 +367,6 @@ m.EffectsRepair5_1=Repair magic items
m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
Fishing.ItemFound=[[GRAY]]Treasure found!
m.SkillFishing=FISHING

View File

@ -367,8 +367,6 @@ m.EffectsRepair5_1=Repair magic items
m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
Fishing.ItemFound=[[GRAY]]Treasure found!
m.SkillFishing=FISHING

View File

@ -346,8 +346,6 @@ m.EffectsRepair5_1=Repair magic items
m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
Fishing.ItemFound=[[GRAY]]Treasure found!
m.SkillFishing=FISHING

View File

@ -367,8 +367,6 @@ m.EffectsRepair5_1=Repair magic items
m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
Fishing.ItemFound=[[GRAY]]Treasure found!
m.SkillFishing=FISHING

View File

@ -373,8 +373,6 @@ m.EffectsRepair5_1=Repair magic items
m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
Fishing.ItemFound=[[GRAY]]Treasure found!
m.SkillFishing=FISHING

View File

@ -367,8 +367,6 @@ m.EffectsRepair5_1=Repair magic items
m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
Fishing.ItemFound=[[GRAY]]Treasure found!
m.SkillFishing=FISHING

View File

@ -377,8 +377,6 @@ m.EffectsRepair5_1=Repair magic items
m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
Fishing.ItemFound=[[GRAY]]Treasure found!
m.SkillFishing=FISHING

View File

@ -359,8 +359,6 @@ m.EffectsRepair5_1=Repair magic items
m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
Fishing.ItemFound=[[GRAY]]Treasure found!
m.SkillFishing=FISHING