Paste #12611: Untitled Paste

Date: 2015/01/07 10:33:35 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


# +----------------------------------
# |   Angel scripts
# +----------------------------------

Angel:
    type: assignment
    interact scripts:
    - 10 Angel_Script
    actions:
        on assignment:
        # These triggers enable interaction with an NPC via chatting, clicking and entering proximity
        - trigger name:chat state:true radius:10
        - trigger name:click state:true
        - trigger name:proximity state:true
        - lookclose <npc> state:true

Angel_Script:
    type: interact
    steps:
        1:
            Click Trigger:
                Script:
                - narrate "<aqua>[Angel] -> You<&co> <yellow>What can I help you with?"
                - zap step:Help
            proximity Trigger:
                exit:
                    Script:
                      - if <player.flag[angel]> {
                          - narrate "<aqua>The angel fades away."
                          - flag server AngeL:!
                          - despawn <npc>
                        }
        Help:
            Click Trigger:
                Script:
                - narrate "<aqua>[Angel] -> You<&co> <red>What can I help you with?"
            chat Trigger:
                1:
                    Trigger: "/regex:(?i)(switch)/"
                    Script:
                      - wait 1
                      - narrate "<aqua>[Angel] -> You<&co> <red>You can use the following commands to switch between your diferent characters<&co>"
                      - narrate "<blue>- <gold>/char switch <blue>(This only works if you have exactly 2 characters.)"
                      - narrate "<blue>- <gold>/char # <blue>(This will switch you to the character in a specific character slot number. e.g. /char 3)"
                      - narrate "<blue>- <gold>/char Character_Name <blue>(This will switch you to the character with that exact name.)"
                      - narrate "<blue>- type <gold>/char help <blue>to see more character commands"
                2:
                    Trigger: "/regex:(?i)(name|rename|namechange)/"
                    Script:
                      - narrate "<dark_red>This command is only to be used in case of events and if you chose an indecent name."
                      - narrate "<dark_red>Your name changing will be recorded and abuse of this command will result in punishment."
                      - narrate "<red>If you wish to continue, please type your new name in chat."
# Setting the basic order of the filters in the file, for easy reading.
                      - yaml id:Names set Players.<player.name>.banned
                      - yaml id:Names set Players.<player.name>.swear_filter
                      - yaml id:Names set Players.<player.name>.titles_filter
                      - yaml id:Names set Players.<player.name>.number_filter
                      - yaml id:Names set Players.<player.name>.other_filter
                      - yaml id:Names set Players.<player.name>.names
                      - zap step:Rename
                3:
                    Trigger: "/regex:(?i)(commands|cmds)/"
                    Script:
                      - wait 1
                      - narrate "<aqua>[Angel] -> You<&co> <red>You can find the commands on arithia at<&co> <aqua>http://www.arithia.com/commands"
                4:
                    Trigger: "/regex:(?i)(character slot|character slots)/"
                    Script:
                      - narrate "<blue>At the moment you have used<&co> <yaml[Players].list_keys[Players.<player.name>.Characters].size>/<yaml[Players].read[Players.<player.name>.Donations.Character_Slots]> Character slots"
                      - narrate "<blue>You can buy more character slots in our store! http://www.arithia.com/store"
                5:
                    Trigger: "/regex:(?i)(char|character)/"
                    Script:
                      - narrate "<blue>Type <gold>/char help <blue>to see the character commands"







# +----------------------------------
# |   Professions
# +----------------------------------
                6:
                    Trigger: "/regex:(?i)(profession|job)/"
                    Script:
                      - narrate "<blue>The available professions are<&co>"
                      - narrate "<red>----------"
                      - narrate "<gold>Miner"
                      - narrate "<gold>Blacksmith"
                      - narrate "<gold>Cook"
                      - narrate "<gold>Farmer"
                      - narrate "<gold>Alchemist"
                      - narrate "<gold>Hunter"
                      - narrate "<gold>Lumberjack"
                      - narrate "<gold>Engineer"
                      - narrate "<red>----------"
                      - if <yaml[Players].read[Players.<player.name>.Characters.%Character%.Jobs]> {
                        - narrate "<blue>You are currently a <gold><yaml[Players].read[Players.<player.name>.Characters.%Character%.Jobs].as_list>"
                        - narrate "<blue>You can change your job(s) by talking to the Steward"
                        } else {
                        - narrate "<blue>You currently don't have a job, to get a job, you must talk to the steward."
                        }
                7:
                    Trigger: "/regex:(?i)(miner)/"
                    Script:
                      - narrate "<blue>Miners can mine all ores and craft<&co>"
                      - narrate "<red>--- crafting list ---"
                      - narrate "<gold>Wooden pickaxe"

                8:
                    Trigger: "/regex:(?i)(blacksmith)/"
                    Script:
                      - narrate "<blue>Blacksmiths can smelt ores and metals into various items<&co>"
                      - narrate "<red>--- crafting list ---"
                      - narrate "<gold>all tools"
                      - narrate "<gold>all armor <red>(except leather)"
                      - narrate "<gold>all swords"
                      - narrate "<gold>all metal blocks"
                      - narrate "<gold>iron doors and trap doors"
                      - narrate "<gold>cauldron"
                      - narrate "<gold>throwing knives"

                9:
                    Trigger: "/regex:(?i)(cook)/"
                    Script:
                      - narrate "<blue>Cooks can cook and bake all food items<&co>"
                      - narrate "<red>--- crafting list ---"
                      - narrate "<gold>all breads"
                      - narrate "<gold>all stew"
                      - narrate "<gold>all meat"
                      - narrate "<gold>all cake"
                      - narrate "<gold>all vegatables"

                10:
                    Trigger: "/regex:(?i)(farmer)/"
                    Script:
                      - narrate "<blue>Farmers can tile dirt, plant and harvest all crops<&co>"
                      - narrate "<red>--- crafting list ---"
                      - narrate "<gold>wooden hoe"

                11:
                    Trigger: "/regex:(?i)(alchemist)/"
                    Script:
                      - narrate "<blue>Alchemists can brew potions and alcohol<&co>"
                      - narrate "<red>--- crafting list ---"
                      - narrate "<gold>glass bottles"
                12:
                    Trigger: "/regex:(?i)(hunter)/"
                    Script:
                      - narrate "<blue>hunteres hunt animals for food and leather<&co>"
                      - narrate "<red>--- crafting list ---"
                      - narrate "<gold>all leather armor"
                      - narrate "<gold>bows"
                      - narrate "<gold>arrows"
                13:
                    Trigger: "/regex:(?i)(lumberjack)/"
                    Script:
                      - narrate "<blue>Lumberjacks cut down trees and crafts wooden items<&co>"
                      - narrate "<red>--- crafting list ---"
                      - narrate "<gold>all wooden tools"
                      - narrate "<gold>wooden swords"
                      - narrate "<gold>armor stand"
                      - narrate "<gold>wooden blocks, stairs and slabs"
                      - narrate "<gold>fences"
                      - narrate "<gold>wooden doors"
                      - narrate "<gold>wooden trapdoor"
                      - narrate "<gold>chests"
                14:
                    Trigger: "/regex:(?i)(engineer)/"
                    Script:
                      - narrate "<blue>Engineers works with all things that needs tinkering.<&co>"
                      - narrate "<red>--- crafting list ---"
                      - narrate "<gold>keys"
                      - narrate "<gold>buttons and levers"
                      - narrate "<gold>pistons"
                      - narrate "<gold>repeaters (candles)"
                      - narrate "<gold>watches and compasses"
                      - narrate "<gold>item frames"
                      - narrate "<gold>pictures"












                15:
                    Trigger: "/regex:(?i)(bye|nvm|nevermind|nothing)/"
                    Script:
                      - narrate "<aqua>[Angel] -> You<&co> <red>Alright, I wish you a good day!"
                      - despawn <npc>
                16:
                    Trigger: "/regex:.+/"
                    Script:
                      - narrate "<aqua>[Angel] -> You<&co> <red>Sorry I can't help you with that."
            proximity Trigger:
                exit:
                    Script:
                      - if <player.flag[angel]> {
                        - flag server Angel:!
                          - narrate "<aqua>The angel fades away."
                          - despawn <npc>
                        }















        Rename:
            chat Trigger:
                1:
                    Trigger: "/regex:.* .*/"
                    Script:
                      - narrate "<red>You cannot have spaces in your character name."
                      - narrate "<red>ONLY write your character name. Separate spaces with underscores. E.g. FirstName_LastName"
                2:
                    Trigger: "/regex:(?i)(bye|nvm|nevermind|nothing)/"
                    Script:
                      - narrate "<aqua>[Angel] -> You<&co> <red>Alright, I wish you a good day!"
                      - flag server Angel:!
                      - despawn <npc>
                3:
                    Trigger: "/regex:(?i)(anus|anal|fuck|shit|balls|penis|arse|dick|lol|bitch|boner|arithia|douche|damn|dildo|fag|dumbass|dumass|cunt|nigger|niggah|pussy|queef|queer|skank|slut|testicle|titties|titty|vagina|whore|fatass|fat_ass|faggot|erection|god|jesus|bieber|person|bacon|bing|pong|asshat|ass_hat|assmunch|ass_munch|genital|clam|hairy|tampon|vulva|snatch|clit|cunnilingus|moose|bongos|fart|phalus|troll|throbb|ramrod|dingle|spunk|shoot|twat|sperm|twink|moning|moan|trouser|snake|snack|fanny|head|gobble|choke|shower|spank|dominatrix|drugs|cooter|beaver|tunnel|suck|hole|vibrator|furry|mound|biscuit|horny|meat|groin|joystick|love|kock|pimp|swag|yolo|gandalf|satan|death|juicy)/"
                    Script:
# Check if they have already been warned about choosing a name like this
# if they have, just ban them
                      - if <player.flag[Name_Warning]> {
                        - execute as_server "ban <player.name> For choosing an inapropiate name (<context.message>) containing (<context.keyword>), this is automated so if you feel this is unjustified please contact staff on www.arithia.com"
#  adds 1 to the swear filter statistics
                        - yaml id:Names set statistics.banned:++
                        - yaml id:Names set statistics.swear_filter:++
# adds what name the player was banned for and the keyword that triggered it.
                        - yaml id:Names set Players.<player.name>.banned.<context.message>:<context.keyword>
                        - queue clear
                        }
# If they havn't gotten a warning, give them 1 chance to choose another word.
                      - if !<player.flag[Name_Warning]> {
                        - narrate "<&4>--=== WARNING ===--"
                        - narrate "<red>Please choose an approiate rp name!"
                        - narrate "<red>If you think <context.message> is approiate for a serious character name, contact staff!"
                        - narrate "<red>Write your character name. Seperate spaces with underscores. E.g. Firstname_Lastname"
                        - flag player Name_Warning
                        - zap step:2
                        - yaml id:Names set statistics.warned:++
                        - yaml id:Names set statistics.swear_filter:++
                        - yaml id:Names set Players.<player.name>.swear_filter.<context.message>:<context.keyword>
                        }
# titles filter
                4:
                    Trigger: "/regex:(?i)(king|queen|prince|slayer|champion|ripper|paladin|princess|emperor|empress|master|lord|dwarf|mage|wizard|hero|assasin|cleric|sir|lady|baron|maquise|captain|major|doctor|mr|child|teen|adult|old|slave)/"
                    Script:
                      - narrate "<red>You cannot name your character <context.message>, Please don't use titles in your character name."
                      - narrate "<red>Write your character name. Seperate spaces with underscores. E.g. Firstname_Lastname"
                      - zap step:2
                      - yaml id:Names set statistics.titles_filter:++
                      - yaml id:Names set Players.<player.name>.titles_filter.<context.message>:<context.keyword>
