Hey guys here is my denizen vampire script if you guys want to use it go for it, what it does it when a vampire npc attacks you, you become a vampire but once you're a vampire you become friends and if you wear a mob head he wont attack you if you're not a vampire
Code:
"VampireGuard":
type: assignment
interact scripts:
- 10 Sitting
Actions:
On Assignment:
- trigger name:proximity toggle:true radius:10
On Enter Proximity:
- run script:Spotted
on hit on player:
- if !<player.flag[isVampire]> {
- narrate "You have been hit by the Vampire!"
- execute as_server "v set v yes <player.name>"
- flag isVampire
}
"Spotted":
type: Task
Script:
- if <player.equipment.helmet.id> == 397 && <~~.data> == 2 {
- chat "<&e><&l>Look a fellow member of the undead!"
- walkto location:<server.flag[Vampire_Spot]>
} else if <player.equipment.helmet.id> == 397 {
- chat "<&e><&l>Look a fellow member of the undead!"
} else if <player.flag[isVampire]> {
- chat "<&e><&l>Greetings fellow vampire"
} else {
- run VampireAttack
}
'VampireAttack':
Type: task
Script:
- random {
- chat "<&4><&l>I see the human!"
- chat "<&4><&l>Attack!"
}
- run script:VampirestopAttack delay:15s
- attack
'VampirestopAttack':
Type: Task
Script:
- random {
- chat "<&e><&l>He's too fast"
- chat "<&e><&l>Where is he!"
}
- if <player.location.distance[<npc.location>]> > 15 {
- chat "<&e><&l>He's not worth my time"
- attack stop
- walkto location:<server.flag[Vampire_Spot]>
} else if <player.location.distance[<npc.location>]> < 10 && <player.location.distance[<server.flag[Vampire_Spot]>]> < 25 {
- run VampireAttack
} else {
- attack stop
- walkto location:<server.flag[Vampire_Spot]>
- chat "<&e><&l>I have to stay close to the lair"
}