Guest User

Untitled

a guest
Dec 8th, 2019
91
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <Custom Battle Effect>
  2. user._fireRunes = user._fireRunes || 0;
  3. user._waterRunes = user._waterRunes || 0;
  4. user._windRunes = user._windRunes || 0;
  5. user._earthRunes = user._earthRunes || 0;
  6. user._prismaticRunes = user._prismaticRunes || 0;
  7.  
  8. var fire = 235;
  9. var water = 236;
  10. var wind = 237;
  11. var earth = 238;
  12. var prismatic = 240;
  13.  
  14. user.addState(235);
  15. user._fireRunes = 2;
  16. user.setStateCounter(fire, user._fireRunes);
  17.  
  18. user.addState(236);
  19. user._waterRunes = 2;
  20. user.setStateCounter(water, user._waterRunes);
  21.  
  22. user.addState(237);
  23. user._windRunes = 2;
  24. user.setStateCounter(wind, user._windRunes);
  25.  
  26. user.addState(238);
  27. user._earthRunes = 2;
  28. user.setStateCounter(earth, user._earthRunes);
  29.  
  30. user.addState(240);
  31. user._prismaticRunes = 0;
  32. user.setStateCounter(prismatic, user._prismaticRunes);
  33. </Custom Battle Effect>
  34.  
  35. <Custom Regenerate Effect>
  36. user._fireRunes = user._fireRunes || 0;
  37. user._waterRunes = user._waterRunes || 0;
  38. user._windRunes = user._windRunes || 0;
  39. user._earthRunes = user._earthRunes || 0;
  40. user._prismaticRunes = user._prismaticRunes || 0;
  41.  
  42. //Generates 0-2 Runes
  43. var fireGenerator = Math.floor(Math.random() * 3);
  44. var waterGenerator = Math.floor(Math.random() * 3);
  45. var windGenerator = Math.floor(Math.random() * 3);
  46. var earthGenerator = Math.floor(Math.random() * 3);
  47.  
  48. var fire = 235;
  49. var water = 236;
  50. var wind = 237;
  51. var earth = 238;
  52. var prismatic = 240;
  53.  
  54. user._fireRunes += fireGenerator;
  55. user._fireRunes = user._fireRunes.clamp(0,3);
  56. user.setStateCounter(fire, user._fireRunes);
  57.  
  58. user._waterRunes += waterGenerator;
  59. user._waterRunes = user._waterRunes.clamp(0,3);
  60. user.setStateCounter(water, user._waterRunes);
  61.  
  62. user._windRunes += windGenerator;
  63. user._windRunes = user._windRunes.clamp(0,3);
  64. user.setStateCounter(wind, user._windRunes);
  65.  
  66. user._earthRunes += earthGenerator;
  67. user._earthRunes = user._earthRunes.clamp(0,3);
  68. user.setStateCounter(earth, user._earthRunes);
  69. </Custom Regenerate Effect>
  70.  
  71. <Custom Confirm Effect>
  72. user._fireRunes = user._fireRunes || 0;
  73. user._waterRunes = user._waterRunes || 0;
  74. user._windRunes = user._windRunes || 0;
  75. user._earthRunes = user._earthRunes || 0;
  76. user._prismaticRunes = user._prismaticRunes || 0;
  77.  
  78. var elements = this.getItemElements();
  79. var fireElementId = 2;
  80. var waterElementId = 5;
  81. var windElementId = 7;
  82. var earthElementId = 6;
  83.  
  84. if(this.isMagical() || this.isPhysical() || this.isAttack() || this.isCertain())
  85. {
  86. if(element.contains(fireElementId))
  87. {
  88. var rate = user._fireRunes * 0.20;
  89. value += Math.floor(value * rate);
  90. }
  91. else if(element.contains(waterElementId))
  92. {
  93. var rate = user._waterRunes * 0.20;
  94. value += Math.floor(value * rate);
  95. }
  96. else if(element.contains(windElementId))
  97. {
  98. var rate = user._windRunes * 0.20;
  99. value += Math.floor(value * rate);
  100. }
  101. else if(element.contains(earthElementId))
  102. {
  103. var rate = user._earthRunes * 0.20;
  104. value += Math.floor(value * rate);
  105. }
  106. }
  107. </Custom Confirm Effect>
  108.  
  109. <Custom Establish Effect>
  110. if(target.isDead() || target.hp <= 0)
  111. {
  112. target.performCollapse();
  113. user._fireRunes = 3;
  114. user._fireRunes = user._fireRunes.clamp(0,3);
  115. user.setStateCounter(fire, user._fireRunes);
  116.  
  117. user._waterRunes = 3;
  118. user._waterRunes = user._waterRunes.clamp(0,3);
  119. user.setStateCounter(water, user._waterRunes);
  120.  
  121. user._windRunes = 3;
  122. user._windRunes = user._windRunes.clamp(0,3);
  123. user.setStateCounter(wind, user._windRunes);
  124.  
  125. user._earthRunes = 3;
  126. user._earthRunes = user._earthRunes.clamp(0,3);
  127. user.setStateCounter(earth, user._earthRunes);
  128. }
  129. </Custom Establish Effect>
RAW Paste Data