Paste #4518: Untitled Paste

Date: 2014/05/23 10:10:51 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


plothelperassignment:
    type: assignment
    default constants:
      cN2: 1|2
      cN25: 1|2|3|4|5
      cN255: 1|2|3|4|5|6|7|8|9
      cN2552: 1|2
    default constants:
    interact scripts:
    - 1 plothelperlocation
    - 2 plotapplicationintroduction
    events:
      on assignment:
      - plotapplicationintroduction
    actions:
    - trigger name:chat toggle:true
    - trigger name:click toggle:true
    - trigger name:proximity toggle:true


plothelperlocation:
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    - if <player.name> == <npc.flag[mytrainee]> {
                      - if <player.flag[application]> == 0 {
                        - chat "You don't suppose to be here yet! Im gonna teleport you right back to spawn now!"
                        - execute as_op "spawn" }
                      - if <player.flag[application]> == 1 {
                        - run plotapplicationintroduction
                        - flag player "chatSelect:1" }
                      - if <player.flag[application]> == 2 {
                        - chat "Oh hey <white><player.name><green> Do you want info about your application?<gray> (right click me)<green>"
                        - flag player "chatSelect:1" }
                      - if <player.flag[application]> == 3 {
                        - run plotapplicationresetsystem
                        }
                    }
            click trigger:
                script:
                - if <player.name> == <npc.flag[mytrainee]> {
                  - flag player "repeatLast:true"
                  - if <player.flag[application]> == 2 {
                    - flag player "repeatLast:true"
                    - run plotHelperChatNav
                  }
                }
            chat trigger:
                1:
                    trigger: //
                    script:
                    - if <player.name> == <npc.flag[mytrainee]> {
                      - run plotHelperChatNav
                    }

plotapplicationintroduction:
    type: task
    script:
      - wait 2
      - if <npc.flag[plotworld1]> == 1 {
        - flag npc "mytrainee:<player.name>"
        - flag npc "plotworld1:1"
        - flag npc "<birth:<util.date.time.month>"
        - flag player "application:2"
        }
      - chat "<green>Hey <white><player.name><green> i have been expecting you on this plot for a while!"
      - wait 5
      - chat "So why didn't you come earlier?"
      - wait 2
      - chat "Well it's not important, let's focus on your application here for now!"
      - wait 3
      - chat "Im going to give you a short tutorial about your application."
      - wait 4
      - chat "First of all, you are now doing a applicationbuild on the server Fixiebrick to become a builder!"
      - wait 6
      - chat "So, when you finish your application, you are in the buildteam for Fixiebrick!"
      - wait 5
      - narrate "<white><player.name><green> So what do i need to do now for my application?"
      - wait 4
      - chat "Oh, you don't know it yet? You have to build something good!"
      - wait 5
      - chat "You should build on your plot in <yellow>medieval<green> or <yellow>steampunk<green> style with a touch of <yellow>fantasy<green>."
      - wait 5
      - chat "Be sure to spend atleast several hours on your build, and make it your best build ever on this size."
      - wait 5
      - chat "The staff who checks the plot is very strict on good build quality."
      - wait 5
      - chat "Be sure to signup for our server <red>http://www.fixiebrick.net <green> to be able to complete your application!"
      - wait 7
      - chat "You are allowed to use <yellow>worldedit<green> for your application on your plot!"
      - wait 6
      - chat "Also be sure to download our texturepack, and mcpatcher <red>http://fixiebrick.net/home/m/19617520/article/2214964<green>."
      - wait 6
      - chat "If you are finished with you application, talk to me again!"
      - wait 5
      - chat "Goodluck <white><player.name><green> on your application!"
      - wait 2
      - narrate "<gold>[Fixiebrick]<gray> If you want this tutorial again? talk to your Trainer!"

plotapplicationresetsystem:
  type: task
  script:
    - chat "this plot will now be reset!"
    - execute as_npc "plotme reset"
    - flag <npc.flag[mytrainee]> "application:0"
    - remove <npc>

