Traxata
Junior Administrator
Here's the info on the NPC mod (admin reference really)
We'll look at putting these NPC's in SkyCity shops, might have to look at an economy mod, or decide on either gold bricks / blocks or diamonds as currency?
Any thoughts?
_________________________________________________________________
#ReadMe for the npcs plugin
#courtesy of Bluragon
Table of contents:
[1.0] FAQ
[2.0] Installation
[3.0] Setting up an NPC!
[3.1] Variables
[3.2] General commands
[3.3] Simples commands
[3.4] Traders commands
[3.5] Example simple!
[3.6] Example trader!
[4.0] Editing files directly
[5.0] Misc
---Use the search function on the tags.
====================
[1.0] - Installation
====================
take the npcs.jar and place it in your plugins folder. Then, open your server.properties and add "npcs" (without quotemarks, no capitals) and you're done!
===========
[2.0] - FAQ
===========
Some frequently asked questions:
1. Can the NPC's be given custom skins?
Short Answer: No.
Long Answer: Kind of. NPC's can be given skins by giving them the NAME OF AN ALREADY EXISTANT PLAYER.
You CANNOT give a custom skin any other way. NOTE: The name must NOT be coloured.
2. Can I change the distance at which the skin loads?
Short Answer: Yes.
Long Answer: Indirectly, yes. You must change the distance at which the NAME loads to change the distance that the skin loads.
3. What are simples?
Short Answer: Simple NPC's.
Long Answer: Simples are NPC's which deliver a message to whoever clicks on them (hits them). If multiple messages are set, it will pick one at random. If multiple messages are set with the same ID number, he will say them both at once.
4. What are traders, and how can I use them?
Short Answer: They trade with you.
Long answer: Traders are NPC's that give you items in exchange for taking items. To use a trader, hit him with an empty hand. He will tell you all his offers, and there will be a little * next to the one you have selected. Once you select the offer you want, hold the item he wants and hit him with it! EG: If a trader says:
<[Trader]Bobby> I am selling these items
3x Coal for 1x Flint
*30x Coal for 2x IronBar
The second offer is selected. You then equip ironbars (hold them) and hit him with it, and the trade will ensue!
---Feel free to submit more questions.
=========================
[3.0] - Setting up an NPC
=========================
For a simple, see [3.3]
For a trader, see [3.4]
=================
[3.1] - Functions
=================
Basename = The ID of the NPC. This is NOT the visible name, this is the ID used in commands.
Name = The visible name of an NPC. You can use $<colorcode> to make it colourful. (eg, "$aBobby" would make the NPC have a bright green name "Bobby")
ID = This is important. It is the ID of whatever string you enter. EG. Message ID 1: Hello!
Message ID 2: HAI
ID's allow the plugin to identify seperate functions.
ItemID = These are... Well... Item ID's! Eg. 264 for diamonds.
---http://www.minecraftwiki.net/images/3/33/ItemslistV110.png
MSG = Enter text here.
SellItemID = The item ID that a trader is SELLING
SellItemCount = The amount of the above item that the trader SELLS AT A TIME
SellItemName = You can enter any text here, this is what the NPC will say the item is called.
BuyItemID = The item ID that a trader is BUYING
BuyItemCount = The amount of the above item that the trader BUYS AT A TIME
BuyItemName = You can enter any text here, this is what the NPC will say the item is called.
%player% = This string is replaced with the name of whoever is viewing the message! Place this in simples messages!
========================
[3.2] - General commands
========================
Currently, the only general command is
||/npc info === This command gives you detauls about what NPC you are looking at (basename, name)
========================
[3.3] - Simples commands
========================
||/npc simple create <basename> <name> === Creates a simple NPC. NOTE: NPC's created will be holding the same item you are!
||/npc simple delete <basename> === Deletes the specified NPC.
||/npc simple move <basename> === Moves the specified NPC to your current location (and facing)
||/npc simple setiih <basename> <ItemID> === Setiih stands for SET ITEM IN HAND. You can change what item they are holding.
||/npc simple setname <basename> <name> === Lets you rename the specified NPC.
||/npc simple list [partofname] === Lists NPC's with [partofname]. If you do not specify partofname, it will list ALL NPC's.
||/npc simple addmsg <basename> <id> <msg> === Specify the string of text to give to players that hit him. NOTE: Messages with the same ID are said at the same time! Diff ID's are randomly chosen!
||/npc simple delmsg <basename> <id> === Delete the specified msg.
||/npc simple listmsg <basename> === Lists all the messages from the specified simple.
========================
[3.4] - Traders commands
========================
||/npc trader create <basename> <name> === Creates a simple NPC. NOTE: NPC's created will be holding the same item you are!
||/npc trader delete <basename> === Deletes the specified NPC.
||/npc trader move <basename> === Moves the specified NPC to your current location (and facing)
||/npc trader setiih <basename> <ItemID> === Setiih stands for SET ITEM IN HAND. You can change what item they are holding.
||/npc trader setname <basename> <name> === Lets you rename the specified NPC.
||/npc trader list [partofname] === Lists NPC's with [partofname]. If you do not specify partofname, it will list ALL NPC's.
||/npc trader additem <basename> <id> <sellitemID> <SellItemCount> <SellItemName> <BuyItemID> <BuyItemCount> <BuyItemName> === NPC will give you <SellitemID/count> for <BuyitemID/count>
||/npc simple delitem <basename> <id> === Delete the specified trade.
||/npc simple listitem <basename> === Lists all the trades from the specified trader.
=======================
[3.5] - Example Simple!
=======================
Find a spot to place your simple.
Type in this command:
/npc simple create test1 $aBobby
You will now have an NPC called Bobby with a green name!
Now type:
/npc simple setiih test1 260
Bobby is now holding an apple!
Then type:
/npc simple addmsg test1 1 Hello there %player%
Punch his face to try it out!
Now type
/npc simple addmsg test1 1 I liek apples!
Punch his face again! He should say both messages at once!
And finally, type
/npc simple addmsg test1 2 Hahahahahaha
Punch him again, he will now randomly say EITHER the first two messages, or the last one
=======================
[3.6] - Example Trader!
=======================
NOTE: I highly suggest you do the [3.5] - Example Simple! tutorial first.
Find a spot to place your trader.
Type in this command:
/npc trader create test1 Diamond
He won't do anything yet. Type these commands:
/npc trader setiih test1 264
/npc trader additem test1 1 264 1 Diamond 263 64 Coal
Your trader will now be holding a diamond, and will give you a diamond if you give him 64 coal!
To add more offers to the trader, do the additem command (see above) and make sure you give it a different ID.
==============================
[4.0] - Editing files directly
==============================
#how to edit files directly. Courtesy of [NAMEGOESHERE]
I (BluX) simply don't do this. If someone else wants to write this tutorial, I will add it in, and give you the credit.
============
[5.0] - Misc
============
- Thanks to morpheus for the great plugin!
- More to come eventually maybe.
We'll look at putting these NPC's in SkyCity shops, might have to look at an economy mod, or decide on either gold bricks / blocks or diamonds as currency?
Any thoughts?
_________________________________________________________________
#ReadMe for the npcs plugin
#courtesy of Bluragon
Table of contents:
[1.0] FAQ
[2.0] Installation
[3.0] Setting up an NPC!
[3.1] Variables
[3.2] General commands
[3.3] Simples commands
[3.4] Traders commands
[3.5] Example simple!
[3.6] Example trader!
[4.0] Editing files directly
[5.0] Misc
---Use the search function on the tags.
====================
[1.0] - Installation
====================
take the npcs.jar and place it in your plugins folder. Then, open your server.properties and add "npcs" (without quotemarks, no capitals) and you're done!
===========
[2.0] - FAQ
===========
Some frequently asked questions:
1. Can the NPC's be given custom skins?
Short Answer: No.
Long Answer: Kind of. NPC's can be given skins by giving them the NAME OF AN ALREADY EXISTANT PLAYER.
You CANNOT give a custom skin any other way. NOTE: The name must NOT be coloured.
2. Can I change the distance at which the skin loads?
Short Answer: Yes.
Long Answer: Indirectly, yes. You must change the distance at which the NAME loads to change the distance that the skin loads.
3. What are simples?
Short Answer: Simple NPC's.
Long Answer: Simples are NPC's which deliver a message to whoever clicks on them (hits them). If multiple messages are set, it will pick one at random. If multiple messages are set with the same ID number, he will say them both at once.
4. What are traders, and how can I use them?
Short Answer: They trade with you.
Long answer: Traders are NPC's that give you items in exchange for taking items. To use a trader, hit him with an empty hand. He will tell you all his offers, and there will be a little * next to the one you have selected. Once you select the offer you want, hold the item he wants and hit him with it! EG: If a trader says:
<[Trader]Bobby> I am selling these items
3x Coal for 1x Flint
*30x Coal for 2x IronBar
The second offer is selected. You then equip ironbars (hold them) and hit him with it, and the trade will ensue!
---Feel free to submit more questions.
=========================
[3.0] - Setting up an NPC
=========================
For a simple, see [3.3]
For a trader, see [3.4]
=================
[3.1] - Functions
=================
Basename = The ID of the NPC. This is NOT the visible name, this is the ID used in commands.
Name = The visible name of an NPC. You can use $<colorcode> to make it colourful. (eg, "$aBobby" would make the NPC have a bright green name "Bobby")
ID = This is important. It is the ID of whatever string you enter. EG. Message ID 1: Hello!
Message ID 2: HAI
ID's allow the plugin to identify seperate functions.
ItemID = These are... Well... Item ID's! Eg. 264 for diamonds.
---http://www.minecraftwiki.net/images/3/33/ItemslistV110.png
MSG = Enter text here.
SellItemID = The item ID that a trader is SELLING
SellItemCount = The amount of the above item that the trader SELLS AT A TIME
SellItemName = You can enter any text here, this is what the NPC will say the item is called.
BuyItemID = The item ID that a trader is BUYING
BuyItemCount = The amount of the above item that the trader BUYS AT A TIME
BuyItemName = You can enter any text here, this is what the NPC will say the item is called.
%player% = This string is replaced with the name of whoever is viewing the message! Place this in simples messages!
========================
[3.2] - General commands
========================
Currently, the only general command is
||/npc info === This command gives you detauls about what NPC you are looking at (basename, name)
========================
[3.3] - Simples commands
========================
||/npc simple create <basename> <name> === Creates a simple NPC. NOTE: NPC's created will be holding the same item you are!
||/npc simple delete <basename> === Deletes the specified NPC.
||/npc simple move <basename> === Moves the specified NPC to your current location (and facing)
||/npc simple setiih <basename> <ItemID> === Setiih stands for SET ITEM IN HAND. You can change what item they are holding.
||/npc simple setname <basename> <name> === Lets you rename the specified NPC.
||/npc simple list [partofname] === Lists NPC's with [partofname]. If you do not specify partofname, it will list ALL NPC's.
||/npc simple addmsg <basename> <id> <msg> === Specify the string of text to give to players that hit him. NOTE: Messages with the same ID are said at the same time! Diff ID's are randomly chosen!
||/npc simple delmsg <basename> <id> === Delete the specified msg.
||/npc simple listmsg <basename> === Lists all the messages from the specified simple.
========================
[3.4] - Traders commands
========================
||/npc trader create <basename> <name> === Creates a simple NPC. NOTE: NPC's created will be holding the same item you are!
||/npc trader delete <basename> === Deletes the specified NPC.
||/npc trader move <basename> === Moves the specified NPC to your current location (and facing)
||/npc trader setiih <basename> <ItemID> === Setiih stands for SET ITEM IN HAND. You can change what item they are holding.
||/npc trader setname <basename> <name> === Lets you rename the specified NPC.
||/npc trader list [partofname] === Lists NPC's with [partofname]. If you do not specify partofname, it will list ALL NPC's.
||/npc trader additem <basename> <id> <sellitemID> <SellItemCount> <SellItemName> <BuyItemID> <BuyItemCount> <BuyItemName> === NPC will give you <SellitemID/count> for <BuyitemID/count>
||/npc simple delitem <basename> <id> === Delete the specified trade.
||/npc simple listitem <basename> === Lists all the trades from the specified trader.
=======================
[3.5] - Example Simple!
=======================
Find a spot to place your simple.
Type in this command:
/npc simple create test1 $aBobby
You will now have an NPC called Bobby with a green name!
Now type:
/npc simple setiih test1 260
Bobby is now holding an apple!
Then type:
/npc simple addmsg test1 1 Hello there %player%
Punch his face to try it out!
Now type
/npc simple addmsg test1 1 I liek apples!
Punch his face again! He should say both messages at once!
And finally, type
/npc simple addmsg test1 2 Hahahahahaha
Punch him again, he will now randomly say EITHER the first two messages, or the last one
=======================
[3.6] - Example Trader!
=======================
NOTE: I highly suggest you do the [3.5] - Example Simple! tutorial first.
Find a spot to place your trader.
Type in this command:
/npc trader create test1 Diamond
He won't do anything yet. Type these commands:
/npc trader setiih test1 264
/npc trader additem test1 1 264 1 Diamond 263 64 Coal
Your trader will now be holding a diamond, and will give you a diamond if you give him 64 coal!
To add more offers to the trader, do the additem command (see above) and make sure you give it a different ID.
==============================
[4.0] - Editing files directly
==============================
#how to edit files directly. Courtesy of [NAMEGOESHERE]
I (BluX) simply don't do this. If someone else wants to write this tutorial, I will add it in, and give you the credit.
============
[5.0] - Misc
============
- Thanks to morpheus for the great plugin!
- More to come eventually maybe.