[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

    hiro24

    Heyya... couple questions on quest configuration.

    1. Is it possible to hae the npc reference your name in quest text? I've tried like... <player> and <name> and <playername> but nothing. Is this possible or am I just doing it wrong? If not, no biggie..

    2. I had heard it was possible to configure a quest so it can be "turned in" w/o needing to return to the NPC. How is this set up?
     
  3. Offline

    BlancoLanda

    Is there any way to make the healer give health pressing right click being unarmed?
     
  4. Offline

    fullwall

    @hiro24 - <name> should work if using a recent dev build. finishhere: true in either objective or step.
    To all - if experiencing funny problems with name conflicts when using #1240, the newest dev build fixes that with some workarounds (hoping Bukkit will negate the use of these eventually).
     
  5. Offline

    hiro24

    You the man Fullwall!
     
  6. Offline

    Scandragon

    fullwall, can you give us a working example of a move location quest?
    I need it for my tutorial area, and just can't get what I have to work..
    I guess that's what I get for trying to fix none-working examples posted previously in the thread
     
  7. Offline

    Teddeh

    My NPC's aren't talking to me :(
     
  8. Offline

    BlancoLanda

    Another question... How can I compile the folder /healer of the source? I just want it to change the language... but i don't know how to compile to .jar!

    @Teddeh Player who wants hims to talk needs to right-click the NPC with a book. Also, you can set talk-when-close: to true in the config file of Citizens, and when people is near the NPC, it will talk.
     
  9. Offline

    fullwall

    @Scandragon
    Code:
    '0':
        type: move location
        location:
            x: 124
            y: 412
            z: -12
            world: 'world'
        amount: 10 # this is the distance leeway in blocks that the player can be from the location. 
     
  10. Offline

    Scandragon

    ah, so amount is not under location..
    works perfectly with that small change :)

    Is there a way to remove the default text and still have NPCs look at players and talk when close if they have a text set?
    I don't really like to have npcs say anything unless they have a text set
     
  11. Offline

    Dragonslife

    @fullwall - I'm getting errors with citizens.
    Code:
    2011-10-04 21:02:30 [WARNING] Task of 'Citizens' generated an exception
    java.lang.IllegalArgumentException: n must be positive
        at java.util.Random.nextInt(Unknown Source)
        at net.citizensnpcs.resources.npclib.creatures.DefaultSpawner.getRandomInt(DefaultSpawner.java:86)
        at net.citizensnpcs.resources.npclib.creatures.DefaultSpawner.spawn(DefaultSpawner.java:38)
        at net.citizensnpcs.resources.npclib.creatures.CreatureTask.spawnCreature(CreatureTask.java:47)
        at net.citizensnpcs.resources.npclib.creatures.CreatureTask.run(CreatureTask.java:39)
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:439)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    Also how's that feature of teleporting to an NPC by ID going?
     
  12. Offline

    BlancoLanda

    I think it's /npc tp <ID> .

    Please... help me someone, I know how to compile the Citizens core .jar but I don't know how to compile the .jar of Healer.jar , I'm using NetBeans.
     
  13. Offline

    Aeron

    Is there any chance this might support databases, preferably MySQL in not so distant future?
     
  14. Offline

    Thorinori

    Code:
    NecromancersGorge:
        texts:
            description: Hello, I need you to kill 5 Zombies and 5 Skeletons <br>inside the Necromancers Gorge, and also I need 1 Iron Ingot from there too.
            completion: Thank you for this Ingot!
            acceptance: Thank you for helping us!
        repeats: 1
        objectives:
    '0':
     '0':
      type: hunt
      string: Zombie
      amount: 5
    
     '1':
      '0':
       type: hunt
       string: Skeleton
       amount: 5
    '2':
     '0':
      type: collect
      materialid: 265
      amount: 1
     '1':
      type: delivery
      npcdestination: 7
      materialid: 265
      amount: 1
    
    I am trying to make a quest, and i dont get errors in the console, but it wont load, any suggestions?
    P.S. I also know this should work for coding, i used Notepad ++ for it and it showed no errors, but the console refuses to load it
     
  15. Offline

    Sketaful

    Is there any way that the guards can me made to attack anyone that attacks them or another player?
     
  16. Offline

    Hornik_Honza

    Hello, since new version, quest as reward stopped working for me. Before, it worked fine. Now it says new challenge accpeted but says u have no quest when i type /quest status. Did the syntax for this change?
    thanks

    And when try to add permission as quest reward, its assigned properly but it ads ":false" after that permission in permission file - config.yml .. why is that? i have "take" option in rewards on false.. so it should not be trying to take permission,
     
  17. Offline

    (AVE(N)GER)

    @Sketaful good idea :D (was thinking the same) plus i haven't really gone through all the config but is there a way of making the npc's have a health bar so i can .. kill them and steal all there belonging's ?? and of course a re-spawn ?

    so it would be nice if npc's had
    -health
    -retaliation with radius
    -respawns
    -and there own inventory that drops on death ...

    but if im correct guards is a new thing ? i have only started using this plugin yesterday..
    EDIT: ok so only guards seem to have health and re-spawn but no retaliation and i cant seem to find a way to make a higher health limit..
     
  18. Offline

    Scandragon

    Try this instead:
    Code:
    NecromancersGorge:
        texts:
            description: Hello, I need you to kill 5 Zombies and 5 Skeletons <br>inside the Necromancers Gorge, and also I need 1 Iron Ingot from there too.
            completion: Thank you for this Ingot!
            acceptance: Thank you for helping us!
        repeats: 1
        objectives:
            '0':
                '0':
                    type: hunt
                    string: Zombie
                    amount: 5
                    message: You killed all the zombies required!
    
                '1':
                    type: hunt
                    string: Skeleton
                    amount: 5
                    message: You killed all the skeletons required!
                '2':
                    type: collect
                    materialid: 265
                    amount: 1
                    message: You have the iron needed!
        rewards:
             '0':
                type: item
                id: 265
                amount: 1
                take: true
    Indentation does matter alot..
    And this will work, trust me
     
  19. Offline

    Scandragon

    I have a problem with requirements.. It seems a quest can be done regardless of requirements being met (at least if it requires another quest to have been done previously)

    Code:
    getting_started:
        texts:
            description: 'Joe says: I would like you to go meet the instructors outside this house'
            completion: 'Joe says: Now that you have met our instructors, maybe it is time for you to move on to the next area<br>Joe says: And remember. Always click NPCs if you want to see if they have tasks for you..'
            acceptance: 'Joe says: Good, I suggest you start by talking to Adam'
        repeats: 1
        objectives:
            '0':
                '0':
                    type: move location
                    location:
                        x: 5137
                        y: 64
                        z: 5117
                        world: 'world'
                    amount: 2
                    message: 'Adam says: Oh hi there. Now remember to always respect your fellow citizens.<br>Adam says: Nobody likes a smartass, or so I have been told'
                '1':
                    type: move location
                    location:
                        x: 5138
                        y: 65
                        z: 5131
                        world: 'world'
                    amount: 2
                    message: 'Jamie says: Jamie wants a big boom.. But as you probably know, big booms are not always a good idea!<br>Jamie says: You should ask people before setting off explosives.<br>Jamie says: To talk serverwide, put /o infront of your text.<br>Jamie says: Oh, and do not blow up other peoples houses... They might get sad'
                '2':
                    type: move location
                    location:
                        x: 5139
                        y: 64
                        z: 5121
                        world: 'world'
                    amount: 2
                    message: 'Grant says: Please do not steal from other citizens.<br>Grant says: Theft will be punished severely..<br>Grant says: The police force here use golems in their pursuit'
                '3':
                    type: move location
                    location:
                        x: 5135
                        y: 64
                        z: 5126
                        world: 'world'
                    amount: 2
                    message: 'Kari says: If you want pets, please make sure only to get one dog<br>Kari says: And make sure your dogs do not attack other citizens, or they will be put down!'
        rewards:
             '0':
                type: rank
                rank: 'QR0001'
                take: false
    moving_on:
        requirements:
            '0':
                type: quest
                quest: 'getting_started'
        texts:
            description: 'Joe says: Could you go see my friend the lumberjack, please?'
            completion: 'Joe says: Longer? Oh I guess I can wait.. I wont need the logs before winter, I guess.<br>Joe says: Thank you for your help, it was most appreciated'
            acceptance: 'Joe says: Thank you. Ask him if he has my logs'
        repeats: 1
        objectives:
            '0':
                '0':
                    type: move location
                    location:
                        x: 5146
                        y: 64
                        z: 5128
                        world: 'world'
                    amount: 2
                    message: 'Lumberjack says: Joe sent you? I should have known he would want the wood soon.<br>Lumberjack says: Can you please tell him it will take longer?<br>Lumberjack says: And please return to me afterwards.. I have a job for you'
        rewards:
             '0':
                type: rank
                rank: 'QR0001'
    woodcutting:
        requirements:
            '0':
                type: quest
                quest: 'moving_on'
        texts:
            description: 'Lumberjack says: Oh, that Joe is a nice guy indeed. I was afraid he would get mad at me.. Oh, right. I have a task for you!<br>Lumberjack says: I hurt my arm cutting down this tree.<br>Lumberjack says: If you could get 5 logs for me, I would be very grateful'
            completion: 'Lumberjack says: Thank you! Please accept this most humble reward<br>Lumberjack says: ... what happened to the axe? It is broken!<br>Lumberjack says: I do not have any more stone axes.. But take this wooden axe instead<br>Lumberjack says: Maybe you should go see my brother, the blacksmith.. I am sure he will have a job for you<br>Lumberjack says: Just follow the path through the tunnel. He should be in his workshop'
            acceptance: 'Lumberjack says: There is an axe in my chest. Feel free to take it'
        repeats: 1
        objectives:
            '0':
                '0':
                    type: collect
                    materialid: 17
                    amount: 5
                    message: You have collected the required amount of wood. Return to the lumberjack for your reward.
        rewards:
             '0':
                type: item
                id: 17
                amount: 5
                take: true
             '1':
                type: item
                id: 275
                amount: 1
                take: true
             '2':
                type: item
                id: 271
                amount: 1
                take: false
    blacksmiths_helper:
        requirements:
            '0':
                type: quest
                quest: 'woodcutting'
        texts:
            description: 'Blacksmith says: Could you please collect some raw materials for me..'
            completion: 'Blacksmith says: Thank you! Here is your money<br>Blacksmith says: I will have my tools back now'
            acceptance: 'Blacksmith says: Wonderful..<br>Blacksmith says: I need 4 cobblestones, 3 iron ores and 5 clay<br>Blacksmith says: You can use the pickaxe and shovel in my chest'
        repeats: 1
        objectives:
            '0':
                '0':
                    type: collect
                    materialid: 4
                    amount: 4
                    message: You have collected the required amount of cobblestone
                '1':
                    type: collect
                    materialid: 15
                    amount: 3
                    message: You have collected the required amount of iron
                '2':
                    type: collect
                    materialid: 337
                    amount: 5
                    message: You have collected the required amount of clay
        rewards:
             '0':
                type: item
                id: 4
                amount: 4
                take: true
             '1':
                type: item
                id: 15
                amount: 3
                take: true
             '2':
                type: item
                id: 337
                amount: 5
                take: true
             '3':
                type: item
                id: 269
                amount: 1
                take: true
             '4':
                type: item
                id: 270
                amount: 1
                take: true
             '5':
                type: money
                money: 150
                take: false
    I just tried taking these..
    I started doing woodcutting, then moving_on followed by blacksmiths_helper and in the end getting_started..
    Requiring the quest did not work
     
  20. Offline

    fullwall

  21. Offline

    Scandragon

    fullwall, 1.1.1
    I probably should update today, but seeing as the requirements were available before 1.1.2, I thought they would work

    Has anything changed that would require me to redo the quests after the update?
     
  22. Offline

    fullwall

    @Scandragon - no, shouldn't be... Also, I just tested quest requirements and they seemed to work for me...?
     
  23. Offline

    Scandragon

    Well, I took them in an order that ought not to be possible..
    I'll have to try some other things later, then.. Right now, I'm off for work.
    Oh and my previous issue, there were alot more I had to fix. No 's can be used in text at all.. I wonder if that'd work if I put " around the string?

    And is there a chance we can have NPCs say multiple lines at once when you go near them some dat?
     
  24. Offline

    fullwall

    @Scandragon - yeah, using " might work. The text system needs a revamp I agree... need to think about it some more.
     
  25. Offline

    Akjosch

    On that note, it would be great to have something along the lines of Inform 7's dynamic string creation instead of util.Messaging.send()'s current rather simplistic approach.

    Example of what I'd like to do with the system ...

    Code:
    "Stuff delivery":
      variables:
        target_npc: "[one of]Marty[or]Rose[or]Sabrina[at random]"
        needed_material: "[one of]gravel[or]sand[or]cobblestone[or]dirt[at random]"
      requirements:
        '0':
          type: time_passed
          time: 900 # In seconds
          time_variance: 120 # In seconds
          timer: global # As opposed to per_player or per_group
          fail_message: "I don't have any delivery to do right now. Come back later."
          success_message: "[randomize all variables]" # This is resolves to an empty string, and doesn't get printed
        '1':
          type: npc_status
          target: [target_npc]
          status: alive
          fail_message: "I had some work to do for [target_npc], but I heard someone murdered [him/her]. Whoever was it, I hope they'll get the bastard![set quest status to aborted]"
          # The "set quest status to aborted" command prints nothing, but acts as if the player aborted this quest and sets the timers again
      texts:
        description: "[target_npc] needs a stack of [needed_material]. I happen to have them ready to pick up and would need someone to run with them over.<br>It doesn't pay much, I'm afraid, but [one of]a job is a job[or]money doesn't stink[at random], right?"
        acceptance: "Here, grab the [needed_material] and run over. Thanks in advance! [target_npc] will pay you for your troubles."
        decline: "No problem. If you see someone who needs to make a quick buck, be so nice and send them over."
        # Yes, you should be able to decline quests too. Also, fail and abort them.
        completion: "Thanks for your help!"
    
    (...)
     
  26. Offline

    Scandragon

    /quester assign [quest]
     
  27. Offline

    Akjosch

    In the game, go to the NPC, right-click on him, then open the text window ("T" key) and toggle him to be a quester if you didn't already (/toggle quester), then assign him the quest (/quester assign QuestName).
     
  28. Offline

    Nibelton

    yea,figured it out when scrolling through commands
     
  29. Offline

    Sketaful

    The only way to make a guard withstand more damage that I've found is giving them better armor.

    I like guards. To have them walk around the city or stand outside inns does make it feel more ehm "genuin" :p
    But as you said. They ignore you even if you attack them. I would love if they responded to every act of violence around them. This way I wouldn't need to keep pvp off in the cities, but instead everyone that use violense within the city gets the guards on them.

    But. This is an amazing plugin as-is, so no complaints from my part, it's just the usual "We want more" ramble :)
     
  30. Offline

    fullwall

    @Sketaful - thanks for spotting that, looks like there was an error in the guard code that stopped them from retaliating (by default, they attack back if aggressive).
     
  31. Offline

    kelthalorn

    Hi.
    I've search for my problem in many pages but can't find any informations. So sorry if I miss it.

    I'm implementing a multiple step quest on my server. No problem, it works perfectly. But I have no idea how to implement rewards for every step.

    There's my quest :
    Code:
    Let's Begin:
        texts:
            description: Find your way in Kromcher. See every villaggers to find your way in this country. Let's begin with Krandol by giving him 5 WOOD PLANKS. But please, replant 1 tree ;)
            completion: <g>You've find your way. Congratulations! Take this. It shoult help you during your trip.
            acceptance: <g>Quest <y>accepted<g>.
        requirements:
        repeatable: true
        objectives:
            '0':
                '0':
                    type: delivery
                    npcdestination: 38
                    materialid: 5
                    amount: 5
                    message: Fine, let's find Father Vermillo and give him 3 SAPLING for the church's garden!
                '1':
                    type: delivery
                    npcdestination: 35
                    materialid: 6
                    amount: 3
                    message: Well done, let's find Mayor Traven and give him the Incognita's story book!
                '2':
                    type: delivery
                    npcdestination: 34
                    materialid: 340
                    amount: 1
                    message: Fine, let's find Miss Opale and give her 2 ROSES! She loves its ! !
                '3':
                    type: delivery
                    npcdestination: 36
                    materialid: 38
                    amount: 2
                    message: Very good, let's finish with Tomly and bring him 3 SEEDS for is garden!
                '4':
                    type: delivery
                    npcdestination: 37
                    materialid: 295
                    amount: 3
                    message: Nice job! Come back to the tavern to speak with Bran.
        rewards:
            '0':
                type: item
                id: 268
                amount: 1
                take: false
    
    the goal is to give items to players at every steps to complete the next one.

    My second question is about the possibility of giving players an items at the acceptance of a quest. Is it possible and how ?

    Thanks for your plugin anyway, my server will become more attractive with it. Great jobs mans.
     

Share This Page