plotHelperChatNav:
    type: task
    script:
    - if <cons:cN<player.flag[chatSelect]>> contains <player.chat_history> && <player.flag[repeatLast]> == false {
        - flag player "chatSelect:<player.flag[chatSelect]><player.chat_history>"
        } else if <player.flag[repeatLast]> == true {
        - flag player "repeatLast:false"
        } else if <player.chat_history> == 0 {
        - flag player "chatSelect:2"
        } else {
        - chat "<green>What? Options; <cons:cN<player.flag[chatSelect]>>"
        }
    - if <player.flag[chatSelect]> == 1 {
        - random {
            - chat "<green>Welcome to <white>The Plotworld<green> <white><player.name><green>. Can I help you with something?"
            - chat "<green>Good day <white><player.name><green> welcome to <white>The Plotworld<green>. Is there something I can help you with?"
            - chat "<green>Welcome to <white>The Plotworld<green>, is there anything I can help you with?"
            - chat "<green>Good day! Welcome to <white>The Plotworld<green>. Can I aid you?"}
        - ^narrate "type the number of the option you want in the chat."
        - ^narrate "1. Yes"
        - ^narrate "2. No"
        } else if <player.flag[chatSelect]> == 11 {
        - random {
            - chat "<green>What is it you need help with?"
            - chat "<green><white><player.name><green> what's your problem?"
            - chat "<green>What does you'r issue regard?"
            - chat "<green>What problem do you need help with <white><player.name><green>?"}
        - ^narrate "1. My application"
        - ^narrate "2. The server"
        - ^narrate "3. play music"
        - ^narrate "4. worldedit"
        - ^narrate "5. Stop talking please!"
        } else if <player.flag[chatSelect]> == 111 {
          - chat "So you have a question about your application? what is the problem?"
          - ^narrate "type the number of the option you want in the chat."
          - ^narrate "1. Can you run my application tutorial again?"
          - ^narrate "2. I am done with my application"
        } else if <player.flag[chatSelect]> == 1111 {
          - chat "Oh sure, let me start from the beginning!"
          - run s@plotapplicationintroduction
        } else if <player.flag[chatSelect]> == 1112 {
          - chat "Are you sure you are done?"
          - wait 2
          - chat "Well i can send in your build as done then, if you like me to do that."
          - ^narrate "type the number of the option you want in the chat."
          - ^narrate "1. Yes"
          - ^narrate "2. No"
        } else if <player.flag[chatSelect]> == 11121 {
          - execute as_player "plotme home"
          - execute as_player "rm review"
          - chat "Oke, your build has now been submitted as completed, you will soon hear from an admin!"
        } else if <player.flag[chatSelect]> == 11122 {
          - chat "Oke, do your best on your build <white><player.name><green>!"
        } else if <player.flag[chatSelect]> == 112 {
          - chat "Aha you want some info about the server?"
          - wait 5
          - chat "Well Fixiebrick is original a roleplayserver started in April 2013."
          - wait 5
          - chat "We are always building the roleplayworld up. and hope we can open it soon enough."
          - wait 5 
          - chat "You are now applying to build in the roleplayworld."
          - wait 5
          - chat "Since May 2014 we also host minigames on our server and hope to expand these!"
          - wait 5
          - chat "We also offer work for developers, and graphical designers, and redstone techincians!"
        } else if <player.flag[chatSelect]> == 113 {
        - random {
            - chat "<green>You want to play music! What piece?"
            - chat "<green>Music? Which piece?"
            - chat "<green>You want music <white><player.name><green>? Any specific piece?"
            - chat "<green>What piece of music <white><player.name><green>"}
        - ^narrate "1. Boulevard Of Broken Dreams"
        - ^narrate "2. Jingle Bells"
        - ^narrate "3. Jump"
        - ^narrate "4. Money Money Money"
        - ^narrate "5. Nothing Else Matters"
        - ^narrate "6. Still Alive"
        - ^narrate "7. The Model"
        - ^narrate "8. Too Bad"
        - ^narrate "9. Wake Me Up"
        - midi stop
        } else if <player.flag[chatSelect]> == 1131 {
        - random {
            - chat "<green>You're the boss <white><player.name><green>, Boulevard Of Broken Dreams it is!"
            - chat "<green>Boulevard Of Broken Dreams? I'll play that!"
            - chat "<green>Ok, I'll play Boulevard Of Broken Dreams"
            - chat "<green>That's what you want <white><player.name><green>? Ok, playing Boulevard Of Broken Dreams"}
        - midi stop
        - midi file:boulevardOfBrokenDreams 
        } else if <player.flag[chatSelect]> == 1132 {
        - random {
            - chat "<green>You're the boss <white><player.name><green>, Jingle Bells it is!"
            - chat "<green>Jingle Bells? I'll play that!"
            - chat "<green>Ok, I'll play Jingle Bells"
            - chat "<green>That's what you want <white><player.name><green>? Ok, playing Jingle Bells"}
        - midi stop
        - midi file:jingleBells 
        } else if <player.flag[chatSelect]> == 1133 {
        - random {
            - chat "<green>You're the boss <white><player.name><green>, Jump it is!"
            - chat "<green>Jump? I'll play that!"
            - chat "<green>Ok, I'll play Jump"
            - chat "<green>That's what you want <white><player.name><green>? Ok, playing Jump"}
        - midi stop
        - midi file:jump 
        } else if <player.flag[chatSelect]> == 1134 {
        - random {
            - chat "<green>You're the boss <white><player.name><green>, Money Money Money it is!"
            - chat "<green>Money Money Money? I'll play that!"
            - chat "<green>Ok, I'll play Money Money Money"
            - chat "<green>That's what you want <white><player.name><green>? Ok, playing Money Money Money"}
        - midi stop
        - midi file:moneyMoneyMoney 
        } else if <player.flag[chatSelect]> == 1135 {
        - random {
            - chat "<green>You're the boss <white><player.name><green>, Nothing Else Matters it is!"
            - chat "<green>Nothing Else Matters? I'll play that!"
            - chat "<green>Ok, I'll play Nothing Else Matters"
            - chat "<green>That's what you want <white><player.name><green>? Ok, playing Nothing Else Matters"}
        - midi stop
        - midi file:nothingElseMatters 
        } else if <player.flag[chatSelect]> == 1136 {
        - random {
            - chat "<green>You're the boss <white><player.name><green>, Still Alive it is!"
            - chat "<green>Still Alive? I'll play that!"
            - chat "<green>Ok, I'll play Still Alive"
            - chat "<green>That's what you want <white><player.name><green>? Ok, playing Still Alive"}
        - midi stop
        - midi file:stillAlive 
        } else if <player.flag[chatSelect]> == 1137 {
        - random {
            - chat "<green>You're the boss <white><player.name><green>, The Model it is!"
            - chat "<green>The Model? I'll play that!"
            - chat "<green>Ok, I'll play The Model"
            - chat "<green>That's what you want <white><player.name><green>? Ok, playing The Model"}
        - midi stop
        - midi file:theModel 
        } else if <player.flag[chatSelect]> == 1138 {
        - random {
            - chat "<green>You're the boss <white><player.name><green>, Too Bad it is!"
            - chat "<green>Too Bad? I'll play that!"
            - chat "<green>Ok, I'll play Too Bad"
            - chat "<green>That's what you want <white><player.name><green>? Ok, playing Too Bad"}
        - midi stop
        - midi file:tooBad 
        } else if <player.flag[chatSelect]> == 1139 {
        - random {
            - chat "<green>You're the boss <white><player.name><green>, Wake Me Up it is!"
            - chat "<green>Wake Me Up? I'll play that!"
            - chat "<green>Ok, I'll play Wake Me Up"
            - chat "<green>That's what you want <white><player.name><green>? Ok, playing Wake Me Up"}
        - midi stop
        - midi file:wakeMeUp 
        } else if <player.flag[chatSelect]> == 114 {
        - chat "So you need some help with worldedit?"
        - wait 5
        - chat "First of all, a wooden axe is your maintool"
        - wait 5
        - chat "use the command <yellow>//wand<green> to get a wooden axe. (I already did for you now)"
        - execute as_player "/wand"
        - narrate "Hold the wooden axe in your hands!"
        - wait 10
        - chat "Oke, so what you need to know. Worldedit needs 2 positions to modify everything in that area"
        - wait 8
        - chat "Left mouseclick a block while holding the axe. and right click another block with the axe."
        - wait 15
        - chat "You now have made a selection with worldedit"
        - wait 5
        - chat "now use the command <yellow>//set 35<green>     this will make the selected area into wool."
        - wait 10
        - chat "Now go stand on your selection you just modified, use the command <yellow>//copy<green>     and fly 5 blocks up, then use <yellow>//paste<green>"
        - wait 15
        - chat "Oke, now you know the very basic of <yellow>worldedit<green>."
        - wait 5
        - chat "visit <red>http://wiki.sk89q.com/wiki/WorldEdit<green> for more info about worldedit, and excercise on your plot!"

        } else if <player.flag[chatSelect]> == 115 {
          - chat "I will stop talking from now on!"
          - wait 2
          - chat "If you need me, richt click me!"
          - trigger proximity state:false 

        } else if <player.flag[chatSelect]> == 12 {
        - flag player "chatSelect:2"
        - flag player "repeatLast:true"
        - runtask plotHelperChatNav
        } else if <player.flag[chatSelect]> == 2 {
        - random {
            - chat "<green>Goodbye <white><player.name><green>."
            - chat "<green>Goodbye <white><player.name><green>, hope I helped!"
            - chat "<green>Hope to see you around <white><player.name><green>."
            - chat "<green>Hope I helped <white><player.name><green>."}
            - flag player "chatSelect:1"
        } else {
        - chat "<green>Error! Unknown chat path... contact admin / technician"
        - announce to_ops "Error! Unknown chat path; guardInteract, <player.flag[repeatLast]> + <player.flag[chatSelect]> + <player.chat_history>"
        }
        - ^narrate "0. Exit"                    

#[20:26] <Kantorh> happertje2: <npc.location>
#[20:26] <Kantorh> then use <m.as_int:<npc.location> + 5> as your walkto location
#[20:27] <Kantorh> or + 5,0,0
#[20:27] <Kantorh> actually, scratch that
#[20:28] <Kantorh> I'm retarded
#[20:28] <Kantorh> happertje2: It's just <npc.location.add[5,0,0]>
#[20:29] <Kantorh> !cmd walkto

#[20:59] <Mikayle1> !tag server.current_time_millis
#[20:59] <monkeybot> Found: <server.current_time_millis>, which returns a Element(Number)
#[21:00] <monkeybot>   Returns the number of milliseconds since Jan 1, 1970.
#[21:01] <Mikayle1> so, on spawn flag npc birth = <set.current_time_millia>
#[21:02] <Mikayle1> Then you can create an event that checks to see if npc.flag.birth >= <server.current_time_millis - 2592000000>
#[21:02] <Mikayle1> 2592000000 is 30 days