Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. public void appendPoison(int damage) {
  2. if (System.currentTimeMillis() - c.lastPoisonSip > c.poisonImmune) {
  3. c.sendMessage("You have been poisoned.");
  4. c.poisonDamage = damage;
  5. c.lastPoison = System.currentTimeMillis();
  6. c.dealDamage(6);
  7. c.getPA().refreshSkill(3);
  8. c.handleHitMask(6);
  9. CycleEventHandler.getSingleton().addEvent(c, new CycleEvent()
  10. {@
  11. Override
  12. public void execute(CycleEventContainer container)
  13. {
  14. if (c.isDead || c.poisonDamage == 0)
  15. {
  16. if (c.poisonDamage == 0)
  17. {
  18. c.sendMessage("The poison has worn off.");
  19. }
  20. container.stop();
  21. }
  22. if (System.currentTimeMillis() - c.lastPoison > 5000 && c.poisonDamage > 0)
  23. {
  24. c.lastPoison = System.currentTimeMillis();
  25. c.dealDamage(6);
  26. c.getPA().refreshSkill(3);
  27. c.handleHitMask(6);
  28. c.poisonDamage--;
  29. }
  30.  
  31. }
  32.  
  33. @
  34. Override
  35. public void stop()
  36. {
  37. c.poisonDamage = 0;
  38. }
  39. }, 1);
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement