ScrollBlue.java 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. package transformations;
  2. import com.l2jserver.gameserver.datatables.SkillTable;
  3. import com.l2jserver.gameserver.instancemanager.TransformationManager;
  4. import com.l2jserver.gameserver.model.L2Transformation;
  5. /**
  6. * TODO: Buffs disappear once you get transformed, but reappear after the transformed state wears off.
  7. * Skills involved in the minigame but are not assigned directly to players:
  8. * Flip Nearby Blocks - 5847 - For Flip Block, there are two skills, one for each side (makes sense). For this, there is only one skill. Thus it is probably not assigned to the transformation.
  9. * Block Trigger Slow - 5848 - This may be assigned to players, unsure.
  10. * Decrease Speed - 5849 - This is possibly assigned to all players to set all players to the same running speed for the duration of the game.
  11. * Block Trigger Stun - 5849 - From L2Vault: "The squares gives drops of "bond" and "landmine". I wasn't able to figure out what the bond did as it wasn't anything that seemed to go into your inventory. However, Landmine did appear in your inventory which allows you to use it before flipping a square which will give the other team a state of stun when they attempt to flip the same square (from what I can gather, it all happens so quickly ;) "
  12. * Shock - 5851 - Stun effect from 5849
  13. * More Info: http://l2vault.ign.com/wiki/index.php/Handy%E2%80%99s_Block_Checker
  14. */
  15. public class ScrollBlue extends L2Transformation
  16. {
  17. private static final int[] SKILLS = {5852,5491,619};
  18. public ScrollBlue()
  19. {
  20. // id, colRadius, colHeight
  21. super(122, 9, 28.3);
  22. }
  23. @Override
  24. public void onTransform()
  25. {
  26. if (getPlayer().getTransformationId() != 122 || getPlayer().isCursedWeaponEquipped())
  27. return;
  28. transformedSkills();
  29. }
  30. public void transformedSkills()
  31. {
  32. // Flip Block
  33. getPlayer().addSkill(SkillTable.getInstance().getInfo(5852, 1), false);
  34. // Decrease Bow/Crossbow Attack Speed
  35. getPlayer().addSkill(SkillTable.getInstance().getInfo(5491, 1), false);
  36. // Transform Dispel
  37. //getPlayer().addSkill(SkillTable.getInstance().getInfo(619, 1), false);
  38. getPlayer().setTransformAllowedSkills(SKILLS);
  39. }
  40. @Override
  41. public void onUntransform()
  42. {
  43. removeSkills();
  44. }
  45. public void removeSkills()
  46. {
  47. // Flip Block
  48. getPlayer().removeSkill(SkillTable.getInstance().getInfo(5852, 1), false);
  49. // Decrease Bow/Crossbow Attack Speed
  50. getPlayer().removeSkill(SkillTable.getInstance().getInfo(5491, 1), false);
  51. // Transform Dispel
  52. //getPlayer().removeSkill(SkillTable.getInstance().getInfo(619, 1), false);
  53. getPlayer().setTransformAllowedSkills(EMPTY_ARRAY);
  54. }
  55. public static void main(String[] args)
  56. {
  57. TransformationManager.getInstance().registerTransformation(new ScrollBlue());
  58. }
  59. }