[FUN] Citizens v2.0.11 - Human NPCs for Bukkit [1.7.2]

Discussion in 'Archived: Plugin Releases' started by Citizens, Mar 5, 2011.

  1. Offline

    Citizens

    Citizens - Human NPCs for Bukkit
    Version: 2.0.11
    Authors: @fullwall and @aPunch
    Source: Citizens on GitHub

    Citizens is now on BukkitDev

    This thread will no longer be updated. We encourage you to use our page on BukkitDev. You can find information, links to our wiki and website, and the download page there.

    Showing Your Support

    We work hard to maintain Citizens. We've been working on Citizens2 around the clock on new and exciting features. A little motivation never hurts, so feel free to donate to us - fullwall and aPunch.

    If you can't donate, we appreciate a "hello" every now and then. Stop by the IRC channel #citizens on irc.esper.net to discuss Citizens and give thanks!
     
  2. Offline

    fullwall

    @hiro24 - the requirement feature seems to fit those needs... basically defined as rewards, except under 'requirements' - then the item reward can be defined.
    @MusicMonkey555 - you have take: false in your item rewards.
    @Olaros96 - you need to update your craftbukkit.
     
  3. Offline

    MusicMonkey5555

    So it is false there (step 3) because he is suppose to give you those items that you then take to someone else in step 4. Basically step 4 never happens.

    Just as a note if I set that to true then he never gives them to you and it breaks the quest. I tried it just to see if it would fix it and it didn't the issue is that step 4 all 3 parts (0, 1, 2) never happen. I never get the messages and npc 0 never takes the items "delivery" instead it just says the completed quest text and I get the money.
     
  4. Offline

    fullwall

  5. Offline

    hiro24

    But what I mean is how would I write out a quest that, for example, required red wool?
     
  6. Offline

    MusicMonkey5555

    I am not positive on this, but I know other plugins you do things like "wool:red" or 35:14
     
  7. Offline

    fullwall

    @hiro24
    Code:
    questname:
        requirements:
            '0':
                type: item
                materialid: 36
                data: 12 #this is from memory...
     
  8. Offline

    Exanimo

    Oeh new feature suggestions! Some i can think of:

    - Preset NPCs (definable in config) which can be called with a command.
    /npc spawn 55 for example. Give this npc some flags in config like: "spawnable with this command or not", "Max duration", "max ammount of this NPC at one time", "cost to spawn", preferable a certain unique permission is needed (so we can give this permission with an external command then take it away when the action is performed).
    This might it possible to spawn quest mobs or soldiers for a battle for example

    - Make it possible so NPCs show only during specified times/days.
    For example: Guards which show up during the night only, traders which show up on certain days, a Santa Claus NPC which shows up only in December. Multiple combinations of flags might be cool (shows on Mondays & Thursdays during the ingame night only, for example)
    Ideal would be if you are able to spawn this NPC at one point and then make it move to its end position. For example night guards which spawn in the watchhouse and then man their post.

    - Command to make NPCs sit or Lie or Sneak
    Gives more variation in your world. Can fill a hospital with some sick then for example.

    - Scaleable NPCs
    You might need to use spout for this but scaleable NPC will again add something to the world. You can then have children or even giants in your world.

    - Make NPCs unable to move with a command/setting
    Very usefull for guards with bows which you don't want to start hitting mobs in melee range with their bow.
    Alternative maybe we can give them a sword aswell so they switch weapons depending on range?
     
    TheExoduser and MusicMonkey5555 like this.
  9. Offline

    Schlumpf

    Hi,
    I am always getting this error on Build #318:
    Code:
    2011-11-15 15:25:51 [SEVERE] java.lang.IllegalArgumentException: Delay cannot be less than 0
    2011-11-15 15:25:51 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftScheduler.scheduleSyncRepeatingTask(CraftScheduler.java:206)
    2011-11-15 15:25:51 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftScheduler.scheduleSyncDelayedTask(CraftScheduler.java:191)
    2011-11-15 15:25:51 [SEVERE]     at net.citizensnpcs.resources.npclib.NPCSpawner.delayedRemove(NPCSpawner.java:58)
    2011-11-15 15:25:51 [SEVERE]     at net.citizensnpcs.resources.npclib.CraftNPC.getBukkitEntity(CraftNPC.java:67)
    2011-11-15 15:25:51 [SEVERE]     at net.citizensnpcs.resources.npclib.HumanNPC.getPlayer(HumanNPC.java:130)
    2011-11-15 15:25:51 [SEVERE]     at net.citizensnpcs.resources.npclib.HumanNPC.getWorld(HumanNPC.java:146)
    2011-11-15 15:25:51 [SEVERE]     at net.citizensnpcs.properties.properties.BasicProperties.loadState(BasicProperties.java:345)
    2011-11-15 15:25:51 [SEVERE]     at net.citizensnpcs.properties.PropertyManager.load(PropertyManager.java:46)
    2011-11-15 15:25:51 [SEVERE]     at net.citizensnpcs.resources.npclib.NPCManager.register(NPCManager.java:170)
    2011-11-15 15:25:51 [SEVERE]     at net.citizensnpcs.resources.npclib.NPCManager.register(NPCManager.java:189)
    2011-11-15 15:25:51 [SEVERE]     at net.citizensnpcs.commands.BasicCommands.create(BasicCommands.java:226)
    2011-11-15 15:25:51 [SEVERE]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2011-11-15 15:25:51 [SEVERE]     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    2011-11-15 15:25:51 [SEVERE]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    2011-11-15 15:25:51 [SEVERE]     at java.lang.reflect.Method.invoke(Unknown Source)
    2011-11-15 15:25:51 [SEVERE]     at net.citizensnpcs.resources.sk89q.CommandsManager.executeMethod(CommandsManager.java:531)
    2011-11-15 15:25:51 [SEVERE]     at net.citizensnpcs.resources.sk89q.CommandsManager.execute(CommandsManager.java:408)
    2011-11-15 15:25:51 [SEVERE]     at net.citizensnpcs.Citizens.onCommand(Citizens.java:203)
    2011-11-15 15:25:51 [SEVERE]     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
    2011-11-15 15:25:51 [SEVERE]     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:163)
    2011-11-15 15:25:51 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:355)
    2011-11-15 15:25:51 [SEVERE]     at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:757)
    2011-11-15 15:25:51 [SEVERE]     at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:722)
    2011-11-15 15:25:51 [SEVERE]     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715)
    2011-11-15 15:25:51 [SEVERE]     at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    2011-11-15 15:25:51 [SEVERE]     at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    2011-11-15 15:25:51 [SEVERE]     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
    2011-11-15 15:25:51 [SEVERE]     at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    2011-11-15 15:25:51 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
    2011-11-15 15:25:51 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
    2011-11-15 15:25:51 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    2011-11-15 15:25:57 [SEVERE] java.lang.IllegalArgumentException: Delay cannot be less than 0
    2011-11-15 15:25:57 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftScheduler.scheduleSyncRepeatingTask(CraftScheduler.java:206)
    2011-11-15 15:25:57 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftScheduler.scheduleSyncDelayedTask(CraftScheduler.java:191)
    2011-11-15 15:25:57 [SEVERE]     at net.citizensnpcs.resources.npclib.NPCSpawner.delayedRemove(NPCSpawner.java:58)
    2011-11-15 15:25:57 [SEVERE]     at net.citizensnpcs.resources.npclib.CraftNPC.getBukkitEntity(CraftNPC.java:67)
    2011-11-15 15:25:57 [SEVERE]     at net.minecraft.server.Explosion.a(Explosion.java:120)
    2011-11-15 15:25:57 [SEVERE]     at net.minecraft.server.World.createExplosion(World.java:1461)
    2011-11-15 15:25:57 [SEVERE]     at net.minecraft.server.WorldServer.createExplosion(WorldServer.java:201)
    2011-11-15 15:25:57 [SEVERE]     at net.minecraft.server.EntityCreeper.a(EntityCreeper.java:118)
    2011-11-15 15:25:57 [SEVERE]     at net.minecraft.server.EntityCreature.c_(EntityCreature.java:69)
    2011-11-15 15:25:57 [SEVERE]     at net.minecraft.server.EntityLiving.s(EntityLiving.java:788)
    2011-11-15 15:25:57 [SEVERE]     at net.minecraft.server.EntityMonster.s(EntityMonster.java:27)
    2011-11-15 15:25:57 [SEVERE]     at net.minecraft.server.EntityLiving.s_(EntityLiving.java:280)
    2011-11-15 15:25:57 [SEVERE]     at net.minecraft.server.EntityMonster.s_(EntityMonster.java:31)
    2011-11-15 15:25:57 [SEVERE]     at net.minecraft.server.EntityCreeper.s_(EntityCreeper.java:68)
    2011-11-15 15:25:57 [SEVERE]     at net.minecraft.server.World.entityJoinedWorld(World.java:1193)
    2011-11-15 15:25:57 [SEVERE]     at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:104)
    2011-11-15 15:25:57 [SEVERE]     at net.minecraft.server.World.playerJoinedWorld(World.java:1175)
    2011-11-15 15:25:57 [SEVERE]     at net.minecraft.server.World.tickEntities(World.java:1090)
    2011-11-15 15:25:57 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:467)
    2011-11-15 15:25:57 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
    2011-11-15 15:25:57 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    2011-11-15 15:25:57 [SEVERE] Unexpected exception
    java.lang.IllegalArgumentException: Delay cannot be less than 0
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.scheduleSyncRepeatingTask(CraftScheduler.java:206)
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.scheduleSyncDelayedTask(CraftScheduler.java:191)
        at net.citizensnpcs.resources.npclib.NPCSpawner.delayedRemove(NPCSpawner.java:58)
        at net.citizensnpcs.resources.npclib.CraftNPC.getBukkitEntity(CraftNPC.java:67)
        at net.minecraft.server.Explosion.a(Explosion.java:120)
        at net.minecraft.server.World.createExplosion(World.java:1461)
        at net.minecraft.server.WorldServer.createExplosion(WorldServer.java:201)
        at net.minecraft.server.EntityCreeper.a(EntityCreeper.java:118)
        at net.minecraft.server.EntityCreature.c_(EntityCreature.java:69)
        at net.minecraft.server.EntityLiving.s(EntityLiving.java:788)
        at net.minecraft.server.EntityMonster.s(EntityMonster.java:27)
        at net.minecraft.server.EntityLiving.s_(EntityLiving.java:280)
        at net.minecraft.server.EntityMonster.s_(EntityMonster.java:31)
        at net.minecraft.server.EntityCreeper.s_(EntityCreeper.java:68)
        at net.minecraft.server.World.entityJoinedWorld(World.java:1193)
        at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:104)
        at net.minecraft.server.World.playerJoinedWorld(World.java:1175)
        at net.minecraft.server.World.tickEntities(World.java:1090)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:467)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
     
    kahlilnc likes this.
  10. Offline

    hiro24

    That worked like a charm! Thanks! In fact, not only does this work, but it works w/ bookworm as well! I now have a quest that rewards players w/ a readable book, as bookworm makes books work like colored wool.. and citizens totally picked that up and just... worked. Good times. :D
     
  11. so... is this plugin still going to be developed/maintained once notch makes his stab at NPC's in MC1?
     
  12. Offline

    redhawk10

    hey no offense but i have had to reload this plugin 7 times for me to use all the commands when i want to make a guard it works then i make him bouncer then i want him to target mobs and it says some random exuse i made sure it was right but i cant make the guard do nothin
     
  13. Offline

    kahlilnc

    Yeah build 318 doesnt work ;(
     
  14. Offline

    kahlilnc

    Is there anything wrong with my quest file?
    Code:
    Priest_Charles:
        texts:
            description: The church has had some unwelcome guests, at night our-Gods-wheat is taken,leaving us none to make bread to eat-i mean give to the people. I need you to remove these vermin so we can grow crops once more.
            completion: The priest gives you 20 dough.
            acceptance: <g>Sure, not a problem.
        repeats: -1
        objectives:
            '0':
                '0':
                    type: hunt
                    amount: 6
                    string: pig
                    rewards:
                         '0':
                            type: money
                            id: 0
                            amount: 5
                            take: true
            '1':
                '0':
                    type: delivery
                    npcdestination: 10
                    materialid: 1
                    amount: 0
                    message: <y>Priest Charles, <g>Thank you! But we do not have enough wheat to make the bread for the morning sermon.Please gather 12 then bring it to the baker.
            '2':
                '0':
                    type: delivery
                    npcdestination: 7
                    materialid: 296
                    amount: 12
                    message: <y>You, <g>Can you please turn this into bread for me? <y> Baker John, <g>Sure, come back in a few and I will have the bread done.
            '3':
                '0':
                    type: delivery
                    npcdestination: 7
                    materialid: 1
                    amount: 0
                    message: <y>Baker John, <g>Okay, here you go. Everything you ordered.
                    rewards:
                         '2':
                            type: item
                            id: 297
                            amount: 4
                            take: true
            '4':
                '0':
                    type: delivery
                    npcdestination: 10
                    materialid: 297
                    amount: 4
                    message: <y>You give the priest the 4 bread.
        rewards:
             '1':
                type: money
                id: 0
                amount: 20
                take: true
    
    Using build 317.
     
  15. Offline

    hiro24

    Well, a couple things stick out... first off, your money reward is formatted wrong. start off w/ '0' instead of '1'. Also format it like this:

    Code:
             '0':
                type: money
                money: 500
                take: false
    
    Also a couple of your delivery quests have 0 for the amount. I'm not sure if that would cause a problem, but if I'd guess, I wouldn't think you meant to do that. I'd have to look closer, but those are the things that pop out immediately.

    Also note that if you put take:true, the quest will "take" that from you, rather than "give" it to you. This is useful when you have to turn in a couple things, like, a sword, apple, blocks, etc.. in one quest.. but if you want the player to receive the item, you need to use take:false
     
    kahlilnc likes this.
  16. Offline

    Schlumpf

    Hmm, theres still the Problem with the quests!!
    Code:
    Test:
        texts:
            description: A fetch quest
            completion: <g>You win! Give me that dirt.
            acceptance: <g>Challenge <y>accepted<g>.
        repeats: 1
        objectives:
            '0':
                '0':
                    type: collect
                    materialid: 3
                    amount: 3
                    message: A voice echoes... "I want that dirt now!"
        rewards:
             '0':
                type: item
                id: 3
                amount: 3
                take: true
    This is my quest and when I get the quest and I got collect Dirt it doesn't change, I always have 0 Dirts collected. But if I collect anything else as sand, log, gravel ... I finish the quest. What's wrong there? Is this an Bug or what is it?! If I collect Dirt as in the quest nothing happens, but if I collect anything else it work, but this is fail :/
     
  17. Offline

    fullwall

    @Schlumpf - this is related to the collect quest being strange is it not? Try just having it as a block destroy quest.
     
  18. Offline

    Olaros96

    thank you it works!:) is it any chanse to change skin with another name like for example.
    If i name it Guard and then change it to Herobrine skin?
     
  19. Offline

    hiro24

    Hey @fullwall can you add some sort of an option for "failing" a quest? I tried to program one in this way but it didn't really work...

    Code:
    MissingDog:
        texts:
            description: <g>=== <blue>Missing Dog <g>===<br>Hey mister!  Wow, am I glad to see you.. there's monsters all over the place.. and I'm sssssscared. My doggie ran away and I tracked him in here, but I can't find him.  Please mister, he's all I have in the whole wide world!  Can you find him?<br><g>=== <blue>Reward <g>===<br><y>300<white> gold<br><y>1 <blue>Saddle
            completion: <g>=== <blue>Quest Complete! <g>===<br>Sparky!  Thank you.. thank you sooooo much!  Here.. I'm sorry it's not more.  I'm an orphan. But it's all my mommie left me and I want you to have it.<br><g>=== <blue>Reward <g>===<br>You have received <y>300 <white>Gil!<br>You have received <y>1<blue>Saddle<white>!
            acceptance: <g>=== <blue>Quest Accepted <g>===<br>Gee, thanks mister!  I know he's somewhere in this wing.. just walk around.. I'm sure you'll find him.  You just gotta mister, you just gotta!
        repeats: -1
        delay: 1440
        objectives:
            '0':
                '0':
                    type: move location
                    location:
                        x: 416
                        y: 80
                        z: 442
                        world: Sanctum
                    amount: 2
                    message: <g>=== <blue>Quest Update <g>===<br>You've found the little boy's dog.  You should go back to him and let him know.
                '1':
                    type: hunt
                    string: '-AngryWolf'
                    amount: 1
                    optional: true
                    message: <g>=== <blue>Quest Failed <g>===<br>Sparky noooooo!  He was my only friend!  I'm not giving you anything you.. you bad man.... f__k you!
                    rewards:
                         '0':
                            type: command
                            command: quest abort
                            server: true
            '1':
                '0':
                    type: move location
                    location:
                        x: 360
                        y: 64
                        z: 430
                        world: Sanctum
                    amount: 4
                    finishhere: true
                '1':
                    type: hunt
                    string: '-AngryWolf'
                    amount: 1
                    optional: true
                    message: <g>=== <blue>Quest Failed <g>===<br>Sparky noooooo!  He was my only friend!  I'm not giving you anything you.. you bad man.... f__k you!
                    rewards:
                         '0':
                            type: command
                            command: quest abort
                            server: true
        rewards:
            '0':
                type: item
                id: 329
                amount: 1
                take: false
            '1':
                type: money
                money: 300
                take: false
    
    This didn't really work though, it gave me a msg in the server.log that the command must be ran in-game. So if a quest like this would ever work, it would probably need some sort of flag for the optional step like... failhere: true. What are your thoughts? Or is there a better way of setting this up that I'm not really thinking of?
     
  20. Offline

    fullwall

    @hiro24 - wouldn't server: true need to be server: false? I see what you mean though, there should be some way to have a fail flag. Maybe a wait-time quest would aid in this...
     
  21. Offline

    hiro24

    Y'know I was just thinking something like that, or that if you had a failhere flag, potentially you could have like.. an optional part of a quest w/ a time: flag on it, effectively making quests require a time limit.. so they would fail after a pre-determined period.

    EDIT: You're absolutely right... swapping it to false did fix it. heh.. guess I need remedial questwriting. Thanks! (my server's gonna love this. I just KNOW somebody's gonna be a jerk and kill the dog that spawns....)
     
  22. Offline

    Exanimo

    Challenge accepted!

    (you know me as Remcob on your server ;) )
     
  23. Offline

    hiro24

    Ohhhhh! lol... heyya Rem.
     
  24. Offline

    Maxxgold

    To many errors with this plugin. It's time someone updated it. I had to remove it from my server. As a Donator I would appreciate an update.
     
  25. Offline

    hiro24

    what version of citizens are you using @Maxxgold ? We use a recent dev build and we're up and very stable (except w/ guards.. which sometimes bugs out, so we don't use them). Check here and try a newer dev build if you're on an older version.. http://ci.citizensnpcs.net/
     
  26. Offline

    rmb938

    Is there any way to skin npcs without relying on player names? I would like to create a themed area and if one of the npc's skin changes because the player changed the skin it ruins the point.
     
  27. Offline

    DarkZeR0

    When i create a trader My people cant trade and buy or sell things from the trader it only works for OPS How do i make it work for players dammit.
     
  28. Offline

    aPunch

    To do this we would need to hook into Spout, which is something that we don't want to do at this time.
     
  29. Offline

    MusicMonkey5555

    I haven't personally done this, but it should be a permission node and if you look at the wiki for that it should tell you what one to use in your permissions file.
     
  30. Offline

    Sk8Sanctified

    Ok, I wanted to make a wizard that spawns wolfs for an amount, because for some reason since 1.8 I have noticed no wolfs spawning. I figured out how to make the wizard that spawn wolfs for an amount and everything worked fine. I added the permission node citizens.use.wizard to the group I wanted to be able to buy wolfs. It seemed to work only once for a short time!? what the? I was able to buy wolfs one time, then I did something like change the npc name color to green and now I have don't have permission to buy wolfs from the wizard. Nothing in my permissions was changed in anyway. I changed the name back to white to fix it (which didn't work) but I have a feeling this has nothing to do with it. I don't see how I would be able to use everything perfectly, then after a restart or name change (not sure exactly what but it was a minimal change) that didn't involve permissions at all, all of a sudden make things not work. Anyone know why this may be happening?..
    Also I had one more random bug. I made an npc of my own character. One time when I logged in and everytime after that my npc would run right into me continously, pushing me all over the map if I wasn't running away from him... lol like he became possessed and felt the endless urge to walk into me and push me everywhere.
     
  31. Offline

    DarkZeR0

    Also if i have to use Permissions I have NO CLUE TO TO USE PERMISSIONS Thats what pissing me off i looked at videos still cant do shit i posted the crap in my permissions.yml still no shit.
     

Share This Page