Paste #54682: Untitled Paste

Date: 2019/06/15 11:07:02 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


Tribute_Event_Status:
    type: yaml data
    debug: false
    tribute_event_active: true
    mcmmo:
        rate: 1
        progress: 0
        upgrades:
            1: 250
            2: 500
            3: 1000
            4: 2000
    drops:
        rate: 1
        progress: 0
        upgrades:
            1: 250
            2: 500
            3: 1000
            4: 2000
    experience:
        rate: 1
        progress: 0
        upgrades:
            1: 250
            2: 500
            3: 1000
            4: 2000

Tribute_Handler:
    type: world
    debug: false
    events:
        on server start:
        - yaml load:utilities\ServerEvents\Tribute\Tribute_Handler.yml id:TributeHandler
        - yaml load:utilities\Rates\GlobalDropRate.yml id:DropRate
        - yaml load:utilities\Rates\GlobalExperienceRate.yml id:ExperienceRate
        on system time hourly:
        - if <util.date.format[EEE]> != Fri || <util.date.format[EEE]> != Mon:
            - queue clear
        - else if <util.date.format[EEE]> == Fri:
            - if <s@Tribute_Event_Status.yaml_key[tribute_event_active]>:
                - queue clear
            - else:
                - yaml set id:TributeHandler Tribute_Event_Status.tribute_event_active:true
                - yaml set id:DropRate drop_rate_data.drop_multiplier_active:true
                - yaml set id:DropRate drop_rate_data.drop_rate_multiplier: 1
                - yaml set id:ExperienceRate experience_rate_data.experience_multiplier_active:true
                - yaml set id:ExperienceRate experience_rate_data.experience_rate_multiplier:1
                - yaml id:ExperienceRate savefile:utilities\Rates\GlobalExperienceRate
                - yaml id:DropRate savefile:utilities\Rates\GlobalDropRate
                - yaml id:TributeHandler savefile:utilities\ServerEvents\Tribute\Tribute_Handler.yml
                - reload
        - else if <util.date.format[EEE]> == Mon:
            - if <s@Tribute_Event_Status.yaml_key[tribute_event_active]> == false:
                - queue clear
            - else:
                - yaml set id:TributeHandler Tribute_Event_Status.tribute_event_active:false
                - yaml set id:TributeHandler Tribute_Event_Status.mcmmo.rate:1
                - yaml set id:TributeHandler Tribute_Event_Status.mcmmo.progress:0
                - yaml set id:TributeHandler Tribute_Event_Status.drops.rate:1
                - yaml set id:TributeHandler Tribute_Event_Status.drops.progress:0
                - yaml set id:TributeHandler Tribute_Event_Status.experience.rate:1
                - yaml set id:TributeHandler Tribute_Event_Status.experience.progress:0
                - yaml set id:DropRate drop_rate_data.drop_multiplier_active:false
                - yaml set id:DropRate drop_rate_data.drop_rate_multiplier: 1
                - yaml set id:ExperienceRate experience_rate_data.experience_multiplier_active:false
                - yaml set id:ExperienceRate experience_rate_data.experience_rate_multiplier:1
                - yaml id:ExperienceRate savefile:utilities\Rates\GlobalExperienceRate
                - yaml id:DropRate savefile:utilities\Rates\GlobalDropRate
                - yaml id:TributeHandler savefile:utilities\ServerEvents\Tribute\Tribute_Handler.yml
                - execute as_server "xprate reset"
                - reload
        on player joins:
        - if <s@Tribute_Event_Status.yaml_key[tribute_event_active].not>:
            - queue clear
        - if <s@Tribute_Event_Status.yaml_key[tribute_event_active]>:
            - wait 3s
            - narrate "<&6>The Gods seek your offerings of Tribute! Collect Tribute and deliver it to the <&2>Oracle of the Gods<&6> in the castle in Dawn's Landing!"
            - if <s@Tribute_Event_Status.yaml_key[mcmmo.rate]> > 1 || <s@Tribute_Event_Status.yaml_key[drops.rate]> > 1 || <s@Tribute_Event_Status.yaml_key[experience.rate]> > 1:
                - narrate "<&a>Current blessings:"
                - narrate "<&a>Blessing of Skillfulness: <&6><s@Tribute_Event_Status.yaml_key[mcmmo.rate]>x"
                - narrate "<&a>Blessing of Luck: <&6><s@Tribute_Event_Status.yaml_key[drops.rate]>x"
                - narrate "<&a>Blessing of Wisdom: <&6><s@Tribute_Event_Status.yaml_key[experience.rate]>x"
        on player receives message:
        - if "<context.message.contains_text[mcMMO is currently in an XP rate event]>" && <s@Tribute_Event_Status.yaml_key[tribute_event_active]>:
            - determine cancelled

Tribute_DropTable_Veteran:
    type: world
    debug: false
    events:
        on mm denizen death:
        - if <s@Tribute_Event_Status.yaml_key[tribute_event_active]> == false:
            - queue clear
        - if !<context.entity.name.starts_with[<&9>]||null>:
            - queue clear
        - else if <context.entity.name.starts_with[<&9>]||null>:
            - if <util.random.int[1].to[10]> <= 1:
                - drop GodsTribute location:<context.entity.location>

Tribute_DropTable_Elite:
    type: world
    debug: false
    events:
        on mm denizen death:
        - if <s@Tribute_Event_Status.yaml_key[tribute_event_active]> == false:
            - queue clear
        - if !<context.entity.name.starts_with[<&d>]||null>:
            - queue clear
        - else if <context.entity.name.starts_with[<&d>]||null>:
                - drop GodsTribute location:<context.entity.location>

Tribute_mcMMO_Drops:
    type: world
    debug: false
    events:
        on player gains xp for mining:
        - if <s@Tribute_Event_Status.yaml_key[tribute_event_active]> == false:
            - queue clear
        - if <util.random.int[1].to[2500]> <= 1:
            - give GodsTribute
            - narrate "<&a>You found a Tribute to the Gods!"

        on player gains xp for herbalism:
        - if <s@Tribute_Event_Status.yaml_key[tribute_event_active]> == false:
            - queue clear
        - if <util.random.int[1].to[2500]> <= 1:
            - give GodsTribute
            - narrate "<&a>You found a Tribute to the Gods!"

        on player gains xp for fishing:
        - if <s@Tribute_Event_Status.yaml_key[tribute_event_active]> == false:
            - queue clear
        - if <util.random.int[1].to[250]> <= 1:
            - give GodsTribute
            - narrate "<&a>You found a Tribute to the Gods!"

        on player gains xp for woodcutting:
        - if <s@Tribute_Event_Status.yaml_key[tribute_event_active]> == false:
            - queue clear
        - if <util.random.int[1].to[1500]> <= 1:
            - give GodsTribute
            - narrate "<&a>You found a Tribute to the Gods!"

        on player gains xp for excavation:
        - if <s@Tribute_Event_Status.yaml_key[tribute_event_active]> == false:
            - queue clear
        - if <util.random.int[1].to[2500]> <= 1:
            - give GodsTribute
            - narrate "<&a>You found a Tribute to the Gods!"