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
@SydMontague
Yes thats the weird thing, I even tried to reset both and it would still refuse to work.
EDIT: It was the color codes.. Which is weird, since it did work before..
I fixed it by completly re-installing it.
@Vlaminations
Well, the error says, that you used a special character somewhere in the config.yml, at position 950. (Some text editors have a function, to go to a certain position)
However, in the config.yml you posted, there seems to be everything alright and I got no error with it...
The plugin used to work for me, but now its giving me an error on startup..
http://pastebin.com/kQ7edrLK
What does this mean?
My config:
http://pastebin.com/YyCj2q5X
My values:
http://pastebin.com/sLaSM1jv
@SydMontague
Your welcome and thanks for making this plugin and keeping it up-to-date :)
@TWSSYesterday
I just use the BukkitAPI, so it should work with every Bukkit implementation released after 1.6.2. (Short: yes, it should)
@lilblue22
So the error does not occur again? It looks like a error when loading the values.yml, caused within Bukkit itself. Will make some research soon, what the actuall reason for this error is.
The other error, which occurs on first startup (i.e. no config.yml) is located, too. A plain restart, without changing anything should fix the bug.
Thanks for the reports - I may release a 0.5.2 soon, to address this issues.
PS: You already found out, who color works. Minecraft added these § codes in 1.2.5 and therefore I don't need any own code for colored stuff, if you use the § codes. :)
PPS: Thanks for the default values. :D
Just a basic default file for pickpocketting feel free to use:
http://pastebin.com/Ee0p9ZRu
Note: how would i get this plugin to recognise colours? If i put the term Soulbound people can still steal it because it is a sword and the soulbound is in gold (&6) so it doesn't recognise bcause its only searching for it in white (yes i have tried to change the soulbound plugin to display in white but doesn't look like it can be done). If I change the soulbound in the lore section of the config to golden colour (&6) like:
lore: &6Soulbound: 1000000
The plugin wont load and i get this error!
http://pastebin.com/PfSkKFku
...I was so close to figuring out how to stop people stealing soulbound items :(
Final Edit (I hope): so replacing
lore: &6Soulbound: 1000000
with,
lore: §6Soulbound: 1000000
WORKS!!! yay :D
@SydMontague
Hmm no this is what happened when i deleted the Wayofshadow folder to let it create a new one and using 0.5.1 on bukkit Dev#2889 for 1.6.4
Edit: just tried it again making sure that the configVersion: 1 line was there and it seems to be working now? not sure what happened there :p
@lilblue22
Did you remove the "configVersion: 1" line from your config? Seems the only possible source of this error. Readd this line and it should not occur again.
Also, the other error you got should be fixed with 0.5.1.
@SydMontague
I tried to delete the skills but the errors still hapened going to try the new build now tho will edit this if i find any more errors!
Edit: On start up http://pastebin.com/7bUa135i
@nkomosim
Should be fixed in v0.5.1 I just uploaded.
Keep getting these spamming errors. 2013-09-29 01:11:19 [SEVERE] Could not pass event ProjectileHitEvent to WayOfShadows v0.5 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory.callProjectileHitEvent(CraftEventFactory.java:590) at net.minecraft.server.v1_6_R2.EntityArrow.l_(EntityArrow.java:210) at net.minecraft.server.v1_6_R2.World.entityJoinedWorld(World.java:1354) at net.minecraft.server.v1_6_R2.World.playerJoinedWorld(World.java:1335) at net.minecraft.server.v1_6_R2.World.tickEntities(World.java:1223) at net.minecraft.server.v1_6_R2.WorldServer.tickEntities(WorldServer.java:480) at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:572) at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:226) at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486) at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419) at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582) Caused by: java.lang.NullPointerException at de.craftlancer.wayofshadows.skills.GrapplingHook.onHookHit(GrapplingHook.java:167) at sun.reflect.GeneratedMethodAccessor234.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425) ... 14 more
@Youramoron
Giving the permissions only in the worlds you want should work.
@lilblue22
Just delete the skills you don't want from the config - that will disable them completly.
However, there seems to be a bug I'll have to upload a fix soon... (most likely the bug which occurs in your case - the plugin itself should work, however)
@MrMe1003
thanks yh it could save some time i think lol and really i have another suggestion for the Dev if your interested mate? having a problem with this error and its constant.. In brief I would like it if this plugin allowed to disable certain things like the grapple hook cos i believe it is causing this..
Can i just add that the thing i like the most about this plugin in the pickpocket but also backstab and airassassination.. the poison and grapple hook doesnt really do it for me and seems to be creating errors.
thanks for reading!
http://pastebin.com/TqNjQAkm
@lilblue22 Actually, your suggestion is better than mine. Having the values.yml as a black list rather than a whitelist would be much more convenient.
@SydMontague
now you said that I think I know how the values work.
I do know of another problem if your interested.. I am using a plugin called Soulbound and people are stealing soulbound items. I am thinking if there was an option to change the values config to work as a blacklist rather than a whitelist (sort-of) and put Soulbound into the lore section of the values then they won't be able to be stolen.
Edit: Can you add the option to do damage to players with the grapple hook? The arrow acts like a very good shuriken, very ninja-like with the right texture!
@MrMe1003
Reload will be included in the next version (already coded). WorldGuard implementation might come - I'm not sure if I should use a flag, or a list of regions per skill as config value. (Most likely last one, as it's more dynamic) I'll also look into a premade values.yml as soon as I need to write one myself - it's a really a big task... (especially if you need to find the right value)
@lilblue22
Are these swords enchanted with sharpness? Because the default values.yml has values for sharpness.
@MrMe1003
I agree with this we need to stop people from stealing at spawn and as it is the only thing people are able to steal are swords? is that supposed to be like that? i looked at the value config and it says the item id is 1 which is stone so im confused why thats classed as a sword?!
@SydMontague
Alright. I'll do that when I get home.
As another suggestion, though (sorry for picking apart pick pocketing) could you add a custom WorldGuard flag, so you can deny picking pockets in a defined area?
And also, perhaps a quick reload plugin, to reload the config easily in-game.
Aaaand.. While I'm running my mouth and being annoying, could you possibly make a premade values.yml set with all the items in default Minecraft already added in? Just because as it is, it seems like a hassle to go through and add every single item/block/tool that exists.