Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

[Plugin][CanaryB8+] NPCs v4.4 + iConomy! UPDATED!


  • Please log in to reply
276 replies to this topic

#1

Jimpi
    Jimpi

    Stone Miner

  • Members
  • 94 posts

Posted 04 January 2011 - 04:12 AM

========================================================
Posted Image

Hi Community!
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 :gravel:

For contact visti: irc.esper.net in #canary


=============================
Changelog v4.4
- fixed broken stuff because of Serverupdate

Changelog v4.3
- 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 :gravel:

Watch a Video about some new Features:


please type "/npc help" ingame, to get help with the new and old features!

=============================


=============================
INSTALL NOTES:
=============================

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:
plugins=backupplugin,iConomy,npcs


IMPORTANT:
=============================
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" :Flint:
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:


=============================
General:
=============================


If you want to know the available commands and for help,
Type this:
/npc 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

/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 ;)

PERMISSION:
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

type
/npc personaMe help
then 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>

=============================
Creating NPCs
=============================


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]

Example:
=============================

/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"..


==============================
NOTE:
==============================

<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.

2. SELLING
==================

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:
=============================



BEWARE!!!
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 :gravel:

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:
type:
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
be overwritten!



=============================
Language-Support
=============================


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=default
The 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.
npc_language=npc_langGER

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

default.

I made a Languagefile for GERMAN and ENGLISH. Please feel free, to translate into other Langs.

=============================
Languages available:
=============================


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 -->

German,
Nederlands and (dunno, forget the name, pls contact me!)
Danish (thx to Rallerbabz @bukkitforums)
AND
A PIRATE-LANGUAGE-PACK (thx to iSushi @bukkitforums)

All Files are included with the Download
=============================


=============================
[]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 -->

=============================



=============================
SUPPORT ?
=============================

If you like my work, feel free to Donate
<!-- m -->https://www.paypal.c... ... B9RH992DBE<!-- m -->


Posted Image
=============================


=============================
Planned for the next Versions:


- Battlemaster-Npc
- Bukkit-Support (50% Done) -> highest Priority atm
- Banker-NPc
- fix item in hand
- CODE OPTIMIZING
- improving Walking-NPCs
- RPG-QUEST-SYSTEM

=============================


=============================
FAQ
=============================

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:

============
BUG- REPORT
============

Server: hmod133
Plugins: Npcs v4.1, XY v3.1

Exception from Server-Log: Error class eventListener[:219] etc...

Whats happend: I did....
=============================



=============================
Known Bugs:
=============================


- 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.

=============================

[size=150]=============================
Credits going to:
=============================


Morpheus
hMod-Team
bukkit-Team
Notch himself

=============================

[size=150][b]=============================
changelog:
=============================

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.

Have Fun :)
Jimpi

If you like my work, feel free to donate.
==BUG=REPORTING==========
If you want to report a bug, please name your current Setting of Server+Plugins.
(e.g. Server=hmod133, Plugins=NPCS4.0,Backup2.1). If possible, write the Exceptionreport. Thanks.

Register or log in to remove.

#2

krydda
    krydda

    Carpenter

  • Members
  • 68 posts
  • Location: Sweden
  • Minecraft: krydda

Posted 04 January 2011 - 11:58 AM

And how do u edit the basic name skins? (Guard,Herobrine) and stuff?

#3

Jimpi
    Jimpi

    Stone Miner

  • Members
  • 94 posts

Posted 04 January 2011 - 02:40 PM

krydda said:

And how do u edit the basic name skins? (Guard,Herobrine) and stuff?
You mean a possibility to change NPCs Skin. I Thought about it before and iam planning to add such a feature. But the Hooks that are offered by hmod does not guarantee FULL SKIN CUSTOMIZATION.  :)  But if you name a NPC like "real" Minecraftuser, the NPC will get the Skin from him. E.g. if you name your NPC "krydda" the NPC will get your Skin.
My Idea is to name NPCs like "Real-names" but showing another Name. Thats possible.

Maybe bukkit offers the possibilities for easy Skinchanging.  
:iapprove:
If you like my work, feel free to donate.
==BUG=REPORTING==========
If you want to report a bug, please name your current Setting of Server+Plugins.
(e.g. Server=hmod133, Plugins=NPCS4.0,Backup2.1). If possible, write the Exceptionreport. Thanks.

#4

krydda
    krydda

    Carpenter

  • Members
  • 68 posts
  • Location: Sweden
  • Minecraft: krydda

Posted 04 January 2011 - 05:03 PM

Jimpi said:

krydda said:

