Guest User

Untitled

a guest
Oct 1st, 2019
88
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function init()
  2. animator.setParticleEmitterOffsetRegion("healing", mcontroller.boundBox())
  3. animator.setParticleEmitterEmissionRate("healing", config.getParameter("emissionRate", 3))
  4. animator.setParticleEmitterActive("healing", true)
  5.  
  6. script.setUpdateDelta(5)
  7. self.tickDamagePercentage = 0.1 + config.getParameter("bleedAmount", 0)
  8. self.tickTime = 0.5
  9. self.tickTimer = self.tickTime
  10. self.damage = math.floor(status.resourceMax("health") * self.tickDamagePercentage) + 1
  11. effect.duration()
  12. end
  13.  
  14. function update(dt)
  15. self.tickTimer = self.tickTimer - dt
  16.  
  17. if effect.duration() >= 9.9 then
  18. self.damage = math.floor(status.resourceMax("health") * self.tickDamagePercentage) + 1
  19. elseif self.tickTimer <= 0 then
  20. self.tickTimer = self.tickTime
  21. self.damage = self.damage * 0.75
  22. status.applySelfDamageRequest({
  23. damageType = "IgnoresDef",
  24. damage = self.damage,
  25. damageSourceKind = "bow",
  26. sourceEntityId = entity.id()
  27. })
  28. end
  29. end
  30.  
  31. function uninit()
  32.  
  33. end
RAW Paste Data