[FUN][CHAT] ServerBot V0.4 - It's like an IRC Bot for Minecraft! - [740]

Discussion in 'Inactive/Unsupported Plugins' started by lego6245, Feb 5, 2011.

?

What should the Next Feature I work on be?

  1. More parsing like {P}

    12.3%
  2. A cool command

    43.6%
  3. Different sorts of catches

    12.9%
  4. "Friends" system

    31.3%
  1. Offline

    lego6245

    ServerBot - You've got a friend in me: IRC Bot-like creation with catch/response system.

    Version: v0.4 - "Why does the <init>() keep existing!" edition

    About
    Styled after many an IRC bot, ServerBot is a customizable bot with a catch/response system that lets you program responses for key phrases or questions directed at your Bot. In the future, the bot will have functions like:
    • Dice rolling
    • Lotto
    • RSS feeds
    • Tweeting
    • Googling
    • Quick references
    • Time both Server and Local
    • Any any other suggestions
    For now, with v0.1, we have the catch system online. With v0.3 the friends system was activated.


    Download
    Zip File with Config

    Base Level Configuration
    In the config.yml file inside the ServerBot folder, there are five main options so far. They are pretty self explanatory (name is the bot's name, color is the [0-9a-f] letter designating the color), save for the last three: action, spoken, and other. Those are part of the Catch System, outlined below.

    Catch System
    There are three types of catches. Action catches, Spoken catches, and Other catches. Action catches are used when the player uses the /me command. Spoken catches are used then the player sends a normal chat message. Other catches are other messages used elsewhere throughout the program. The format is thus:

    Yay! A hug from {P}!: [hugs]
    I like waffles, {P}: [does, like waffles?]

    The way this works is simple. The first bit is the actual response you want. Notice the {P}. This inserts the players name at that spot. The second bit after the colon, in bracket, is the before/after clause. The first part, before the comma, is what should come before the bot's name. The second part, after the comma, is what should come after the name. Avoid using commas in your actual catches, as it probably will break things. This is the format for Spoken/Action catches. Other catches are similar, except instead of having a before/after, you have just the ID of the other catch. A list of IDs are provided below, and they are self explanatory.
    • playerjoinop
    • playerjoinfriend
    • playerleaveop
    • playerleavefriend
    • playerkickfull
    • playerkickbanned
    • playerkickother
    Parsing
    In your responses, you can use certain parsers. These will input things that you might not want to remain constant, i.e. the players name or the current time. Here is a list of current Parses. Add them in like in the example above.
    • {P} - Player Name
    • {B} - Bot Name
    • {T} - Time (Real World)
    • {D} - Date (Real World)
    • {ST} - Time (Server)
    • {DT} - Descriptive Time (Real World)
    • {SDT} - Descriptive Time (Server)
    Change Log
    Version 0.4
    • Compatible with most recent recommended build.
    • Fixed a few lingering Friends system issues. Preparing full implementation.
    Version 0.3b1
    • Friends system in place. May be buggy.
    Version 0.2
    • More parsing for the bot
    Version 0.1
    • Release. Base catch system
     
  2. Offline

    fugue2005

    CB440

    only thing working is the op join
     
  3. Offline

    lego6245

    @drampelt Then I guess it's a random bug. As for the essentials /me that's expected behavior. Wait for a newer essentials update and it should fix it.
    --- merged: Feb 28, 2011 1:56 PM ---
    @fugue2005 Are you following the instructions and posts before you? That might help.
     
  4. Offline

    Zaonhort

    I'm getting an error on craftbukkit #450

    Code:
    2011-02-28 10:09:19 [SEVERE] Could not load plugins\ServerBot.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:80)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:129)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:94)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:59)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NoSuchMethodException: com.enigmasm.serverbot.ServerBot.<init>()
        at java.lang.Class.getConstructor0(Unknown Source)
        at java.lang.Class.getConstructor(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:75)
        ... 8 more
    Also I think it would be cool if you could have a basic conversation with it and it would be awesome if we could use if..then statements in the config or something like depending on the day, or player. Also it would be awesome if it could search for definitions. like "define bucket" and it will go fetch that data and define it
     
  5. Offline

    lego6245

    This seems to be a blanket problem that I can't seem to reproduce. Make sure your craftbukkit version is as current as possible.
     
  6. Offline

    GizmoTheGreen

    I have issues using this configfile, am I doing anything wrong or is it a bug?


    Code:
      action:
          Yay! A hug from {P}!: [hugs]
          I has been summoned!: [summons]
      spoken:
          no u {P}: [no u]
      other:
          Oh look, an OP!: playerjoinop
          I will miss you {P}: playerleaveop
          {P} mean to me! T_T: playerkickfull
          {P} tried to force himself on me! T_T: playerkickban
          {P} mean to me! T_T: playerkickother
    error message:
    Code:
    Caused by: while parsing a block mapping
     in "<reader>", line 10, column 7:
              Oh look, an OP!: playerjoinop
              ^
    expected <block end>, but found Scalar
     in "<reader>", line 12, column 11:
              {P} mean to me! T_T: playerkickfull
                  ^
     
  7. Offline

    lego6245

    I don't see what could be wrong. Try not starting a line with a { symbol.
     
  8. Offline

    GizmoTheGreen

    latest recommended build broke this plugin? I get

    Code:
    07:37:54 [ALLVARLIG] Could not load plugins\ServerBot.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:80)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:129)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:94)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:59)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NoSuchMethodException: com.enigmasm.serverbot.ServerBot.<in
    it>()
            at java.lang.Class.getConstructor0(Unknown Source)
            at java.lang.Class.getConstructor(Unknown Source)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:75)
            ... 8 more
     
  9. Offline

    lego6245

    Oh god, this thing again. I'm going to try to figure out what it means. I have no idea though, so wait for me to find out.
     
  10. Offline

    Emalde

    This is a fun plugin, thanks for making it! Do you think it would be possible to restrict/separate catches by user type? Have it say one when an OP trips a catch, but something else when a regular player does the same?
     
  11. Offline

    lego6245

    That will be in a later update, @Emalde.

    By the by, here is what the Vo.3 update will have
    User Types: Known, Friend, Admin, Owner
    Able to change the types from in game using SQLite.
    Able to have join messages for each type of user.
     
  12. Offline

    Emalde

    Oh no, we're getting an error! While I can guess this means one (or some) of our lines are too long, is there any way to make it more helpful?

    Code:
    [SEVERE] 1 (Is it up to date?)
    java.lang.ArrayIndexOutOfBoundsException: 1
    	at com.enigmasm.serverbot.Bot.loadCatches(Bot.java:121)
    	at com.enigmasm.serverbot.ServerBot.loadBotInformation(ServerBot.java:50)
    	at com.enigmasm.serverbot.ServerBot.onEnable(ServerBot.java:39)
    	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:140)
    	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:426)
    	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:79)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:60)
    	at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:187)
    	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:174)
    	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:120)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:227)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Edit: after extensive testing we have -zero- idea what the hell is going on
     
  13. Offline

    GizmoTheGreen

    Sounds awesome lego, patiently waiting :)
     
  14. Offline

    skillinazn

    I have figured out the pointers of some of the errors of this plugin. If you ever add under scrolls (_____) To the server bot's respond message you WILL get that error no matter what. The same will go for equal signs. The problem might be is that the under scroll or equal sign might have a different function, which means they are read differently.

    As to looking at Emalde's error, I have also come to the conclusion that putting periods in the responses will trigger that error. Basically, the only symbol that can be used for messages is the exclamation sign or the dash for now. (I don't know about the others, didn't test it)

    How do I know all of this? I had just made near spam log of text and found out why it was failing. The issue probably has to do with the .yml format but I'm not completely sure.

    Edit: If you are to attempt to link two responses in one message it will not work.
    Ex. Hi! : [Hi]
    How's it going? : [Hi]
     
  15. Offline

    Emalde

    Thanks skillinazn, that stopped it from erroring, but now spoken catches wont work at all (actions and other do however). This plugin has the most ridiculous problems I've ever run into :/

    edit: we've kind of gotten around it by moving them all into actions, but the lack of hyphens and periods is one of the strangest bugs in the world
     
  16. Offline

    lego6245

    I'll check into that period and hyphen thing. Thanks for the debugging help.
     
  17. Offline

    skillinazn

    Ok, for spoken catches you must remember to type what your want your bot to say first, then space it once and type a colon. Afterwards you space again and type what you, the player, will say. Then put it in brackets. Since this might be confusing to say here is a simple model to show you.

    "Word for Server Bot to say" : ["Word that the player should say"]

    Ex. (This is from my own text, from an event map)
    Welcome to the Collozo! This challenger has come their way to battle these fiendish monsters! Good Luck and Have fun! : [collozo1]

    As you can see here, "Welcome to the Collozo! This challenger...." is the text the bot will say. [collozo1] is what the player will have to say to trigger that catch phrase.

    Because this is in .yml format you should know that if you are ever to enter another line you MUST backspace until it has reached the first spacing. Then you can press tab and type whatever you like. (Notepad++ helps a lot to see what the errors are)

    Finally, to trigger that catch phrase you would in game type:
    "phrase to say" "Bot Name"
    Ex. collozo1 Server-Tan Then after Server-Tan will say the phrase above.

    No problem. Hyphens work by the way, but apostrophes do not. (Well I'm not entirely sure, but when I added it the line would still have a gray color using Notepad++, meaning that the code did not go through)
     
  18. Offline

    lego6245

    Apostrophes are used to designate strings, so that would break it. Perhaps try \' instead? or is it /'... I forget. Anyway, use an escape character and it should work better.
     
  19. Offline

    skillinazn

    Cool, I'd try it out but the new craftbukkit build doesn't support it. Mind if you can update it please?
     
  20. Offline

    MJRamon

    I found a clue about "Could not load plugins/*****.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException" error

    a m (flames):

    Hope this will help. If you've placed source files, I could try to fix this (though I'm no good in Java, but tutorials and wiki make their job)
     
  21. Offline

    lego6245

    Sorry for being away for so long. Spring Break + God Only Knows = Lack of Updates. Rest assured that development is resuming!

    -William

    WARNING: UPDATE 0.3b1 IS JUST THAT: A BETA. ALL OTHER THINGS SHOULD BE WORKING PROPERLY SAVE FOR THE FRIENDS FEATURE. USE FRIENDS AT YOUR OWN RISK.

    Now, with capslock turned off, 0.3b1 is released
    Changes: Friend system. You'll need the full zip for this one, as it contains SQLite, the database management system I chose. You're welcome.

    You may now collectively download from the links in the thread.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 8, 2016
  22. Offline

    MJRamon

    Thank you. Does it support 556 version? Cause it's too early to upgrade for 1.4...
     
  23. Offline

    lego6245

    It should work backwards.

    As an aside, I have found no major bugs in promoted craftbukkit build 617, which is recommended and supports 1.4

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 8, 2016
  24. Offline

    MJRamon

    About half of plugins are still not updated :) So I won't be in rush
    I'll check the plugin, thank you

    Nope. Doesn't work.

    Code:
    [SEVERE] Could not load plugins/ServerBot.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:113)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NoSuchMethodException: com.enigmasm.serverbot.ServerBot.<init>()
            at java.lang.Class.getConstructor0(Class.java:2706)
            at java.lang.Class.getConstructor(Class.java:1657)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:108)
            ... 8 more
    
    CB 556

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 8, 2016
  25. Offline

    lego6245

    Oh god, not this again. No such method exceptions are haunting me. HAUNTING ME I TELL YOU! It's because you should really version up by now...
     
  26. Offline

    MJRamon

    Too bad:( Maybe later.
     
  27. Offline

    Plague

    You'Re missing a changelog and there has to be the latest working version in the thread title.
     
  28. Offline

    lego6245

    First of all, V0.3b1 is the latest working version. One component of it, which is not necessary for actual usage, hasn't been able to be tested throughly (as I am but one man) and therefore the "b1". Second, changelog will be added.

    There. Done. Enjoy your change log, @Plague :3

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 8, 2016
  29. Offline

    Exone

    LAWL. Coincident, I think not?
    One of my players made an IRC bot, just like this (He was planning googling and things alike yours aswell.), that was actually running on our IRC channel. (We used CraftIRC)
    I might give this a try, to make him think I've turned his bot against him. :p (Even with CraftIRC not working ;D)
    Looks like a nice plugin! Keep it up! :D
     
  30. Offline

    Zaonhort

    On craftbukkit build 617 I'm getting this error:

    Code:
    2011-04-03 00:27:18 [SEVERE] Could not load plugins\ServerBot.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:105)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:158)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:106)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:63)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:215)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:202)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:142)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:257)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    Caused by: java.lang.NoSuchMethodException: com.enigmasm.serverbot.ServerBot.<init>()
        at java.lang.Class.getConstructor0(Unknown Source)
        at java.lang.Class.getConstructor(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:100)
        ... 8 more
     
  31. Offline

    Animosity

    It has been working nonstop since 602... not even the 1.4 update broke it, I think you need to update.
     

Share This Page