And how do u edit the basic name skins? (Guard,Herobrine) and stuff?
You mean a possibility to change NPCs Skin. I Thought about it before and iam planning to add such a feature. But the Hooks that are offered by hmod does not guarantee FULL SKIN CUSTOMIZATION.  :GoldBar:  But if you name a NPC like "real" Minecraftuser, the NPC will get the Skin from him. E.g. if you name your NPC "krydda" the NPC will get your Skin.
My Idea is to name NPCs like "Real-names" but showing another Name. Thats possible.

Maybe bukkit offers the possibilities for easy Skinchanging.  
:iapprove:
ok :GoldBar:

"But if you name a NPC like "real" Minecraftuser, the NPC will get the Skin from him. E.g. if you name your NPC "krydda"" already knew that..

#5

bloodien0se

Posted 04 January 2011 - 10:40 PM

Jimpi,
I haven't played with 4.1 yet, but I believe setting the trader prefix setting to from "=[Trader] " to nothing would eventually cause my server (and computer) to crash. I'd prefer my traders to have no prefix at all, just have their names.

And some requests: If you combine the two "types" (trader/simple) into one flatfile, you could make the basic commands work for both types without specifying which type.  Delete, Move, Setiih, Setname, and List all currently require you to specify which type of NPC you are talking about. You could cut down on the number of different commands by a good bit.
Here's how I wish it worked:
/npc create
/npc delete
/npc move
/npc setiih
/npc setname
/npc list [partofname]

The following would only work with NPCs created as Simple type, giving you an error ("Command only works with Simple NPCs") if the basename is that of a trader:
/npc addmsg
/npc delmsg
/npc listmsg

And these would work only with Trader types, giving you an error ("Command only works with Trader NPCs") if the basename matches that of a simple:
/npc additem
/npc delitem
/npc listitem

It would also be quite nice if the additem command could accept item names from items.txt instead of only item ids.

#6

Jimpi
    Jimpi

    Stone Miner

  • Members
  • 94 posts

Posted 05 January 2011 - 12:06 AM

bloodien0se said:

Jimpi,
I haven't played with 4.1 yet, but I believe setting the trader prefix setting to from "=[Trader] " to nothing would eventually cause my server (and computer) to crash. I'd prefer my traders to have no prefix at all, just have their names.

Hi bloodien0se !

Thanks for your Feedback, if you Remove the Prefix, the Server will not crash, i tested it, extra for you, i created a trader-npc and voila, the name without prefix will be displayed :iapprove:

bloodien0se said:

And some requests: If you combine the two "types" (trader/simple) into one flatfile, you could make the basic commands work for both types without specifying which type.  Delete, Move, Setiih, Setname, and List all currently require you to specify which type of NPC you are talking about. You could cut down on the number of different commands by a good bit.
Here's how I wish it worked:
/npc create
/npc delete
/npc move
/npc setiih
/npc setname
/npc list [partofname]

The following would only work with NPCs created as Simple type, giving you an error ("Command only works with Simple NPCs") if the basename is that of a trader:
/npc addmsg
/npc delmsg
/npc listmsg

And these would work only with Trader types, giving you an error ("Command only works with Trader NPCs") if the basename matches that of a simple:
/npc additem
/npc delitem
/npc listitem

During programming i recognized that there is a lot of potential to make that plugin better. Like you, i have seen the really same  create/delete/move/etc. syntax. But its not why there are 2 own flatfiles. (atm in my dev-version, i got 3, one more for itrader ^^ (trader for iConomy-Support))

Atm i was going to port this Plugin to Bukkit, because of missing Methods, i will not be able to port it to Bukkit, and so, i am going to make that syntax better. And maybe i will write the settings into one flatfile.

bloodien0se said:

It would also be quite nice if the additem command could accept item names from items.txt instead of only item ids.
Thats a good idea, but eventually, will solve this by using enums.

Visit the Thread in 1-2 Days, then i think, will be post a updated version.
Best Regards,
Jimpi
:D
If you like my work, feel free to donate.
==BUG=REPORTING==========
If you want to report a bug, please name your current Setting of Server+Plugins.
(e.g. Server=hmod133, Plugins=NPCS4.0,Backup2.1). If possible, write the Exceptionreport. Thanks.

#7

bloodien0se

Posted 05 January 2011 - 03:14 AM

Hmm, I wonder what was causing the crash then. Thank you for your time and considering my requests. I look forward to updates, and to checking out the bukkit version when bukkit is released.

#8

Jimpi
    Jimpi

    Stone Miner

  • Members
  • 94 posts

Posted 05 January 2011 - 03:56 AM

I have got iConomy to work, buying items is ready to use, its working 100% :Diamond:

My plan till next update, is to create a new Type of Npc, who is buying items from you and give you Money :Diamond:
Iam currently working at the syntax. Then i will create the 4th Npc-Typ and then, its time for update ^^

:Diamond:


edit: /npc create simple does work
also /npc addmsg
/npc delmsg
/npc listmsg

:Diamond:

Tomorrow, i will edit the rest.

Cheers
If you like my work, feel free to donate.
==BUG=REPORTING==========
If you want to report a bug, please name your current Setting of Server+Plugins.
(e.g. Server=hmod133, Plugins=NPCS4.0,Backup2.1). If possible, write the Exceptionreport. Thanks.

#9

Jimpi
    Jimpi

    Stone Miner

  • Members
  • 94 posts

Posted 05 January 2011 - 05:27 AM

krydda said:

And how do u edit the basic name skins? (Guard,Herobrine) and stuff?

sad news, loading skins is done by client, so there is no chance to modify it with a serverMod. But i will try to release a client mod that implements such a feature... MAYBE when i got more time ^^
If you like my work, feel free to donate.
==BUG=REPORTING==========
If you want to report a bug, please name your current Setting of Server+Plugins.
(e.g. Server=hmod133, Plugins=NPCS4.0,Backup2.1). If possible, write the Exceptionreport. Thanks.

#10

TurtleeyMC
    TurtleeyMC

    Blaze Extinguisher

  • Members
  • 4229 posts
  • Location: Arvada, Colorado
  • Minecraft: Flatirons

Posted 05 January 2011 - 10:15 AM

This is pretty interesting, but I think the controls are a tiny bit complicated.


User's ease of navigation and easy interface is key!

Does this work for bukkit, or does the bukkit* in the name supposed to mean "hmod but not bukkit"?
[simg]http://www.userbars.com/i/547443.gif[/simg]
Posted Image < My Steam Account (add me!)
Posted ImagePosted ImagePosted ImagePosted Image < Dragon Cave! :D (aid)

#11

Kayonesoft

Posted 05 January 2011 - 12:01 PM

I'm getting a couple of errors.

