Paste #9438: Edit of P#9437 - Untitled Paste

Date: 2014/09/08 15:45:47 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


#Violet Server World Scripts v0.0001
#By TheGeek007 
#9-8-14 

VioletWorldScript:
    type: world
    events:
        on server start:
        # clear the flag, it saves between reboots
        - flag server naughtywords:!
        #set a server flag a list of naughty words 
        - flag server naughtywords:|:fuck|shit|damn|pussy|cunt|bitch|nigger|ass|dick|penis
#to add a naughty word /ex flag server naughtywords:->:word 
#to remove a naughty word /ex flag server naughtywords:<-:word 
        on player chats:
        #this line censors the naughty words with "*%@&"
        - define replacement <context.message.replace[regex:(?i)(<server.flag[naughtywords].as_list.replace[li@]>)].with[*%@&]> 
        #if words were replaced, then increase flag.player.infractions and 
        #rain down misfortune! I'm a freaking genius!
        - if !<context.message.is[==].to[%replacement%]> {
          #for debugging purposes, we will set the duration to 1 minute
          - flag player infractions:++ duration:1m
          - announce "DEBUG player flag infractions is now <player.flag[infractions]>"
          - random {
            - run MisfortuneJenny
            - run MisfortuneOak
            }
          - determine %replacement%
          }
        on player uses portal:
        #Makes players not able to use portals AT ALL!!! (YAY!) 
        - determine CANCELLED

        on portal created:
        - announce "A portal has been created at <context.location> in world <context.world> for reason <context.reason>!"

MisfortuneJenny:
    type: task
    script:
    - announce "[Officer Jenny] Offensive words aren't allowed on our server, <player.name>!"
    - wait 1
    - burn <player> duration:5
    - announce "Officer Jenny's Growlithe used Fire Spin on <player.name> for Bad Language!"
MisfortuneOak:
    type: task
    script:
    - announce "[Professor Oak] <player.name>! This isn't the time to use dirty words!"
    - wait 1
    - strike <player.location>
    - announce "A passing Pikachu is offended at <player.name>'s lanugage and used Thunder!"