[FUN/MECH] npcx (v0.0.31) - The NPC eXtender (now for 1.8.1) [1097-1157]

Discussion in 'Inactive/Unsupported Plugins' started by wizjany, May 9, 2011.

  1. Offline

    wizjany

    npcx - The NPC eXtender
    Version: 0.0.31

    UPDATE: mixxit has took the initiative to update the npclib to 1.8, all credit for this update goes to him! it should work on any 1.8 version of craftbukkit

    If you are having trouble, please read the old thread here and the included readme.txt that mixxit left. If you know of any other tutorials, do post and I'll add them.

    Info Update: Well long story short I am beginning to get bored of Minecraft and I don't have as much time as I would like to develop this plugin. This probably means that the rewrite I had planned is just going to die. Besides lack of time and motivation, I find it extremely pointless to write an API for NPCs outside of bukkit/craftbukkit, which makes the rewrite I was working on very frustrating. However, I will continue to update mixxit's code for new versions of minecraft, but don't expect any new features or anything.
    Update 2: As NPCs are being planned natively for 1.8 (the adventure update), I will probably be working on a (separate) plugin or directly with the NPC API if I have time.

    Note: If you have iConomy, make sure you have at least version 5+ or you'll get an error like this.
    Code:
    [SEVERE] Could not pass event WHATEVER_EVENT to npcx
    java.lang.NoClassDefFoundError: com/iConomy/iConomy
    You should also be able to add "use-iConomy=false" in the npcx properties file.

    If you're having trouble installing MySql on windows, here's a nice guide: http://forums.bukkit.org/posts/293544, thanks to Atticus Craft. Basic WAMP/LAMP/MAMP servers should work fine too, just make sure you have the username/password correct and the database with permissions to the right user.

    Features:
    • You can create npcs
    • And they do stuff
    • Everything should work like it did in mixxit's last version
    And by "work like it did" I mean I have no clue if there were bugs from then, but they're probably still around now. Please report any you find so I can take them into consideration.

    For MC 1.8.1 (1097+, no RB yet) Download
    For MC 1.7 (937+, 953, 1k): Download
    For MC 1.6 (807+): Download
    For MC 1.5 (740-803): Download
    Source Code

    Changelog:
    Version 0.0.31
    • Updated to MC 1.8.1 (by Mixxit)
    Version 0.0.3
    • Updated for Grum's internal renaming
    Version 0.0.2
    • Updated for 1.6
    Version 0.0.1
    • Updated for 1.5
    • Began code revamp
    All credits go to mixxit for his work. Special thanks to sk89q and fullwall, even if they don't know they helped.
     
    wassilij, Zoaen, nathanaelps and 2 others like this.
  2. Offline

    masteroliw

    i have a little error after i installed this plugin:

    Code:
    2011-06-16 18:59:35 [INFO] *******************************************
    2011-06-16 18:59:35 [INFO]   npcx : ERROR - Error during MySQL login *
    2011-06-16 18:59:35 [INFO]  This generally means that you forgot to  *
    2011-06-16 18:59:35 [INFO]  create a MySQL user and database the same*
    2011-06-16 18:59:35 [INFO]  as defined in your npcx.properties file  *
    2011-06-16 18:59:35 [INFO] *******************************************
    2011-06-16 18:59:35 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
    2011-06-16 18:59:35 [SEVERE]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2011-06-16 18:59:35 [SEVERE]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at java.lang.reflect.Constructor.newInstance(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.Util.getInstance(Util.java:382)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1013)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2239)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2168)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
    2011-06-16 18:59:35 [SEVERE]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2011-06-16 18:59:35 [SEVERE]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at java.lang.reflect.Constructor.newInstance(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
    2011-06-16 18:59:35 [SEVERE]     at java.sql.DriverManager.getConnection(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at java.sql.DriverManager.getConnection(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at net.gamerservices.npcx.myUniverse.openDB(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at net.gamerservices.npcx.myUniverse.loadSetup(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at net.gamerservices.npcx.npcx.onEnable(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:125)
    2011-06-16 18:59:35 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:799)
    2011-06-16 18:59:35 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:253)
    2011-06-16 18:59:35 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:140)
    2011-06-16 18:59:35 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:118)
    2011-06-16 18:59:35 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
    2011-06-16 18:59:35 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
    2011-06-16 18:59:35 [SEVERE]     at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
    2011-06-16 18:59:35 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    2011-06-16 18:59:35 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-06-16 18:59:35 [SEVERE] Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    
    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    2011-06-16 18:59:35 [SEVERE]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2011-06-16 18:59:35 [SEVERE]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at java.lang.reflect.Constructor.newInstance(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:343)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2334)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2186)
    2011-06-16 18:59:35 [SEVERE]     ... 25 more
    2011-06-16 18:59:35 [SEVERE] Caused by: java.net.ConnectException: Connection refused: connect
    2011-06-16 18:59:35 [SEVERE]     at java.net.PlainSocketImpl.socketConnect(Native Method)
    2011-06-16 18:59:35 [SEVERE]     at java.net.PlainSocketImpl.doConnect(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at java.net.PlainSocketImpl.connect(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at java.net.SocksSocketImpl.connect(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at java.net.Socket.connect(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at java.net.Socket.connect(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at java.net.Socket.<init>(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at java.net.Socket.<init>(Unknown Source)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:254)
    2011-06-16 18:59:35 [SEVERE]     at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:292)
    2011-06-16 18:59:35 [SEVERE]     ... 27 more
    2011-06-16 18:59:35 [INFO] **********************************************
    2011-06-16 18:59:35 [INFO] * Load settings failed to load your DB setup *
    2011-06-16 18:59:35 [INFO] *                 openDB()                   *
    2011-06-16 18:59:35 [INFO] **********************************************
    
    i have done everything what Atticus Craft said on the post. but it didnt work.
     
  3. Offline

    Niles

    masteroliw do you have a mysql server running? do you have a database with the correct name as specefied in the config? is the user and pass in the config correct? if all of these are true than it is a problem with the plugin or server. otherwise it is a user error.
     
  4. Offline

    masteroliw

    are you meaning that i need to have the MySQL 5.5 command line client on? oh and everything else you said i have done. just the "do you have a mysql server running?" part i dont know about, how do i run a mysql server?

    edit 1: its not the the MySQL 5.5 command line client.
     
  5. Offline

    Niles

    Do you have a windows computer or a mac/linux.
     
  6. Offline

    masteroliw

    i have windows vista.

    edit1 : do you have team viewer? if you have can you check what i have done wrong?
     
  7. Offline

    Niles

  8. Offline

    masteroliw

    as i said. i have done that. but it didnt work.
     
  9. Offline

    Niles

    is the npcx.properties correct with the right data? you need to make a database, user AND password. that is the only thing that may have gone wrong.
     
  10. Offline

    masteroliw

    i shall check it. i have done a database with the name npcx AND the password ( p4ssw0rd ).
    but its not working.

    edit 1: wait a secound... is the password : p4ssw0rd or p4ssword/! ?
     
  11. Offline

    Niles

    a / is used to define a file location. try using a backslash (\)
     
  12. Offline

    masteroliw

    dont work

    edit 1:
    Code:
    15:34:59 [SEVERE] Caused by: java.sql.SQLException: Access denied for user ´npcx´@´localhost´ (using password: YES )
    ?
     
  13. Offline

    Niles

    that appears to be that you set your user to "npcx" or you didnt set a user in the config file. that or the password in the config file.
     
  14. Offline

    masteroliw

    config file:
    Code:
    #Default generated settings, please ensure mysqld matches
    #Thu Jun 16 18:59:24 CEST 2011
    db-version=1
    nospread=false
    db-pass=p4ssw0rd\!
    db-host=localhost
    nocreeper=false
    update=true
    db-name=npcx
    world=world
    db-port=3306
    nations=false
    db-user=npcx
    nowild=false
    
    oh and btw. do you have team viewer? you can control my computor then and fix what i have done wrong.
     
  15. Offline

    Niles

    my config is
    Code:
    #Default generated settings, please ensure mysqld matches
    #Thu May 12 15:52:50 EDT 2011
    db-version=1.10
    nospread=false
    db-pass=p4ssw0rd\!
    db-host=localhost
    nocreeper=false
    update=false
    db-name=npcx
    db-port=3306
    world=world
    db-user=npcx
    nations=false
    nowild=false
    
    and it pretty much works fine.
     
  16. Offline

    wizjany

    have you tried manually setting a password in the database and changing the config file to that?
    afaik the \ in the p4ssw0rd\! is just escaping the ! but i'm not positive, it's probably best to use something completely different
     
  17. Offline

    masteroliw

    holy ****! i fixed it! i used YES as password instead and it worked :D
     
  18. Offline

    Pim1234

    do npc's create villages and do they gather recourses on their own?
     
  19. Offline

    wizjany

    no

    Also, 0.0.3 should work fine with MC 1.7.
     
  20. Offline

    darkm3tr01d

    thanks for the update! works great.
     
  21. Offline

    Jeametrix

    :'( I keep getting an error occured message when inputing a command

    Code:
    06.07 22:37:46 [Server] SEVERE     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    06.07 22:37:46 [Server] SEVERE     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    06.07 22:37:46 [Server] SEVERE     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    06.07 22:37:46 [Server] SEVERE     at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    06.07 22:37:46 [Server] SEVERE     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:84)
    06.07 22:37:46 [Server] SEVERE     at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    06.07 22:37:46 [Server] SEVERE     at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    06.07 22:37:46 [Server] SEVERE     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:669)
    06.07 22:37:46 [Server] SEVERE     at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:676)
    06.07 22:37:46 [Server] SEVERE     at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:711)
    06.07 22:37:46 [Server] SEVERE     at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:298)
    06.07 22:37:46 [Server] SEVERE     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
    06.07 22:37:46 [Server] SEVERE     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    06.07 22:37:46 [Server] SEVERE     at net.gamerservices.npcx.npcx.onCommand(Unknown Source)
    06.07 22:37:46 [Server] SEVERE java.lang.NullPointerException
    06.07 22:37:46 [Server] WARNING npcx: error: null[Ljava.lang.StackTraceElement;@3d319fc
    its upside down btw i don't know how to change, appreciate any help!!!
     
  22. Offline

    mixxit

    Woop! Nice work wiz!
     
  23. Offline

    mixxit

    This is a request to remove the license you have attached to this version of NPCX and replace it with a normal GPL license - in the spirit of the original completely open source version - LGPL will cause people to be able to charge for derivatives of this plugin which is completely against the point of why i made it - i understand your needs to license your changes to the plugin but it should be listed as so and not the whole thing

    NPCX was created using the NPC Library, which was a great help in creating this plugin for the community and something I made available to everyone to hopefully cause the creation of many similar 'Everquest' style plugins that I believed persistent minecraft worlds need - I do hope you can understand my frustration at seeing the license in there after I made this completely open to everyone and how I feel going forward you should only attach a license to your changes which should be clearly defined in the change log as to where the license was applied

    This will mean that any plugin created using NPCX will always be free and someone can never charge for it as I had originally hoped for and of course I'm sure the author of the npclibrary feels the same way about
     
  24. Offline

    IndieGamers

    Hi, sorry if im being a bother. But i would like to request flat file storage compat. As i am not on a "MySQL" server.
     
  25. Offline

    mixxit

    Wizjany and others have been working hard on a rewrite for this stuff so hopefully those guys have worked in alternate storage systems! (and fixes for the many bugs)
     
  26. Offline

    IndieGamers

    Hopefully, I shall cross my fingers. Do you think the next release will be out soon then?
     
  27. Offline

    IronFerret

    just wondering if there is a whay to have the NPC stand still, every NPC i spawned ran off and started non-stop punching the air
     
  28. Offline

    xkingxdreadx

  29. Offline

    Po1ntBlank

    Um... can you tell me how I can do this?

    Basically, I want an NPC that does this:

    You talk to him, he says Hi there! I am the Wizard Danny. If you want, I can teach you to become a Wizard
    and then
    Okay, just bring me back {list of items} And talk to me again ;D
    and then he would be like Congratz! Are you sure you want to be a Wizard? there is NO turning back.
    And when you talk to him again, it would be like an admin was typing the comman /xl setclass {theirname] Magician

    any way this is possible?
     
  30. Offline

    EyhSteve

    Is there a way to make npc spawning cost money? And make it so people can make their own merchants and get the money from all the sales of said merchant?
     
  31. Offline

    quickclay

    Citizens
    http://forums.bukkit.org/threads/mech-fun-citizens-v1-0-9c-npcs-for-bukkit-1000.7173/
     

Share This Page