-
Posts
451 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by disorder25
-
I have this community board class master code, I tried to adapt it to my L2j Server and for some reason it doesn't work. I tried many different things to fix it and make it work but nothing. I got it to show the html on the community board but all it does is tell players that their class and witch level they can change classes. It is supposed to show buttons with the class available to then when they reach the proper level to change class. Can anyone take a look on it and see if you can help me fix it. I appreciate if anyone help. Thank you. Obs: No errors on Eclipse. /* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://l2jpsproject.eu/>. */ package com.l2jserver.gameserver.communitybbs.Managers; import java.util.StringTokenizer; import javolution.text.TextBuilder; import com.l2jserver.Config; import com.l2jserver.gameserver.communitybbs.Manager.BaseBBSManager; import com.l2jserver.gameserver.datatables.ItemTable; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.base.ClassId; import com.l2jserver.gameserver.model.items.L2Item; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jserver.gameserver.network.serverpackets.SystemMessage; import com.l2jserver.gameserver.util.Util; public class ClassBBSManager extends BaseBBSManager { private static ClassBBSManager _Instance = null; public static ClassBBSManager getInstance() { if (_Instance == null) { _Instance = new ClassBBSManager(); } return _Instance; } @Override public void parsecmd(String command, L2PcInstance activeChar) { ClassId classId = activeChar.getClassId(); int jobLevel = classId.level(); int level = activeChar.getLevel(); TextBuilder html = new TextBuilder(""); html.append("<br>"); html.append("<center>"); if (Config.ALLOW_CLASS_MASTERS_LISTCB.isEmpty() || !Config.ALLOW_CLASS_MASTERS_LISTCB.contains(jobLevel)) { jobLevel = 3; } if ((((level >= 20) && (jobLevel == 0)) || ((level >= 40) && (jobLevel == 1)) || ((level >= 76) && (jobLevel == 2))) && Config.ALLOW_CLASS_MASTERS_LISTCB.contains(jobLevel)) { L2Item item = ItemTable.getInstance().getTemplate(Config.CLASS_MASTERS_PRICE_ITEMCB); html.append("Price for class is: <font color=\"LEVEL\">"); html.append(Util.formatAdena(Config.CLASS_MASTERS_PRICE_LISTCB[jobLevel])).append("</font> <font color=\"LEVEL\">").append(item.getName()).append("</font> Really want one click class?<br>"); for (ClassId cid : ClassId.values()) { if (cid == ClassId.inspector) { continue; } if (cid.childOf(classId) && (cid.level() == (classId.level() + 1))) { html.append("<br><center><button value=\"").append(cid.name()).append("\" action=\"bypass -h _bbsclass;change_class;").append(cid.getId()).append(";").append(Config.CLASS_MASTERS_PRICE_LISTCB[jobLevel]).append("\" width=250 height=25 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></center>"); } } html.append("</center>"); } else { switch (jobLevel) { case 0: html.append("Greetings " + activeChar.getName() + "! Your current class is <font color=F2C202>" + activeChar.getClassId().name() + "</font>.<br>"); html.append("Class level at: <font color=F2C202>20 level.</font><br>"); html.append("Class level at: <font color=F2C202>40 level.</font><br>"); html.append("Class level at: <font color=F2C202>76 level.</font><br>"); break; case 1: html.append("Congratulation " + activeChar.getName() + "! you are <font color=F2C202>" + activeChar.getClassId().name() + "</font>now.<br>"); break; case 2: html.append("Greetings " + activeChar.getName() + "! Your current class is <font color=F2C202>" + activeChar.getClassId().name() + "</font>.<br>"); html.append("Class level at: <font color=F2C202>20 level.</font><br>"); html.append("Class level at:<font color=F2C202>40 level.</font><br>"); html.append("Class level at: <font color=F2C202>76 level.</font><br>"); break; case 3: html.append("Greetings " + activeChar.getName() + "! Your current class is <font color=F2C202>" + activeChar.getClassId().name() + "</font>.<br>"); html.append("Congratulation !.<br>"); if (level >= 76) { html.append("Your level is over <font color=F2C202>76</font>! There is no more classes available to you.<br>"); } break; } } NpcHtmlMessage adminReply = new NpcHtmlMessage(5); adminReply.setFile(activeChar.getLang(), "data/html/CommunityBoard/5.htm"); adminReply.replace("%classmaster%", html.toString()); separateAndSend(adminReply.getHtm(), activeChar); if (command.startsWith("_bbsclass;change_class;")) { StringTokenizer st = new StringTokenizer(command, ";"); st.nextToken(); st.nextToken(); short val = Short.parseShort(st.nextToken()); int price = Integer.parseInt(st.nextToken()); L2Item item = ItemTable.getInstance().getTemplate(Config.CLASS_MASTERS_PRICE_ITEMCB); L2ItemInstance pay = activeChar.getInventory().getItemByItemId(item.getItemId()); if ((pay != null) && (pay.getCount() >= price)) { activeChar.destroyItem("ClassMaster", pay, price, activeChar, true); changeClass(activeChar, val); parsecmd("_bbsclass;", activeChar); } else if (Config.CLASS_MASTERS_PRICE_ITEMCB == 57) { activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_NOT_ENOUGH_ADENA)); } else { activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_NOT_ENOUGH_ADENA)); } } } private void changeClass(L2PcInstance activeChar, short val) { if (activeChar.getClassId().level() == ClassId.values()[val].level()) { return; } if (activeChar.getClassId().level() == 3) { activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.THIRD_CLASS_TRANSFER)); } else { activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CLASS_TRANSFER)); } activeChar.setClassId(val); if (activeChar.getClassId().level() == 2) { activeChar.getInventory().addItem("bbsClassManager", 6622, 1L, activeChar, null); } if (activeChar.isSubClassActive()) { activeChar.getSubClasses().get(Integer.valueOf(activeChar.getClassIndex())).setClassId(activeChar.getActiveClass()); } else { if (activeChar.getClassId().level() == 0) { activeChar.getInventory().addItem("bbsClassManager", 8869, 15L, activeChar, null); } else if (activeChar.getClassId().level() == 1) { activeChar.getInventory().addItem("bbsClassManager", 8870, 15L, activeChar, null); } activeChar.setBaseClass(activeChar.getActiveClass()); } if (activeChar.getClassId().getId() == 97) { activeChar.getInventory().addItem("bbsClassManager", 15307, 1L, activeChar, null); } else if (activeChar.getClassId().getId() == 105) { activeChar.getInventory().addItem("bbsClassManager", 15308, 1L, activeChar, null); } else if (activeChar.getClassId().getId() == 112) { activeChar.getInventory().addItem("bbsClassManager", 15309, 4L, activeChar, null); } activeChar.broadcastUserInfo(); } @Override public void parsewrite(String ar1, String ar2, String ar3, String ar4, String ar5, L2PcInstance activeChar) { } } <html> <body><br> <center> <center><table> <tr> <td width="500" align="center" border="0" cellpadding="0" cellspacing="0" ><center>%classmaster%</center></td> </tr> </table><br><br><br><br> </body> </html>
-
I did change there but there is only one Homepage id and when I change it change both on the community board and on the System Menu. Also I change the word on top that says Community, there is 3 ids for community but the one that change the community board also change the system menu.
-
Custom Server Info Npc (With Maxcheaters Logo)
disorder25 replied to SpirakosDafuq™'s topic in Server Shares & Files [L2J]
very nice. -
How can I change the on the community board the name of the homepage tab? I tried on the file sysstring-e, found the homepage and change it but the problem is it changed the button on the System Menu also. So I guess they use the same id. Is that a way to change only one of then? Maybe where the window is created or something.
-
Code Basic Event Drop Monsters
disorder25 replied to allanalcantara's topic in Server Shares & Files [L2J]
Great Job, nice little event. -
Discussion [Preview] Acismyadmin
disorder25 replied to a topic in Server Development Discussion [L2J]
This is a great idea. I only hope you make one version for L2j. It will be a great tool for admins. A+ for you. Great Job. -
For me it work fine.
-
can anyone adapt it to L2j Hi5?
-
Thank you mate, this is exactly what I was looking for..... Great Job. Will test it>
-
Code Mob Drop Panel Freya/h5 L2Jserver
disorder25 replied to LioNa's topic in Server Shares & Files [L2J]
very nice share mate. Worked just fine> -
Great event. Excellent job mate. Only have one problem, .gopk is not working. I got the latest Hi5 L2j Stable. Can you help? Here is the error on gameserver.... Failed running: [C] 49 Say2 - L2J Server Version: 6445M - DP Revision: 9641M ; Enum value of type com.l2jserver.gameserver.model.skills.targets.L2TargetType required, but not specified java.lang.IllegalArgumentException: Enum value of type com.l2jserver.gameserver. model.skills.targets.L2TargetType required, but not specified at com.l2jserver.gameserver.model.StatsSet.getEnum(StatsSet.java:585) at com.l2jserver.gameserver.model.skills.L2Skill.<init>(L2Skill.java:381 ) at com.l2jserver.gameserver.model.skills.l2skills.L2SkillTeleport.<init> (L2SkillTeleport.java:46) at handlers.voicedcommandhandlers.PkHunterVoiced.useVoicedCommand(PkHunt erVoiced.java:59) at handlers.chathandlers.ChatAll.handleChat(ChatAll.java:78) at com.l2jserver.gameserver.network.clientpackets.Say2.runImpl(Say2.java :278) at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run (L2GameClientPacket.java:70) at com.l2jserver.gameserver.network.L2GameClient.run(L2GameClient.java:1 091) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) I fixed the problem\, it was at the target type, if you are having this problem change this line. set.set("target", "TARGET_SELF"); to this: set.set("targetType", "SELF");
-
Can you add a feature? Show where the pk is on the map. Thanks.
-
Code Hi5 Vote Reward Configurable [ Topzone - Hopzone ]
disorder25 replied to insaNNe's topic in Server Shares & Files [L2J]
This is not working, can anyone help me with the right code for Topzone vote reward? while ((inputLine = in.readLine()) != null) { // for top-zone if (inputLine.contains("Votes:")) { return Integer.valueOf(inputLine.split(">")[3].replace("</div", "")); } -
[Share] H5 Npc Enchant Manager V2 /*java*/
disorder25 replied to HappyLDE's topic in Server Shares & Files [L2J]
Excelente share, I was looking for a java enchanter because L2j doesn't support jython anymore and I found this one, it worked like a charm on the newest revision with minor fixes. Thank you very much. -
Thank you for the Gl wishes. We had have a pretty good community with over 50 players for a while but after a little drama that happened some players left. But we will turn around.
-
This is not for Hopzone is for CraneTop.
-
[Share]Unique Interlude Event [SpeedRun]!!!!!!!!!
disorder25 replied to Boorinio's topic in Server Shares & Files [L2J]
pastestorm doesn't have a download option. If I copy and paste is giving me errors like the whole file is red. -
Online Players Up Right On The Screen.
disorder25 replied to ™® Stergios ®™'s topic in Server Shares & Files [L2J]
nice work. -
nice work mate. waiting for it>
-
missing import on L2PcInstance import com.l2jserver.gameserver.model.entity.Zombie; and there is a config import on ZombieNpc.java that is not beeing used. Need to remove that. also on Zombie.java FastList still have arguments. public static FastList<L2PcInstance> all = new FastList<L2PcInstance>(); public static FastList<L2PcInstance> _infected = new FastList<L2PcInstance>(); public static FastList<L2PcInstance> _notinfected = new FastList<L2PcInstance>(); it should be like this public static FastList<L2PcInstance> all = new FastList<>(); public static FastList<L2PcInstance> _infected = new FastList<>(); public static FastList<L2PcInstance> _notinfected = new FastList<>();
-
Admin voiced command //recallall
disorder25 replied to Tokenlt's topic in Server Shares & Files [L2J]
I tried but I got some problems on the DlgAnswer.java, on L2j handlers are on database side and I can't import the AdminRecallAll.java. So I got errors and I could not fix it. -
I think you need a check for same ip. If player kill a box he still gets the points.
-
Code Rank Pvp System 3.8.9 [Il - H5]
disorder25 replied to << Masterio >>'s topic in Server Shares & Files [L2J]
Interest pvp system, great share my friend. thank you.