Paste #44450: prefix script

Date: 2017/09/14 16:06:41 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Testnpc:
  type: assignment
  interact scripts:
  - 30 test

test:
  type: interact
  steps:
    1:
      click trigger:
        script:
        - if <player.in_group[<eternal>||<admin>]> {
          - chat "<aqua>Good Day To You! I see that you are a previous donator! I have quite a few options for titles for you."
          - wait 3
          - chat "<aqua>You can say any of the following for a new title!"
          - wait 3
          - chat "<aqua>The first set of old in game ranks;"
          - wait 2
          - chat "<aqua>Wizard, Templar, Guardian, Overlord, or Titan"
          - wait 2
          - chat "<aqua>You may also choose from the following old Donator rank titles;"
          - wait 3
          - chat "<aqua> Hero, Crusader, Paladin, Vanquisher, Dragonborn or Immortal."
          - wait 3
          - chat "<aqua> Please Note&co I can only reset your Prefix <green>Once <aqua>a day!"
          - queue clear
          }
        - if <player.in_group[<†hero>]> {
          - chat "<aqua>Hello, would you like to have a new prefix? You can say the following;"
          - wait 3
          - chat "<blue>Say&co Wizard for a new prefix"
          - queue clear
          }
        - if <player.in_group[<††hero>]> {
          - chat "<aqua>Hello, you are rank ††hero. If you would like a new prefix, You can choose from any of the following;"
          - wait 3
          - chat "<blue>Say&co Wizard, or Templar for a new prefix"
          - queue clear
          }
        - if <player.in_group[<†††hero>]> {
          - chat "<aqua>Hello, you are rank †††hero. If you would like a new prefix, You can choose from any of the following;"
          - wait 3
          - chat "<blue>Say&co Wizard, Templar, or Guardian for a new prefix"
          - queue clear
          }
        - if <player.in_group[<††††hero>]> {
          - chat "<aqua>Hello, you are rank ††††hero. If you would like a new prefix, You can choose from any of the following;"
          - wait 3
          - chat "<blue>Say&co <aqua>Wizard, Templar, Guardian, or Overlord for a new prefix"
          - queue clear
          }
        - if <player.in_group[<☬hero>]> {
          - chat "<aqua>Hello, you are rank ☬hero. If you would like a new prefix, you may choose from any of the following;"
          - wait 3
          - chat "<blue>Say&co <aqua>Wizard, Templar, Guardian, Overlord, or Titan for a new prefix"
          - queue clear
          }
        - chat "<aqua>Hello <player.name>"
      chat trigger:
        'Wizard Title':
          Trigger: /Wizard/ title.
          script:
            - if <player.in_group[<eternal>||<admin>||<†hero>||<††hero>||<†††hero>||<††††hero>||<☬hero>]> {
              - chat "<aqua>Wizard Prefix it is!"
              - execute as_server "lp user <player.name> removeprefix 1"
              - execute as_server "lp user <player.name> addprefix 1 &a{&9Wizard&a}&f"
              - flag player prefix duration:12h
              - zap step:2
              - queue clear
              }
        'Templar Title':
          Trigger: /Templar/ title.
          script:
            - if <player.in_group[<eternal>||<admin>||<††hero>||<†††hero>||<††††hero>||<☬hero>]> {
              - chat "<aqua>Templar Prefix it is!"
              - execute as_server "lp user <player.name> removeprefix 1"
              - execute as_server "lp user <player.name> addprefix 1 &a{&3Templar&a}&f"
              - flag player prefix duration:12h
              - zap step:2
              - queue clear
              }
        'Guardian Title':
          Trigger: /Guardian/ title.
          script:
            - if <player.in_group[<eternal>||<admin>||<†††hero>||<††††hero>||<☬hero>]> {
              - chat "<aqua>Guardian Prefix it is!"
              - execute as_server "lp user <player.name> removeprefix 1"
              - execute as_server "lp user <player.name> addprefix 1 &1{&9Guardian&1}&f"
              - flag player prefix duration:12h
              - zap step:2
              - queue clear
              }
        'Overlord Title':
          Trigger: /Overlord/ title.
          script:
            - if <player.in_group[<eternal>||<admin>||<††††hero>||<☬hero>]> {
              - chat "<aqua>Overlord Prefix it is!"
              - execute as_server "lp user <player.name> removeprefix 1"
              - execute as_server "lp user <player.name> addprefix 1 &1{&7Overlord&1}&f"
              - flag player prefix duration:12h
              - zap step:2
              - queue clear
              }
        'Titan Title':
          Trigger: /Titan/ title.
          script:
          - if <player.in_group[<eternal>||<admin>||<☬hero>]> {
            - chat "<aqua>Titan Prefix it is!"
            - execute as_server "lp user <player.name> removeprefix 1"
            - execute as_server "lp user <player.name> addprefix 1 &6{&4T&6it&ean&6}&f"
            - flag player prefix duration:12h
            - zap step:2
            - queue clear
            }
        'Hero Title':
          Trigger: /Hero/ title.
          script:
          - if <player.in_group[<eternal>]> {
            - chat "<aqua>Hero Prefix it is!"
            - execute as_server "lp user <player.name> removeprefix 1"
            - execute as_server "lp user <player.name> addprefix 1 &e{&7H&3e&ar&eo}&f"
            - flag player prefix duration:12h
            - zap step:2
            - queue clear
            }
        'Crusader Title':
          Trigger: /Crusader/ title.
          script:
          - if <player.in_group[<eternal>]> {
            - chat "<aqua>Crusader Prefix it is!"
            - execute as_server "lp user <player.name> removeprefix 1" 
            - execute as_server "lp user <player.name> addprefix 1 &9{&aCru&bsa&3der&9}&f"
            - flag player prefix duration:12h
            - zap step:2
            - queue clear
            }
        'Paladin Title':
          Trigger: /Paladin/ title.
          script:
          - if <player.in_group[<eternal>]> {
            - chat "<aqua>Paladin Prefix it is!"
            - execute as_server "lp user <player.name> removeprefix 1"
            - execute as_server "lp user <player.name> addprefix 1 &5{&9Pal&3ad&7in&5}&f"
            - flag player prefix duration:12h
            - zap step:2
            - queue clear
            }
        'Vanquisher Title':
          Trigger: /Vanquisher/ title.
          script:
          - if <player.in_group[<eternal>]> {
            - chat "<aqua>Vanquisher Prefix it is!"
            - execute as_server "lp user <player.name> removeprefix 1"
            - execute as_server "lp user <player.name> addprefix 1 &8{&eVan&6qui&csh&4er&8}&f"
            - flag player prefix duration:12h
            - zap step:2
            - queue clear
            }
        'Dragonborn Title':
          Trigger: /Dragonborn/ title.
          script:
          - if <player.in_group[<eternal>]> {
            - chat "<aqua>Dragonborn Prefix it is!"
            - execute as_server "lp user <player.name> removeprefix 1"
            - execute as_server "lp user <player.name> addprefix 1 &6{&4Dr&6ag&eo&fn&bb&3o&9r&1n&6}"
            - flag player prefix duration:12h
            - zap step:2
            - queue clear
            }
        'Immortal Title':
          Trigger: /Immortal/ title.
          script:
          - if <player.in_group[<eternal>]> {
            - chat "<aqua>Immortal Prefix it is!"
            - execute as_server "lp user <player.name> removeprefix 1"
            - execute as_server "lp user <player.name> addprefix 1 &8{&eVan&6qui&csh&4er&8}&f"
            - flag player prefix duration:12h
            - zap step:2
            - queue clear
            }
        'What did you say':
          trigger: /REGEX:\w+/
          script:
          - chat "<white><player.name><yellow>, I don<&sq>t what <&sq><white><context.message><yellow><&sq> means."
          - ^narrate "<green>Please interact with me again to hear your options!<&co>"
    2:
      click trigger:
        script:
        - if !<player.has_flag[soda]> {
          - zap step:1
          - queue clear 
          }
        - chat "<aqua>You have already had your prefix changed today! Come see me again tomorrow!"