Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void appendPoison(int damage) {
- if (System.currentTimeMillis() - c.lastPoisonSip > c.poisonImmune) {
- c.sendMessage("You have been poisoned.");
- c.poisonDamage = damage;
- c.lastPoison = System.currentTimeMillis();
- c.dealDamage(6);
- c.getPA().refreshSkill(3);
- c.handleHitMask(6);
- CycleEventHandler.getSingleton().addEvent(c, new CycleEvent()
- {@
- Override
- public void execute(CycleEventContainer container)
- {
- if (c.isDead || c.poisonDamage == 0)
- {
- if (c.poisonDamage == 0)
- {
- c.sendMessage("The poison has worn off.");
- }
- container.stop();
- }
- if (System.currentTimeMillis() - c.lastPoison > 5000 && c.poisonDamage > 0)
- {
- c.lastPoison = System.currentTimeMillis();
- c.dealDamage(6);
- c.getPA().refreshSkill(3);
- c.handleHitMask(6);
- c.poisonDamage--;
- }
- }
- @
- Override
- public void stop()
- {
- c.poisonDamage = 0;
- }
- }, 1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement