Paste #5285: Untitled Paste

Date: 2014/06/14 01:58:00 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


################################################################################
#                                                                              #
#                        T h o u g h t   B u b b l e s                         #
#                                                                              #
#                                                                              #
#    Thought Bubbles are the inner monologue of the player. The intention is   #
# to move to a more versitile system using yaml files. Admins will be able to  #
# add/remove thoughts and additional thought categories ingame with commands.  #
#                                                                              #
#    Currently, this script narrates a random thought from a random category   #
# and repeats every <player.flag[ThoughtDelay]> minutes. Players can specify   #
# a wait time from 1 - 30 minutes AND/OR turn thoughts off. Thoughts will be   #
# re-enabled on next login.                                                    #
#                                                                              #
#                                                                              #
#  This format script is found in Formats.yml                                  #
#                                                                              #
#  "TBFormat":                                                                 #
#      type: format                                                            #
#      format: <&4>[<&a><&l><player.name><&r><&4>]<&e> <&co> <&b><text>        #
#                                                                              #
################################################################################




"ThoughtCommands":
  type: world
  events:
    on thought command:
    - define arg1 '<c.args.get[1]>'

    - if %arg1% == off {
      - determine passively fulfilled
      - narrate "<&b>Toggling Thought Bubble <&4><&l>OFF"
      - queue <player.name>_TBQueue clear
      - queue clear
      }
      else if %arg1% == on {
      - determine passively fulfilled
      - narrate "<&b>Toggling Thought Bubble <&a><&l>ON"
      - run s@ThoughtBubble id:<player.name>_TBQueue
      - queue clear
      }
      else if <proc[isbetween].context[%arg1%|1|30]> {
      - narrate "<&b>Setting Thought Bubble delay to<&co> <&a><&l>%arg1% minute(s)"
      - flag player ThoughtDelay:%arg1%
      - determine passively fulfilled
      - queue clear
      }
      else {
      - ^narrate ""
      - ^narrate "<&b>========== <&a>Thought Bubbles Help <&b>=========="
      - ^narrate ""
      - ^narrate "<&b>Thought Bubbles are your inner monologue. You think about all sorts of things. You might even learn a thing or two if you pay attention."
      - ^narrate ""
      - ^narrate "<&b>You can adjust how often you think by specifying a number of minutes from 1 - 30. Thought Bubbles will be re-enabled on login."
      - ^narrate ""
      - ^narrate format:CmdSynFormat "/thought \<&lb\>on/off/time\<&rb\>"
      - ^narrate ""
      - determine fulfilled
      - queue clear
      }

"ThoughtBubble":
#        - narrate format:TBFormat "MESSAGE"
    type: task
    script:
    - ^if !<player.is_online> {
      - queue clear
      }
    - define wait '<player.flag[ThoughtDelay] || 5>'
    - wait <def[wait]>m
    - playsound <player> villager_haggle volume:0.5
    - ^random {
      - random {
        - narrate format:TBFormat "I like what I see here..."
        - narrate format:TBFormat "Who builds this stuff!?!"
        - narrate format:TBFormat "There is so much to see here!"
        - narrate format:TBFormat "I<&sq>m going to tell everyone about the MineConomy Network!"
        - narrate format:TBFormat "This must have taken a long time to put together..."
        - narrate format:TBFormat "I gotta get my friends here!"
        }
      - random {
        - narrate format:TBFormat "Gotta remember <&e>/train<&b> brings me back to the train station."
        - narrate format:TBFormat "I feel like having a slaughter! I should head to the Killing Games for some UltraPvP."
        - narrate format:TBFormat "I've heard that MineConomy has an economic simulation server. I would own everything!"
        - narrate format:TBFormat "Maybe I'll take the train to the Wastelands... I am a badass Survivor. Mwuhahaha!"
        }
      - random {
        - narrate format:TBFormat "I would love to build something for the Fair Grounds! I have a few ideas already..."
        - narrate format:TBFormat "I wonder if MineConomy has a creative server..."
        - narrate format:TBFormat "I wonder what sort of rules MineConomy has..."
        - narrate format:TBFormat "What are these Perk Points I keep hearing about?"
        - narrate format:TBFormat "Gotta remember to report any bugs in <&e>/helpme<&b> or on the website."
        - narrate format:TBFormat "I think too much. I should type <&e>/thought"
        - narrate format:TBFormat "I should get on the Mumble Voice server and chat with the staff. <&e>/help mumble"
        }
      }
    - inject s@ThoughtBubble