Advertisement
ChristianSDM

Configurar barra skill etc

Apr 15th, 2020
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.66 KB | None | 0 0
  1. Index: config/players.properties
  2. ===================================================================
  3. --- config/players.properties (revision 3)
  4. +++ config/players.properties (working copy)
  5. @@ -308,4 +308,52 @@
  6. DressMeLegs = Imperial,6374
  7. DressMeBoots = Draconic,6381;Imperial,6376;Arcana,6385
  8. DressMeGloves = Draconic,6380;Imperial,6375;Arcana,6384
  9. -DressMeWeapons = Draconic_Bow,7577;Shining_Bow,6594;Arcana_Mace,6608
  10. \ No newline at end of file
  11. +DressMeWeapons = Draconic_Bow,7577;Shining_Bow,6594;Arcana_Mace,6608
  12. +
  13. +# Configuração de ShortCuts Actions
  14. +# id 0 = sit
  15. +# id 1 = walk/run
  16. +# id 2 = attack
  17. +# id 3 = exchange
  18. +# id 4 = next target
  19. +# id 5 = pickup
  20. +# id 6 = Assist
  21. +# id 7 = party
  22. +# id 8 = leave party
  23. +# id 9 = dismiss party member
  24. +# id 10 = private store sell
  25. +# id 11 = party matching
  26. +# id 12 = social greeting
  27. +# id 13 = social victory
  28. +# id 14 = social advance
  29. +# id 24 = social yes
  30. +# id 25 = social no
  31. +# id 26 = social bow
  32. +# id 28 = private store buy
  33. +# id 29 = social unaware
  34. +# id 30 = social waiting
  35. +# id 31 = social laugh
  36. +# id 33 = social applaud
  37. +# id 34 = social dance
  38. +# id 35 = social sorrow
  39. +# id 37 = dwarven manufacture
  40. +# id 40 = recommend
  41. +# id 50 = change of party leader
  42. +# id 51 = general manufacture
  43. +# id 55 = start/end recording replay
  44. +# id 56 = guild invitation
  45. +# id 57 = find store
  46. +# id 58 = Duel
  47. +# id 59 = Duel Withdraw
  48. +# id 60 = Party Duel
  49. +#
  50. +# Slotid,PageId,actionId;Slotid,PageId,actionId...;
  51. +# retail : 1,0,2;4,0,5;11,0,0;
  52. +#
  53. +ActionShortCuts = 1,1,2;4,1,5;11,1,0;
  54. +
  55. +# Configuração de ShortCuts Skills
  56. +# Slotid,PageId,SkillId
  57. +# nota : isso só serve para skills que serão adicionados em todos os personagens
  58. +# nota : a skill deve está ja na lista de skills a partir do momento que cria o personagem
  59. +SkillShortCuts = 1,1,0;
  60. Index: java/net/sf/l2j/Config.java
  61. ===================================================================
  62. --- java/net/sf/l2j/Config.java (revision 3)
  63. +++ java/net/sf/l2j/Config.java (working copy)
  64. @@ -675,6 +686,9 @@
  65. public static int CLIENT_PACKET_QUEUE_MAX_UNDERFLOWS_PER_MIN = 1; // default 1
  66. public static int CLIENT_PACKET_QUEUE_MAX_UNKNOWN_PER_MIN = 5; // default 5
  67.  
  68. + public static Map<Integer, List<Integer>> SKILLS_SHORTCUTS = new HashMap<>();
  69. + public static Map<Integer, List<Integer>> ACTIONS_SHORTCUTS = new HashMap<>();
  70. +
  71. // --------------------------------------------------
  72.  
  73. /**
  74. @@ -1088,6 +1132,26 @@
  75. private static final void loadPlayers()
  76. {
  77. final ExProperties players = initProperties(PLAYERS_FILE);
  78. + String shortCut = players.getProperty("SkillShortCuts", "0");
  79. + String[] shortCut2 = shortCut.split(";");
  80. + for (String s : shortCut2)
  81. + {
  82. + List<Integer> list = new ArrayList<>();
  83. + String[] t = s.split(",");
  84. + list.add(Integer.parseInt(t[1]));
  85. + list.add(Integer.parseInt(t[2]));
  86. + SKILLS_SHORTCUTS.put(Integer.parseInt(t[0]), list);
  87. + }
  88. + shortCut = players.getProperty("ActionShortCuts", "0");
  89. + shortCut2 = shortCut.split(";");
  90. + for (String s : shortCut2)
  91. + {
  92. + List<Integer> list = new ArrayList<>();
  93. + String[] t = s.split(",");
  94. + list.add(Integer.parseInt(t[1]));
  95. + list.add(Integer.parseInt(t[2]));
  96. + ACTIONS_SHORTCUTS.put(Integer.parseInt(t[0]), list);
  97. + }
  98. STARTING_ADENA = players.getProperty("StartingAdena", 100);
  99. EFFECT_CANCELING = players.getProperty("CancelLesserEffect", true);
  100. HP_REGEN_MULTIPLIER = players.getProperty("HpRegenMultiplier", 1.);
  101. Index: java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java
  102. ===================================================================
  103. --- java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java (revision 3)
  104. +++ java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java (working copy)
  105. @@ -14,6 +14,9 @@
  106. */
  107. package net.sf.l2j.gameserver.network.clientpackets;
  108.  
  109. +import java.util.List;
  110. +import java.util.Map.Entry;
  111. +
  112. import net.sf.l2j.commons.lang.StringUtil;
  113.  
  114. import net.sf.l2j.Config;
  115. @@ -138,9 +141,19 @@
  116. newChar.getPosition().set(template.getSpawn());
  117. newChar.setTitle("");
  118.  
  119. - newChar.registerShortCut(new L2ShortCut(0, 0, 3, 2, -1, 1)); // attack shortcut
  120. - newChar.registerShortCut(new L2ShortCut(3, 0, 3, 5, -1, 1)); // take shortcut
  121. - newChar.registerShortCut(new L2ShortCut(10, 0, 3, 0, -1, 1)); // sit shortcut
  122. + for (Entry<Integer, List<Integer>> skillShortcut : Config.ACTIONS_SHORTCUTS.entrySet())
  123. + {
  124. + Integer slotIdPosition = skillShortcut.getKey();
  125. + List<Integer> values = skillShortcut.getValue();
  126. + Integer pageId = values.get(0);
  127. + Integer actionId = values.get(1);
  128. + slotIdPosition -= 1;
  129. + pageId -= 1;
  130. + newChar.registerShortCut(new L2ShortCut(slotIdPosition, pageId, 3, actionId, -1, 1));
  131. + }
  132. +// newChar.registerShortCut(new L2ShortCut(0, 0, 3, 2, -1, 1)); // attack shortcut
  133. +// newChar.registerShortCut(new L2ShortCut(3, 0, 3, 5, -1, 1)); // take shortcut
  134. +// newChar.registerShortCut(new L2ShortCut(10, 0, 3, 0, -1, 1)); // sit shortcut
  135.  
  136. for (Item ia : template.getItems())
  137. {
  138. @@ -164,6 +177,17 @@
  139. if (skill.getId() == 1216)
  140. newChar.registerShortCut(new L2ShortCut(9, 0, 2, skill.getId(), 1, 1));
  141. }
  142. + for (Entry<Integer, List<Integer>> skillShortcut : Config.SKILLS_SHORTCUTS.entrySet())
  143. + {
  144. + Integer slotIdPosition = skillShortcut.getKey();
  145. + List<Integer> values = skillShortcut.getValue();
  146. + Integer pageId = values.get(0);
  147. + Integer skillId = values.get(1);
  148. + slotIdPosition -= 1;
  149. + pageId -= 1;
  150. + if(skillId != 0)
  151. + newChar.registerShortCut(new L2ShortCut(slotIdPosition, pageId, 2, skillId, 1, 1));
  152. + }
  153.  
  154. if (!Config.DISABLE_TUTORIAL)
  155. {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement