Paste #6016: Untitled Paste

Date: 2014/06/30 15:09:14 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


"Fishing Contest":
    type: world
    events:
    #Join
    #Leave
    #Start
        on garapesca command:
        - determine passively fulfilled
        - define command <context.parsed_args.get[1]>
        - define winner <context.parsed_args.get[2]>
        - execute as_server "scoreboard objectives add fishing stat.fishCaught <aqua><bold>Gara di pesca"
        - execute as_server "scoreboard objectives setdisplay sidebar fishing"


        - if %command% = join inject "Join Contest"
        - if %command% = leave inject "Leave Contest"
        - if %command% = start inject "Start Contest"
        - if %command% = stop inject "Stop Contest"
        - if %command% = win inject "Winner of Contest"

"Join Contest":
    type: task
    script:
    - announce "<aqua><bold><player.name> è entrato nella gara!"
    - execute as_server "scoreboard players add <player.name> fishing 0"

"Leave Contest":
    type: task
    script:
    - announce "<aqua><bold><player.name> è uscito dalla gara"
    - execute as_server "scoreboard players reset <player.name>"

"Start Contest":
    type: task
    debug: false
    script:
    - announce "<aqua><bold>Inizia la gara di pesca! Vince il primo che arriva a 20 pesci!"
    - announce "<aqua><bold>Scrivi <red><bold>/garapesca join <aqua><bold>per partecipare!"
    - switch l@93365,2,3508,minebox state:on duration:2s
    - switch l@93368,2,3508,minebox state:off

"Stop Contest":
    type: task
    debug: false
    script:
    - announce "<aqua><bold>La gara di pesca è terminata"
    - execute as_server "scoreboard objectives remove fishing"
    - switch l@93368,2,3508,minebox state:on
    - switch l@93365,2,3508,minebox state:off
"Winner of Contest":
    type: task
    definitions: winner
    script:
    - announce "<aqua><bold>%winner% ha vinto la gara di pesca! E ha ottenuto un premio!"
    - execute as_server "scoreboard objectives remove fishing"
    - random 2
    - give i@TrinketPesca qty:1 player:%winner%
    - execute as_server "give %winner% 346 1 name:&3&l&oFortuna_dei_mari enchant luck lure lore:Graziosa_canna_da_pesca|Ottenuta_da_un_evento"