"BossFight": type: assignment interact scripts: - 1 Boss default constants: #Range to warn targets should be larger than Range WarningRange: 15 WarningMessage: "Any closer and I will kill you." Health: 100 #Requires Sentry to equip and change Armor or weapons, See Sentry documentation for Weapons types. ID Number and Names are acceptable #http://wiki.citizensnpcs.com/Sentry#Commands MeleeEquipment: Diamond_Sword RangeEquipment: book Helmet: 310 ChestPlate: 311 Leggins: 312 Boots: 313 #True or false, if true it will attack anything that attacked it instead of current target Retaliate: true #This is the damage the sentry does with each hit, regardless of weapon (or object) held. Strength: 1 #This value is subtracted from all incoming damage. #An armor of 10 makes the Sentry very hard to hurt. Armor items equipped on the Sentry have no effect on combat. Armor: 1 #range in which it will find targets 1-100 MeleeRange: 5 #range in which it will find targets 1-100 RangeAttackRange: 20 #Attack speed can be 0-30 AttackSpeed: 1 #walking speed 0-1.5 Speed: 0.8 #This is the number of seconds between heals of 1 point, values less than 1.0 are acceptable. Set to 0 to turn off healing. RegenRate: 0 #Number in Seconds before the Boss Respawns Respawn: 10 #How well the NPC can see in the Dark choose a number 0-16 Nightvision: 5 #See http://jd.bukkit.org/rb/apidocs/org/bukkit/potion/PotionEffectType.html for different spells effects SpellTimeOut: 10s Spell1: Poison Spell1Duration: 10s Spell1Power: 1 #Spell 2 Spell2: Slow Spell2Duration: 10s Spell2Power: 1 #Spell 3 Spell3: Blindness Spell3Duration: 10s Spell3Power: 1 #Spell 4 Spell4: Confusion Spell4Duration: 10s Spell4Power: 1 #Spell 5 Spell5: Harm Spell5Duration: 1s Spell5Power: 1 #Spell 6 Spell6: Wither Spell6Duration: 10s Spell6Power: 1 #Spell 7 Spell7: Weakness Spell7Duration: 10s Spell7Power: 1 #Rewards for killing the Boss Reward1: 264 Reward1Qty: 1 actions: on assignment: - ^execute as_npc "npc select <npc.id>" - ^execute as_npc "Trait Sentry" - trigger name:chat toggle:true - trigger name:click toggle:true - trigger name:damage toggle:true - trigger name:proximity toggle:true radius:<cons:MeleeRange> - execute as_npc "sentry Health <cons:Health>" - execute as_npc "sentry Armor <cons:Armor>" - execute as_npc "sentry Strength <cons:Strength>" - execute as_npc "sentry Range <cons:RangeAttackRange>" - execute as_npc "sentry Speed <cons:Speed>" - execute as_npc "sentry Attackrate <cons:AttackSpeed>" - execute as_npc "sentry HealRate <cons:RegenRate>" - execute as_npc "sentry Nightvision <cons:Nightvision>" - execute as_npc "sentry Respawn <cons:Respawn>" - execute as_npc "sentry equip <cons:Helmet>" - execute as_npc "sentry equip <cons:Leggins>" - execute as_npc "sentry equip <cons:ChestPlate>" - execute as_npc "sentry equip <cons:Boots>" - execute as_npc "sentry retaliate <cons:Retaliate>" - execute as_npc "sentry Warning <cons:WarningMessage>" - execute as_npc "sentry target add entity:player" - execute as_npc "npc vulnerable" - execute as_npc "sentry invincible false" on death: - chat "Arrgghhh!" - flag npc in_pursuit:! - drop item:<cons:reward1> qty:<cons:reward1Qty> location:<npc.location> on enter proximity: - lookclose toggle:true - if <flag.npc[inpursuit]> queue clear - flag npc in_pursuit:true - attack on exit proximity: - if !<flag.npc[in_pursuit]> queue clear - lookclose toggle:false on despawn: - flag npc in_pursuit:! on spawn: - announce "<&4><npc.name.nickname> has respawned." - execute as_npc "sentry Health <cons:Health>" #Acual Denizen Boss script here 'Boss': type: interact steps: '1': proximity trigger: entry: script: - ^Execute as_npc "Sentry equip <Cons:MeleeEquipment>" - run Cast delay:<cons:SpellTimeOut> - attack #If player is out of range the Boss will switch to a ranged weapon specified above to start attacking exit: script: - ^Execute as_npc "Sentry equip <Cons:RangeEquipment>" #If you add more spells please make sure to edit the 7 to the new count. 'Cast': type: task script: - run Spell "context:<util.random.int[1].to[7]>" 'Spell': type: task context: id script: - narrate "<&c><npc.name.nickname> has casted <cons:spell<context.id>> on you." - cast <cons:spell<context.id>> duration:<cons:Spell<context.id>Duration> Power:<cons:Spell<context.id>Power>
Line 133 gives me an error. It says Invalid arguments were specified. 'Cannot delay an INJECTED task script! Use 'QUEUE'.'
Spells dont seem to work and the "on death" wont execute anything...
on despawn not working. So NPC Kill Listener Example .... a solution ? A player flag with the boss name and true/false value ?
I have found : https://github.com/aufdemrand/Denizen/issues/189
All up to date and currently working on my server, let me know if you see any issues.