Iam proud to present the new Version of NPCs (v4.4)
This Plugin fits really good for RPG-Themed Servers or economy-Themed Servers, or if you like to have some Non-
Player-Characters, that talk to you, or sell Items to you
For contact visti: irc.esper.net in #canary
- fixed broken stuff because of Serverupdate
- fixed broken stuff because of Serverupdate
- some minor Bugs
fixed iConomy for latest canary is included!
ATM WORKING ON NEWITEM-SUPPORT AND NEW SPECIAL NPC
Watch a Video about some new Features:
please type "/npc help" ingame, to get help with the new and old features!
1. Extract the Archiv.
2. Put the npcs.jar into your plugin-folder (iConomy1.9 is included! its working!)
3. Put the folder "npcs" into your plugin-folder (all Npc-data will be saved there, also
LANGUAGE-FILES have to be there!)
npcs-folder (default is: "/plugins/npcs" if you want to change the Folder-Dir
you have to edit the npcs.properties-File.
4. Put the npcs.properties into your root-dir, like server.properties
5. If you want to migrate your old NPCS, you have to set "npc_migrate=" to true
in npcs.properties. To get more Information about Migration, continue reading.
6. Give the Groups the command /npcs, if you want to let him to use this commands (change in groups.txt)
If you create NPCs, npcs_simple/npcs_trader/npcs_itrader will be generated.
==== For iConomy-Support ====
iConomy 1.9 or higher is needed (iConomy1.9 is included! its working!)
please add "npcs" in your server.properties-File AFTER iConomy, like this:
HOW TO Migrate your old Npc-Files to the new Version!
(Version 4.2.3b and lower is old File-Format):
NPCS got a new Fileformat, they are saved as txt-files.
You can migrate your old npc-files to the new format,
1. you only have to put the variable "npc_migration=" to true (in npcs.properties).
2. run the server, with the first start, the plugin will migrate and gives a success-message,
it automaticly changes to "npc_migration=false"
3. Now you should have some txt-files in your plugins/npcs-folder.
4. Your NPCS should be loaded successful from the new Files.
The new Syntax:
A Video about Creating NPCs and the working with new syntax is here:
If you want to know the available commands and for help,
this Menu will appear:
type in for specific help: npc help <simple/trader/itrader/isalesman> /npc help <recording/personaMe> /npc help example <simple/trader/itrader/isalesman> To List all Npcs: /npc list <simple/trader/itrader/isalesman> /npc list <simple/trader/itrader/isalesman> [partofname] To recognize the aimed(to Head) Npc type /npc info
gives you the Base-Name and Name of the NPC,
first aim to the Head of the Bot, then type "/npc info"
personaMe - Feature
This Feature allows you, to be on the Server, without being on the Server :ugly: ^^
If you enable personaMe, a NPc will be spawned if you leave the Server. The Npc spawns
at your last location and is named like you. And of course, got the Same skin.
At the moment there is no "addmsg" stuff. I already implemented these Methods, but there is
some more tweaking needed. Atm they will spawn if you leave the server, and get deleted if you
rejoin the server. In the next Update, addmsg etc. will be available
i added the Command "/personaMe" to Permissions, now you can enable personaMe-Feature for all groups you want. only add "/personaMe" to group-commands! Smile (ingame, you can type "/npc personame" it will still work. Its not case-sensitive
A Video about this Feature and how it works is here:
inspired by liquidthex from Minecraftforum
/npc personaMe helpthen you will receive a Helpscreen that looks like this:
-- personaMe Commands: to activate personaMe: /npc personaMe 1 to deactivate personaMe: /npc personaMe 0 show status of personaMe: /npc personaMe ? -- UPCOMING FEATURES --: /npc personaMe addsmg <msg> /npc personaMe listmsg /npc personaMe delmsg <id>
First the NPC Types:
Atm there are 4 Types available.
The Simple NPC - they print messages when they get hit
The Trader NPC - they can trade items for other items.
The iTrader NPC - they can sell items for iConomy-Money.
The iSalesman NPC - they can buy items from the User with iConomy-Money
To Create/move/setname/delete the syntax is quite the same:
/npc create <simple/trader/itrader> <base> <name> /npc move <base> /npc setiih <base> // set item in hand does not work atm. /npc setname <base> /npc delete <base>
Example creating Simple-NPC
/npc create simple home Jimpi
with the "list"-Command you can get an overview about the current NPCs
/npc list simple/trader/itrader [partofname]
/npc list simple
Returns a List of all current SimpleNPcs
/npc list simple Jim
/Returns a List of all current SimpleNpcs which Name begins with "Jim"..
<base>: each time you create a NPC, use different base-names, these are working like Id's.
/npc help example simple
you will get a Menu which shows you how to use the available Commands.
The Menu for the Simple-NPC looks like this:
-- Simple-NPC-Commands: -- /npc help example simple /npc create simple <base> <name>: /npc move <base> /npc setiih <base> /npc setname <base> <name> /npc delete <base> /npc addmsg <base> <id> <msg> /npc listmsg <base> /npc delmsg <base> <id>
The Menu for Simple-NPC-Examples looks like this:
-- Simple-NPC-Commands: -- /npc create simple home James: /npc move home /npc delete home /npc addmsg home 1 you are welcome /npc listmsg home /npc delmsg home 1
HOW TO BUY / TRADE FROM/WITH A TRADER:
1. SELECTING ITEM (trader + itrader):
if you got more than one item, hit the Trader, the selected item-row get a star (*) at the beginning, if you hit the npc a second time, the second line will be selected.
Please look at the video (zap to 5:00 first video in Thread)
2. BUYING / TRADING
trader= rightclick with the needed item, the buyer (you) has to equip the item the npc will trade (eg. is amount 3x then you must equip the item with min of 3x-Stacksize) then you rightclick the NPC to trade it!
itrader= rightclick with tool (pick, shovel, lighter, some Blocks, ...) then you will geht the selected item and money will be withdrawn.
The Menu for the Trader-NPC looks like this:
NOTE: Itemlist with ItemID of Minecraft : <!-- m -->http://www.minecraft... ... stV110.png<!-- m -->
-- Trader-NPC-Commands: -- /npc help example trader /npc create trader <base> <name>: /npc move <base> /npc setname <base> <name> /npc delete <base> /npc additem <base> <id> <sellitemid> <sellitemname> <sellitemamount> <buyitemid> <buyitemname> <buyitemcount> /npc listitem <base> /npc delitem <base> <id>
The Menu for Trader-NPC-Examples looks like this:
Trader-NPC-Commands: -- /npc create trader home James: /npc move home /npc delete home /npc additem home 1 46 tnt 10 3 dirt 64 /npc listitem home /npc delitem home 1
The Menu for the iTrader-NPC looks like this:
-- iTrader-NPC-Commands: -- /npc help example itrader /npc create itrader <base> <name> /npc move <base> /npc setname <base> <name> /npc delete <base> /npc additem <base> <id> <sellitemid> <sellitemname> <sellitemcount> <currencyvalue> /npc listitem <base> /npc delitem <base> <id>
The Menu for iTrader-NPC-Examples looks like this:
iTrader-NPC-Example-Commands: -- /npc create itrader home James: /npc move home /npc setiih home /npc delete home /npc additem home 1 46 tnt 10 99 /npc listitem home /npc delitem home 1
HOW TO Sell ITEMS TO A iSALESMAN-NPC:
1. SELECTING ITEM:
hit the iSalesman, the selected item-row get a star (*) at the beginning, if you hit the npc a second time, the second line will be selected.
Please look at the many videos, if you got more Questions.
iSalesman= rightclick with the item to sell, the User has to equip the item the npc will buy
then you rightclick the NPC to sell it!
The Menu for the iSalesman-NPC looks like this:
-- iSalesman-NPC-Commands: -- /npc help example isalesman /npc create isalesman <base> <name> /npc move <base> /npc setname <base> <name> /npc delete <base> /npc additem <base> <id> <buyItemId> <buyitemname> <buyitemAmount> <currencyvalue> /npc listitem <base> /npc delitem <base> <id>
The Menu for iSalesman-NPC-Examples looks like this:
-- iSalesman-NPC-Example-Commands: -- /npc create isalesman home James: /npc move home /npc delete home /npc additem home 1 46 tnt 32 99 /npc listitem home /npc delitem home 1
HOW TO RECORD WAYPOINTS FOR ANIMATING THE NPCS:
THE FUNCTION "/npc rec all <base>" is bugged, i was fixing this, but i realized that the plugin will be delayed again, i decided to release it, the people who want to use "rec all" have to wait, because its bugged. BUT the command /npc rec <bas> is fine, you can record the position you are walking. But "/npc rec all <base>" will throw a exception, if you "play" the animations.
To run the animated-npcs well (in a smoothly way) you have to let the npc_updatetime by 150.
Please watch the first Video in this Post. (About the new Features, to see this in Action).its recommended to use "/npc rec" only, atm, because the other got bugged while i was trying to make it better
The Menu for Npc-Recording Commands looks like this:
-- Npc-Recording Commands -- Recording works for all NPC-Types (not Personas!) To start recording your Route(Positions) type in: /npc rec <base> To start recording your Route(incl. Rotation+Pitch) type in: /npc rec all <base> To end recording your Route type in: /npc recend <base> To start/stop Route-Playback type in: /npc <play/stop> <base>
To Record your Route:
1. "/npc rec basenameOfNpc
2. move around. a text will appear, if you are recording
the new Waypoints
3. to stop recording, type in "/npc stop basenameOfNpc"
4. to play the Route, type in "/npc play basenameOfNpc"
5 to stop playing the Route, type in "/npc stop basenameOfNpc"
If you record another Route with the same Npc, the old Route will
The Language is outsourced in a seperated File, so you can edit the Language,
to Fit it for your Server, e.g. if you got a Country-specific Server and so on...
how to "install" the Language is quite easy:
in the "npcs.properties"-File there is a new Line called "npc_language", if you insert
npc_language=defaultThe Language will be English
if you want, to use your own Language, then modify the Line with your
Languagefilename e.g.: npc_langGER, if your Languagefile is named "npc_langGER.properties". The Languagefiles must be
with ending ".properties.
example of the english Langfile:
traderWelcome=I'm_selling_these_items traderNotEnough=Sorry,_you_dont_have_enough traderTakeItem=Take_your traderListSellingItems=Selling traderAlreadyExists=already_exist_in traderItemAdded=Item_added_to traderItemNotExist=does_not_exist traderItemWithId=Item_with_id traderItem=items traderListOf=List_of traderFor=for simpleMessage=Message simpleAdded=added_to simpleMassageWithId=message_with_id simpleNotExist=does_not_exist_in simpleListOfBase=List_of_Base simpleMessages=messages salesmanWelcome=I'm_buying_these_items baseItemDeleted=deleted_from baseItemId=Id eventListenerBasename=Basename eventListenerInUse=already_in_use_by eventListenerCreated=created eventListenerSimplenpc=Simple_npc eventListenerDeleted=deleted eventListenerListOfSnpc=List_of_simple_npcs eventListenerName=Name eventListenerRename=renamed_to eventListenerMove=moved_to_new_position eventListenerItemInHand=item_in_hand_changed_to eventListenerTradernpc=Trader-npc eventListenerNpcType=NPC_Type eventListenerWrongSyn=Wrong_syntax eventListenerITradernpc=iTrader-npc eventListenerRecStarted=Route_recording_started eventListenerRecEnd=Route_recording_finished eventListenerStart=Playing_Route eventListenerStop=Routeplayback_stopped
If the Plugin does not find all Lines in the Languagefile, the missing translated parts, will be in English by
I made a Languagefile for GERMAN and ENGLISH. Please feel free, to translate into other Langs.
English, is default, you dont have to attach this file in properties, if the value is set to "default"
But for translation it will be helpful: <!-- m -->http://www.mediafire...i448frft9ea4cza<!-- m -->
Nederlands and (dunno, forget the name, pls contact me!)
Danish (thx to Rallerbabz @bukkitforums)
A PIRATE-LANGUAGE-PACK (thx to iSushi @bukkitforums)
All Files are included with the Download
Get all Files in one ZIP-Archive:
Download(zip): DOWNLOAD ZIP ARCHIVE HERE/size]
Follow me on Twitter, to receive latest News about this Plugin
<!-- m -->http://twitter.com/_jimpi<!-- m -->
If you like my work, feel free to Donate
<!-- m -->https://www.paypal.c... ... B9RH992DBE<!-- m -->
Planned for the next Versions:
- Bukkit-Support (50% Done) -> highest Priority atm
- fix item in hand
- CODE OPTIMIZING
- improving Walking-NPCs
Q: I can't get it to work, it says "could not find custom hook: iSettings"
A: if you get in serverlog this message:
"[SEVERE] Cannot find custom hook: iSettings"
You have no iConomy activated or you got a old version. (latest is 1.9 of iConomy)
But npc-plugin will run fine if you havent iConomy @ your server, it will only tell that the hook is not found and you will get 2 other messages in the log: "[INFO] npcsiConomy Plugin-Support not found.
[INFO] npcsiConomy-Support is Off!"
Q: My NPCs disappearing! i can not see them
A: Please edit the npcs.properties-file. The Line "npc_broadcast_range=". The Plugin runs fine with this Setting: "npc_broadcast_range=40". No invisible/disappearing NPCs during 10reboots
If you experience Bugs. Please Post in like that:
Plugins: Npcs v4.1, XY v3.1
Exception from Server-Log: Error class eventListener[:219] etc...
Whats happend: I did....
- NOTE iTRADER IMPORTANT: you can only buy items @ iTrader if you got some tool in your hand (e.g. pick) with nothing in your hand, i wont work. (will fix that)
- Only 10Items can be displayed, the others will not be shown, but can be selected (HIGH PRIORITY)
- If you trade @trader-NPc,
the Tools my change in durability, but its only a display failure,
if you use the tools after interaction with npc, the bars will be correct.
- Set Item in Hand does not work.
Credits going to:
Changelog v4.2.6 - fixed broken stuff because of Serverupdate Changelog v4.2.5 - fixed some Prefix-Bugs - added the Command "/personaMe" to Permissions, now you can enable personaMe-Feature for all groups you want. only add "/personaMe" to group-commands! :) (ingame, you can type "/npc personame" it will still work. Its not case-sensitive - Validated all the PersonaMe-Stuff, its all working fine!!! (tested with hmod134alpha13) - Some minor Code changes Changelog v4.2.4 - Syntax changed ot Trader-additem, now the syntax makes more sense for more information, look the Trader-Section or type /npc help trader :gravel: - fixed Trader-load-Bug offers got reverted (sometimes ?) - added new Npc-Type, the iSalesman. This Npc-Type can Buy defined items with defined amount from the User, and giving the user a defined amount of iConomy-Money. To Lean more about the iSalesman, view the latest Youtube-Video or type ingame "/npc help isalesman " or continue reading this post. - changed Npc-Savefile-format to .txt. Now you can manipulate the single Trader-Files with any text-editor :) no extra tools needed! - you can MIGRATE your old npc-files to the new npc-file-format, you only have to set the variable "npc_migration=false" to true in npcs.properties. If you start the Server the new files will be generated and saved to the path you set in npcs.properties (npc_fileDir=plugins/npcs/ <-- this is standard!) Please create during plugin installation, the folder which is listed by "npc_fileDir=" - now, your npcs will be able to move around the World! Please continue Reading the "Animating Npcs-Section" - fixed some bugs - updatr support is activ, but atm not working, will be running with the next Update! v4.2.3b - UpdateMethod to update NPCs (for interaction,etc) new structured. Now all is handled in one Timerthread. That maybe kills the Clientcrashes, some Users have experienced. With the Fiel "npc_update_time" in npcs.properties, you can tweak the timeinterval for updating the NPCS, (the lesser, the better the NPCs will respond. By Default its "npc_update_time=1800". But if you dont experience Client- Crashes, you could change this to a better Value. - npcs.properties got a new field called "DebugMode", default is false, if you enable it with "true" it will spam your console with Information about the plugin calls. v4.2.2 - HOTFIX: loading itraders now works fine, in every situation - disableplugin now WITHOUT Bugs if you disabled and enabled the plugin, some Npcs got Clones. But Thats fixed now. - Simple-Npcs, now prints all Messages with the same Id. Before, the Npc only printed one Message. v4.2.1 - fixed bug in npc_itraders txttobin.jar, now it converts the file properly! - Hotfix (wrong Example Code + VersionNr) v4.2 - added iConomy-Support (iTrader) - fixing delmsg (simple) Deleting now works - added new Syntax-System - added "personaMe"-Feature - fixed some minor bugs ("ARM_SWING"-exceptions..) 4.1 fixed "/npc trader delitem" did not worked added full customizable Language-Support 4.0 132+ support choose item by left and buy by right! iteminhand now dont work 3.9_1 HOTFIX 3.9 /deisableplugin was broken D: (+rep for any help) some commands for editing npcs $<color> now working in messages too use %player% in messages for pasting player name 3.8 added /npc info command /deisableplugin was broken D: (+rep for any help) code optimization npc_color now deleted, but you can use $<color> in name for paintig names. npc_simple multiline messages(just add messages with some ids) 3.7 Now plugin can be disabled/enabled by in-game commands. 3.6 Npc's names stays " " when no players in specified distance near it. 3.5 HOTFIX 3.4 Saving into binary file 3.3 some fixs 3.2 Coloured messages and npc nicks 3.1 Fixed npc_trader selling msg Fixed non-deleteting last npc Fixed non-fully deleting npcs Broadcast npcs position to players in fixed range 3.0 npc_trader 2.4 code optimization (thx to Playermet) now you must to look at npc for interacting with it 2.3 Second relize Code was fully rewrited npc_trader now deleted added npc_simple new npc creating system npcs.properties 1.0 First relize npc's now saves into file and loading when server is started 0.5_1 deleting npc's 0.5 npc_trader 0.4 Catching interact player with npc event 0.3 npc's now can look up and down 0.2 npc's now looking at nearest playerBroadcast npcs position in fixed range Credits: Thx to nisovin for base npc class Thx to Morpheus.