Griswold – NPCs repair your items
Griswold
NPCs now can repair and enchant your items! – Without any commands!
Show your stuff to blacksmith and he'll tell you how much he wants for the job. If you agree – just pass him the item. Users have no commands (because they don't need them)!
Simple!
Features:
-
Command-free native minecraft game experience.
-
Repairing does not clear enchantments on enchanted items!
-
Items that are fully repaired can be enchanted (optional)!
-
Multiworld support.
-
Mod items support!
-
Citizens support.
-
Fully multilingual. There are english, german and russian out-of-the-box, but you can add more!
-
All major economy systems supported. If Vault supports something - than it'll work with Griswold.
-
Lightweight!
Video
NPC Types:
When you use /blacksmith create command you can specify a type of NPC. Available types are:
-
"all" – can repair everything and enchant repaired things.
-
"weapon" or "armor" – can repair only one type of items, cannot enchant.
-
"both" – can repair everything but cannot enchant.
-
"enchant" – these guys are just enchanters and cannot repair things.
Permissions:
-
griswold.admin - lets you create and remove repairmen
-
griswold.tools - lets users talk to repairmen who repair their weapons and tools
-
griswold.armor - lets users talk to repairmen who repair armors
-
griswold.enchant - lets users to enchant their gear at repairmen
Commands:
These commands are for administrative purposes, users don't need them.
-
/blacksmith create name - creates new repairman. You can also specify more parameters: /blacksmith create name type cost. Name can be anything and will be displayed in chat when user talks to repairman. NPC types are described below. Cost is repairman's multiplier of cost – it can be greater than 1 to make prices higher or below 1 to make prices lower. Prices are rounded to 2 digits after comma.
-
/blacksmith list - lists all the repairmen ever created
-
/blacksmith remove name - removes a particular repairman
-
/blacksmith despawn / respawn - despawns or respawns all repairmen. Config is not re-read, you have to use next command to reload config.
-
/blacksmith names – toggles names above their heads.
-
/blacksmith sound name bukkitsoundid – sets the interaction sound for the repairman. Use standard bukkit Sound names (you can find those here). You can set sound to "mute" to be silent.
-
/blacksmith reload - reloads config, despawns and then respawns all the repairmen.
All commands require griswold.admin permission and fallbacks to OP if something bad happens.
/blacksmith command has an alias – /bsmith to avoid conflicts with other plugins.
NPC Types:
When you use /blacksmith create command you can specify a type of NPC. Available types are:
-
"all" – can repair everything and enchant repaired things.
-
"weapon" or "armor" – can repair only one type of items, cannot enchant.
-
"both" – can repair everything but cannot enchant.
-
"enchant" – these guys are just enchanters and cannot repair things.
Config:
All parameters are stored in config.yml and are reloadable without restarting the server (/blacksmith reload).
Debug is for debugging stuff and not usually useful if you don't know why you need it. Default is "false".
Timeout is for timeout of blacksmiths "remember" your item and are waiting for you to confirm the repair. Default is "5000" (5 sec).
Language is a name of language file (without .yml at the end) stored next to config.yml and containing all the text in preferred language. Default is "en_US".
UseEnchantmentSystem tells the plugin if he should allow spawning of enchant-type repairmen and allow all-type ones to add enchantments.
PriceToAddEnchantment sets the price to add one random set of enchantments. Default - 50.
ClearOldEnchantments says to repairmen whether they should blank the item before they enchant it or just add new enchantments to it. Default - true that means "yes, blank it".
EnchantmentBonus is a number of "virtual bookshelves" around blacksmith. Greater the number - cooler are enchantments. Default - 5.
UseEnchantmentSystem switches the whole enchantment routine on and off.
ShowNames – shows names over NPC heads.
DuplicateFinder – when a new NPC spawns it will check for possible duplicates that may be there because of server crash in the past. It is off by default, but you can set it to true if you have NPC duplicate issues.
DuplicateFinderRadius is a radius where plugin will search for duplicate NPCs. Smaller means slightly less work for server and probably little bit safer (won't delete wrong guys). You don't usually want it to be more than 10 blocks anyways.
You also can alternate price calculation by changing basic armor and tool prices and enchantment cost. Modify parameters BasicArmorPrice, BasicToolPrice and BasicEnchantmentPrice.
Prices are calculated like this: repairman cost parameter * (basic item type cost + (basic enchantment price * number of enchantments * sum'd enchantment levels)).
This formula makes repairment of simple non-enchanted items quite cheap, items with 1-2 enchantments are at moderate cost and uber-enchanted items repairment cost a fortune.
If you want to change sound that NPC are making on interact – you can use ingame command or change it in the config part of the NPC.
All other config parameters are configurable in-game, so you don't have to bother about them. But if you want – they are quite self-explanatory.
Citizens integration
You can add traits to your npcs to act like respective Griswold NPC types.
Following traits can be added:
-
griswold_tools
-
griswold_armor
-
griswold_both
-
griswold_enchant
-
griswold_all
Please don't add multiple traits at once, lol.
How to add a custom item
You have to create a new entry in config with name CustomItems. This entry will contain two more entries: Tools and Armor. Under those you add your items in "'id': name" format. Yes, it sounds complicated, but it is not! Here, look at my sample config:
CustomItems:
Tools:
'BOW': Bow
'FLINT_AND_STEEL': Flint and steel
Armor:
'LEATHER_CHESTPLATE': Leather Armor
'CHAINMAIL_CHESTPLATE': Some other armor
You can just copy-paste it in your config at the very end of it and change the IDs. Names after ":" are just for your convenience and are not used anywhere in the code.
How to blacklist items
You can prohibit players to repair certain items and also, separately, prohibit them from adding enchantments to certain items.
This is achieved through ItemBlacklist.Repair and ItemBlacklist.Enchant config sections, respectively.
Here is an example of such config:
ItemBlacklist:
Enchant:
- DIAMOND_SWORD
- GOLD_SPADE
Repair:
- GOLD_SPADE
- DIAMOND_SWORD
By default, this setting is not in your config and you have to add it manually.
You can copy-paste this snippet to the end of your config.
Give author a dollar!
I started to develop for Minecraft more than two years from now and only did it in my spare time. I still don't have a legit Minecraft account. Having one would be helpfull to give support in-person on online-mode servers. So if you want me to come to your server or just want to say "Thanks, Tony!" – feel free to use the button below. I will buy myself a minecraft account from these money.
Stats:
This plugin utilises Hidendra's plugin metrics system, which means that the following information is sent to mcstats.org:
unique identifier, server's version of Java, whether the server is in offline or online mode, Griswold's version, Bukkit version, OS version and architecture, CPU core count, number of players online, metrics version.
You can opt-out of this service by editing plugins/Plugin Metrics/config.yml and changing opt-out to true.
@LaoTheLizard - You had any luck updating it to 1.5.2? I'm getting errors below. Thanks for your work... ;)
http://pastebin.com/Gu9K8W7s
@conetopia3000
I can't understand you. :) Maybe you'll show me screenplay by Youtube, for example? And I'll try to help you, when I'll get your problem.
/blacksmith create name you have no money, that's sad !
- when i try to get my diamond sword repaired. Looks Great ! good as new! once i get that 18$ or w/e it costs.This item is fully repaired, though I can enchant it - for free keep on right clicking him... nothing happens....
when i set my balance for 1500... each time i right click him.... it costs 50$ and some trade window opens up... it says hes a villager :( wtf.... and it has 2 boxes = outcome box.. use items to get emeralds or 11 emeralds for diamond pickaxe .....
does this plugin not work with version 1.5.1 ???
And this variant more true: Griswold 1.5R2LE2
Now in config useful to set BasicEnchantmentPrice=100.
Let me introduce you new, enhanced calculation formula for repairing items for your virtual money. This is original code:
And this is special code, developed by me.
Explanation: Let we have diamond boots "Defend III, Fly II", damaged for 200 hp. Enchantment price is 0.25. Blacksmith's cost is 20.
Then calculation will be so: price=200 (hp was damaged)*50(diamond price)*4(diamonds in boots)/429 (full boots hp)*(1+(0.25*2(enchants number)))+20 (basic work price)=200*50*4/429*(1+(0.25*2))+20=160.
Henceforth, price is real.
Enjoy it.
Griswold1.5R2LE
LaoTheLizard's version below works great for repairing on 1.5.1. I haven't checked the enchant/disenchant side. toxuin, You should let someone else take over this one, if you've lost interest in it. Hate to see the best repair plugin go inactive... ;)
1.5.R2 beta Attention! 1. It can't enchant books! 2. My version has two main types: a) enchant - he can enchant (if item is common) or re-enchant (if item is enchanted) ONLY. b) both - he can repair (if item is broken) or un-chant (if item is not broken, then item becomes common! be care!!!) ONLY. Enchant, re-enchant and un-chant costs equal! It is not changeable!
Got a fix for 1.5.1? Please.... :)
sounds nice!
Awe man... I only just discovered this plugin and its not being updated?
Poo.
Anyone get this working in 1.4.7? TIA
@toxuin Ok, sure. As soon, as you answer me in Skype.
@LaoTheLizard
Yeah, I am kind of AFK. You can still send me a pull-request on github so I can add your changes to the core repo and update this page if you want.
I'll return in a few weeks. The matter why I am AFK is a long boring story, all about love, loss and desperation, so nobody really wants to hear it.
Seems, author is AFK.
I downloaded sources and made some changes to this plugin. Firstly, I fixed some bugs - I can't describe it, cause my English is very poor. Secondly, I added new function to blacksmith of "both" class. Now this class can unchant (remove enchants) your items for price of enchanting. And, finally, I prepared new version - which works in 1.4.6 (! but not for enchanting books !).
You can download it and try to use. I hope you'll enjoy it and this nice plugins will not die. :) http://file3.webfile.ru/6304759/Griswold.zip?filename=Griswold.zip
Archive's list: Griswold-145.jar - fixed, for 1.4.5. Money for work goes to iConomy's account named "Server". Griswold-146.jar - fixed, for 1.4.6. Griswold-146.jar - fixed, for 1.4.6. Money for work goes to iConomy's account named "Server". ru_RU.yml - russian language file. All versions has built-in English language only. Non-english/non-russian .yml you can make yourself. It is not hard.
Please update when you get some free time for 1.46. Thank you for your work... :)
@toxuin
I am actually using PermissionEX. (Vault)
Thanks, I am still setting and building my server up and I don't mind giving that kind of permission to my friends who play the server for now, but it would actually be a problem on big public servers.
Hoping that it is fixed before it is done because so far it is the best economy repair plugin I found! :D
@DemolitionDerby
Right now I cannot fix those bugs or any other because I am really busy working on another project. But I am still active so those bugs will be fixed in near future. Thanks for reporting them. BTW, what permission system do you use?
Hi,
Is this plugin still active?
I would like to use it but there a few bugs that makes it annoying to use.
BUG1: Spawns a normal villager every time the map is loaded or something like that.
BUG2: Permission system ain't working, need to use griswold.* perm command to allow people juste to USE it.
Thanks
Hy
Could u make ur NPC real NPC's? Or link them with citizens?
because if i do /killall or /nolagg clear all npcs die :S
About the Enchantment Bonus in the cofig: so would putting 15 give him the accessing the hightest level of enchantments for your items? When I had the repairment blank out every time he enchants, you can try giving him an already enchanted item to try for a higher level, only to usually lose what you had to get a level 1 enchantment. Removing the option to have him blank out existing echantments only seem to give a bunch of level 1 or 2 enchantments.
Is there a max in the config's Enchantment Bonus? Maybe I put too much?
Thanks.