1: I'm experiencing a lot of lag when attempting to interact with NPCs, sometimes causing me to disconnect.
2: I experience a java error on occasion when trying to use NPC commands (I can't be more specific right this moment, but I will next time it happens)
3: my server log keeps showing "[SEVERE] Exception while calling plugin function in 'class event_listener' while calling hook: 'ARM_SWING'."
4: /npc simple delmsg  doesn't seem to be functioning. I do not get an error when using the command but it doesn't do anything as the messages are not removed.
5: Sometimes NPCs say more than one message with just a single click
6: Unconfirmed, but I think using NPCs uses your active tool's durability. I'll have to test later.

A couple of other things:
It seems like I can only get NPCs to talk by clicking on their mouth region. Anywhere else and it's unresponsive.
Rightclick doesn't work for flavor text?
The npc_simples file doesn't seem to be in a format that's easily editable, or at least I just don't know what program I should be editing it in. Wordpad doesn't seem to work right.

#12

Jimpi
    Jimpi

    Stone Miner

  • Members
  • 94 posts

Posted 05 January 2011 - 01:58 PM

TurtleeyMC said:

This is pretty interesting, but I think the controls are a tiny bit complicated.


User's ease of navigation and easy interface is key!

Currently working at the syntax,

Syntax will be:

/npc create simple/trader/itrader
/npc delete
/npc move  
/npc setiih
/npc setname
/npc list [partofname]
/npc addmsg
/npc delmsg
/npc listmsg
/npc additem   
/npc delitem
/npc listitem

---iConomy specifc---
/npc additem   

--- help ---
/npc info
/npc help

-----------------

If you got ideas to make it better, let me know  :Water:

TurtleeyMC said:

Does this work for bukkit, or does the bukkit* in the name supposed to mean "hmod but not bukkit"?
Iam was currently working on porting it to bukkit, but there are missing methods, and so bukkit port will be delayed. But it will come. I Think in the next few days, bukkitteam will implement needed methods (cause, hMode offers them...)

Thanks for interest,
Jimpi
If you like my work, feel free to donate.
==BUG=REPORTING==========
If you want to report a bug, please name your current Setting of Server+Plugins.
(e.g. Server=hmod133, Plugins=NPCS4.0,Backup2.1). If possible, write the Exceptionreport. Thanks.

#13

Jimpi
    Jimpi

    Stone Miner

  • Members
  • 94 posts

Posted 05 January 2011 - 02:20 PM

Kayonesoft said:

I'm getting a couple of errors.

1: I'm experiencing a lot of lag when attempting to interact with NPCs, sometimes causing me to disconnect.

could you please tell my your setting ? (hmod version, plugin version, count of npcs, so i will able to replicate this @ my server ? Thx.

Kayonesoft said:

2: I experience a java error on occasion when trying to use NPC commands (I can't be more specific right this moment, but I will next time it happens)
Please let me know the exception text. Have a look at your Serverlog (if you save this, if not please set logging to true in server.properties).

Kayonesoft said:

3: my server log keeps showing "[SEVERE] Exception while calling plugin function in 'class event_listener' while calling hook: 'ARM_SWING'."
Please let me know the exception text with Line etc. E.g. "...ARM_SWING in event_listener [:231]...".
Discovered yesterday some similiar exception and could remove this :)


Kayonesoft said:

4: /npc simple delmsg  doesn't seem to be functioning. I do not get an error when using the command but it doesn't do anything as the messages are not removed.
Sorry for that, with the new syntax, the failure will be gone. Iam trying to release it soon!

Kayonesoft said:

5: Sometimes NPCs say more than one message with just a single click
If you give messages the same id, e.g. addmsg base 1 message1
and "addmsg base 1 message2

they will be printed at the same time, because of the same id. Give different ids for random printing.

Kayonesoft said:

6: Unconfirmed, but I think using NPCs uses your active tool's durability. I'll have to test later.
I will investigate. But i think its not ^^
Could you tell me what plugins you got @ your server ?

Kayonesoft said:

A couple of other things:
It seems like I can only get NPCs to talk by clicking on their mouth region. Anywhere else and it's unresponsive.
Rightclick doesn't work for flavor text?
The npc_simples file doesn't seem to be in a format that's easily editable, or at least I just don't know what program I should be editing it in. Wordpad doesn't seem to work right.

Its in the usage-guide, you have to click there head to interact with them.
And the simple/trader flatfileformat is not for user-editing. Its not crypted, its simple variables from the objects, it have to be in that format for "easy" reading it for the plugin.

If you wish files to edit (trader items etc) i have to investigate :)

Thanks for your interest, Update will released in a few Days/hous :ugly:
If you like my work, feel free to donate.
==BUG=REPORTING==========
If you want to report a bug, please name your current Setting of Server+Plugins.
(e.g. Server=hmod133, Plugins=NPCS4.0,Backup2.1). If possible, write the Exceptionreport. Thanks.

#14

Kayonesoft

Posted 05 January 2011 - 02:36 PM

Jimpi said:

Kayonesoft said:

I'm getting a couple of errors.

1: I'm experiencing a lot of lag when attempting to interact with NPCs, sometimes causing me to disconnect.

could you please tell my your setting ? (hmod version, plugin version, count of npcs, so i will able to replicate this @ my server ? Thx.
hmod 133
npcs 4.1
Number of NPCs currently: 6 (but I've had it happen with just one)
Other server info:
I'm running it off my home computer, and connecting to the server using the same home computer, but I'm not connecting through Localhost, rather I connect through the outside IP like everyone else connecting.
I'm using McMyAdmin 0.8.1.0 Enterprise
Some other plugins I'm using: MonoPort, iConomy, iCTrade, iCShop, Cuboid

I'll provide more information tonight. I'm afraid I was only able to play with it for a couple hours this morning.

Jimpi said:

Kayonesoft said:

2: I experience a java error on occasion when trying to use NPC commands (I can't be more specific right this moment, but I will next time it happens)
Please let me know the exception text. Have a look at your Serverlog (if you save this, if not please set logging to true in server.properties).

Kayonesoft said:

3: my server log keeps showing "[SEVERE] Exception while calling plugin function in 'class event_listener' while calling hook: 'ARM_SWING'."
Please let me know the exception text with Line etc. E.g. "...ARM_SWING in event_listener [:231]...".
Discovered yesterday some similiar exception and could remove this :D
I'll let you know tonight.


Jimpi said:

Kayonesoft said:

4: /npc simple delmsg  doesn't seem to be functioning. I do not get an error when using the command but it doesn't do anything as the messages are not removed.
Sorry for that, with the new syntax, the failure will be gone. Iam trying to release it soon!

Kayonesoft said:

5: Sometimes NPCs say more than one message with just a single click
If you give messages the same id, e.g. addmsg base 1 message1
and "addmsg base 1 message2

they will be printed at the same time, because of the same id. Give different ids for random printing.
I'm positive I'm seeing more than one message printed even though they use different IDs. At first I thought it was part of the lag issue I was experiencing but I was able to repeat it several times with a single click.

Jimpi said:

Kayonesoft said:

6: Unconfirmed, but I think using NPCs uses your active tool's durability. I'll have to test later.
I will investigate. But i think its not ^^
Could you tell me what plugins you got @ your server ?
hmod, cuboid, iconomy, ictrade, icshop and this one.

Jimpi said:

Kayonesoft said:

A couple of other things:
It seems like I can only get NPCs to talk by clicking on their mouth region. Anywhere else and it's unresponsive.
Rightclick doesn't work for flavor text?
The npc_simples file doesn't seem to be in a format that's easily editable, or at least I just don't know what program I should be editing it in. Wordpad doesn't seem to work right.

Its in the usage-guide, you have to click there head to interact with them.
And the simple/trader flatfileformat is not for user-editing. Its not crypted, its simple variables from the objects, it have to be in that format for "easy" reading it for the plugin.

If you wish files to edit (trader items etc) i have to investigate :)

Thanks for your interest, Update will released in a few Days/hous :ugly:
I've just gotten used to going in and manually modifying a lot of variables through the property files. I tend to like it better for going in and doing a lot of work over typing in console commands in game.

#15

Robinx
    Robinx

    Tree Puncher

  • Members
  • 36 posts
  • Location: Germany
  • Minecraft: Robinx

Posted 05 January 2011 - 07:08 PM

Will you do some things of morpheus' todolist?

E.G.
- Make npc_battlemaster
- trader execute command for item
Skype: My.Robinx
Posted Image

#16

Jimpi
    Jimpi

    Stone Miner

  • Members
  • 94 posts

Posted 05 January 2011 - 10:09 PM

Robinx said:

Will you do some things of morpheus' todolist?

E.G.
- Make npc_battlemaster
- trader execute command for item

Yes, in another Forum, we discussed battlemaster, and we thought it would be could, to support cuboid etc, to get to specified areas of that plugins. But first, i will create a NPC which will have the abilitie to port you to specific areas/npcs. So you can be spawned to battleareas etc. Maybe support with a pvp-plugin will come.

But first: Npc for teleporting.

New Syntax is complete working. Now working at the new Npc for selling items to him for money (iconomy support) or items...

Then the Kraken will be released  :SSSS:
If you like my work, feel free to donate.
==BUG=REPORTING==========
If you want to report a bug, please name your current Setting of Server+Plugins.
(e.g. Server=hmod133, Plugins=NPCS4.0,Backup2.1). If possible, write the Exceptionreport. Thanks.

#17

Jimpi
    Jimpi

    Stone Miner

  • Members
  • 94 posts

Posted 06 January 2011 - 05:14 AM

Video of Release 4.2 - including iConomy support, new syntax, huge /help-menu!
DeAg2mnEDDY

If you like my work, feel free to donate.
==BUG=REPORTING==========
If you want to report a bug, please name your current Setting of Server+Plugins.
(e.g. Server=hmod133, Plugins=NPCS4.0,Backup2.1). If possible, write the Exceptionreport. Thanks.

#18

liquidthex

Posted 06 January 2011 - 05:22 AM

Suggestion: Self-Persona NPCs!

Define an NPC with textual interactions that will pop into your place when you log off, and disappear when you log on!

#19

Jimpi
    Jimpi

    Stone Miner

  • Members
  • 94 posts

Posted 06 January 2011 - 05:27 AM

liquidthex said:

Suggestion: Self-Persona NPCs!

Define an NPC with textual interactions that will pop into your place when you log off, and disappear when you log on!

Noticed!
+1Kudos to you
If you like my work, feel free to donate.
==BUG=REPORTING==========
If you want to report a bug, please name your current Setting of Server+Plugins.
(e.g. Server=hmod133, Plugins=NPCS4.0,Backup2.1). If possible, write the Exceptionreport. Thanks.

#20

CKSlider
    CKSlider

    Zombie Killer

  • Members
  • 154 posts

Posted 06 January 2011 - 07:36 PM

game crashes whenever i try a /npc command even /npc help

java.lang.StringIndexOutOfBoundsException: String index out of range: 2
at java.lang.String.charAt(Unknown Source)
at mj.a(SourceFile:152)
at mj.a(SourceFile:119)
at ob.a(SourceFile:213)
at kr.b(SourceFile:315)
at net.minecraft.client.Minecraft.run(SourceFile:704)
at java.lang.Thread.run(Unknown Source)

im hmod 133

plugins:CuboidPlugin,QuickPort,MagicCarpet,iConomy,SlowHeal,LocalChat,npcs