# Number filter
                5:
                    Trigger: "/regex:(\d+)/"
                    Script:
                      - narrate "<red>You cannot have numbers in your character name."
                      - narrate "<red>Write your character name. Seperate spaces with underscores. E.g. Firstname_Lastname"
                      - zap step:2
                      - yaml id:Names set statistics.number_filter:++
                      - yaml id:Names set Players.<player.name>.number_filter.<context.message>:<context.keyword>
# Other violating filters
                5:
                    Trigger: "/regex:(?i)(wonderdude|drem|monkey|staff|moderator|event|Scripter|Plugin|owner|admin|creative|)/"
                    Script:
                      - narrate "<red>You cannot have numbers in your character name."
                      - narrate "<red>Write your character name. Seperate spaces with underscores. E.g. Firstname_Lastname"
                      - zap step:2
                      - yaml id:Names set statistics.other_filter:++
                      - yaml id:Names set Players.<player.name>.other_filter.<context.message>:<context.keyword>
                6:
                    Trigger: "/regex:.+/"
                    Script:
                      - if <context.message.contains[_]> {
# Define a few keywords for the name changing
                        - define Player <player.name>
                        - define Character <player.flag[Character]>
# We have to figure out the number, to change the name of the character instead of making a new one
                        - define Char_Number <yaml[Players].list_keys[Players.%Player%.Characters].find[%Character%]>
                        - define New_Name <context.message>
# Saving their old name in case they back out of it.
                        - flag player Old_Name %Character%
# changing their name ingame
                        - execute as_server "name <player.name> %New_Name%"
# Setting their name in the file
                        - yaml id:Players set players.%Player%.Characters[%Char_Number%]:%New_Name%
# Changing their character flag to that name
                        - flag player Character:%New_Name%
                        - narrate "<red>Are you sure you want to name your character %New_Name%?"
                        - zap step:ConfirmName
                        } else {
                        - narrate "<red>Your character, must have a first name and a last name."
                        - wait 1
                        - narrate "<red>Write your character name. Seperate spaces with underscores. E.g. Firstname_Lastname"
                        - yaml id:Names set statistics.underscore_filter:++
# This one adds it to the list of succesful names a player have had.
                        - yaml id:Names set Players.<player.name>.names.<context.message>
                        }
            proximity Trigger:
                exit:
                    Script:
                      - if <player.flag[angel]> {
                        - flag server Angel:!
                        - narrate "<aqua>The angel fades away."
                        - despawn <npc>
                        }
        ConfirmName:
            chat Trigger:
                1:
                    Trigger: "/regex:(?i)(yes|yeah|okay|sure|alright)/"
                    Script:
                      - narrate "<aqua>[Angel] -> You<&co> <red>Your character name has been changed to <player.flag[Character]>"
                      - zap step:1
                      - despawn <npc>
                2:
                    Trigger: "/regex:.+/"
                    Script:
                      - execute as_server "removename <player.name>"
                      - narrate "<red>Write your character name. Separate spaces with underscores. E.g. Firstname_Lastname"
                      - zap step:Rename
            proximity Trigger:
                exit:
                    Script:
                      - if <player.flag[angel]> {
                        - flag server Angel:!
                        - narrate "<aqua>The angel fades away."
# Define a few keywords for the name changing
                        - define Player <player.name>
                        - define Character <player.flag[Character]>
# We have to figure out the number, to change the name of the character instead of making a new one
                        - define Char_Number <yaml[Players].list_keys[Players.%Player%.Characters].find[%Character%]>
# getting their old name
                        - define Old_Name <player.flag[Old_Name]>
# changing their name ingame
                        - execute as_server "name <player.name> %Old_Name%"
# Setting their name in the file
                        - yaml id:Players set players.%Player%.Characters[%Char_Number%]:%Old_Name%
                        - wait 1
                        - narrate "<red>Your renaming has been cancelled and you've gotten your old name<&co> <gold>%Old_Name% <red>back."
                        - flag player Old_Name:!
                        - despawn <npc>
                        }