Advertisement
Visualgi

Buffer aCis

May 17th, 2024 (edited)
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 5.14 KB | None | 0 0
  1. +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/Schemebuffer.java
  2. @Override
  3.     public void onBypassFeedback(L2PcInstance player, String command)
  4.    
  5. + else if (currentCommand.equalsIgnoreCase("getbuff"))
  6. +          {
  7. +              int buffid = 0;
  8. +              int bufflevel = 1;
  9. +              String nextWindow = null;
  10. +
  11. +              if (st.countTokens() == 3)
  12. +              {
  13. +                  buffid = Integer.valueOf(st.nextToken());
  14. +                  bufflevel = Integer.valueOf(st.nextToken());
  15. +                  nextWindow = st.nextToken();
  16. +              }
  17. +              else if (st.countTokens() == 1)
  18. +                  buffid = Integer.valueOf(st.nextToken());
  19. +
  20. +              if (buffid != 0)
  21. +              {
  22. +                  player.broadcastPacket(new MagicSkillUse(this, player, buffid, bufflevel, 5, 0));
  23. +
  24. +                  player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT).addSkillName(buffid,
  25. +  bufflevel));
  26. +                  SkillTable.getInstance().getInfo(buffid, bufflevel).getEffects(this, player);
  27. +                  showChatWindow(player);
  28. +                  showChatWindow(player, nextWindow);
  29. +              }
  30. +          }
  31. +      
  32. +         else if (currentCommand.equalsIgnoreCase("fbuff"))
  33. +         {
  34. +               player.stopAllEffectsExceptThoseThatLastThroughDeath();
  35. +
  36. +               for (Integer skillid : Config.FIGHTER_BUFF_LIST)
  37. +               {
  38. +                   L2Skill skill = SkillTable.getInstance().getInfo(skillid, SkillTable.getInstance().getMaxLevel(skillid));
  39. +                   if (skill != null)
  40. +                       skill.getEffects(player, player);
  41. +               }
  42. +                
  43. +               player.setCurrentHpMp(player.getMaxHp(), player.getMaxMp());
  44. +               player.setCurrentCp(player.getMaxCp());
  45. +               player.sendMessage("You get a Fighter-buff complect.");
  46. +
  47. +               showChatWindow(player);
  48. +         }
  49. +
  50. +
  51. +         else if (currentCommand.equalsIgnoreCase("mbuff"))
  52. +         {
  53. +               player.stopAllEffectsExceptThoseThatLastThroughDeath();
  54. +
  55. +               for (Integer skillid : Config.MAGE_BUFF_LIST)
  56. +               {
  57. +                   L2Skill skill = SkillTable.getInstance().getInfo(skillid, SkillTable.getInstance().getMaxLevel(skillid));
  58. +                   if (skill != null)
  59. +                       skill.getEffects(player, player);
  60. +               }
  61. +
  62. +               player.setCurrentHpMp(player.getMaxHp(), player.getMaxMp());
  63. +               player.setCurrentCp(player.getMaxCp());
  64. +               player.sendMessage("You get a Mage-buff complect.");
  65. +
  66. +               showChatWindow(player);
  67. +         }
  68. +      
  69. +      
  70. +      
  71. +
  72. +          else if (currentCommand.startsWith("cleanup"))
  73. +          {
  74. +              player.broadcastPacket(new MagicSkillUse(this, player, 1056, 12, 100, 0));
  75. +              player.stopAllEffectsExceptThoseThatLastThroughDeath();
  76. +              
  77. +              final Summon summon = player.getPet();
  78. +              if (summon != null)
  79. +                  summon.stopAllEffectsExceptThoseThatLastThroughDeath();
  80. +              
  81. +              NpcHtmlMessage html = new NpcHtmlMessage(1);
  82. +              html.setFile(getHtmlPath(getNpcId(), 0));
  83. +              html.replace("%objectId%", getObjectId());
  84. +              player.sendPacket(html);
  85. +          }
  86. +      
  87. +      
  88. +          else if (currentCommand.startsWith("heal"))
  89. +          {
  90. +              player.broadcastPacket(new MagicSkillUse(this, player, 1218, 33, 100, 0));
  91. +              
  92. +              player.setCurrentHpMp(player.getMaxHp(), player.getMaxMp());
  93. +              player.setCurrentCp(player.getMaxCp());
  94. +              
  95. +              final Summon summon = player.getPet();
  96. +              if (summon != null)
  97. +                  summon.setCurrentHpMp(summon.getMaxHp(), summon.getMaxMp());
  98. +              
  99. +              NpcHtmlMessage html = new NpcHtmlMessage(1);
  100. +              html.setFile(getHtmlPath(getNpcId(), 0));
  101. +              html.replace("%objectId%", getObjectId());
  102. +              player.sendPacket(html);
  103. +          }
  104. +
  105. +
  106. +++ b/aCis_gameserver\java\net\sf\l2j\config.java
  107.    
  108. + public static String FIGHTER_BUFF;
  109. + public static ArrayList<Integer> FIGHTER_BUFF_LIST = new ArrayList<>();
  110. + public static String MAGE_BUFF;
  111. + public static ArrayList<Integer> MAGE_BUFF_LIST = new ArrayList<>();
  112.  
  113. + FIGHTER_BUFF = npcs.getProperty("FighterBuffList", "0");
  114. + FIGHTER_BUFF_LIST = new ArrayList<>();
  115. + for (String id : FIGHTER_BUFF.trim().split(","))
  116. + {
  117. + FIGHTER_BUFF_LIST.add(Integer.parseInt(id.trim()));
  118. + }
  119. + MAGE_BUFF = npcs.getProperty("MageBuffList", "0");
  120. + MAGE_BUFF_LIST = new ArrayList<>();
  121. + for (String id : MAGE_BUFF.trim().split(","))
  122. + {
  123. + MAGE_BUFF_LIST.add(Integer.parseInt(id.trim()));
  124. +}
  125.    
  126.  
  127. #=============================================================
  128. #                          Buffer
  129. #=============================================================
  130.  
  131. # Auto buffer for fighter
  132. FighterBuffList = 1204,1068,1040,1035,1036,1045,1086,1077,1242,264,267,268,269,304,271,274,275,1363,1388,4699,270,306,308,307,1392,1393,1352,1353,1354,1323
  133.  
  134. # Auto buffer for mage
  135. MageBuffList = 1204,1040,1035,1045,1036,1303,1085,1059,1078,1062,1243,264,267,268,304,349,273,276,365,1413,1391,4703,1270,306,308,307,1392,1393,1352,1353,1354,1323
  136.  
  137.    
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement