Headshot


Author: entezflare
Created: 2014-01-23T18:42:28-0500
Edited: 2014-01-23T18:42:28-0500
Denizen Version: 0.9.4-SNAPSHOT (build 1436)
Views: 33
Downloads: 859
Likes: 2


WGET
Description: This script will add a bit more skill to using bows. Headshots will now do either 1.5x or 1.25x damage, depending on whether or not the entity is wearing a helmet. This applies to all entities, including skeletons, making them a more formidable enemy.

Just save the file as a .YML and reload your scripts! No formatting necessary!

#Script by Entez
#Last Updated January 23, 2014
 
 
#When an arrow hits, determines if the arrow was on the head. If so, damage is multiplied 1.5x for entities without helmets, and 1.25x for entities with helmets
'SniperShot':
  Type: World
  Events:
    on entity damaged by arrow:
    - If <context.projectile.location.y> >= <math:<context.entity.eye_location.y>-0.05> && <context.projectile.location.y> <= <math:<context.entity.eye_location.y>+0.70> {
     - ^playeffect <context.entity.eye_location> effect:RED_DUST qty:10 offset:0.5     
     - ^If <context.damager.is_player> Narrate targets:<context.damager> "<proc:Headshot>"
     - ^If <context.entity.equipment.helmet> == null determine <math:<context.damage>*1.5>
       else determine <math:<context.damage>*1.25>
     }
 
#Determines the message to send on headshot
'Headshot':
  type: Procedure
  script:
  - If <context.entity.name> == "Spider"{
    - Random 3
    - determine "Critical!"
    - determine "Abdomen Shot!"
    - determine "Nice Shot!"
    }
    Else {
    - Random 3
    - determine "Boom! Headshot!"
    - determine "That's gonna leave a mark!"
    - determine "Headshot!"
    }
 




Comments
2014-02-12 18:55:16 - L1amm:

haha this is awesome! Great job & thanks for sharing!