[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


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

    • 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

    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


    They follow these exact instructions. So everything should be typed in properly (unless its different in 101). Along with that, I have 101 in my plugins folder and so do they. So when they try to connect on localhost:25565, that error occurs. The port specified (1440) is open on my end.
  3. Offline


    ...uhm, what? I don't see what this has to do with the upside down people.
  4. Offline


    <a target='_blank' title='ImageShack - Image And Video Hosting' href='http://imageshack.us/photo/my-images/684/20110604200223.png/'><img src='http://img684.imageshack.us/img684/7205/20110604200223.png' border='0'/></a>

    Uploaded with <a target='_blank' href='http://imageshack.us'>ImageShack.us</a>

    i loged in and all my npcs are looking at the floor, the shop keeper has even turned away from his window

    its asthetic thing i know but its wierd that all my npcs have suddenly become depressed at once, anything i can do to cheer them up?

    also tried to set a patrol route for one guard, he kinda got stuck on the first waypoint even though it was fully flat ground and just walked foward and backward on in a 4 block radius of it
  5. Offline


    Wrong post....
  6. Offline


    Chocolate should cheer them up and...rofl that's pretty funny actually. Either they loaded like that (meaning that the values in the database are like that), or they saw something below them for a second and then forgot to look back up. If you get their attention (hit them, talk to them, etc), do they keep looking up or do they look back down when they lose target?

    As for the patrol route...all I can say is try resetting the pathgroup or remaking it altogether.
  7. Offline

    cris kevin

    Hey i get an error when trying to spawn a npc

    00:16:41 [WARNING] npcx: error: Cannot add or update a child row: a foreign key
    constraint fails (`npcx`.`spawngroup_entries`, CONSTRAINT `fk_spawngroupid` FORE
    IGN KEY (`spawngroupid`) REFERENCES `spawngroup` (`id`) ON DELETE NO ACTION ON U
    PDATE NO ACTION)[Ljava.lang.StackTraceElement;@d9c21c6
    00:16:41 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolat
    ionException: Cannot add or update a child row: a foreign key constraint fails (
    `npcx`.`spawngroup_entries`, CONSTRAINT `fk_spawngroupid` FOREIGN KEY (`spawngro
    00:16:41 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance
    0(Native Method)
    00:16:41 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance
    (Unknown Source)
    00:16:41 [SEVERE] at sun.reflect.DelegatingConstructorAccessorImpl.newInst
    ance(Unknown Source)
    00:16:41 [SEVERE] at java.lang.reflect.Constructor.newInstance(Unknown Sou
    00:16:41 [SEVERE] at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    00:16:41 [SEVERE] at com.mysql.jdbc.Util.getInstance(Util.java:382)
    00:16:41 [SEVERE] at com.mysql.jdbc.SQLError.createSQLException(SQLError.j
    00:16:41 [SEVERE] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:
    00:16:41 [SEVERE] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:
    00:16:41 [SEVERE] at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)

    00:16:41 [SEVERE] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:21
    00:16:41 [SEVERE] at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.
    00:16:41 [SEVERE] at com.mysql.jdbc.PreparedStatement.executeInternal(Prep
    00:16:41 [SEVERE] at com.mysql.jdbc.PreparedStatement.executeUpdate(Prepar
    00:16:41 [SEVERE] at com.mysql.jdbc.PreparedStatement.executeUpdate(Prepar
    00:16:41 [SEVERE] at com.mysql.jdbc.PreparedStatement.executeUpdate(Prepar
    00:16:41 [SEVERE] at net.gamerservices.npcx.npcx.onCommand(npcx.java:1373)

    00:16:41 [SEVERE] at org.bukkit.command.PluginCommand.execute(PluginComman
    00:16:41 [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCo
    00:16:41 [SEVERE] at org.bukkit.craftbukkit.CraftServer.dispatchCommand(Cr
    00:16:41 [SEVERE] at net.minecraft.server.NetServerHandler.handleCommand(N
    00:16:41 [SEVERE] at net.minecraft.server.NetServerHandler.chat(NetServerH
    00:16:41 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHand
    00:16:41 [SEVERE] at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:3
    00:16:41 [SEVERE] at net.minecraft.server.NetworkManager.b(NetworkManager.
    00:16:41 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHand
    00:16:41 [SEVERE] at net.minecraft.server.NetworkListenThread.a(SourceFile
    00:16:41 [SEVERE] at net.minecraft.server.MinecraftServer.h(MinecraftServe
    00:16:41 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftSer
    00:16:41 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(Sour
  8. Offline


    Looks like one of the rows in the spawngroup_entries table is referencing an id on the spawngroup table that doesn't exist.
  9. Offline


    Is it possible to make it so I have a guard but I want the guard to kill Dannyo333 when close? Not me, and others in my guild (factions)
  10. Offline

    Jeffrey Morelos

    Hey guys how do i set up mysql with hamachi on windows 7?
  11. Offline

    Emiya Shirou

    Any chances to make this plugin without mysql? (Like for example for flatfile or something...? How the hell I'm suppose to get mysql for dedicated MC server that have access only via FTP and control panel D: ? ) or maybe an SQLite that would work on the current bukkit server without any additional servers?
  12. Offline

    cris kevin

    Hey sorry i didnt think this was inportant comes up with this first. When i am trying to do /npcx spawngroup add 1 1:

    04:32:04 [SEVERE] Exception in thread "Timer-0"
    04:32:04 [SEVERE] java.lang.NoSuchMethodError: net.minecraft.server.ItemInWorldM
    04:32:04 [SEVERE] at net.gamerservices.npclibfork.NpcSpawner.SpawnBasicHum
    04:32:04 [SEVERE] at net.gamerservices.npcx.myNPC.Spawn(myNPC.java:1146)
    04:32:04 [SEVERE] at net.gamerservices.npcx.npcx.think(npcx.java:381)
    04:32:04 [SEVERE] at net.gamerservices.npcx.Tick.run(Tick.java:16)
    04:32:04 [SEVERE] at java.util.TimerThread.mainLoop(Unknown Source)
    04:32:04 [SEVERE] at java.util.TimerThread.run(Unknown Source)
  13. Offline


    You have to edit the database directly. In one of the players tables the standing which each faction is stored. If a player's standing with a faction is below -1000, they will be attacked on sight.
    You sure you are using the correct versions of npcx and craftbukkit? (0.0.1 is only compatible with certain builds etc, check first post)
  14. Offline


    That happened to me when I let my mouse scroll down while i was getting ready to create my spawngroup. Now I make sure i'm looking where I want the NPC to look when I do it.
  15. Offline


    triggerwords doesnt work
  16. Offline


    Thanks for that super informative bug report. Are you using another plugin that messes with chat in any way, shape, or form?
  17. Offline


    So I get the following error when reading the readme file and it says to use the command /npcx spawngroup create myfirstgroup

    It will say Error or something like that and my server spits out the following:
  18. Offline


    You're missing a large part of the error there. The important part.
  19. Offline


    Can you add a flag to your property-File for IConomy support?

  20. Offline


    npc merchant.. they only stack 8 items? whenever I type list, only 8 stacks they have.. but I put 25 stacks in there.. sorry for my bad english..

    also having problem on CIV command, I can't get it to work, I change my nations to true, but whenever I type /civ buy or civ something2.. unknown console command..
  21. Offline


    Pls can you make some tuts for install and command list, i'll pleased :'(:)
  22. Offline


    Uh, pages? it can't show everything at once or your chatbox will be flooded. As for civ, I've disabled the command but if you're smart you can add it to the plugin.yml.

    Uh, try reading the original post and the readme.
    It should default to not using it if it's not installed but:
    Add "use-iConomy=false" to your npcx.properties file.

    Also I updated the main post with some info.
  23. Offline


    I love the idea of NPC's, especially in SMP. I would love to help with the development of this plugin if I could. I know some java.
  24. Offline

    Atticus Craft

    @wizjany I am interested in picking up wherever you left off with the rewrite... I don't know if much will come from it, I'm already rather busy, but I do really want a newer version of this plugin, and if that requires I do it (time permitting) then so be it.

    I don't know how far you got, but anything you can provide would be awesome. And like I said, I make no promises as to whether or not I'll finish :) but I figure if you aren't gonna move forward on it, I may as well attempt it.
    Bradley Hilton likes this.
  25. Offline


    pages for merchant list? But I don't see any pages.. or it's not implemented yet?
  26. I'm having issues with pathgroups when I type /npcx pathgroup 1 1 it gives message "Insufficient arguments /npcx pathgroups add pathgroupid or name" but it dosent show any error messages on log. any help what I'm doing wrong.
  27. Offline


    They apparently need a name now. Just add one last argument at the end with whatever you want.
    Could have sworn it was. Have you tried adding a number at the end of the line? Have you read everything the merchant was saying to make sure that they have all the items at least?
    Feel free to dig in.
  28. Offline


    Yes.. I've added a number at the end of the line, and yes I've read everything.. but it really has 8 Stacks.. i've putted 25..
  29. Offline


    Using build 818 these npcs are really glitching up the place. They follow you backwards. Their head is on backwards. NPCs are ignoring God Mode. During combat, npcs arn't taking damage. At all. Can't equip. When attempted to equip any item, the environment around the npc becomes buggy.

    The best part? Its not tracing any errors in the log. This is all I am able to tell you.
  30. Offline


    Hm, when you say 8 stacks do you mean 8 different entries for them to buy/sell? Have you checked the database to make sure they're all there?

    I can't reproduce this.
    Known issue, it's been around forever. They don't actually deal damage, they just swing their arm and the plugin sets your health. Fixing this would require the plugin to hook into a million other plugins that might provide godmode.
    I can't reproduce this.
    I love it when people say "stuff" is "buggy". Also those complete sentences like "can't equip." are so descriptive it makes me want to cry.

    Make sure you are using the version of craftbukkit that matches the version of npcx designed for it (see first post).

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jul 16, 2016
  31. Offline


    I'm having a really tough time with this mod and MySQL. I'm almost 90% sure it's to do with MySQL, but this issue is occurring on 2 separate MySQL servers (A Godaddy one and an Adelais one), which tells me otherwise. This issue does NOT occur on other plugins using MySQL (iConomy, BigBrother). I doubt it's a confliction, because this happens without any other mods installed as well.

    What is happening is the MySQL connection seems to get dropped and wont reconnect (or doesn't bother trying?). Then when I run the command /npcx spawngroup create test1, I get the following in the log:

    2011-06-07 20:33:08 [WARNING] npcx: error: Communications link failure
    The last packet successfully received from the server was 232,530 milliseconds ago.  The last packet sent successfully to the server was 52 milliseconds ago.[Ljava.lang.StackTraceElement;@77cf08b7
    2011-06-07 20:33:08 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    The last packet successfully received from the server was 232,530 milliseconds ago.  The last packet sent successfully to the server was 52 milliseconds ago.
    2011-06-07 20:33:08 [SEVERE]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2011-06-07 20:33:08 [SEVERE]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    2011-06-07 20:33:08 [SEVERE]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    2011-06-07 20:33:08 [SEVERE]     at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
    2011-06-07 20:33:08 [SEVERE]     at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    2011-06-07 20:33:08 [SEVERE]     at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
    2011-06-07 20:33:08 [SEVERE]     at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3082)
    2011-06-07 20:33:08 [SEVERE]     at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2968)
    2011-06-07 20:33:08 [SEVERE]     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3516)
    2011-06-07 20:33:08 [SEVERE]     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
    2011-06-07 20:33:08 [SEVERE]     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
    2011-06-07 20:33:08 [SEVERE]     at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626)
    2011-06-07 20:33:08 [SEVERE]     at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111)
    2011-06-07 20:33:08 [SEVERE]     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407)
    2011-06-07 20:33:08 [SEVERE]     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325)
    2011-06-07 20:33:08 [SEVERE]     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310)
    2011-06-07 20:33:08 [SEVERE]     at net.gamerservices.npcx.npcx.onCommand(Unknown Source)
    2011-06-07 20:33:08 [SEVERE]     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    2011-06-07 20:33:08 [SEVERE]     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:128)
    2011-06-07 20:33:08 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:281)
    2011-06-07 20:33:08 [SEVERE]     at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:718)
    2011-06-07 20:33:08 [SEVERE]     at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:684)
    2011-06-07 20:33:08 [SEVERE]     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:677)
    2011-06-07 20:33:08 [SEVERE]     at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
    2011-06-07 20:33:08 [SEVERE]     at net.minecraft.server.NetworkManager.b(NetworkManager.java:217)
    2011-06-07 20:33:08 [SEVERE]     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    2011-06-07 20:33:08 [SEVERE]     at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    2011-06-07 20:33:08 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:401)
    2011-06-07 20:33:08 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:311)
    2011-06-07 20:33:08 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-06-07 20:33:08 [SEVERE] Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
    2011-06-07 20:33:08 [SEVERE]     at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2529)
    2011-06-07 20:33:08 [SEVERE]     at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2979)
    2011-06-07 20:33:08 [SEVERE]     ... 23 more
    Then typically the server crashes with a read timed out error. I haven't been able to find any information on google or elsewhere on this. Any ideas?

Share This Page