diff --git a/mcMMO/com/bukkit/nossr50/mcMMO/mcPlayerListener.java b/mcMMO/com/bukkit/nossr50/mcMMO/mcPlayerListener.java index b34fcef2b..cc7ab4741 100644 --- a/mcMMO/com/bukkit/nossr50/mcMMO/mcPlayerListener.java +++ b/mcMMO/com/bukkit/nossr50/mcMMO/mcPlayerListener.java @@ -140,7 +140,7 @@ public class mcPlayerListener extends PlayerListener { mcm.getInstance().removeIron(player); mcUsers.getProfile(player).skillUpRepair(1); player.sendMessage(ChatColor.YELLOW+"Repair skill increased by 1. Total ("+mcUsers.getProfile(player).getRepair()+")"); - } else if (mcm.getInstance().isDiamondTools(is) && mcm.getInstance().hasDiamond(player) && mcUsers.getProfile(player).getRepairInt() > 50){ //Check if its diamond and the player has diamonds + } else if (mcm.getInstance().isDiamondTools(is) && mcm.getInstance().hasDiamond(player) && mcUsers.getProfile(player).getRepairInt() >= 50){ //Check if its diamond and the player has diamonds is.setDurability(mcm.getInstance().getToolRepairAmount(is, durability, player)); mcm.getInstance().removeDiamond(player); mcUsers.getProfile(player).skillUpRepair(1); @@ -196,9 +196,9 @@ public class mcPlayerListener extends PlayerListener { player.sendMessage(ChatColor.GREEN+"~~UNARMED INFO~~"); player.sendMessage(ChatColor.GREEN+"Gaining Skill: "+ChatColor.DARK_GRAY+"Punching monsters and players."); player.sendMessage(ChatColor.GREEN+"~~EFFECTS~~"); - player.sendMessage(ChatColor.GRAY+"Damage scales with unarmed skill. The first damage increase happens"); - player.sendMessage(ChatColor.DARK_GRAY+" at 50 skill. At very high skill levels, you will gain a proc"); - player.sendMessage(ChatColor.DARK_GRAY+"to disarm opponents on hit"); + player.sendMessage(ChatColor.GRAY+"Damage scales with unarmed skill. The first damage increase"); + player.sendMessage(ChatColor.DARK_GRAY+"happens at 50 skill. At very high skill levels, you will"); + player.sendMessage(ChatColor.DARK_GRAY+"gain a proc to disarm opponents on hit"); } if(split[0].equalsIgnoreCase("/herbalism")){ event.setCancelled(true); @@ -214,8 +214,9 @@ public class mcPlayerListener extends PlayerListener { player.sendMessage(ChatColor.GREEN+"Gaining Skill: "+ChatColor.DARK_GRAY+"Digging."); player.sendMessage(ChatColor.GREEN+"~~EFFECTS~~"); player.sendMessage(ChatColor.GRAY+"You will find treasures while digging based on your excavation,"); - player.sendMessage(ChatColor.GRAY+"and at high levels the rewards are quite nice. The item you get"); - player.sendMessage(ChatColor.GRAY+"depend on the block you're digging. They all give diffrent stuff."); + player.sendMessage(ChatColor.GRAY+"and at high levels the rewards are quite nice. The items you get"); + player.sendMessage(ChatColor.GRAY+"depend on the block you're digging."); + player.sendMessage(ChatColor.GRAY+"Different blocks give diffrent stuff."); } if(split[0].equalsIgnoreCase("/mcmmo")){ event.setCancelled(true); diff --git a/mcMMO/com/bukkit/nossr50/mcMMO/mcUsers.java b/mcMMO/com/bukkit/nossr50/mcMMO/mcUsers.java index 24c11fd3c..1fb02ad45 100644 --- a/mcMMO/com/bukkit/nossr50/mcMMO/mcUsers.java +++ b/mcMMO/com/bukkit/nossr50/mcMMO/mcUsers.java @@ -37,7 +37,6 @@ public class mcUsers { try { writer = new FileWriter(location); writer.write("#Storage place for user information\r\n"); - writer.write("#username:nickname:suffix:tag:ignore,list,names:alias,commands,here\r\n"); } catch (Exception e) { log.log(Level.SEVERE, "Exception while creating " + location, e); } finally { @@ -230,9 +229,7 @@ class PlayerList if(character.length > 9) herbalism = character[9]; if(character.length > 10) - repair = character[10]; - if(character.length > 11) - excavation = character[11]; + excavation = character[10]; in.close(); return true; } diff --git a/mcMMO/com/bukkit/nossr50/mcMMO/mcm.java b/mcMMO/com/bukkit/nossr50/mcMMO/mcm.java index 23cc5189f..7bffd2e70 100644 --- a/mcMMO/com/bukkit/nossr50/mcMMO/mcm.java +++ b/mcMMO/com/bukkit/nossr50/mcMMO/mcm.java @@ -276,7 +276,15 @@ public class mcm { Location loc = block.getLocation(); ItemStack is = null; Material mat = null; - //DIRT OR GRAVEL + if(type == 2 && mcUsers.getProfile(player).getExcavationInt() > 250){ + //CHANCE TO GET APPLES + if(Math.random() * 100 > 99){ + mat = Material.getMaterial(260); + is = new ItemStack(mat, 1, (byte)0, (byte)0); + loc.getWorld().dropItemNaturally(loc, is); + } + } + //DIRT SAND OR GRAVEL if(type == 3 || type == 13 || type == 2){ if(Math.random() * 10 > 9){ mcUsers.getProfile(player).skillUpExcavation(1); @@ -284,23 +292,27 @@ public class mcm { } if(mcUsers.getProfile(player).getExcavationInt() > 750){ + //CHANCE TO GET CAKE if(Math.random() * 2000 > 1999){ mat = Material.getMaterial(354); is = new ItemStack(mat, 1, (byte)0, (byte)0); loc.getWorld().dropItemNaturally(loc, is); } } - if(mcUsers.getProfile(player).getExcavationInt() > 500 && type == 3){ + if(mcUsers.getProfile(player).getExcavationInt() > 500){ + //CHANCE TO GET MUSIC if(Math.random() * 1000 > 999){ mat = Material.getMaterial(2256); is = new ItemStack(mat, 1, (byte)0, (byte)0); loc.getWorld().dropItemNaturally(loc, is); } + //CHANCE TO GET MUSIC if(Math.random() * 1000 > 999){ mat = Material.getMaterial(2257); is = new ItemStack(mat, 1, (byte)0, (byte)0); loc.getWorld().dropItemNaturally(loc, is); } + //CHANCE TO GET DIAMOND if(Math.random() * 500 > 499){ mat = Material.getMaterial(264); is = new ItemStack(mat, 1, (byte)0, (byte)0); @@ -308,22 +320,26 @@ public class mcm { } } } + //SAND if(type == 12){ if(Math.random() * 10 > 9){ mcUsers.getProfile(player).skillUpExcavation(1); player.sendMessage(ChatColor.YELLOW+"Excavation skill increased by 1. Total ("+mcUsers.getProfile(player).getExcavationInt()+")"); } + //CHANCE TO GET GLOWSTONE if(mcUsers.getProfile(player).getExcavationInt() > 50 && Math.random() * 100 > 95){ mat = Material.getMaterial(348); is = new ItemStack(mat, 1, (byte)0, (byte)0); loc.getWorld().dropItemNaturally(loc, is); } + //CHANCE TO GET DIAMOND if(mcUsers.getProfile(player).getExcavationInt() > 500 && Math.random() * 500 > 499){ mat = Material.getMaterial(264); is = new ItemStack(mat, 1, (byte)0, (byte)0); loc.getWorld().dropItemNaturally(loc, is); } + //CHANCE TO GET COAL if(mcUsers.getProfile(player).getExcavationInt() > 125){ if(Math.random() * 2000 > 1999){ mat = Material.getMaterial(263); @@ -332,20 +348,32 @@ public class mcm { } } } - + //GRASS OR DIRT if((type == 2 || type == 3) && mcUsers.getProfile(player).getExcavationInt() > 25){ + //CHANCE TO GET GLOWSTONE if(Math.random() * 10 > 7){ mat = Material.getMaterial(348); is = new ItemStack(mat, 1, (byte)0, (byte)0); loc.getWorld().dropItemNaturally(loc, is); } } - if(type == 13 && mcUsers.getProfile(player).getExcavationInt() > 75){ + //GRAVEL + if(type == 13){ + //CHANCE TO GET SULPHUR + if(mcUsers.getProfile(player).getExcavationInt() > 75){ if(Math.random() * 10 > 7){ mat = Material.getMaterial(289); is = new ItemStack(mat, 1, (byte)0, (byte)0); loc.getWorld().dropItemNaturally(loc, is); } + } + if(mcUsers.getProfile(player).getExcavationInt() > 175){ + if(Math.random() * 10 > 6){ + mat = Material.getMaterial(352); + is = new ItemStack(mat, 1, (byte)0, (byte)0); + loc.getWorld().dropItemNaturally(loc, is); + } + } } } public void woodCuttingProcCheck(Player player, Block block, Location loc){ diff --git a/mcMMO/plugin.yml b/mcMMO/plugin.yml index c0750f9e9..e4b54c82e 100644 --- a/mcMMO/plugin.yml +++ b/mcMMO/plugin.yml @@ -1,3 +1,3 @@ name: mcMMO main: com.bukkit.nossr50.mcMMO.mcMMO -version: 0.3 \ No newline at end of file +version: 0.3.1 \ No newline at end of file