WayOfShadows
WayOfShadows
Description
This plugin provides 6 assassin/rouge like skills. Backstab, PotionEffects, GrapplingHook, PickPocket and AirAssassination
You can use this plugin together with SkillLevels to make the skills levelable and/or to reward XP for using the skills.
Backstab is inspired from locutus's plugin Backstab. Grappling Hook is inspired from SalamiJack's plugin HookShot.
Compatibility
The GrapplingHook Skill uses NMS code, to prevent users from picking up arrows, shot by the plugin. If you plan to use this functionallity, you must use a CraftBukkit version, the plugin was made for.
Version 0.5 update notice
With Version 0.5 the config and permissions format changes. The config will be updated automaticly, the permissions however needs to be updated by hand.
Metrics
This plugin utilises Hidendra's plugin metrics system. You can opt-out under <yourPluginFolder>/PluginMetrics/config.yml
The following informations will be collected:
- A unique identifier
- The server's version of Java
- Whether the server is in offline or online mode
- The plugin's version
- The server's implementation and game version
- The OS version/name and architecture
- The core count for the CPU
- The number of players online
- The Metrics version
- Your online-mode
- Your server location
Skill description
Backstab: When you attack someone from behind you'll get a chance to do extra damage.
Effect: When you attack someone, your target may gets a certain potion effect (like poison or blindness).
Grappling Hook: When you throw a Arrow by rightclick, you can pull you to it with a configurable item (default: String). If there is no block where you could stand on, it`ll spawn a glass block for a given amount of time.
Pickpocket: When you are behind another player, you can right click him, which opens his inventory. Now you can try to steal a certain worth of items by left clicking the items in his inventory.
AirAssassination: When you attack a while falling down you'll deal more damage, depending on the distance you already fall.
LockPick: When you rightclick with a special item on a protected block, you have no right's for, you have a chance to use it anyways. E.g. protected doors or chests will open. Also, when a wooden door/fence gate/trap door/lever gets picked, it can't be opened for a defined amount of time. (Except by picking it again)
Usage
Permissions
- shadow.reload - access to /wayofshadows command, which reloads the plugin
- shadow.<skillname> - allows you to use this skill with every valid item
- shadow.<skillname>.item.<material> - allows you to use this skill with items with material <material>
- shadow.<skillname>.name.<name> - allows you to use this skill with items with name <name>
- shadow.<skillname>.lore.<lore> - allows you to use the skill with items which lore contains the String <lore> For PickPocket skills:
- shadow.<skillname>.exempt - player with this permission are safe from this skill
Configuration
The plugin creates a default configuration on startup, if there is no existing config.yml. It contains example setting for every skill.
You can add as many skills of every skill type as you want.
All values which require a number, can be a math forumla as well, if you use the plugin together with SkillLevels.
You can use + ,- ,* ,/ ,^ ,log(), sqrt(). ^ is expotential, like x^2 = x*x | log() = natural logarithm (base e) | sqrt() = sqare root
If you look for item/material names here.
General values, which every skill has:
type - the type of the skill. Valid types are "backstab", "effect", "grapplinghook", "pickpocket" and "airassassination"
lore - list of strings, which make this skill useable with items, that have one if these string within their lore.
items - list of item names (or item ids), which can be used for this skill
names - list of strings, which make this skill usable with items, that have these strings as name
levelSystem - name of the level system, which
cooldown - a number, which defines the cooldown of this skill in seconds
cooldownMsg - the string given to the player, when he tries to use this skill while is on cooldown. %time% will be replaced with the time in seconds.
Backstab values
chance - a number, which defines the chance of using this skill successful, must be between 0 and 1
critChance - a number, which defines the chance landing a critical hit, must be between 0 and 1
multiplier - a number, with which the damage get multiplied in case of a successful backstab
critMultiplier - a number, with which the damage get multiplied in case of a successful critical backstab
maxAngle - a number, which determines the maximum Angle, you can stand behind a target, in degree
onSneak - a boolean whether you need to sneak for this skill or not
critOnSneak - a boolean whether you need to sneak for a critical hit or not
attackerMsg - the message the attacker gets on a successful backstab
critMsg - the message the attacker gets on a critical backstab
victimMsg - the message the victim gets on a successful backstab
Effect values
effectType - the potioneffect type, which is used for this skill. Can be id and name.
chance - a number, which defines the chance of using this skill successful, must be between 0 and 1
maxAngle - a number, which determines the maximum Angle, you can stand behind a target, in degree
duration - a number, which defines the duration of the potion effect
strength - a number, which defines the strength of the potion effect
Hook values
pullLore - list of strings, which defines pull items if they contain one of these strings in their lore
pullItems - list of item names (or item ids), which can be used as pull items
pullNames - list of strings, which defines pull items if their name is given in this list
blockTime - a number, which determines the lifetime of the spawned glass block in server ticks (1 = 1/20 second)
maxDistance - a number, which defines the max distance to the hook
distanceToInitial - a number, which defines the max distance to your initial position
itemsPerBlock - the amount of items of per block distance, which will be consumed
distanceMsg - the message the player gets, when his hook is too far away
initialMsg - the message the player gets, when he is too far away from this initial position
errorMsg - the message the player gets, when he tries to hook to an invalid position
canPickupArrow - a boolean wether a player can pickup his hook arrow or not
AirAssassination
chance - a number, which defines the chance of using this skill successful, must be between 0 and 1
minHeight - the minimum height, required to activate this skill. This number will be substraced from the fall distance
maxHeight - the maximum height, for which you can get the damage bonus.
damgePerHeight - the amount of damage, that will be added to the attack per block fall distance
negateFallOnSuccess - whether the fall damage should be set to 0, when you successfully perform this skill
attackerMsg - the message the attacker gets on a successful air assassination (no message if empty)
victimMsg - the message the victim gets on a successful air assassination (no message if empty)
Pickpocket values
chance - a number, which defines the chance of using this skill successful, must be between 0 and 1
maxAngle - a number, which determines the maximum Angle, you can stand behind a target, in degree
maxDistance - a number, which defines the max distance to the player you are stealing from
maxValue - maximum worth of items you can steal per stealing session
onSneak - a boolean whether you need to sneak for this skill or not
abortOnDamage - whether the stealing process should be cancled if the stealing player gets damage
maxValueMsg - the message the stealer gets, when he reached his maxValue cap.
cantStealMsg - the message the stealer gets, when the item is not stealable
valueCatalogue - the name of the valueCatalogue, which should be used by this plugin. ValueCatalogues are explained below
stealFailedMsg - the message the stealer gets, when he failed to steal an item (no message if empty)
attemptStealMsg - the message the victim gets, when a thief failed to steal an item (no message if empty)
Lockpick values
chance - a number, which defines the chance of using this skill successful, must be between 0 and 1. The variable 'y' defines the pick mod, defined in the "pickable" section
closeCooldown - a number, which defines how long doors/etc. can't be opened after a successful pick in seconds
damageOnFail - a number, which defines how much damage a player gets when he fails to pick a lock
loseItemOnFail - a boolean whether you lose your item when you fail to pick a lock
loseItemOnFail - a boolean whether you lose your item when you succed to pick a lock
successMsg - the message a player gets, when he successfully picks a lock
failMsg - the message a player gets, when he fails to pick a lock
sneakMsg - the message a player gets, when he tries to pick locks while sneaking (-> Vanilla behaviour, you don't open thinks while sneaking)
closeCooldownMsg - the message when you try to close/open a picked door
pickable - maps every pickable item to a modificator, which can be used in formulas.
ValueCatalogue
All value catalogues are define in the values.yml.
The values are additive. If you have a item, which matches in name and material, both values will be added together.
Items with values below 0 are not stealable. If you want items to be not stealable, give them a high negative value.
<nameofcatalogue>: defaultValue: -1 items: <material>: <value> lore: <lore>: <value> names: <name>: <value> enchantments: <enchantment>: <level>: <value>
Events and SkillLevels
The plugin calls events, when an skill is successfully activated. (ShadowAirAssassinEvent, ShadowBackStabEvent, ShadowEffectSkillEvent, ShadowPickPocketEvent and ShadowPullEvent)
Also, the plugin provides support for SkillLevels, what allows you to reward xp for successfull skill activation. Just add "shadow_<skillname>: <xp>" under the CUSTOM section of your level system's config. Xp are awarded per successful skill usage.
Source
This plugin is open Source. It's code can be found on GitHub
@MrMe1003
When I try to start my server with your config, I get a YAML Parse Error because of the * at the beginning and the end of your cooldownMsg. I fixed that by putting the string between " ".
However, after I did this it worked on CB1.6.2 and CB1.5.2-R1.0.
@SydMontague
This is the entire Pickpocket section of my config:
@bombrown
You can define a item, like for any other skill as well. If you leave it blank every item is qualified as useable item.
Can you have an option for pickpocket and air assassin to have an item or you can leave it blank.
@MrMe1003
Okay, if you don't get a permissions check the interact is either cancelled, before the plugin handles it, or you don't have a skillitem in your hand when interacting. (Or when the player is no player...) Do you have set the "lore", "items" or "names" value for the skill, or is it still empty/non existant?
@SydMontague
No, there is no error. It is simply not allowing me to. I turned on the debug mode for my permissions plugin (PEX), and it was not even checking for the correct permission node to pickpocket. It's as though it wasn't recognizing the action whatsoever. The plugin is loading, because it loads the config file, and shows up when I use /plugins.
@tremby90
A message as soon as someone pickpockets would make this skill completly useless, unless you only want to steal AFK players. However, I'll add a message as soon as someone fails at stealing in the next update.
A cooldown is already implemented: just add "cooldown: <time>" to your pickpocket skill.
just one question can you make it so when someone pickpockets someone they victim get alerted and also can you make a cooldown timer
@MrMe1003
I'll look into supporting Citizens for pickpocket. After a short look it should be possible, but it will need a bit of work.
Also, I usually test with one of the lastest CraftBukkit builds, so I can not gurantee that it works with old version, or other implementations.
Is there any error message or similar when you try pickpocketing?
@SydMontague
Just allow players to open up NPC inventories the same way they would a player's, maybe? I'm sorry if this is something ridiculous; I don't honestly know the first thing about coding.
Also, my server requires Spoutcraft, which will not be updating past 1.5.2, so I was wondering if this plugin would be compatible with 1.5.2? I've had issues so far with pickpocketing not working. (It's really the only feature I need out of this plugin)
@jenniferstrife
I will add a config whether the shoot arrow should be pickupable.
@MrMe1003
The permission is easy, but how do you imagine the plugin to work with Citizens NPCs?
Can an option be added to the config to toggle the ability for this plugin to work with Citizens 2 NPCs?
And also, can a permission be added so that certain players with that permission can't be pickpocketed?
@jenniferstrife
Yeah that would be helpful, I changed from arrow to feather, and I understand that it shoots arrows since the physics were already made, but at the same time it's kinda bad that you can pick them up :/
This plugin is really great. Everything works, but... I changed the ID for the Hooking. The player can shoot a custom object and hook with a string. But, when I do it, it shoots the custom object AND an arrow (even the player hasn't got any in the inventory). The player can pick the arrow. So... free arrows even if the item is another one.
Is there a way to not spam arrows in any case?
@SydMontague
Ah, lol I tought the value is like how much I could steal, silly me
@jonhykrazy
The setting is in the config section of the pickpocket skill in your config.yml
The value is the "worth" of the item. If you say TNT is 1 unit worth, and that can steal items in worth of 100 units, you can steal 100 TNT. If you set TNT to 2, you can steal 50 and so on.
@SydMontague
where is the maxValue parameter or where do I put it? and how does setting the value of tnt to 1 would work? shouldn't I be able to only steal 1 with that?
@jonhykrazy
You can define a "maxValue" value for the pickpocket skill. This defines the max value of items you can steal per session.
If you set this value to 100, you can steal items with a combined value of 100. The 100 after 46 defines the value of TNT, which is 100 in your case.
That means you can only steal 1 TNT per stealing session. If you want to be able to steal 100 TNT, you either need to change the value of TNT to 1, or the maxValue parameter of the pickpocket skill to 10000.
Ok, I don't know about the other blocks, but at least for tnt (46) I am only being able to steal 1!, should I be able to steal 100? http://pastebin.com/sHn2NkxW
@SydMontague
ah now I get it, thanks