# Copyright (c) 2015, Xericore # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright notice. # ########################################################################################## # # Marryme # # @version 1.1 # @author Xericore # @last-updated 11 May 2015 # xericore@gmail.com # http://www.petricevic.net/minecraft/marryme/ # # Citizens 2.0.15-SNAPSHOT (build 1227) (ci.citizensnpcs.co/job/Citizens2/) # Denizen 0.9.6-SNAPSHOT (build 186) (http://ci.mineconomy.org/job/Denizen_Developmental/) # ### To assign to an NPC, type: ### # /npc assign --set marryme # # Optional: # /npc constant --set marryitem --value i@allium # /npc constant --set likescolor --value purple # # As of Citizens 2 build #1226, it's possible to set the skin independently of the NPC's name: # e.g. /npc skin -p Xericore # # Some good female skins: Alanaria, Meara, Lewna, Sanjaa, Pandema, Azelia, Nelia, Mnealia, Azalia, # Melisee, Nefala, Endjulia, Anilia, Amelisten, Raiissa, Ameliabelia, Ellisah, Comitissa marryme: type: assignment actions: on assignment: - trigger name:click state:true - trigger name:chat state:true radius:4 - trigger name:proximity state:true - trigger name:damage toggle:true - lookclose state:true on damage: - random { - ^chat "Hey, that hurts!" - ^chat "Stop it!" - ^chat "Why are you doing this?" } - animate animation:HURT - if !]> && !]> { - flag npc attackedme:->: } interact scripts: - 1 marryme_interact - 2 married - 3 marryequipmode default constants: # You will need this amount to marry the NPC. price: 2000 # NPC will reward you daily with the following amount of money if you ask them about it. earningreward: 50 earningcooldownduration: 20h # The NPC will tell you that this is their favourite color likescolor: red # You will need to give the NPCs this item to be able to marry the NPC. marryitem: i@poppy # How long the NPC will not have a conversation with you after a positive or negative reaction. negativecooldown: 1d positivecooldown: 6h marryme_interact: type: interact steps: 1: click trigger: script: - trigger name:chat state:true - random { - ^playsound sound:mob.villager.haggle custom - ^playsound sound:mob.villager.idle custom } - if !_karma]> { - flag npc _karma:0 } - ^flag npc justtalked - if _cooldown]> { - random { - chat "Sorry, I<&sq>m busy right now, please visit me another time." - chat "I have to do something now, please come back later." - chat "Sorry I have no time right now, but we can talk later." } } else { - if _karma].is[OR_MORE].than[1]> { - random { - ^chat "Hello ." - ^chat "Greetings, what can I do for you, ?" - ^chat "Good day, ." - ^chat "How can I help you, ?" - ^chat "Yes, do you need anything?" } } - if _karma].is[OR_MORE].than[4]> { - ^narrate "<&e>1. <&b>Sure darling. I will help you open your shop. (Give )" } else if _karma].is[OR_MORE].than[3]> { - ^narrate "<&e>1. <&b>I know this is surprising, but I really love you. Will you marry me?" } else if _karma].is[OR_MORE].than[2]> { - ^narrate "<&e>1. <&b>Here, I have something for you." - ^narrate "<&e>2. <&b>I<&sq>m just curious. What are your hobbies?" } else if _karma].is[OR_MORE].than[1]> { - ^narrate "<&e>1. <&b>Is there anything you need help with?" - ^narrate "<&e>2. <&b>Would you like to go out with me?" } else if _karma].is[==].to[-1]> { - random { - chat "I<&sq>m not talking to you anymore." - chat "Go away." - chat "Fuck off, ." - chat "Leave me alone." } - queue clear } else { # 0 karma - random { - ^chat "Hello stranger." - ^chat "Greetings, we don't seem to know each other." - ^chat "Good day, fellow Kratanian." } - ^narrate "<&e>1. <&b>Hey there, beautiful!" - ^narrate "<&e>2. <&b>Greetings, how are you doing?" } - ^narrate "<&e>Q. <&b>Goodbye." } chat trigger: '1': trigger: "/1/" script: - if _karma].is[OR_MORE].than[4]> { - engage - if ]> { - ^take money qty: - ^narrate "You gave to ." - ^flag player marriedTo: - ^flag npc marriedTo: - ^chat "Yes! Thank you, this is a dream come true!" - playeffect HEART qty:3 - wait 2 - chat "This is crazy, but yes, I will marry you!" - playeffect HEART qty:5 - wait 1 - playeffect HEART qty:10 - announce " is now married to ." - equip hand: } else { - chat "Sorry, but you don<&sq>t seem to have enough." } - disengage } else if _karma].is[OR_MORE].than[3]> { - engage - if { - chat "Sure, I<&sq>d love to!" - wait 1 - chat "Wait a second ... is that a ring on your finger?" - chat "You<&sq>re already married!" - wait 1 - chat "How could you say such a thing? You swine!" - attack target: - wait 1 - attack cancel - flag npc _karma:-1 } else if { - define partner - chat "What!? I<&sq>m already married to <%partner%.name>" - wait 1 - chat "How could you say such a thing? You swine!" - attack target: - wait 1 - attack cancel - chat "I will tell this to <%partner%.name>." - chat "Now get out of my sight!" - flag npc shame:->: - flag npc _karma:-1 } else { - animate animation:HURT - chat "Oh wow, . This really is surprising." - chat "I don<&sq>t know. I really like you." - playeffect HEART qty:3 - wait 2 - chat "But I can<&sq>t just leave everything behind and go." - wait 2 - chat "I<&sq>d like to open my own flower shop. But I still lack for that." - wait 2 - chat "If I could open my shop at your place, I<&sq>d marry you!" - flag npc _karma:4 - playeffect HEART qty:3 } - disengage } else if _karma].is[OR_MORE].than[2]> { - engage - if contains { - take qty:1 - chat "Geez thanks, that is my favourite flower! How did you know that?" - if ! { - playeffect HEART qty:1 } - wait 2 - chat "They smell so wonderful." - if ! { - playeffect HEART qty:2 } - wait 2 - chat "Thank you so much!" - if ! { - playeffect HEART qty:5 } - flag npc _karma:3 } else { - if contains i@air { - random { - chat "Well maybe you should put something in your hand before offering me nothing." - chat "Wow geez, an empty hand. How impressive!" } } else { - chat "Thanks, but I don<&sq>t really need ." } } - disengage } else if _karma].is[OR_MORE].than[1]> { - ^chat "Not really, but it<&sq>s very kind of you that you care about me." - if ! { - playeffect HEART qty:2 } - flag npc _karma:2 - flag player _cooldown duration: - trigger name:chat state:false } else { - random { - ^chat "Thanks..." - ^chat "That<&sq>s nice, I guess..." - ^chat "Do you tell that to everyone you just met?" } - flag player _cooldown duration: - trigger name:chat state:false } '2': trigger: "/2/" script: - if _karma].is[OR_MORE].than[2]> { - engage - chat "I enjoy swimming, reading and spending my time in flower fields." - wait 1 - chat "I would one day really like to open my own flower shop." - wait 1 - chat "I also like the color ." - disengage } else if _karma].is[OR_MORE].than[1]> { - if { - chat "No, I<&sq>m already married!" } else { - ^chat "Well that is surprising, but I think it<&sq>s too early for that." } - flag player _cooldown duration: - trigger name:chat state:false } else { - ^chat "I<&sq>m doing fine, thanks for asking. Have a good day, ." - if ! { - ^playeffect HEART qty:1 } - ^flag npc _karma:1 - ^flag player _cooldown duration: - trigger name:chat state:false } '3': trigger: "/q/" script: - random { - chat "Bye." - chat "Goodbye." - chat "Have a good day." } proximity trigger: entry radius: 5 exit radius: 5 entry: script: - if !_cooldown]> && _karma].is[OR_MORE].than[1]> { - random { - chat "Hi , good to see you again." - chat "Greetings, ." - chat "Good day, ." - chat "Oh , it<&sq>s you." } } exit: script: - if { - ^playsound sound:mob.villager.yes custom - flag npc justtalked:! } married: type: interact requirements: mode: all list: - flagged player "marriedTo:" steps: 1: click trigger: script: - trigger name:chat state:true - random { - ^chat "Hello darling." - ^chat "Hi honey!" - ^chat "It<&sq>s always a pleasure to see you, ." - ^chat ", you<&sq>re home!" } - ^if { - ^playeffect HEART qty: } - ^if { - lookclose false - look - wait 0.5 - lookclose true - random { - ^chat "Nice outfit you have there." - ^chat "You look great." - ^chat "Handsome as always, my dear ." } } - ^narrate "<&e>1. <&b>How are you?" - ^narrate "<&e>2. <&b>Did you earn anything in the shop today?" - if { - ^narrate "<&e>3. <&b>Stay here please." } else { - ^narrate "<&e>3. <&b>Follow me please." } - ^narrate "<&e>4. <&b>I have something new for you to wear." - ^narrate "<&e>5. <&b>A piece of advice..." - ^narrate "<&e>Q. <&b>Goodbye." chat trigger: '1': trigger: "/1/" script: - random { - chat "Thank you, I<&sq>m fine. I hope you are doing well too." - chat "Good, now that you are home." - chat "I always feel good when you are by my side." } '2': trigger: "/2/" script: - if { - chat "I already gave you your share today. You should come back tomorrow." - chat "Not right now, see me tomorrow." } else { - ^chat "Yes, here<&sq>s your share." - ^define reward *(/5)+>].round> - ^give money qty:%reward% - ^narrate "Received %reward% ." - ^flag npc earningcooldown duration: } '3': trigger: "/3/" script: - if { - flag npc isFollowing:! - chat "Ok, I will stay here now." - follow stop } else { - chat "Sure, I will follow you anywhere." - follow target: - flag npc isFollowing - narrate "Type '/cometome' to teleport to you." } '4': trigger: "/4/" script: - random { - ^chat "Really? Thank you, I<&sq>m curious to find out what you have for me!" - ^chat "Awesome, thanks!" - ^chat "Thank you honey!" } - flag npc equipmode - narrate "Talk to again to equip new items." '5': trigger: "/5/" script: - chat 'Q': trigger: "/q/" script: - random { - chat "Goodbye darling." - chat "Bye honey!" - chat "See you soon ." - chat ", take good care." } proximity trigger: entry radius: 5 entry: script: - if { - chat "! I have to tell you something!" - chat " tried to talk me into leaving you!" - flag npc shame:! } - if { - chat "! You will want to know about this!" - chat " attacked me!" - flag npc attackedme:! } marryequipmode: type: interact requirements: mode: all list: - flagged npc equipmode - flagged player "marriedTo:" steps: 1: click trigger: script: - ^narrate "<&e>1. <&b>Take this in your hand." - ^narrate "<&e>2. <&b>I have a new hat for you." - ^narrate "<&e>3. <&b>Please put this on your chest." - ^narrate "<&e>4. <&b>Please wear these leggings." - ^narrate "<&e>5. <&b>I have new shoes for you." - ^narrate "<&e>6. <&b>Would you kindly drop all the items I gave you?" - ^narrate "<&e>Q. <&b>Let<&sq>s talk about something else..." chat trigger: '1': trigger: "/1/" script: - run marryEquipItem def:|hand|hand instantly '2': trigger: "/2/" script: - run marryEquipItem def:|head|helmet instantly '3': trigger: "/3/" script: - run marryEquipItem def:|chest|chestplate instantly '4': trigger: "/4/" script: - run marryEquipItem def:|legs|leggings instantly '5': trigger: "/5/" script: - run marryEquipItem def:|boots|boots instantly '6': trigger: "/6/" script: - engage - ^drop - foreach li@helmet|chestplate|leggings|boots { - if ! { - ^drop } } - equip hand:i@air helmet:i@air chestplate:i@air leggings:i@air boots:i@air - ^chat "Alright. Here you go." - narrate "You will see the changes when you disconnect and reconnect." - disengage 'q': trigger: "/q/" script: - chat "Sure." - flag npc equipmode:! marryEquipItem: type: task definitions: npcid|bodypart|equipment script: - engage - if contains i@air { - chat "You don<&sq>t have anything in your hands. I<&sq>ll give you the item back." } - if %bodypart% == hand { - drop } else { - if contains %equipment% || contains i@air { - drop } else { - chat "I can<&sq>t wear this on that bodypart." - disengage - queue clear } } - if contains i@air { # clear item. Can't do , because air will be i@air,-1 and the equip will not work correctly and the item would be duplicated - equip %bodypart%:i@air } else { - equip %bodypart%: } - take iteminhand qty:1 - narrate "You will see the item when you disconnect and reconnect." - random { - chat "Ok." - chat "Thank you very much." - chat "Sure, I<&sq>ll give it a try." - chat "Looks great on me, doesn<&sq>t it?." } - disengage cometome: type: command name: cometome script: - if { - define marriedTo - if ]> { - if { - teleport - narrate " teleported to you." } else { - narrate " isn<&sq>t following you. You should tell to follow you." } } else { - narrate "Couldn<&sq>t find npc ." } } else { - narrate "You are not married to anyone." } randomMOTD: type: procedure script: - random { - define value "People aren<&sq>t against you, they are for themselves." - define value "Climb mountains not so the world can see you, but so you can see the world." - define value "You learn more from failure than from success. Don<&sq>t let it stop you. Failure builds character." - define value "The most dangerous risk of all - the risk of spending your life not doing what you want on the bet you can buy yourself the freedom to do it later." - define value "Go where you<&sq>re celebrated, not where you<&sq>re tolerated." - define value "The person that you will spend the most time with in your life is yourself, so better try to make yourself as interesting as possible." - define value "If you accept your limitations you go beyond them." - define value "People often say that motivation doesn<&sq>t last. Well, neither does bathing, that<&sq>s why I recommend it daily." - define value "Everyone you meet is afraid of something, loves something, and has lost something." - define value "Comfort is the enemy of achievement." - define value "<&dq>I<&sq>m bored<&dq> is a useless thing to say. You live in a great, big, vast world that you<&sq>ve seen none percent of." - define value "The only time you should look in your neighbor<&sq>s bowl is to make sure that they have enough. You don<&sq>t look to see if you have ... as much as them." - define value "Knowledge is knowing a tomato is a fruit. Wisdom is not putting it in a fruit salad." - define value "My mother never realized the irony in calling me a son-of-a-bitch." - define value "Politicians and diapers should be changed regularly, for the same reason." - define value "To steal ideas from one person is plagiarism. To steal from many is research." - define value "Light travels faster than sound. This is why some people appear bright until you hear them speak." - define value "I didn<&sq>t fight my way to the top of the food chain to be a vegetarian." - define value "I saw a woman wearing a shirt with <&dq>Guess<&dq> on it ... so I said<&co> <&dq>Implants?<&dq>" - define value "Good girls are bad girls that never get caught." - define value "Fighting for peace is like fucking for virginity." - define value "Always borrow money from a pessimist. He won<&sq>t expect it back." - define value "War doesn<&sq>t determine who is right. It determines who is left." - define value "Never hit anyone unless they are an immediate threat." - define value "Nothing looks more badass than a well-tailored suit." - define value "Always look a person in the eye when you talk to them." - define value "Buy a plunger before you need a plunger." - define value "If you aren<&sq>t confident, fake it. It will come with time." - define value "You can tell the size of a man by the size of the things that bother him." - define value "Ask more than you answer. Everybody likes to talk about themselves." - define value "Go with the decision that will make for a good story." - define value "When you walk, look straight ahead, not at your feet." - define value "Find your passion and figure out how to get paid for it." - define value "No matter their job or status in life, everyone deserves your respect." - define value "Never stop learning." - define value "Don<&sq>t change yourself just to make someone happy, unless that someone is you." - define value "If you<&sq>re the smartest person in the room, you<&sq>re in the wrong room." - define value "Luck favors the prepared." - define value "Do whatever you want to do in life, but be the best at it!" - define value "No one is on their deathbed wishing they spent more time at work. Enjoy your life." } - determine %value%