Paste #51734: lvl5

Date: 2019/01/24 14:56:03 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


lvl5Kobold:
    type: assignment

    default constants:
        MobType: Player
        name: <red><Bold>KoboldGuard
        Health: 20
        Damage: 4
        speed: 2
        Healrate: 2
        Respawntime: 8
        Experience: 6
        Range: 10
        Follow: 20
        Skin: Goblin
        Chestplate: 299
        Weapon: 2256

    Interact Scripts:
    - agressive_targeting_kobold

    actions:
        on assignment:
        - wait 5s
        - trigger name:proximity toggle:true range:20
        - wait 1s
        - trigger name:damage toggle:true
        - wait 1s
        - execute as_op "npc sel"
        - execute as_op "npc type <cons:MobType>"
        - execute as_op "npc rename <cons:name>"
        - execute as_op "trait Sentinel"
        - execute as_op "Sentinel health <cons:Health>"
        - execute as_op "Sentinel removeignore Owner"
        - execute as_op "npc skin <cons:Skin>"
        - equip <npc> chest:<cons:Chestplate>
        - equip <npc> hand:<cons:Weapon>
        - execute as_op "Sentinel addtarget Player"
        - execute as_op "npc speed <cons:speed>"
        - execute as_op "Sentinel damage <cons:Damage>"
        - execute as_op "Sentinel speed <cons:speed>"
        - execute as_op "Sentinel Healrate <cons:Healrate>"
        - execute as_op "Sentinel Range <cons:range>"
        - execute as_op "Sentinel chaserange <cons:Follow>"
        - execute as_op "Sentinel spawnpoint"
        - flag server <npc.id>spawn:<npc.location>

agressive_targeting_kobold:
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    - narrate "entered proximity"


KoboldDeath:
    type: world
    events:
        on entity death:
        - if <context.entity.name> == <red><Bold>KoboldGuard {
            - flag server <npc.id>:outcombat
            - execute as_server "class exp <context.damager.name> 5"
            - random 10
            - drop i@GoldCoin qty:1 location:<context.entity.location>
            - drop i@KoboldSkull qty:1 location:<context.entity.location>
            - drop i@GoldCoin qty:2 location:<context.entity.location>
            - queue clear
            - queue clear
            - queue clear
            - queue clear
            - queue clear
            - queue clear
            - queue clear
        }