Guest User

Info Panel [H5] Dracule www.devcheaters.net

a guest
Jan 29th, 2013
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.53 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P L2J_DataPack_BETA
  3. Index: dist/game/data/html/infopanel/eventinfo.htm
  4. ===================================================================
  5. --- dist/game/data/html/infopanel/eventinfo.htm (revision 0)
  6. +++ dist/game/data/html/infopanel/eventinfo.htm (working copy)
  7. @@ -0,0 +1,13 @@
  8. +<html><head><title>Event Information - Info Panel (Dracule)</title></head><body>
  9. +<center><br>
  10. +Team Vs Team: %tvt%
  11. +<br>
  12. +Banking System: %bankingsystem%
  13. +<br>
  14. +Champions Mod: %champion%
  15. +<br>
  16. +Offline Trade: %offlinetrade%
  17. +<br></br>
  18. +<font color=\"A9A9A9\">Dracule www.devcheaters.net</font>
  19. +</center>
  20. +</body></html>
  21. \ No newline at end of file
  22. Index: dist/game/data/scripts/handlers/voicedcommandhandlers/Info.java
  23. ===================================================================
  24. --- dist/game/data/scripts/handlers/voicedcommandhandlers/Info.java (revision 0)
  25. +++ dist/game/data/scripts/handlers/voicedcommandhandlers/Info.java (working copy)
  26. @@ -0,0 +1,217 @@
  27. +package handlers.voicedcommandhandlers;
  28. +
  29. +import com.l2jserver.Config;
  30. +import com.l2jserver.gameserver.cache.HtmCache;
  31. +import com.l2jserver.gameserver.handler.IVoicedCommandHandler;
  32. +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  33. +import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;
  34. +import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
  35. +
  36. +/**
  37. + * @author Dracule
  38. + */
  39. +
  40. +public class Info implements IVoicedCommandHandler
  41. +{
  42. + public static final String[] VOICED_COMMANDS =
  43. + {
  44. + "info",
  45. + "ratesinfo",
  46. + "custominfo",
  47. + "eventinfo"
  48. + };
  49. +
  50. + @Override
  51. + public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)
  52. + {
  53. + if (Config.SHOW_INFO_PANEL)
  54. + {
  55. + if (command.equalsIgnoreCase("info"))
  56. + {
  57. + Info.showInfoPage(activeChar, "info.htm");
  58. + }
  59. + if (command.equalsIgnoreCase("ratesinfo"))
  60. + {
  61. + Info.showInfoPage(activeChar, "ratesinfo.htm");
  62. + }
  63. + if (command.equalsIgnoreCase("custominfo"))
  64. + {
  65. + Info.showInfoPage(activeChar, "custominfo.htm");
  66. + }
  67. + if (command.equalsIgnoreCase("eventinfo"))
  68. + {
  69. + Info.showInfoPage(activeChar, "eventinfo.htm");
  70. + }
  71. + }
  72. + else
  73. + {
  74. + activeChar.sendMessage("This command is disabled");
  75. + ExShowScreenMessage message1 = new ExShowScreenMessage("This command is disabled by admin!", 4000);
  76. + activeChar.sendPacket(message1);
  77. + return true;
  78. + }
  79. + return true;
  80. + }
  81. +
  82. + public static void showInfoPage(L2PcInstance targetChar, String filename)
  83. + {
  84. + String content = HtmCache.getInstance().getHtmForce(targetChar.getHtmlPrefix(), "data/html/infopanel/" + filename);
  85. + NpcHtmlMessage InfoPanelReply = new NpcHtmlMessage(5);
  86. + InfoPanelReply.setHtml(content);
  87. + InfoPanelReply.replace("%xp%", String.valueOf(Config.RATE_XP));
  88. + InfoPanelReply.replace("%sp%", String.valueOf(Config.RATE_SP));
  89. + InfoPanelReply.replace("%partyxp%", String.valueOf(Config.RATE_PARTY_XP));
  90. + InfoPanelReply.replace("%partysp%", String.valueOf(Config.RATE_PARTY_SP));
  91. + InfoPanelReply.replace("%dropitem%", String.valueOf(Config.RATE_DROP_ITEMS));
  92. + InfoPanelReply.replace("%chanceelementstone%", String.valueOf(Config.ENCHANT_CHANCE_ELEMENT_STONE));
  93. + InfoPanelReply.replace("%chanceelementcrystal%", String.valueOf(Config.ENCHANT_CHANCE_ELEMENT_CRYSTAL));
  94. + InfoPanelReply.replace("%chanceelementjewel%", String.valueOf(Config.ENCHANT_CHANCE_ELEMENT_JEWEL));
  95. + InfoPanelReply.replace("%chanceelementenergy%", String.valueOf(Config.ENCHANT_CHANCE_ELEMENT_ENERGY));
  96. + InfoPanelReply.replace("%enchantsafe%", String.valueOf(Config.ENCHANT_SAFE_MAX));
  97. + InfoPanelReply.replace("%enchantmax%", String.valueOf(Config.ENCHANT_SAFE_MAX_FULL));
  98. + InfoPanelReply.replace("%enchantchance%", String.valueOf(Config.ENCHANT_CHANCE));
  99. + InfoPanelReply.replace("%enchantmaxlevel%", String.valueOf(Config.MAX_ENCHANT_LEVEL));
  100. + InfoPanelReply.replace("%maxsubs%", String.valueOf(Config.MAX_SUBCLASS));
  101. + InfoPanelReply.replace("%maxsublvl%", String.valueOf(Config.MAX_SUBCLASS_LEVEL));
  102. + if (!Config.TVT_EVENT_ENABLED)
  103. + {
  104. + InfoPanelReply.replace("%tvt%", "OFF");
  105. + }
  106. + else if (!Config.TVT_EVENT_ENABLED == true)
  107. + {
  108. + InfoPanelReply.replace("%tvt%", "OFF");
  109. + }
  110. + else
  111. + {
  112. + InfoPanelReply.replace("%tvt%", "ON");
  113. + }
  114. +
  115. + if (!Config.L2JMOD_CHAMPION_ENABLE)
  116. + {
  117. + InfoPanelReply.replace("%champion%", "OFF");
  118. + }
  119. + else if (!Config.L2JMOD_CHAMPION_ENABLE == true)
  120. + {
  121. + InfoPanelReply.replace("%champion%", "OFF");
  122. + }
  123. + else
  124. + {
  125. + InfoPanelReply.replace("%champion%", "ON");
  126. + }
  127. + if (!Config.ALT_GAME_DELEVEL)
  128. + {
  129. + InfoPanelReply.replace("%delevel%", "OFF");
  130. + }
  131. + else if (!Config.ALT_GAME_DELEVEL == true)
  132. + {
  133. + InfoPanelReply.replace("%delevel%", "OFF");
  134. + }
  135. + else
  136. + {
  137. + InfoPanelReply.replace("%delevel%", "ON");
  138. + }
  139. + if (!Config.AUTO_LOOT)
  140. + {
  141. + InfoPanelReply.replace("%autoloot%", "OFF");
  142. + }
  143. + else if (!Config.AUTO_LOOT == true)
  144. + {
  145. + InfoPanelReply.replace("%autoloot%", "OFF");
  146. + }
  147. + else
  148. + {
  149. + InfoPanelReply.replace("%autoloot%", "ON");
  150. + }
  151. + if (!Config.AUTO_LOOT_RAIDS)
  152. + {
  153. + InfoPanelReply.replace("%autolootraids%", "OFF");
  154. + }
  155. + else if (!Config.AUTO_LOOT_RAIDS == true)
  156. + {
  157. + InfoPanelReply.replace("%autolootraids%", "OFF");
  158. + }
  159. + else
  160. + {
  161. + InfoPanelReply.replace("%autolootraids%", "ON");
  162. + }
  163. + if (!Config.ALLOW_CLASS_MASTERS)
  164. + {
  165. + InfoPanelReply.replace("%allowclassmaster%", "OFF");
  166. + }
  167. + else if (!Config.ALLOW_CLASS_MASTERS == true)
  168. + {
  169. + InfoPanelReply.replace("%allowclassmaster%", "OFF");
  170. + }
  171. + else
  172. + {
  173. + InfoPanelReply.replace("%allowclassmaster%", "ON");
  174. + }
  175. + if (!Config.ALT_GAME_SUBCLASS_WITHOUT_QUESTS)
  176. + {
  177. + InfoPanelReply.replace("%subquest%", "OFF");
  178. + }
  179. + else if (!Config.ALT_GAME_SUBCLASS_WITHOUT_QUESTS == true)
  180. + {
  181. + InfoPanelReply.replace("%subquest%", "OFF");
  182. + }
  183. + else
  184. + {
  185. + InfoPanelReply.replace("%subquest%", "ON");
  186. + }
  187. + if (!Config.AUTO_LEARN_SKILLS)
  188. + {
  189. + InfoPanelReply.replace("%autolearnskill%", "OFF");
  190. + }
  191. + else if (!Config.AUTO_LEARN_SKILLS == true)
  192. + {
  193. + InfoPanelReply.replace("%autolearnskill%", "OFF");
  194. + }
  195. + else
  196. + {
  197. + InfoPanelReply.replace("%autolearnskill%", "ON");
  198. + }
  199. + if (!Config.BANKING_SYSTEM_ENABLED)
  200. + {
  201. + InfoPanelReply.replace("%bankingsystem%", "OFF");
  202. + }
  203. + else if (!Config.BANKING_SYSTEM_ENABLED == true)
  204. + {
  205. + InfoPanelReply.replace("%bankingsystem%", "OFF");
  206. + }
  207. + else
  208. + {
  209. + InfoPanelReply.replace("%bankingsystem%", "ON");
  210. + }
  211. + if (!Config.AUTO_LEARN_FS_SKILLS)
  212. + {
  213. + InfoPanelReply.replace("%autolearnfs%", "OFF");
  214. + }
  215. + else if (!Config.AUTO_LEARN_FS_SKILLS == true)
  216. + {
  217. + InfoPanelReply.replace("%autolearnfs%", "OFF");
  218. + }
  219. + else
  220. + {
  221. + InfoPanelReply.replace("%autolearnfs%", "ON");
  222. + }
  223. + if (!Config.OFFLINE_TRADE_ENABLE)
  224. + {
  225. + InfoPanelReply.replace("%offlinetrade%", "OFF");
  226. + }
  227. + else if (!Config.OFFLINE_TRADE_ENABLE == true)
  228. + {
  229. + InfoPanelReply.replace("%offlinetrade%", "OFF");
  230. + }
  231. + else
  232. + {
  233. + InfoPanelReply.replace("%offlinetrade%", "ON");
  234. + }
  235. + targetChar.sendPacket(InfoPanelReply);
  236. + }
  237. +
  238. + @Override
  239. + public String[] getVoicedCommandList()
  240. + {
  241. + return VOICED_COMMANDS;
  242. + }
  243. +}
  244. \ No newline at end of file
  245. Index: dist/game/data/html/infopanel/ratesinfo.htm
  246. ===================================================================
  247. --- dist/game/data/html/infopanel/ratesinfo.htm (revision 0)
  248. +++ dist/game/data/html/infopanel/ratesinfo.htm (working copy)
  249. @@ -0,0 +1,34 @@
  250. +<html><head><title>Rates Information - Info Panel (Dracule)</title></head><body>
  251. +<center><br>
  252. +XP: %xp%
  253. +<br>
  254. +SP: %sp%
  255. +<br>
  256. +Party XP: %partyxp%
  257. +<br>
  258. +Party SP: %partysp%
  259. +<br>
  260. +Drop Item: %dropitem%
  261. +<br>
  262. +<br>
  263. +Chance Element Stone: %chanceelementstone%
  264. +<br>
  265. +Chance Element Crystal: %chanceelementcrystal%
  266. +<br>
  267. +Chance Element Jewel: %chanceelementjewel%
  268. +<br>
  269. +Chance Element Energy: %chanceelementenergy%
  270. +<br>
  271. +<br>
  272. +Enchant Safe: %enchantsafe%
  273. +<br>
  274. +Enchant Max: %enchantmax%
  275. +<br>
  276. +Enchant Chance: %enchantchance%
  277. +<br>
  278. +Enchant Max LvL: %enchantmaxlevel%
  279. +<br>
  280. +<br>
  281. +<font color=\"A9A9A9\">Dracule www.devcheaters.net</font>
  282. +</center>
  283. +</body></html>
  284. \ No newline at end of file
  285. Index: dist/game/data/scripts/handlers/MasterHandler.java
  286. ===================================================================
  287. --- dist/game/data/scripts/handlers/MasterHandler.java (revision 9404)
  288. +++ dist/game/data/scripts/handlers/MasterHandler.java (working copy)
  289. @@ -312,6 +312,7 @@
  290. import handlers.voicedcommandhandlers.ChatAdmin;
  291. import handlers.voicedcommandhandlers.Debug;
  292. import handlers.voicedcommandhandlers.Hellbound;
  293. +import handlers.voicedcommandhandlers.Info;
  294. import handlers.voicedcommandhandlers.Lang;
  295. import handlers.voicedcommandhandlers.StatsVCmd;
  296. import handlers.voicedcommandhandlers.TvTVoicedInfo;
  297. @@ -612,6 +613,7 @@
  298. (Config.L2JMOD_DEBUG_VOICE_COMMAND ? Debug.class : null),
  299. (Config.L2JMOD_ALLOW_CHANGE_PASSWORD ? ChangePassword.class : null),
  300. (Config.L2JMOD_HELLBOUND_STATUS ? Hellbound.class : null),
  301. + Info.class
  302. },
  303. {
  304. // Target Handlers
  305. Index: dist/game/data/html/infopanel/custominfo.htm
  306. ===================================================================
  307. --- dist/game/data/html/infopanel/custominfo.htm (revision 0)
  308. +++ dist/game/data/html/infopanel/custominfo.htm (working copy)
  309. @@ -0,0 +1,22 @@
  310. +<html><head><title>Custom Information - Info Panel (Dracule)</title></head><body>
  311. +<center><br>
  312. +Delevel: %delevel%
  313. +<br>
  314. +Auto Loot: %autoloot%
  315. +<br>
  316. +Auto Loot Raids: %autolootraids%
  317. +<br>
  318. +Auto Learn Skills: %autolearnskill%
  319. +<br>
  320. +Auto Learn Forb Skills: %autolearnfs%
  321. +<br>
  322. +Max Subs: %maxsubs%
  323. +<br>
  324. +Max Sub LvL: %maxsublvl%
  325. +<br>
  326. +Allow Class Master: %allowclassmaster%
  327. +<br>
  328. +Subclass without Quest : %subquest%
  329. +<br>
  330. +<font color=\"A9A9A9\">Dracule www.devcheaters.net</font>
  331. +</center>
  332. \ No newline at end of file
  333. Index: dist/game/data/html/infopanel/info.htm
  334. ===================================================================
  335. --- dist/game/data/html/infopanel/info.htm (revision 0)
  336. +++ dist/game/data/html/infopanel/info.htm (working copy)
  337. @@ -0,0 +1,12 @@
  338. +<html><head><title>Info Panel (Dracule)</title></head><body>
  339. +<center>
  340. +<br>
  341. +<button action="bypass -h voice .ratesinfo $Info" value="Rates Info" width=90 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">
  342. +<br>
  343. +<button action="bypass -h voice .custominfo $Info" value="Custom Info" width=90 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">
  344. +<br>
  345. +<button action="bypass -h voice .eventinfo $Info" value="Event Info" width=90 height=18 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">
  346. +<br>
  347. +<font color=\"A9A9A9\">Dracule www.devcheaters.net</font>
  348. +</tr></center><br><br>
  349. +</html></body>
  350. \ No newline at end of file
  351. #P L2J_Server_BETA
  352. Index: dist/game/config/L2JMods.properties
  353. ===================================================================
  354. --- dist/game/config/L2JMods.properties (revision 5768)
  355. +++ dist/game/config/L2JMods.properties (working copy)
  356. @@ -479,4 +479,11 @@
  357.  
  358. # Enables .changepassword voiced command which allows the players to change their account's password ingame.
  359. # Default: False
  360. -AllowChangePassword = False
  361. \ No newline at end of file
  362. +AllowChangePassword = False
  363. +
  364. +# ---------------------------------------------------------------------------
  365. +# Show Info Panel By (Dracule) www.devcheaters.net
  366. +# ---------------------------------------------------------------------------
  367. +
  368. +# the voiced command is .info
  369. +ShowInfoPanel = True
  370. \ No newline at end of file
  371. Index: java/com/l2jserver/Config.java
  372. ===================================================================
  373. --- java/com/l2jserver/Config.java (revision 5768)
  374. +++ java/com/l2jserver/Config.java (working copy)
  375. @@ -781,6 +781,7 @@
  376. public static int L2JMOD_DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP;
  377. public static Map<Integer, Integer> L2JMOD_DUALBOX_CHECK_WHITELIST;
  378. public static boolean L2JMOD_ALLOW_CHANGE_PASSWORD;
  379. + public static boolean SHOW_INFO_PANEL;
  380.  
  381. // --------------------------------------------------
  382. // NPC Settings
  383. @@ -2687,6 +2688,7 @@
  384. }
  385. }
  386. L2JMOD_ALLOW_CHANGE_PASSWORD = Boolean.parseBoolean(L2JModSettings.getProperty("AllowChangePassword", "False"));
  387. + SHOW_INFO_PANEL = Boolean.parseBoolean(L2JModSettings.getProperty("ShowInfoPanel", "False"));
  388.  
  389. // Load PvP L2Properties file (if exists)
  390. final File pvp = new File(PVP_CONFIG_FILE);
Add Comment
Please, Sign In to add comment