Inactive [MECH/RPG] LevelCraft v0.1.7.2 - The leveling up plugin; adds skills to Minecraft [1060+]

Discussion in 'Inactive/Unsupported Plugins' started by Samkio, Jan 25, 2011.

  1. Offline

    Samkio

    [​IMG]

    <Edit by Moderator: Redacted mediafire url>

    LevelCraft v0.1.8- The leveling up plugin; adding skills to Minecraft!

    Slowly moving to BukkitDev: <Edit by Moderator: Redacted mediafire url>


    Version: [617<font color="rgb(51, 102, 255)">+</font>]
    Description:
    LevelCraft is a plugin devised to add a Challenge to Minecraft Single Multiplayer.It denotes normal actions into "Levels" this level is increased via the gaining of "Experience" the experience of which relates to the level. It is fully customizable and due to some recent changes is medium weight. This congratulates the user for doing certain actions. For example the more mining a player does the faster they mine and the better then mine. Makes sense right?

    LevelCraft is licensed under a <Edit by Moderator: Redacted mediafire url> Commons Attribution-NoDerivs 3.0 Unported License[/url].

    <Edit by Moderator: Redacted mediafire url>

    <Edit by Moderator: Redacted mediafire url> Suite.[/url]
    LevelCraftCore:
    <font color="rgb(51, 102, 255)"><font color="rgb(0, 0, 0)">Download:</font> <Edit by Moderator: Redacted mediafire url>
    <font color="rgb(0, 0, 0)"><Edit by Moderator: Redacted mediafire url>

    <font color="rgb(0, 0, 0)">Features:</font>
    * Dyamic ExpBar without the use of a client mod!
    * Support for API Permissions.
    * Improved Code.
    * Compatability with 1.8. :)

    <font color="rgb(0, 0, 0)">

    LevelCraftCore is necessary to have to enable all the level plugins. It is the glue that holds them all together, it also handles the commands and the data storage. It is a beast, a boss and made my the 1337 pro that is Samkio. :cool: "Core' blimey it is mighty good."


    Show Spoiler
    [X] = Outdated.

    [​IMG]
    Mining: Author @<Edit by Moderator: Redacted mediafire url>
    Download <Edit by Moderator: Redacted mediafire url>
    The Mining level depicts the use of the mighty pickaxe. Players leveling up by the mining of blocks enabling them to gain access of new pickaxes and new blocks.
    Features:
    1. Denotes use of Pickaxes. Higher level unlocks better pickaxes.
    2. Denotes block mining. Higher level the more types of blocks they can mine.
    3. Faster Mining. Higher level the faster you can mine.
    4. Double Drops. Higher level the higher your change of the block dropping twice.
    5. FirePick. Higher level unlocks the FirePick. A portable furnace that when mining blocks with golden pickaxe will drop what it would be if smelted.
    ie. CobbleStone -> Stone, IronOre -> IronIngot

    * Gain Experience by Mining.


    ------------------------------------------------------------------------------------------------------
    [​IMG]
    WoodCutting: Author @<Edit by Moderator: Redacted mediafire url>
    Download <Edit by Moderator: Redacted mediafire url>
    The WoodCutting level depicts the use of the hatchet or more commonly know as the axe. Players can gain experience by chopping down trees and planks allowing them to gain access to higher level axes.
    Features:
    6. Denotes usage of hatchets (axes). The higher the level the more axes you can use.
    7. Denotes cutting of logs/wood. The higher the level the more types of log you can cut.
    8. Faster Cutting. The Higher your level the faster you can chop down trees.

    * Gain Experience by chopping trees.

    -------------------------------------------------------------------------------------------------------
    [​IMG]
    Combat: Author @<Edit by Moderator: Redacted mediafire url>
    Download <Edit by Moderator: Redacted mediafire url>
    The Combat level depicts the use of swords on both players and mobs. A true warrior will attain to keep this high.
    Features:
    9. Denotes usage of swords. The higher the level the more swords are unlocked.
    10. PVP Range (Toggleable). Allows players to only attack players withing a range of combat level.

    * Gain Exp by fighting mobs and players.

    -------------------------------------------------------------------------------------------------------
    [​IMG]
    Range: Author @<Edit by Moderator: Redacted mediafire url>
    Download <Edit by Moderator: Redacted mediafire url>
    The Range level depicts how much damage you do per arrow. A handly level for keen archers.
    Works both on Players and Mobs.
    Features:
    11. Greater Damage Arrows. The higher the level the greater damage your arrows do.

    * Gain Experience by attacking mobs and players with a bow.

    -------------------------------------------------------------------------------------------------------
    [​IMG]
    Dexterity: Author @<Edit by Moderator: Redacted mediafire url>
    Download <Edit by Moderator: Redacted mediafire url>
    The Dexterity level allows players to jump higher and run faster with the aid of boots. Level up by jumping. Jumping higher is turned off by default and only applies to Gold and Diamond boots. Players also receieve less Fall Damage with higher levels. (Note. Every attempt to make this level a light a possible has been done. This Level however may contribute a large amount of lag. Due to this LevelUpdates for this level are run every 1min [as upposed to everytime someone moves]).
    Features:
    12. Allows users to run. Crouch to run. Must be wearing boots.
    13. The higher level you are the move boots you unlock.
    14. The higher the level of boot the greater running speed and jumping height.
    15. Survive greater fall damage the higher level you are.

    * Gain Experience by jumping.

    -------------------------------------------------------------------------------------------------------
    [​IMG]
    Farming: Author @<Edit by Moderator: Redacted mediafire url>
    Download <Edit by Moderator: Redacted mediafire url>
    The Farming level depicts how a player is one with the land. It depicts the use of hoes allowing the player to use a greater level of hoe the higher their level. Gain experience via harvesting crops, tilling land and much more. Also adds the ability to obtain apples from trees by farming the leaves.
    Features:
    16. Depicts the level for hoes. The greater level you are the higher level of hoe you can use.
    17. Random chance to yield more wheat from crops the higher level you are.
    18. Random chance to yield Coca Beans from crops the higher level you are


    * Gain Exp for things such as Harvesting crops, tilling land, finding seeds, using bonemeal on crops

    -------------------------------------------------------------------------------------------------------
    [​IMG]
    Digging AKA Excavation: Author @<Edit by Moderator: Redacted mediafire url>
    Download <Edit by Moderator: Redacted mediafire url>
    The Excavation level depicts the use of the shovel. Allowing users to dig greater depths with a higher excavation skill.
    Features:
    19. Depicts the use of shovel. The greater your level higher shovel you can use.
    20. Depicts what blocks you can dig. The greater your level the more block types are dig able.

    * Gain experience by digging.

    -------------------------------------------------------------------------------------------------------
    [​IMG]
    Swimming/Diving: Author @<Edit by Moderator: Redacted mediafire url>
    Download <Edit by Moderator: Redacted mediafire url>
    The Swimming level allows players to use helmets as scuba-diving gear. Having a higher level allows you to stay under water longer, then re-fill your helmet on land.
    Features:
    21. Allows users to wear "scuba-gear" to enhance their breath in water.
    22. The higher level the more scuba-gear obtainable.
    23. Crouch to fill and empty air.

    * Gain Experience by using the scuba gear.

    -------------------------------------------------------------------------------------------------------
    [​IMG]
    Explosives: Author @<Edit by Moderator: Redacted mediafire url>
    Download <Edit by Moderator: Redacted mediafire url>
    The Explosives level depicts your ability with explosive devices. This being TNT, Dynamite Sticks (Redtorch light with lighter), and grenades (eggs Thank to @<Edit by Moderator: Redacted mediafire url> for letting me use this functionality.) This plugin makes explosives really poor damage at the start but as you level up you deal greater damage. Be warned :D
    Features:
    24. Denotes range of Explosives. The higher level you are the more choice of range you can use.
    25. Denotes Levels for TNT. Must be higher than this level to use TNT.
    26. Adds Dynamite and Grenades.
    27. Toggle Grenades with left click.
    28. Light RedStoneTorch with a lighter.
    29. Change Dynamite Range with left click.
    30. Depicts Levels for Dynamite and Grenade.

    * Gain Experience by using TNT,Dynamite and Grenades.

    -------------------------------------------------------------------------------------------------------
    [​IMG]:mad:
    Health[X]: Author @<Edit by Moderator: Redacted mediafire url>:mad:
    Download <Edit by Moderator: Redacted mediafire url>
    The Health level allows players to take greater damage. This is leveled up by getting:mad: damaged.:mad:
    BUGGY. :'( Avoid use.
    -------------------------------------------------------------------------------------------------------
    [​IMG]
    Defence: Author @<Edit by Moderator: Redacted mediafire url>
    Download <Edit by Moderator: Redacted mediafire url>
    The Defence Level depicts the use of armor. Allowing players to wield armor only when they attain the correct level. Level up by using the armor.
    (Disclaimer: not fully tested use at own risk.)
    Features:
    31. Denotes level to use armor. The higher level you are the more armour you can wear.

    * Gain Experience by getting damaged when using armour.

    -------------------------------------------------------------------------------------------------------
    [​IMG]
    Forgery: Author @<Edit by Moderator: Redacted mediafire url>
    Download <Edit by Moderator: Redacted mediafire url>
    The Forgery level, the most configurable level to date, allows users to forge tools, forge armour and repair tools and armour. The higher level you are the more you can forge! Level it up by smelting/repairing and forging items. A truly epic skill if i say so myself. :p
    Features:
    32. Allows tools to be repaired by placing in a furnace.
    33. The higher level you are the greater tools can be repaired.
    34. The higher level you are the more tools/armour that can be forged.
    35. The higher level you are the more blocks that can be smelted.

    * Gain Experience by Repairing,Smelting and Forging.

    -------------------------------------------------------------------------------------------------------
    [​IMG]
    Scavengar: Author @<Edit by Moderator: Redacted mediafire url>
    Download <Edit by Moderator: Redacted mediafire url>
    Users have a small chance of finding 'lost' items in the sand / gravel /dirt /grass.
    The higher level you are, the better chance of finding the items.
    Features:
    36. Allows hidden items to be found when destroying blocks.
    37. The higher level you are the more items that can be found.

    * Gain Experience by finding items.

    -------------------------------------------------------------------------------------------------------
    [​IMG]
    Prayer[X]: Author @<Edit by Moderator: Redacted mediafire url>
    Download <Edit by Moderator: Redacted mediafire url>
    Introducing the new Prayer level! Users can now be at one with the gods. Level up by burying the bones of past victims to gain Prayer Points that allow you to do many functions such as healing and protecting. When your Prayer points are low don't forget to pray at an alter to replenish them!
    Features:
    38. Creates Prayer Points Replenish-able by praying at an alter.
    39. The higher level you are the more prayers you can do.
    40. Prayers use prayer points and must be replenished.

    * Gain experience by using prayers and burying bones.

    -------------------------------------------------------------------------------------------------------
    [​IMG]
    Construction: Author @<Edit by Moderator: Redacted mediafire url> Fixed by: @Samkio
    Download <Edit by Moderator: Redacted mediafire url>
    The construction level depicts what blocks are allowed to be placed. The higher level you are the more blocks that can be placed.

    Features:
    41. Depicts level for block placement.

    * Gain experience by placing blocks.



    Show Spoiler
    LevelsProgess/NeedDeveloper: <font color="rgb(255, 0, 0)">1</font><font color="rgb(255, 153, 0)">-</font><font color="rgb(153, 204, 0)">3</font> Difficulty.
    <font color="rgb(153, 204, 0)">Excavation</font>: COMPLTED.
    <font color="rgb(153, 204, 0)">Combat</font>: COMPLETED
    <font color="rgb(153, 204, 0)">Range:</font> COMPLETED
    <font color="rgb(255, 153, 0)">Forgery</font>: COMPLETED
    <font color="rgb(255, 153, 0)">Dexterity</font>: COMPLETED
    <font color="rgb(153, 204, 0)">PvP</font>: INTEGRATED WITH COMBAT
    <font color="rgb(153, 204, 0)">Swimming</font>: COMPLETED
    <font color="rgb(255, 153, 0)">Thieving</font>: Author @Samkio/<Edit by Moderator: Redacted mediafire url> me[/url]. The ability to steal items from players inventory.
    <font color="rgb(255, 153, 0)">Sorcery</font>: Author @<Edit by Moderator: Redacted mediafire url>. The ability to do a series of magical abilities using a wand (stick).
    <font color="rgb(255, 0, 0)">Necromancy</font>: Author <Edit by Moderator: Redacted mediafire url> me[/url]. The ability to summon agressive mobs (on your side).
    <font color="rgb(255, 153, 0)">Crafting</font>: Author @1337. The ability to craft items.
    <font color="rgb(255, 0, 0)">Dungeonee</font>ring: Author <Edit by Moderator: Redacted mediafire url> me[/url]. The ability to destroy dungeons.
    <font color="rgb(255, 153, 0)">Explosives</font>: COMPLETED
    <font color="rgb(255, 153, 0)">Cooking</font>: Author <Edit by Moderator: Redacted mediafire url> me[/url]. The ability to cook items without burning them.
    <font color="rgb(255, 153, 0)">Prayer</font>: COMPLETED
    <font color="rgb(255, 153, 0)">Health</font>: COMPLETED
    <font color="rgb(255, 153, 0)">Defence</font>: COMPLETED
    <font color="rgb(153, 204, 0)">Angling</font>: Author @<Edit by Moderator: Redacted mediafire url> The ability to catch more fish quicker.
    <font color="rgb(153, 204, 0)">Fletching</font>: Author @Spartan_V23. The ability to craft more arrows.
    <font color="rgb(255, 0, 0)">Merchant</font>: Author <Edit by Moderator: Redacted mediafire url> me[/url]. The ability to sell items. [Possibly have NPC "Traveling Salesman" randomly generated. They will try and sell stuff.]
    <font color="rgb(255, 153, 0)">Engineering</font>: Author <Edit by Moderator: Redacted mediafire url> me[/url]. The ability to engineer transport.
    <font color="rgb(255, 0, 0)">Electrician</font>: Author <Edit by Moderator: Redacted mediafire url> me[/url]. The ability to use redstone.
    <font color="rgb(255, 0, 0)">Tamer</font>: Author <Edit by Moderator: Redacted mediafire url> me[/url]. The ability to tame mobs.
    <font color="rgb(255, 0, 0)">Speech</font>: Author <Edit by Moderator: Redacted mediafire url> me[/url]. The ability to talk. ;) [Possibly have NPC's and have a sort of Persuasion level Possibly could be linked with Merchant]
    <font color="rgb(255, 0, 0)">Survivalist</font>: Author <Edit by Moderator: Redacted mediafire url> me[/url]. The ability to "Survive"
    <font color="rgb(255, 0, 0)">Luck</font>: Author <Edit by Moderator: Redacted mediafire url> me[/url]. The ability to find greater number of ores.
    Could be one Level.
    <font color="rgb(255, 153, 0)">Hunger</font>: Author <Edit by Moderator: Redacted mediafire url> me[/url]. The ability to last longer without food.
    <font color="rgb(255, 153, 0)">Thirst:</font> Author <Edit by Moderator: Redacted mediafire url> me[/url]. The ability to last longer without water.
    <font color="rgb(255, 153, 0)">Fatigue</font>: Author <Edit by Moderator: Redacted mediafire url> me[/url]. The ability to last longer without sleep.
    <font color="rgb(255, 0, 0)">Locksmith</font>: Author @<Edit by Moderator: Redacted mediafire url> Friedrich[/url]. The ability to break into locked chests/doors. (LWC or other protection).
    <font color="rgb(153, 204, 0)">Forager</font>: COMPLETED
    <font color="rgb(153, 204, 0)">Florist</font>: Author <Edit by Moderator: Redacted mediafire url> me[/url]. Get more flowers.
    <font color="rgb(153, 204, 0)">Medicine/Doctor</font>: Author @Samkio. Heal players from poison and damage with bandages and herbal remedies.
    <font color="rgb(153, 204, 0)">Builder</font>: Author <Edit by Moderator: Redacted mediafire url> me[/url]. Build Blocks!
    <font color="rgb(153, 204, 0)">Artist</font>: Author <Edit by Moderator: Redacted mediafire url> me[/url]. Paint Wool with a brush!
    <font color="rgb(153, 204, 0)">Masonary</font>: Author @Torrent. Bricks/Stone etc.
    <font color="rgb(153, 204, 0)">Carpentary</font>: Author PM me. Create wooded items.



    Show Spoiler
    Videos:





    Show Spoiler
    LevelView:
    If you are using MySql to store LevelCraft Data you can use LevelView curtesy of @<Edit by Moderator: Redacted mediafire url> to allow users to view their levels online!
    [​IMG]
    Download: <Edit by Moderator: Redacted mediafire url>


    Show Spoiler
    Love LevelCraft? Express it:
    Code:
    <Edit by Moderator: Redacted mediafire url> <Edit by Moderator: Redacted mediafire url>
    
    
    [spoiler]Translations:
    Dutch: Curtesy of @<Edit by Moderator: Redacted mediafire url> : <Edit by Moderator: Redacted mediafire url>
        German: Curtesy of @<Edit by Moderator: Redacted mediafire url> 			 				[/url]<Edit by Moderator: Redacted mediafire url> : <Edit by Moderator: Redacted mediafire url>
    Polish: Curtesty of @<Edit by Moderator: Redacted mediafire url> : <Edit by Moderator: Redacted mediafire url>
    Swedish: Curtesty of @<Edit by Moderator: Redacted mediafire url> : <Edit by Moderator: Redacted mediafire url>
    French: Curtesty of @<Edit by Moderator: Redacted mediafire url> : <Edit by Moderator: Redacted mediafire url>
    Spanish: Curtesty of @<Edit by Moderator: Redacted mediafire url> [/url]: <Edit by Moderator: Redacted mediafire url>
    Czech: Curtesty of [USER=90570041]@rodier[/USER]@ceskejparan.cz : <Edit by Moderator: Redacted mediafire url> / <Edit by Moderator: Redacted mediafire url>
    
    
    [spoiler]FlatFile to MySQL by @<Edit by Moderator: Redacted mediafire url> : <Edit by Moderator: Redacted mediafire url>
    
    
    [spoiler]LevelCraft is Expanded by Spout!
    Download it here: <Edit by Moderator: Redacted mediafire url>
    Features:
      * Skill Capes - Obtained by Level Mastery.
      * LevelUp Sounds - Sound played on LevelUp.
      * LevelUp Notification - Achievement Style Notification.
      * + More to come![IMG]http://forums.bukkit.org/attachments/2011-08-22_15-20-27-png.6113/?embedded=1[/IMG][/spoiler]
    
    
    Have any issues or ideas?
     Post here: <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Jul 14, 2017
  2. Offline

    Ziden

  3. Offline

    Samkio

    Summer hols soon.
    More time. + Torrent More time. :D
    Maybe get some more devs on board for new levels etc?

    Might add LevelAutoUpdater to the Core save people checking all the time.
     
  4. Offline

    Ziden

    @Samkio im not a so skilled dev like you and torrent are, but surely i can help you with some levels. I have a Thief "beta" with LWC. Its not working but i guess its close to :eek:

    how could i share/discuss sources ? is there any easy way to do that ?

    PS: make auto update disabled if wanted to =x i use a translated , sightly different version of it
     
  5. Offline

    Samkio

    @Ziden
    Ah okay i have an alpha version of theiving. Crouch behind players and right click to see their inv. (Brings up GUI).
    Not sure if it still works. + Needs Level's exp added to it.

    Looks like you are starting with Locksmith then?
    Erm you could start a convosation to talk and use GitHub etc?
     
  6. Offline

    Southpaw018

    On that note, @Samkio, could you possibly get the LC Github repository into a clean state so we can fetch it and start some pull requests? I tried looking through it, but the multiple present versions of LevelCraftCore and some missing levels (Digging, which is currently broken, being the highest profile) make it tough to begin work.
     
  7. Offline

    mbsuperstar1

    We need developer progress reports (samkio reports XD) so we can all work as effectively to bring this plugin together as smoothly as possible with minimal conflicts. ;)

    BigCatch has gone and a new fishing event has appeared... I might be interested. :)

    P.S.: Galipo is really dieing?!!?!?!? :(
     
  8. Offline

    Ziden

    @Samkio

    i never used github, tryed but havent got to it. Im on ubuntu, does this makes thing somehow easyer ?

    Im kinda new to this versioning world. If this helps, its translated to portuguese and it still not using configuration. Not working tho, idk why, no bugs detected.

    Code:
    //Declare the package name
    package me.ziden.thief;
    //Add all the necessary imports.
    import com.griefcraft.lwc.LWC;
    import com.griefcraft.lwc.LWCPlugin;
    import java.io.File;
    import java.io.IOException;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    
    import org.bukkit.event.Event;
    import org.bukkit.plugin.Plugin;
    import org.bukkit.plugin.PluginManager;
    import org.bukkit.plugin.java.JavaPlugin;
    //Start the class.
    public class LCThiev extends JavaPlugin {
        //Assign a logger with the value 'logger'
    
        public final Logger logger = Logger.getLogger("Minecraft");
        //Create a Block Listener.
        private LWC lwc = null;
        //Create a Plugin variable 'thisPlug'
        public Plugin thisPlug;
    
        //onDisable. Called when the plugin is disabled.
        @Override
        public void onDisable() {
            //Log that the plugin has been disabled.
            logger.log(Level.INFO, "[LC] Level Thiev Unloaded");
        }
    
        //onEnable. Called when the plugin is enabled.
        @Override
        public void onEnable() {
            logger.log(Level.INFO, "[LC] Level Thief CARREGANDO");
            //Load this configuration file.
            // Set Reference Keys. 1-4 good.
            logger.log(Level.INFO, "[LC] Level Thief CARREGANDO");
            String[] Args = {"Ladino", "Ladrao", "Ld"};
            getConfiguration().setProperty("ReferenceKeys", Args);
    
            String[] Unlocks = {"Abrir Porta = 1", "Abrir Bau = 20", " Melhor chance a cada Level"};
            //Set data in parallel with Unlocks. (This denotes wethere the user has the unlock or not.)
            int[] UnlocksLevel = {1, 20, 0};
            //Sets the data for /lvl exp <ref>
            String[] Exp = {"Exp por Porta 10 ", "Exp por Bau 20"};
            //Set the LevelExpPer to the Exp Array.
            getConfiguration().setProperty("LevelExpPer", Exp);
            //Set the LevelUnlocksLevel to the UnlocksLevel int array.
            getConfiguration().setProperty("LevelUnlocksLevel", UnlocksLevel);
            //Set the LevelUnlocks to the Unlocks string array.
            getConfiguration().setProperty("LevelUnlocks", Unlocks);
            // Set Level Name.
            getConfiguration().setProperty("LevelName", "Ladino");
            // Set Reference Index (1-2 Characters).
            getConfiguration().setProperty("ReferenceIndex", "Ld");
            // Set Author :3.
            getConfiguration().setProperty("Author", "Ziden");
            // Get the plugin that this one is.
            this.thisPlug = this.getServer().getPluginManager().getPlugin("LCThiev");
            //Get the plugin that LevelCraftCore is.
            Plugin LevelCraftCore = this.getServer().getPluginManager().getPlugin("LevelCraftCore");
            //If the plugin for LevelCraftCore is null then disable the plugin. If not register the events and state that it is loaded.
            if (LevelCraftCore == null) {
                logger.log(Level.SEVERE,
                        "[LC] Could not fine LevelCraftCore. Disabling.");
                this.getServer().getPluginManager().disablePlugin(this);
            } else {
                registerEvents();
                logger.log(Level.INFO, "[LC] Level Thief Loaded");
    
            }
        }
    
        private void registerEvents() {
    
            Plugin lwcPlugin = getServer().getPluginManager().getPlugin("LWC");
    
            if (lwcPlugin != null) {
                if (lwcPlugin.isEnabled()) {
                    lwc = ((LWCPlugin) lwcPlugin).getLWC();
                }
            }
            LwcModule lwcModule = new LwcModule(this);
            if (lwc != null) {
                lwc.getModuleLoader().registerModule(this, lwcModule);
                logger.log(Level.SEVERE,"[LWC - Nivel Ladrao]modulos do LWC LADRAO foram ativados ! WOOHOO !");
            }
    
        }
    }
    
    Code:
    package me.ziden.thief;
    
    import com.griefcraft.lwc.LWC;
    import com.griefcraft.model.Protection;
    import com.griefcraft.model.ProtectionTypes;
    import com.griefcraft.scripting.JavaModule;
    import java.util.List;
    import java.util.Random;
    import me.samkio.levelcraftcore.LevelFunctions;
    import org.bukkit.Material;
    import org.bukkit.block.Chest;
    import org.bukkit.entity.Player;
    
    class LwcModule extends JavaModule {
    
        public LCThiev plugin;
    
        public LwcModule(LCThiev tance) {
            plugin = tance;
        }
    
        // called when a player interacts with a protection
        public Result onProtectionInteract(LWC lwc, Player player, Protection protection, List<String> actions, boolean canAccess, boolean canAdmin) {
    
            if (player.getItemInHand().getType() != Material.FLINT_AND_STEEL) {
                return DEFAULT;
            }
    
            int level = LevelFunctions.getLevel(player, plugin);
     
            // wood door ou iron door 10
            if ((protection.getBlock().getType() == Material.WOODEN_DOOR || protection.getBlock().getType() == Material.IRON_DOOR)) {
                if (!player.getInventory().contains(Material.IRON_INGOT)) {
                    // need iron
                    player.sendMessage("Voce precisa de barras de ferro para abrir portas !");
                    return DEFAULT;
                } else {
                    player.getInventory().remove(Material.IRON_INGOT);
                    Random rnd = new Random();
                    int n = rnd.nextInt(100);
                    if (protection.getBlock().getType() == Material.IRON_DOOR) {
                        n *= 1.2;
                    }
                    if (level < 10) {
                        level = 10;
                    }
                    if (n < level / 2) {
                       // you acessed the door (this time)
                        player.sendMessage("Voce astutamente abre a porta.");
                        LevelFunctions.addExp(player, plugin, 10);
                        if (n < level / 5) { // acerto critico
                            // damn you broke the lock, its public
                            player.sendMessage("Ao abrir a porta, voce consegue quebrar a tranca !");
                            protection.remove();
                        }
                        return ALLOW;
                    } else {
                         // fail
                        player.sendMessage("Voce falhou em abrir a porta");
                    }
                }
            }
    
            // baus (diamante)
            if (protection.getBlock().getType() == Material.CHEST) {
                if(level < 20) {
                    // need lvl 20 meh
                      player.sendMessage("Voce precisa de ladino lvl 20 para abrir baus !");
                     return DEFAULT;
                }
                if (!player.getInventory().contains(Material.DIAMOND)) {
                   // need diamonds
                    player.sendMessage("Voce precisa de diamantes para abrir baus !");
                    return DEFAULT;
                } else {
                    player.getInventory().remove(Material.DIAMOND);
                    Random rnd = new Random();
                    int exp = 20;
                    int r = rnd.nextInt(100);
                    double chance = 0.5;
                    if (protection.getBlock() instanceof Chest) {
                        Chest c = (Chest) protection.getBlock();
                        // tricky part, (Chest) casting on protection.getBlock() works ?
                        if (!c.getInventory().contains(Material.IRON_INGOT) && c.getInventory().getContents().length < 5 && !c.getInventory().contains(Material.DIAMOND)) {
                            exp -= 10;
                            chance += 5;
                        }
                    }
    
                    if (level > 30) {
                        chance += 0.5;
                    }
                    if (level > 60) {
                        chance += 0.5;
                    }
                    if (level > 80) {
                        chance += 0.5;
                    }
                    if (level > 90) {
                        chance += 0.5;
                    }
                    if (level > 99) {
                        chance += 0.5;
                    }
                    if (chance > r) {
                       // you broke it, its public !
                        player.sendMessage("Com uma violenta diamantada voce consegue quebrar o trinco do bau !");
                        LevelFunctions.addExp(player, plugin, exp);
                        protection.remove();
                    } else {
                        // fail
                        player.sendMessage("Voce falhou em abrir o bau !");
                    }
                }
            }
     
            return DEFAULT;
        }
    }
    
    I know this is not the best way to share it, but i dont know better ways :D yet [pig]

    Its fairly simple, the LWC plugin developer told me to do this 'lwc module' class in his topic.
    If it worked i would add configuration to it later on, and could do what u guys call a 'pull request' on a english version of it. First i gotta know why is this nawt working.
     
  9. Offline

    Samkio

    @Ziden
    By "Not Working" what do you mean?
     
  10. Offline

    killerx243

    I love this mod.
     
  11. Offline

    javabudd

    Does anyone here know how to convert the flatfile data to a mysql database? I had my levelcraft set on flatfile but now that there are a decent amount of users on my server I need to switch over to mysql without losing user data. Any ideas?
     
  12. Writing a php-script? :)
    Can you give me a copy of one of your flatfiles?
    Mabye i can write a little script tomorrow.
     
  13. Offline

    javabudd

  14. Oh it's a simple line-separated file, that's easy! :)
    Tomorrow the script will be online :)
     
  15. Offline

    javabudd

    Ok thank you so much, we should message the plugin author and see if he can post your script on the main page, I assume it's going to be very useful for some people.
     
  16. Offline

    Samkio

  17. Ohh of course!
    Would be great, if one or two could test it.
    Works for me, but i think it should work for other, too ;)
     
  18. Offline

    javabudd

    testing it right now

    your script works but i ran into a problem, in unix names are case sentitive so the database experiencetable needs to be called ExperienceTable for it to work. THANK YOU SOOOO MUCH! <3 <3 <3

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 18, 2016
  19. Okay, then i will change the code, so the user has to edit the table-name.
    I'm running a windows-server and it's "experiencetable" :)
    Will change and upload it again.

    *Edit: Done, now the user has to edit it*
     
  20. Offline

    Duckdoom5

    @Samkio I found a little bug, if you mine something you can't mine (because you don't have the lvl) you still get the damage on your tool.
    and, if you place a cheated block than you can get - exp (ex: -10 exp) don't know if you would call this a bug
     
  21. Offline

    Samkio

    @Duckdoom5
    It dosn't get damaged. Your Client thinks it does and will show it losing damage.
    Relog and it will still be full.

    Not a bug you can turn off/on in the mine config.
     
  22. Offline

    nico2111

    can I change the name of the levels?
     
  23. Offline

    Chromana

    Does this have multiworld support? I'd be using MultiVerse and I want to have one normal world and one RPG world using this plugin. Or if you know of some plugin which restricts other plugins to certain worlds that would be good.

    Thanks.
     
  24. I don't know if it's MultiVerse support, but there is MultiWorld support, so yeah, you can use two different worlds.
     
  25. Offline

    vDepth

  26. Offline

    Samkio

  27. Offline

    Moe041991

    is a construction fix planned? :)
     
  28. Offline

    Duckdoom5

    ok, good to know

    edit: oh and with the - exp i mean that you can gat a totla exp of -# and not the fact you get - wxp from placing a block
     
  29. Offline

    amant94

    i noticed the flame pick in mining and flame level, what is that and how does it work?
     
  30. Offline

    Flenix

    @Samkio
    Posted this a while back, no reply. I watch the thread regularly, and I've not seen anyone else post THIS bug (just other forging ones) (sometimes the other devs release betas in the thread which I like to test)

    "Anyway, bug in Forgery: if you try to create for example, 27 iron helmets, you'd naturally put the materials for 27 helmets in then just make 27 together. However, you only get the XP once.
    If you them remove all the materials and readd them and make another helmet, you get the XP again. its VERY slow and tedious though.. any chance of a fix?"

    Another thing too while I'm here:
    How is the Magic level coming along? The dev of the Magic plugin (NathanWolf) plays our server, so I might talk to him about hooking his plugin into the LevelCraft system if you like, depending on how easy it is. He'd probably split it into a few different levels though, depending on types of spells (eg combat magic, support magic etc)
     

Share This Page