Advertisement
KujiUn

Ticks MT 1.05

May 11th, 2016
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. /me
  2. [h:setProperty("None", 0)]
  3. [h:input(
  4. "ticks|0|Number of ticks to damage/heal",
  5. )]
  6.  
  7. [h:tickValue = NormalmaxHP/10]
  8.  
  9. [h,if(ticks<0), CODE:
  10. {
  11. [h:damage = ceil(tickValue*ticks)]
  12. [h:HP = min(HP - damage,MaxHP)]
  13. [h,if(HP>0): setState("KO",0)]
  14. [h,if(HP==MaxHP): newline=add("<br>", token.name, " has been healed to full HP!"); newline=""]
  15. [h:message=add("has been healed for ", abs(damage), "HP!", newline)]
  16. };
  17. {
  18. [h:actualDamage = floor(tickValue*ticks)]
  19. [h:oldInjuries = Injuries]
  20. [h,if(actualDamage >= NormalMaxHP/2):Injuries = Injuries + 1]
  21. [h:oldHPCount = ceil(HP/NormalMaxHP*2)]
  22. [h:HP = (HP - actualDamage)]
  23. [h:HPCount = ceil(HP/NormalMaxHP*2)]
  24. [h:Injuries = Injuries - HPCount + oldHPCount]
  25. [h,if(HP<1): setState("KO",1)]
  26. [h:message=add("has been hit with ", actualDamage, " damage!")]
  27. [h:injuriesTaken=Injuries-oldInjuries]
  28. [h,if(injuriesTaken>0):message = add(message, "<br>", token.name, " has taken ", injuriesTaken, " injuries!")]
  29. [h,if(Injuries<10 && HP<=-2*NormalMaxHP && HP<=-50): message = add(message, "<br>", token.name, " might be dead...")]
  30. [h,if(Injuries>=10):message = add(message, "<br>", token.name, " has died from injuries...")]
  31. [h,if(Injuries>=10):setState("KO",0)]
  32. [h,if(Injuries>=10):setState("Dead",1)]
  33. }]
  34. [h,if(Injuries>=10):setBar("Health",0);setBar("Health",HP/MaxHP)]
  35. [r:message]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement