[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 10, 2011.

     
  1. Offline

    wizjany

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    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.

    This post has been edited 3 times. It was last edited by wizjany Sep 20, 2011.
    wassilij, Zoaen, nathanaelps and 2 others like this.
  2.  
  3. Offline

    Izbay

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thanks for the response! I've been putting off the upgrade to 5.x... so I guess I'll get around to that once and for all. Thanks again! ^_^

    Edit: and I'll edit later if that solves it :] ... edit
  4. Offline

    Yggy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hmmm... if they just swing their arms and damage is dealt, that needs to be taken care of. The damage should come from the NPC itself, not from a routine that deals direct-damage. Not sure how that would affect mcMMO or some of the health mods that are floating around, as it would seem to be a cause of some issues. Unless that's how Minecraft enemies deal damage, period.
  5. Offline

    radur

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    You still need mySQL?
  6. Offline

    Flenix

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Just throwing out an idea of why iConomy might be linked to aggro;
    Maybe the original dev was going to set up a money drop system, so killing the specified NPC would give you X coins? maybe if multiple people killed it, it would split/give to the one who did most damage, which would be why it was triggering while just attacking anot quite killing.
  7. Offline

    fragen

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I get the following error whenever I execute a command
    Code:
    2011-05-12 12:29:01 [WARNING] npcx: error: null[Ljava.lang.StackTraceElement;@1735b26
    2011-05-12 12:29:01 [SEVERE] java.lang.NullPointerException
    2011-05-12 12:29:01 [SEVERE]     at net.gamerservices.npcx.npcx.onCommand(Unknown Source)
    2011-05-12 12:29:01 [SEVERE]     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    2011-05-12 12:29:01 [SEVERE]     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
    2011-05-12 12:29:01 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:255)
    2011-05-12 12:29:01 [SEVERE]     at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:677)
    2011-05-12 12:29:01 [SEVERE]     at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:640)
    2011-05-12 12:29:01 [SEVERE]     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:634)
    2011-05-12 12:29:01 [SEVERE]     at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
    2011-05-12 12:29:01 [SEVERE]     at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
    2011-05-12 12:29:01 [SEVERE]     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
    2011-05-12 12:29:01 [SEVERE]     at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    2011-05-12 12:29:01 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
    2011-05-12 12:29:01 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
    2011-05-12 12:29:01 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
  8. Offline

    Deathlysteve-

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    is it by any chance for this to work with SQLite now? or is it impossible or something... that would be PERFECT if it did and i would love you but i dont like MySQL too complicated -.-
  9. Offline

    Flenix

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    pretty sure he has already said there are no plans to support it.
    I don't know technical details but as far as I am aware MySQL is a LOT faster than sqlite, so the fact that groups of NPCs lag players as it is, I feel even if this mod did work on sqlite it would be unusable from lag, so thats probably where there is no support for it.
  10. Offline

    Deathlysteve-

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    well every time i need to start server, i need to open xxamp and then run MySQL... is there an EASIER way to run MySQL... like so i start server and MySQL starts too?
  11. Offline

    duschdas2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I cant Attack Npcs and i cant delete the Npcs.

    pls help
  12. Online

    fullwall

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    To everyone experiencing issues - this plugin is still based off Mixxit's codebase, which was slightly buggy, so you may want to wait until @wizjany has simplified the code and made it a better laid out and optimised plugin before reporting bugs.
    wizjany and mbsuperstar1 like this.
  13. Offline

    duschdas2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    also that i cant attack npcs is a bug that has erveryone ?
  14. Offline

    Yahiko911

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    hy. when i write /npcx npc triggerword 1 ATTACK NPCATTACK , and when i attack him, it dont want to respond anything. what have i to do?
  15. Offline

    Taylor179

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Again, is 1.5 gigs enough ram?
  16. Offline

    PsychoNecrosis

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    That would be it

    You know, you could just run the plugin and find out if it lags or not.
  17. Offline

    hakre1

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I xampp if you check the little check-box beside svc that will install MYSQL as a service, meaning it will start up in the background when the computer boots.
  18. Offline

    Yahiko911

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hy i have a problem. When i want to chat with the npc it write this to the console:
    Code:
    2011-05-12 19:57:34 [SEVERE] Could not pass event PLAYER_CHAT to npcx
    java.lang.NoClassDefFoundError: com/iConomy/iConomy
        at net.gamerservices.npcx.myPlayer.getPlayerBalance(Unknown Source)
        at net.gamerservices.npcx.myNPC.variablise(Unknown Source)
        at net.gamerservices.npcx.myNPC.parseChat(Unknown Source)
        at net.gamerservices.npcx.myNPC.onPlayerChat(Unknown Source)
        at net.gamerservices.npcx.npcxPListener.onPlayerChat(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader$6.execute(JavaPluginLoader.java:236)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:646)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:634)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.ClassNotFoundException: com.iConomy.iConomy
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 17 more
    
    I have Craftbukkit 740, and Permissions, SimleWarp, SimpleHome, PwnCraft, Blacksmith, this NPCX, xAuth, Nether, Lockette, HeroicDeath, SimpleSave, NoWeather, NoSpawn.
    THX FOR HELP!!!
  19. Offline

    Smurphy88x

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thanks for the tip! :) Sorry all, don't use forums much... haha. I can come have a look if you like, not sure how much looking will help though :(. The triggerwods etc. work fine for me, maybe its an issue of syntax? It could also be incompatibility with another plugin, which would be annoying to deal with :confused:... I'm happy to come on and check it out first hand though ;). Besides it'd be nice to just login and see some of the many wonders of someone elses server anyway. Feel free to PM me if you'd like.
    No worries mate! :) I'll set my irc client back up at some point this week. Really keen to help out, so just let me know if you want a hand with the coding. Don't mind simply error checking either :) Good to hear you plan to redo the whole structure of the coding too. mixxit did an awesome job, and I don't want to do him any disservice, but I have to say, I'm not the biggest fan of his coding style :rolleyes:. Anyways, keen as dude, so feel free to gimme any task you like to 'test me out' if you're keen for a programming assistant :p
    Hmm, I guess first thing to do would be check the name length of the npc. I'd say try to make sure it stays under 15 for each npc. Personally I like to keep mine simple and easy to retype. (G1 for Guard type 1 etc.). If your NPCs name is shorter then 15 characters it could probably be any one (or multiples) of a number of things. I'd say to check your MySQL database is set up the way that is described in mixxit's readme, and to check for plugin conflicts (try backing up then removing all the plugins except the one for npcx). Also, not sure if its an issue or not, but I think someone mentioned it on the other thread... You should probably set yourself as an op if you have that option, because I think someone mentioned that causes issues if you don't.
    Yes, for now at least, possibly forever. For now I think we should just be happy that it is working at all. I didn't know anything about MySQL before I found this plugin, but its really not that hard to set up if you follow the steps in mixxit's readme. If you are really having trouble with this, that is understandable, but for now its all we have. Most of the code appears to be built around MySQL databases so there's probably not a whole lot the mighty plugin saviour (wizjany) can do there for now (his powers are not quite as godly as we like to believe :p). Perhaps in future, with politely infrequent requests wizjany may decide to implement a simpler system, I cannot say.
  20. Offline

    sansprenom

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Is there anybody who is able to condescend to make a detailed tutorial on how to configure mysql for the plugin?

    sans
  21. Offline

    cholo71796

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Will you make a wiki for this plugin? This thread obviously doesn't have documentation, but the previous thread doesn't either- I'm not as much a fan of videos as I am a fan of a list of commands when it comes to plugins.
  22. Offline

    Flenix

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hmm, I removed iChat but it hasn't made any difference.

    If I type something with no trigger, for example "Test" it just tells me I said it to the NPC. If i type a word that DOES have a trigger, for example "Hello", it both says it to the guard and inputs it into normal chat, which other players can also hear.
    I didn't realize this until just now when I typed "hello" and about 4 players all said hey at the same time... Then had to pretend nothing happened :D (They don't know about the NPCs yet...)
  23. Offline

    RustyShackleQuan

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    It seems that there is not that much documentation, so I have been browsing the source to try to figure out everything. Here are some useful comments.

    // Overview:
    // A spawngroup is like a container. It contains many npcs and
    // any one of them could spawn randomly.
    // If you placed just one npc in the group only one npc would
    // spawn. This allows you to create 'rare' npcs

    // Spawngroups need to be assigned to a location with
    // 'spawngroup place' Once assigned that group
    // will spawn in that location and remain stationary

    // If a path is assigned to the spawn group, the npc will follow
    // the path continuously after spawning
    // at the location of 'spawngroup place'

    // todo: functionality
    // creates a new spawngroup with name
    // adds an npc to a spawngroup with a chance
    // makes the spawngroup spawn at your location
    // assigns a path to the spawngroup
  24. Offline

    wizjany

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    This pretty much sums stuff up.

    As for
    Code:
    [SEVERE] Could not pass event PLAYER_CHAT to npcx java.lang.NoClassDefFoundError: com/iConomy/iConomy
    it's because you're running a version of iconomy older than 5.x

    Wrong triggerwords, check the readme. Should be "EVENT_ATTACK" I believe.
  25. Offline

    XLawless BaronX

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    OMG awesome love this plugin
  26. Offline

    LucidLethargy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Is it possible to delete pathgroups? If it's not... then please add this if you have the time! It clutters things a bit, of course, to not have that ability without delving into the sql!

    Also, once again bravo on getting this plugin back in workig order and thank you for sharing. After finally getting the time to try it out, I can say it's pretty much the coolest thing since iConomy :p It adds a lot more than iConomy to any server, too!
  27. Offline

    Deathlysteve-

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    thanks but everytime i do that, and restart my computer, its not running and the box is unchecked... the only thing that DOES run on startup is the Apache thingy but thats been like that since i installed xampp. u know how to fix that problemo??
  28. Offline

    PsychoNecrosis

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    The previous thread has a readme which contains all the commands
  29. Offline

    Atticus Craft

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I was actually about to mention this God damage issue, but I suppose you already know about it :)

    However this same issue probably is the reason behind another, where the NPC's can attack inside "protected" zones, when using other plugins (like residence or worldgaurd) where pvp is turned off.. they just keep raping you while they become invincible. I imagine its related to the issue you mentioned however, just figure the more information the better.

    I'm glad to hear you will be re-writing it, I imagine that means you'll be modifying the way some of the commands work? Personally I think a good deal of it is overcomplicated for the sake of over-complication.

    You rock, keep up the awesome work!
  30. Offline

    Atticus Craft

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)



    For those having MySQL issues, here's a bit of a walkthrough on how to set it up for Windows 7 (I'll try to add one for linux later):
    ==============================
    First download the MySQL installer that best fits your machine from: MySQL.com

    I chose the: Windows (x86, 64-bit), MSI Installer
    (Currently MySQL Community Server is on 5.5.12 as of this writing)

    1. Run the installer (double click the .msi file, click Run when prompted)
    2. Click "Next" in the intro window.
    3. In the following screen select Custom Installation which will allow you to specify the folder to which MySQL will be installed.
    4. Click the "Change" button and enter C:\MySQL in the Folder name field. Hit "OK" when done.
    5. The installer will change the MySQL installation folder to the one specified by you.
    6. You are now ready to install MySQL on Windows 7 operating system. Click "Install".
    7. It would take some time for the progress bar to move ahead... be patient.
    8. You may also get messages along the way - simply click on "Next" to proceed
    9. When the process finishes, you'll get to see the final screen. Congratulations - MySQL has been installed on your computer. You are now prompted to Configure the MySQL server and register the product. In the interest of time, you can skip registering it (if it asks) and clicked "Finish".
    10. MySQL instance configuration is important - you cannot use the software until you do so. Click "Next" to proceed.
    11. Select "Detailed Configuration" option.
    12. Choose "Developer Machine".
    13. I suggest going ahead with "Multifunctional Database" unless you know what you are doing.
      • Personally, I prefer the middle option, which sets InnoDB as the default...
    14. In the following screen, don't mess with the default values and click "Next".
    15. The same goes for the subsequent screen - click "Next".
    16. For the networking options configuration, put a check mark in front of "Enable Strict Mode" if it's not there.
    17. Yes, it's recommended to install MySQL as a Windows service and have the system include the MySQL bin directory in the Windows PATH variable.
    18. The password for the MySQL server instance has to be typed in twice. Remember to keep a note of it - Don't lose this MySQL password.
    19. The configuration wizard has received all the information it needs and is ready to create a MySQL server instance. Click "Execute" button.
    20. The instance should be configured without problems. If you do get a message from an anti-virus program or the Windows 7 operating system - choose the option to move ahead.
    Checking the MySQL Installations Integrity:
    The easiest way to check MySQL installation and confirm that it's working properly is to use the MySQL Command Line Client. Fire it up from "All Programs" -> "MySQL" -> "MySQL Server 5.1".
    Now enter the MySQL password - the characters you type will be replaced by the asterisk sign (the password is not shown for security reasons - obviously).
    The MySQL client displays the mysql> prompt on successful login - [Slide 25]. Type: show databases; (the semi-colon at the end is not a typo) and hit the enter key. This simple SQL command instructs MySQL to display the names of the installed databases, which should be three. Hurray - rejoice because you have been able to correctly install MySQL on Windows 7!
    ======================
    That will get your MySQL setup correctly, which is the first most important step. After that, I personally recommend Navicat Lite (MySQL version - Click the Navicat for MySQL Tab) to manage my databases and db users. Its lightweight and extremely easy to use.
    Once you have installed and opened Navicat:
    Click "Connection" and select MySQL (to create a new Connection)
    1. You can name it whatever you want, but I suggest "Local" or "Localhost" as the Connection Name.
    2. Host Name/IP Address: keep this as "localhost"
    3. Port: 3306
    4. User Name: root
    5. Password: (whatever you setup in the MySQL Install)
    Hit Ok.
    ==================
    Using Navicat to setup Npcx:
    You should see 3 tables by default in the list. Right click in this left pane and select "New Database..."
    1. Database Name: "npcx"
    2. Character Set: utf8 -- UTF-8 Unicode
    3. Collation: utf8_general_ci
    Next you need to create the Npcx user, to do this Click on the giant "User" button.
    Right click on the Right pane and select, "New User":
    1. User Name: npcx
    2. Host: localhost
    3. Password: p4ssw0rd!
      • This is the default for npcx, but can be changed in the config located under bukkit/plugins/npcx/npcx.properties
      • Personally, I changed this password, you can too.
    4. Retype the password to confirm
    5. Hit "Save"
    Close the user window (but not the Navicat Main window)

    Now click "Privilege Manager" on the Right Hand side (above the list of your two users):
    1. Select the "npcx" Db and click on "Add Privilege" at the top left-hand corner
    2. A new window will popup, select 'npcx'@'localhost' on the left
    3. Select ALL checkboxes on the Right hand side
    4. Hit Ok
    5. Click Save
    You are done! Start up your server running NPCX (or just do a reload all) and it should create the tables in the DB.

    If you mucked up anywhere along the way or get some sort of error, I can try to help you correct it, but I only check back here a few times a day (and may skip a few days).

    Hope that helps some of you :)
    ========
    Once you've gotten a good way into re-writing the Code @wizjany, I wouldn't mind giving a hand with SQL optimization if you end up modifying or adding tables.
    sansprenom likes this.
  31. Offline

    sansprenom

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thanks a lot for your efforts, but I get a "no callback/reaction" (don't know whats the message in english), when I execute the configuration. It appears while trying to do the third point.
  32. Offline

    Atticus Craft

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hmm.. which version are you trying to install and what are your PC's specs? Operating system?

    And which step exactly did you encounter the issue? You said 3, but 3 is just selecting "custom config" and that doesn't make sense.

Share This Page