# Testing out making a one use scroll to summon a wolf that will attack your target. "wolfscroll": type: item material: 339 display name: Scroll of Summon wolf lore: - This scroll can be used - to Summon a wolf monster - that will attack other - nearby monsters. # This links up with wolfscroll "summon_wolf": type: world events: on player right clicks entity with i@wolfscroll: - run wolf_attack "def::::" # this is the wolf actually coming into being and choosing a target based off the "def:" "wolf_attack": type: task script: - ^execute as_server "npc create wolf --type wolf --at %1%" - execute as_server "npc assign --set wolf_assign" - take i@wolfscroll qty:1 # here is the assignment that gets fired from the previous task and will start his death timer. "wolf_assign": type: assignment actions: on assignment: - attack target:].exclude[].get[1]> - run kill_wolf delay:10s "wolf_damage": type: world events: on npc damages entity: - if == wolf_assign determine # this script will remove the wolf after 10 seconds if it has not been killed "kill_wolf": type: task script: - remove