Inactive [RPG/FUN] Thieves 1.2.4 - Steal items from other players [1.2.5-R1.0]

Discussion in 'Inactive/Unsupported Plugins' started by Snaipe, Jan 27, 2012.

  1. Offline

    Snaipe

    Thieves
    v1.2.2​

    This plugin does just as the title says : It adds the possibility for players to steal other players. SpoutPlugin is required ( the client is not, though ). Spout is no longer required since 1.2.2.

    How to use :
    Show Spoiler
    The thief must be behind the targeted player, and sneaking. Right-clicking with those conditions on the player will open his inventory as a chest.
    There, the thief can steal any item one by one. Each item steal has a probability of success.
    If the player fails to steal the item, the target will recieve a notification.
    Each stealing attempts will add the item value to a gauge. If the gauge is filled, the thief cannot steal the player anymore on this attempt. The gauge's capacity increases with the thief's level.
    Each successful stealing will add the item's value to the thief's experience.
    If the thief gets seen by either the victim or by other players within a range defined in the settings, he will get stunned for a configurable amount of time.

    The stealing probability of an item is calculated with the formula :
    probability = 100 * ( 1 - item value * enchantment multiplier / ( thief level + 9 ) )

    where enchantment multiplier = 1 + ( number of enchantments + sum of enchantments' levels ) * enchantment unit multiplier

    The required experience to get to a level is calculated with the formula :
    exp required = ceiling( 100 * ( 1.6681 ^ ( level - 1 ) ) )

    The total experience of a player is the sum of the values of every items the thief have stolen so far.


    Configuration :
    Show Spoiler

    config.yml
    Code:
    worlds:
        - world
    general:
        # The time the theif should be stunned upon discovery ( in seconds )
        stun-time: 5
        # The maximal range a thief must be to keep stealing somebody.
        theft-range: 4
        # The radius around the thief where another player can detect him.
        detection-radius: 2
        # Whenever the thief can steal in other player's hotbars
        can-steal-in-hotbar: true
        # Whenever the thief can steal in non-pvp regions
        can-steal-in-non-pvp-area: false
        # Must the players have their thief level defined with permission ?
        permission-levels: false
        # The cooldown time ( in seconds )
        cooldown: 60
        # The enchantment unit multiplier - The higher this value is, the harder it will be to steal an enchanted item.
        enchantment-unit-multiplier: 0.115
    language:
        enabled: "Theft have been enabled on the server."
        disabled: "Theft have been disabled on the server."
        you-have-been-discovered: "You have been discovered, and the victim stunned you with anger."
        victim-is-too-far: "The victim is too far from you."
        thief-spotted: "You feel that something is moving inside your pocket."
        cannot-rob-player: "You cannot rob this player."
        cannot-steal-in-non-pvp-area: "You cannot steal in non-PvP area."
        cooldown-not-finished: "Your cooldown is not finished."
        level-up: "You just leveled up !"
        level: "Level"
        experience: "Experience"
        next-level: "Next level"
    
    items.yml
    Code:
    items:
        # Items values MUST BE from 1 to 10. Any invalid values will default to 1. If the item can't be found, it's value will default to 1 too.
        APPLE: 1
        ARROW: 1
        BED: 1
        BEDROCK: 1
        BED_BLOCK: 1
        BLAZE_POWDER: 1
        BLAZE_ROD: 1
        BOAT: 1
        BONE: 1
        BOOK: 1
        BOOKSHELF: 1
        BOW: 1
        BOWL: 1
        BREAD: 1
        BREWING_STAND: 1
        BREWING_STAND_ITEM: 1
        BRICK: 1
        BRICK_STAIRS: 1
        BROWN_MUSHROOM: 1
        BUCKET: 1
        BURNING_FURNACE: 1
        CACTUS: 1
        CAKE: 1
        CAKE_BLOCK: 1
        CAULDRON: 1
        CAULDRON_ITEM: 1
        CHAINMAIL_BOOTS: 1
        CHAINMAIL_CHESTPLATE: 1
        CHAINMAIL_HELMET: 1
        CHAINMAIL_LEGGINGS: 1
        CHEST: 1
        CLAY: 1
        CLAY_BALL: 1
        CLAY_BRICK: 1
        COAL: 1
        COAL_ORE: 1
        COBBLESTONE: 1
        COBBLESTONE_STAIRS: 1
        COMPASS: 1
        COOKED_BEEF: 1
        COOKED_CHICKEN: 1
        COOKED_FISH: 1
        COOKIE: 1
        CROPS: 1
        DEAD_BUSH: 1
        DETECTOR_RAIL: 1
        DIAMOND: 1
        DIAMOND_AXE: 1
        DIAMOND_BLOCK: 1
        DIAMOND_BOOTS: 1
        DIAMOND_CHESTPLATE: 1
        DIAMOND_HELMET: 1
        DIAMOND_HOE: 1
        DIAMOND_LEGGINGS: 1
        DIAMOND_ORE: 1
        DIAMOND_PICKAXE: 1
        DIAMOND_SPADE: 1
        DIAMOND_SWORD: 1
        DIODE: 1
        DIODE_BLOCK_OFF: 1
        DIODE_BLOCK_ON: 1
        DIRT: 1
        DISPENSER: 1
        DOUBLE_STEP: 1
        DRAGON_EGG: 1
        EGG: 1
        ENCHANTMENT_TABLE: 1
        ENDER_PEARL: 1
        ENDER_PORTAL: 1
        ENDER_PORTAL_FRAME: 1
        ENDER_STONE: 1
        EYE_OF_ENDER: 1
        FEATHER: 1
        FENCE: 1
        FENCE_GATE: 1
        FERMENTED_SPIDER_EYE: 1
        FIRE: 1
        FISHING_ROD: 1
        FLINT: 1
        FLINT_AND_STEEL: 1
        FURNACE: 1
        GHAST_TEAR: 1
        GLASS: 1
        GLASS_BOTTLE: 1
        GLOWING_REDSTONE_ORE: 1
        GLOWSTONE: 1
        GLOWSTONE_DUST: 1
        GOLDEN_APPLE: 1
        GOLD_AXE: 1
        GOLD_BLOCK: 1
        GOLD_BOOTS: 1
        GOLD_CHESTPLATE: 1
        GOLD_HELMET: 1
        GOLD_HOE: 1
        GOLD_INGOT: 1
        GOLD_LEGGINGS: 1
        GOLD_NUGGET: 1
        GOLD_ORE: 1
        GOLD_PICKAXE: 1
        GOLD_RECORD: 1
        GOLD_SPADE: 1
        GOLD_SWORD: 1
        GRASS: 1
        GRAVEL: 1
        GREEN_RECORD: 1
        GRILLED_PORK: 1
        HUGE_MUSHROOM_: 1
        HUGE_MUSHROOM_: 1
        ICE: 1
        INK_SACK: 1
        IRON_AXE: 1
        IRON_BLOCK: 1
        IRON_BOOTS: 1
        IRON_CHESTPLATE: 1
        IRON_DOOR: 1
        IRON_DOOR_BLOCK: 1
        IRON_FENCE: 1
        IRON_HELMET: 1
        IRON_HOE: 1
        IRON_INGOT: 1
        IRON_LEGGINGS: 1
        IRON_ORE: 1
        IRON_PICKAXE: 1
        IRON_SPADE: 1
        IRON_SWORD: 1
        JACK_O_LANTERN: 1
        JUKEBOX: 1
        LADDER: 1
        LAPIS_BLOCK: 1
        LAPIS_ORE: 1
        LAVA: 1
        LAVA_BUCKET: 1
        LEATHER: 1
        LEATHER_BOOTS: 1
        LEATHER_CHESTPLATE: 1
        LEATHER_HELMET: 1
        LEATHER_LEGGINGS: 1
        LEAVES: 1
        LEVER: 1
        LOCKED_CHEST: 1
        LOG: 1
        LONG_GRASS: 1
        MAGMA_CREAM: 1
        MAP: 1
        MELON: 1
        MELON_BLOCK: 1
        MELON_SEEDS: 1
        MELON_STEM: 1
        MILK_BUCKET: 1
        MINECART: 1
        MOB_SPAWNER: 1
        MONSTER_EGG: 1
        MONSTER_EGGS: 1
        MOSSY_COBBLESTONE: 1
        MUSHROOM_SOUP: 1
        MYCEL: 1
        NETHERRACK: 1
        NETHER_BRICK: 1
        NETHER_BRICK_STAIRS: 1
        NETHER_FENCE: 1
        NETHER_STALK: 1
        NETHER_WARTS: 1
        NOTE_BLOCK: 1
        OBSIDIAN: 1
        PAINTING: 1
        PAPER: 1
        PISTON_BASE: 1
        PISTON_EXTENSION: 1
        PISTON_MOVING_PIECE: 1
        PISTON_STICKY_BASE: 1
        PORK: 1
        PORTAL: 1
        POTION: 1
        POWERED_MINECART: 1
        POWERED_RAIL: 1
        PUMPKIN: 1
        PUMPKIN_SEEDS: 1
        PUMPKIN_STEM: 1
        RAILS: 1
        RAW_BEEF: 1
        RAW_CHICKEN: 1
        RAW_FISH: 1
        RECORD_10: 1
        RECORD_11: 1
        RECORD_3: 1
        RECORD_4: 1
        RECORD_5: 1
        RECORD_6: 1
        RECORD_7: 1
        RECORD_8: 1
        RECORD_9: 1
        REDSTONE: 1
        REDSTONE_ORE: 1
        REDSTONE_TORCH_OFF: 1
        REDSTONE_TORCH_ON: 1
        REDSTONE_WIRE: 1
        RED_MUSHROOM: 1
        RED_ROSE: 1
        ROTTEN_FLESH: 1
        SADDLE: 1
        SAND: 1
        SANDSTONE: 1
        SAPLING: 1
        SEEDS: 1
        SHEARS: 1
        SIGN: 1
        SIGN_POST: 1
        SLIME_BALL: 1
        SMOOTH_BRICK: 1
        SMOOTH_STAIRS: 1
        SNOW: 1
        SNOW_BALL: 1
        SNOW_BLOCK: 1
        SOIL: 1
        SOUL_SAND: 1
        SPECKLED_MELON: 1
        SPIDER_EYE: 1
        SPONGE: 1
        STATIONARY_LAVA: 1
        STATIONARY_WATER: 1
        STEP: 1
        STICK: 1
        STONE: 1
        STONE_AXE: 1
        STONE_BUTTON: 1
        STONE_HOE: 1
        STONE_PICKAXE: 1
        STONE_PLATE: 1
        STONE_SPADE: 1
        STONE_SWORD: 1
        STORAGE_MINECART: 1
        STRING: 1
        SUGAR: 1
        SUGAR_CANE: 1
        SUGAR_CANE_BLOCK: 1
        SULPHUR: 1
        THIN_GLASS: 1
        TNT: 1
        TORCH: 1
        TRAP_DOOR: 1
        VINE: 1
        WALL_SIGN: 1
        WATCH: 1
        WATER: 1
        WATER_BUCKET: 1
        WATER_LILY: 1
        WEB: 1
        WHEAT: 1
        WOOD: 1
        WOODEN_DOOR: 1
        WOOD_AXE: 1
        WOOD_DOOR: 1
        WOOD_HOE: 1
        WOOD_PICKAXE: 1
        WOOD_PLATE: 1
        WOOD_SPADE: 1
        WOOD_STAIRS: 1
        WOOD_SWORD: 1
        WOOL: 1
        WORKBENCH: 1
        YELLOW_FLOWER: 1
    


    Permissions :
    Show Spoiler

    • thieves.user : packs the thieves.steal and the thieves.stats permission. Is given by default to everyone.
    • thieves.steal : player is able to steal
    • thieves.stats : player is able to use the /thieves stats command
    • thieves.stats.other : player is able to use the /thieves stats <player> command
    • thieves.protected : player is immune to stealing
    • thieves.toggle : player can use the /thieves toggle command
    • thieves.level.<1-10>: manually defines the thief's level, if permission-levels is set to true.


    Commands :
    Show Spoiler

    /thieves stats : displays the player's stats
    /thieves stats <player> : displays the specified player's stats.
    /thieves toggle : toggles whenever it is allowed or not to steal on the server.
    /thieves reload : reloads configuration


    Credits :
    • lishid from whom I modified the IInventory implementation in openinv
    Known bugs :
    • If you shift-click inside your inventory while stealing an other player, the clicked stack will be transfered to the player ( the contrary is impossible ). Fixed since 1.2.2
    Changelog:
    Version 1.2.4
    • Added /thieves stats to display the player's level, experience, and next level's experience.
    • Added /thieves stats <player> to display the stats of the given player.
    • Added thieves.stats and thieves.stats.other permissions for the two commands above.
    • Defined the thieves.user permission to pack the default user permissions ( thieves.steal and thieves.stats ). Default behaviour is "true".

    Version 1.2.3
    • Fixed a configuration bug
    • Fixed enchantment and durability not transferring with the stolen item.
    Version 1.2.2
    • Updated for 1.2.5
    • Removed Spout dependency
    • Better click handling
    Version 1.2.1
    • Added a multiplier to make harder the stealing of enchanted items, based on the number of enchantments, the level of those enchantments, and an unit multiplier defined in the config.
    • Removed the obsolete "discovery-chance" config, as it is completely useless now.
    • Craftbukkit-1.1-R5 ready.
    Version 1.2.0
    • Added a config to disable stealing in non-PvP areas.
    • Added a leveling system
    • Added a config to define the thief's level with permissions
    • Added a cooldown between two stealing attempts
    • Added values to items. The higher the value is, the lesser will be it's stealing probability ( and the greater the gained experience will be when it's successfully stolen. )
    • Added a limit of stealable items, based on the thief's level and the stolen items' values.
    • Added events ( PlayerStealEvent, ItemStealEvent, and ThiefDetectEvent )
    • Some bugfixes
    Version 1.1.0
    • Added a config to disable hotbar stealing
    • Added a notification when a player tries to steal someone with the thieves.protected permission
    • Some bugfixes
    Version 1.0.0
    • Initial release
     
    kahlilnc and ZNickq like this.
  2. Offline

    leopik

    Nice plugin :) Can you add configuration like here?
     
  3. Offline

    Cronos Dage

    Doesn't work for me. The toggle plugin exists, but does the plugin function?
     
  4. Offline

    Snaipe

    Do you have any errors in your console ?
    Also, could you please paste your config ?

    While the jail/damage/kick function could be implemented, I'd hardly see how I could add money stealing, since the plugin uses the chance of being detected while moving things from an inventory to an other. I'll try to figure that out.
     
  5. Offline

    craztheking

    Gosh people are turning minecraft into skyrim.. I LOVE IT haha
     
  6. Offline

    Snaipe

    Haha, true :] I *may* have played it a little too much :>
     
  7. Offline

    RaydarScan

    It wont work for me either, I am getting no errors.
     
  8. Offline

    Kainzo

    Snaipe - what methods are you using to stun the player?

    Also - is there a way to disable hotbar stealing? that's a deal breaker for a lot of people/servers
     
  9. Offline

    Snaipe

    I'm attaching a potion effect to the player, slow at potency 10 to be exact. I though that simulated quite well the stun, making the situation hard to handle/understand for the thief.

    And yes, there might be a way to disable hotbar stealing, I'll give a try and add an option for it.

    Could you post your config and what you did exactly ?

    Cronos Dage
    RaydarScan

    The plugin works fine for me, tested on latest RB... please make sure you have the permissions set up...

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 23, 2016
  10. Offline

    Bradley Hilton

    What about making it so that the more a player steals the less likely to have a chance of discovery go down? How possible could that be?
     
  11. Offline

    Snaipe

    Like some king of skill ? Yeah, i'll maybe add something like that.
    Thing is that I fear that everyone will end being able to steal everything without being noticed at all.
    I think I'll add a stealing probability to precious items, and raise that probability with practice ( like, for example, diamond would have a 1% stealing chance for inexperienced thieves, and maybe 75~80% for master thieves )
     
    Bradley Hilton likes this.
  12. Offline

    RaydarScan

    I have also set up permissions and I'm on craftbukkit 1.1-R3, but I'm on a dev version of the Spout plugin, so I will try to see if it works after I update Spout.
     
  13. Offline

    Snaipe

    Kainzo done in v1.1.0

    RaydarScan please download the new version and tell me if it happens to work for you :]
     
    kahlilnc likes this.
  14. Offline

    Kainzo

    Good job and that's the correct method to introduce a snare/root. Not 100% stun effect but it works great.

    Here's my thoughts on balancing something like this.

    • Option to toggle if you can steal in pvp-off areas. Should be pretty easy to see if you can damage the target, if not you cancel
    • Option to only steal one item per X seconds (or something similar to have a cooldown on it)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 23, 2016
  15. Offline

    md_5

    Nice, approved
     
  16. Offline

    nicklas1162

    awesome!
    approved by me
     
  17. Offline

    fuzyfeet

    First let me say this rocks. The only thing I would love to see is maybe instead of skill leveling (or alternative to) setting it in the config to let admins set several levels then assign them via permissions kinda like nisovin does in MagicSpellMemory?
     
  18. Offline

    Snaipe

    I will probably add an option for the level handling (permissions or experience)
     
  19. Offline

    chitchatterz

    This plugin should have some new features which are, be able to steal outside the spawn which is pretty simple to do, steal only if pvp is enabled. Also a cool down to steal each item at a time to balance things out. I would love to see this updated by 20th because im making this my next patch on my upcoming rpg server.
     
  20. Offline

    Snaipe

    I'm currently working on the next version. the config to disable stealing in non-pvp zones is done, and i'm creating a new system that allows to steal a certain quantity of items based of the item's rarity and the thief's level.
    It should be done next saturday/sunday if everything goes right.
     
  21. Offline

    chitchatterz

    also the timer dont seem to work, if the player looks at me it does not stun the thief, i put the amount of stun time in seconds 120 and it dont seems to work correctly, if the victim look at me i can still run away and not be stunned any suggestions for this.?
     
  22. Offline

    Snaipe

    I recommend that you wait for the next update, as I cannot reproduce the bug on my test server. The bug might have been fixed somehow.
     
  23. Offline

    chitchatterz

    okay great plugin, cannot wait to have it on my server.
     
  24. Offline

    Kainzo

    Really would like a method to lock the thief out once they have stolen one item. I like the idea of stealing no-pvp but if the victim catches the thief or they fail, they should be able to take damage and or instant death?

    Really awesome job so far, I had to yank it from my server because of so many users unliking it with the current balance it has. (Namely no-pvp areas etc)
     
    kahlilnc likes this.
  25. Offline

    chitchatterz

    wheres the new update?
     
  26. Offline

    Snaipe

    Unfortunately, there is an issue with spout's click event, and I either have to wait for an update or find a way to get around. Therefore, the next release is hardly predictable. I will try to find an alternative until the bug's fixed.
     
  27. Offline

    Sambrosia

    Ah, very awesome. I will be using this on my server as a skill for Heroes. It sounds like it still works in non-pvp zones though? Perhaps adding support for Factions/WorldGuard anti-pvp would be nice.
    Thanks.
     
  28. Offline

    Snaipe

    Sambrosia
    the 1.2 version will bring support to any current and future anti-pvp.

    Okay, I finally managed to solve the problem. Here's the new version :

    Please let me know if anything goes wrong, as I had to deal with functions out of Bukkit's API.
    While I'm sure that these will not break anything, I recommend that you backup your worlds, just in case - but again, I have tested it myself several times, and it should work fine.

    By the way, this introduced a new bug :
    If you shift-click inside your inventory while stealing an other player, the clicked stack will be transfered to the player. Shift-clicking inside the target's inventory will be cancelled, though, so there is no way to steal illegitimately.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 23, 2016
  29. Offline

    Wulfspider

    News to me! Would help if you actually reported the issue, as I do not recall any open issues about it. :p
     
  30. Offline

    Snaipe

Share This Page