Paste #7744: Untitled Paste

Date: 2014/07/31 15:14:36 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


KillAnnouncer:
    type: world
    debug: false
    events:
        on player dies:
        - flag player ZombieCountLife:0
        - flag player KillCountLife:0
        on player joins:
        - run script:KillFlags1

KillFlags1:
    type: task
    script:
    - flag player ZombieCountLife:0
    - flag player KillCountLife:0
    - listen kill type:entity name:zombie qty:1 script:ZombieCountCheck
    - listen kill type:player qty:1 script:KillCountCheck

KillFlags2:
    type: task
    script:
    - flag player ZombieCountTotal:0
    - flag player KillCountTotal:0

ZombieCountCheck:
    type: task
    script:
    - flag player ZombieCountLife:++
    - flag player ZombieCountTotal:++
    - narrate "<white>You have killed <yellow><player.flag[ZombieCountLife].as_int> <dark_green>Zombies <white> this life!"
    - narrate "<white>You have killed <yellow><player.flag[ZombieCountTotal].as_int> <dark_green>Zombies <white> while playing QuestZ!"

KillCountCheck:
    type: task
    script:
    - flag player KillCountLife:++
    - flag player KillCountTotal:++
    - narrate "<white>You have killed <yellow><player.flag[KillCountLife].as_int> <red>Players <white> this life!"
    - narrate "<white>You have killed <yellow><player.flag[KillCountTotal].as_int> <red>Players <white> while playing QuestZ!"