Jump to content

ThugLord92

Members
  • Posts

    200
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by ThugLord92

  1. Just change the agro range from your database and it will be ok
  2. I think it is animation you can change it but it will be for all of the heroes
  3. That's bad check the configs maybe there is something if not check the code I think there is a package about that what pack did you use ?
  4. I was thinking to open l2jfrozen but I'm not sure it's good or bad ? There are bad known bugs ?
  5. JuSt search in google l2jfrozen geodata or others pack geodata I think you can use every l2j pack geodata give it a try!!
  6. Find the line for rewards < reward id = 57 <--- Adena id > put whatever reward id you want. Press ctrl + F and type reward and you are there!!!
  7. I think you can copy the dm code change the name and delete the line for revived
  8. Hello guys I got stuck with that if little help it would be blessing I want check from the database if clan got already clan skills but I don't know the right parameters help!!! imports import sys from com.l2jfrozen.gameserver.model import L2Skill from com.l2jfrozen.gameserver.model.quest import State from com.l2jfrozen.gameserver.model.quest import QuestState from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest from com.l2jfrozen.gameserver.model.actor.instance import L2PcInstance from com.l2jfrozen.gameserver.datatables import SkillTable from com.l2jfrozen.gameserver.network.serverpackets import PledgeSkillList from com.l2jfrozen.gameserver.network.serverpackets import PledgeShowInfoUpdate from com.l2jfrozen.gameserver.network.serverpackets import SystemMessage from java.lang import Integer script problem if event == "skills": if xCLANx == 8888 : if st.getQuestItemsCount(Item3) < Count6 : return u"<html><title>Exclusive Shop</title><body><center><table>bla..bla</table></center></body></html>" elif not st.getPlayer().isClanLeader() : return u"<html><title>Exclusive Shop</title><body><center><table>bla..bla</table></center></body></html>" here i want to add an (if) that checks if ClanLeader got already the skills but i am not sure what exactly to check i tried : if st.getplayer().getClan()(SkillTable.getInstance(): return u"<html><title>Exclusive Shop</title><body><center><table>bla..bla</table></center></body>/html>" st.takeItems(Item3,Count6) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(370,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(371,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(372,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(373,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(374,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(375,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(376,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(377,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(378,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(379,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(380,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(381,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(382,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(383,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(384,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(385,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(386,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(387,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(388,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(389,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(390,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(391,1)) st.getPlayer().getClan().broadcastToOnlineMembers(PledgeSkillList(st.getPlayer().getClan())) st.playSound("ItemSound.quest_finish") return u"<html><title>Exclusive Shop</title><body><center><table>bla..bla</table></center></body>/html>" st.exitQuest(1)
  9. i fixed it with elif not st.getPlayer().isClanLeader() : return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0422\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0434\u0435\u0440 \u043a\u043b\u0430\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043a\u0438\u043b\u043b\u044b !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table></center></body></html>"
  10. hehe i know but for now i am not good at coding java but thanks guys for now i am getting error when i'm using boolean i that IF but i think i will find a way to fix this
  11. I have change some lines but now i just stuck everyone can buy clan skills and if they have clan but i want only clan leaders to buy clan skills if event == "skills": if xCLANx == 8888 : << i want to add IF not here if not st.getPlayer().isClanLeader() : >> i want only clan leaders to buy clan skills >> if st.getQuestItemsCount(Item3) < Count6 : return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0423 \u0432\u0430\u0441 \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432 !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table></center></body></html>" st.takeItems(Item3,Count6) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(370,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(371,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(372,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(373,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(374,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(375,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(376,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(377,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(378,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(379,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(380,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(381,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(382,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(383,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(384,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(385,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(386,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(387,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(388,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(389,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(390,3)) st.getPlayer().getClan().addNewSkill(SkillTable.getInstance().getInfo(391,1)) st.getPlayer().getClan().broadcastToOnlineMembers(PledgeSkillList(st.getPlayer().getClan())) st.playSound("ItemSound.quest_finish") return u"<html><title>Exclusive Shop</title><body><center><br><br><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" width=300 height=32><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><font color=\"LEVEL\">\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0432\u0441\u0435 \u043a\u043b\u0430\u043d \u0441\u043a\u0438\u043b\u043b\u044b !</font><img src=\"L2UI_CH3.herotower_deco\" width=256 height=32><br><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32><table><tr><td align=center><button value=\"\u0412\u044b\u0445\u043e\u0434\" action=\"bypass -h npc_%objectId%_Close\" width=75 height=22 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr></table></center></body></html>" st.exitQuest(1)
  12. Γνωμη μου: Παω ηδη σε ιδιωτικο ιεκ ακμη : προγραμματισμο τωρα μπηκα δευτερο 6μηνο Τα ΙΕΚ ειναι σαπια οσο σαπια ειναι κ τα ΤΕΙ εχω φιλους που πανε σε ΤΕΙ και δεν εχουν ιδεα οπως και το αντιθετο Εαν κατι σου αρεσει κ θες να μαθεις θα μαθεις οπου και να πας. *για το delta δεν εχω ακουσει καλα λογια btw*
  13. Γιατι τα φαντασματα πρεπει παντα να ειναι σε απομονομενο μερος ? Το ποιο creepy σημειο ειναι οι φιλοι του camera-man στο 10:17 στα δεξια
  14. Ψαχνω code ωστε οταν ο καθε παιχτεις που κανει login στον σερβερ να πρεπει πρωτα να βαλει secondary Password δεν εχω βρει κατι σε c6 l2jfrozen
  15. Βρες το code απ το Frozen και καντο adapt στο aCis
  16. private boolean checkAllowed(L2PcInstance activeChar) { String msg = null; if(activeChar.isSitting()) msg = "GMShop is not available when you sit"; else if(PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("ALL")) msg = "GMShop is not available in this area"; else if(PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("CURSED") && activeChar.isCursedWeaponEquiped()) msg = "GMShop is not available with the cursed sword"; else if(PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("ATTACK") && AttackStanceTaskManager.getInstance().getAttackStanceTask(activeChar)) msg = "GMShop is not available during the battle"; else if(PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("DUNGEON") && activeChar.isIn7sDungeon()) msg = "GMShop is not available in the catacombs and necropolis"; else if(PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("RB") && activeChar.isInsideZone(L2Character.ZONE_NOSUMMONFRIEND)) msg = "GMShop is not available in this area"; else if(PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("PVP") && activeChar.isInsideZone(L2Character.ZONE_PVP)) msg = "GMShop is not available in this area"; else if(PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("PEACE") && activeChar.isInsideZone(L2Character.ZONE_PEACE)) msg = "GMShop is not available in this area"; else if(PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("SIEGE") && activeChar.isInsideZone(L2Character.ZONE_SIEGE)) msg = "GMShop is not available in this area"; else if(PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("OLYMPIAD") && (activeChar.isInOlympiadMode() || activeChar.isInsideZone(L2Character.ZONE_OLY) || Olympiad.getInstance().isRegistered(activeChar) || Olympiad.getInstance().isRegisteredInComp(activeChar))) msg = "GMShop is not available at Olympiad"; else if(PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("EVENT") && (activeChar._inEvent)) msg = "GMShop is not available at the opening event"; else if(PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("TVT") && activeChar._inEventTvT && TvT.is_started() ) msg = "GMShop is not available in TVT"; else if(PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("CTF") && activeChar._inEventCTF && CTF.is_started() ) msg = "GMShop is not available in CTF"; else if(PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("DM") && activeChar._inEventDM && DM.is_started() ) msg = "GMShop is not available in DM"; if(msg!=null) activeChar.sendMessage(msg); return msg==null; } i think this is a method to prevent that ?
  17. i mean close to npc gmshop, but i think you are right i have to change this line
  18. Voice Command = .gmshop i found that when i am close to merchant my exchanges are working fine but when i am away from merchant i cannot buy anything what do you think? html <html> <title> VoiceCommand </title> <body> <center> <font color="B8B8B8 " align="center">___________________________________________</font> <table width=224> <tr> <td width=32><img src=Icon.etc_alphabet_l_i00 height=32 width=32></td> <td width=32><img src=Icon.etc_alphabet_i_i00 height=32 width=32></td> <td width=32><img src=Icon.etc_alphabet_n_i00 height=32 width=32></td> <td width=32><img src=Icon.etc_alphabet_e_i00 height=32 width=32></td> <td width=32><img src=Icon.etc_alphabet_a_i00 height=32 width=32></td> <td width=32><img src=Icon.etc_alphabet_g_i00 height=32 width=32></td> <td width=32><img src=Icon.etc_alphabet_e_i00 height=32 width=32></td> </tr> </table> <font color="B8B8B8 " align="center">___________________________________________</font> <table align=center> <tr> <td align=center><button value="Weapon" action="bypass -h custom_doShop Chat 1" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td> <td align=center><button value="Armor" action="bypass -h custom_doShop Chat 2" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td> <td align=center><button value="Jeweler" action="bypass -h custom_doShop Chat 3" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td> </tr> </table> <font color="B8B8B8 " align="center">___________________________________________</font> <table width=210> <tr> <td align=center> <button value="Consumables" action="bypass -h custom_doShop multisell 90023" width=134 height=21 back="L2UI_ch3.BigButton3_over" fore="L2UI_ch3.BigButton3"> </td> </tr> <tr> <td align=center> <button value="Dyes" action="bypass -h custom_doShop multisell 90051" width=134 height=21 back="L2UI_ch3.BigButton3_over" fore="L2UI_ch3.BigButton3"> </td> </tr> <tr> <td align=center> <button value="Scrolls" action="bypass -h custom_doShop multisell 90050" width=134 height=21 back="L2UI_ch3.BigButton3_over" fore="L2UI_ch3.BigButton3"> </td> </tr> <tr> <td align=center> <button value="Clan Items" action="bypass -h custom_doShop multisell 90021" width=134 height=21 back="L2UI_ch3.BigButton3_over" fore="L2UI_ch3.BigButton3"> </td> </tr> <tr> <td align=center> <button value="Olympiad" action="bypass -h custom_doShop multisell 999997" width=134 height=21 back="L2UI_ch3.BigButton3_over" fore="L2UI_ch3.BigButton3"> </td> </tr> <tr> <td align=center> <button value="Acessories" action="bypass -h custom_doShop multisell 99994" width=134 height=21 back="L2UI_ch3.BigButton3_over" fore="L2UI_ch3.BigButton3"> </td> </tr> </table> <font color="B8B8B8 " align="center">___________________________________________</font> <br> <table width=220> <tr> <td align=center> <button value="Sell" action="bypass -h npc_%objectId%_Sell" width=134 height=21 back="L2UI_ch3.BigButton3_over" fore="L2UI_ch3.BigButton3"> </td> </tr> </table> <font color="B8B8B8 " align="center">___________________________________________</font> </center> </body> </html> multisell <?xml version='1.0' encoding='utf-8'?> <list maintainEnchantment="false"> <!-- Soulshot: S-grade --> <item id="1"> <ingredient id="57" count="2000000"/> <production id="1467" count="1000"/> </item> <!-- Soulshot: A-grade --> <item id="2"> <ingredient id="57" count="1600000"/> <production id="1466" count="1000"/> </item> <!-- Soulshot: B-grade --> <item id="3"> <ingredient id="57" count="1000000"/> <production id="1465" count="1000"/> </item> <!-- Soulshot: C-grade --> <item id="4"> <ingredient id="57" count="400000"/> <production id="1464" count="1000"/> </item> <!-- Soulshot: D-grade --> <item id="5"> <ingredient id="57" count="200000"/> <production id="1463" count="1000"/> </item> <!-- Soulshot: No Grade --> <item id="6"> <ingredient id="57" count="100000"/> <production id="1835" count="1000"/> </item> <!-- Blessed Spiritshot: S Grade --> <item id="7"> <ingredient id="57" count="2000000"/> <production id="3952" count="1000"/> </item> <!-- Blessed Spiritshot: A-Grade --> <item id="8"> <ingredient id="57" count="1600000"/> <production id="3951" count="1000"/> </item> <!-- Blessed Spiritshot: B-Grade --> <item id="9"> <ingredient id="57" count="1400000"/> <production id="3950" count="1000"/> </item> <!-- Blessed Spiritshot: C-Grade --> <item id="10"> <ingredient id="57" count="1200000"/> <production id="3949" count="1000"/> </item> <!-- Blessed Spiritshot: D-Grade --> <item id="11"> <ingredient id="57" count="2000000"/> <production id="3948" count="1000"/> </item> <!-- Blessed Spiritshot: No Grade --> <item id="12"> <ingredient id="57" count="160000"/> <production id="3947" count="1000"/> </item> <!-- Spiritshot: S-grade --> <item id="13"> <ingredient id="57" count="1000000"/> <production id="2514" count="1000"/> </item> <!-- Spiritshot: A-grade --> <item id="14"> <ingredient id="57" count="800000"/> <production id="2513" count="1000"/> </item> <!-- Spiritshot: B-grade --> <item id="15"> <ingredient id="57" count="700000"/> <production id="2512" count="1000"/> </item> <!-- Spiritshot: C-grade --> <item id="16"> <ingredient id="57" count="600000"/> <production id="2511" count="1000"/> </item> <!-- Spiritshot: D-grade --> <item id="17"> <ingredient id="57" count="100000"/> <production id="2510" count="1000"/> </item> <!-- Spiritshot: No Grade --> <item id="18"> <ingredient id="57" count="80000"/> <production id="2509" count="1000"/> </item> <!-- Beast Soulshot --> <item id="19"> <ingredient id="57" count="600000"/> <production id="6645" count="1000"/> </item> <!-- Blessed Beast Spiritshot --> <item id="20"> <ingredient id="57" count="1000000"/> <production id="6647" count="1000"/> </item> <!-- Greater Swift Attack Potion --> <item id="21"> <ingredient id="57" count="20000"/> <production id="1375" count="1"/> </item> <!-- Greater Haste Potion --> <item id="22"> <ingredient id="57" count="20000"/> <production id="1374" count="1"/> </item> <!-- Greater Magic Haste Potion --> <item id="23"> <ingredient id="57" count="20000"/> <production id="6036" count="1"/> </item> <!-- Greater Healing Potion --> <item id="24"> <ingredient id="57" count="200000"/> <production id="1539" count="100"/> </item> <!-- Mana potion --> <item id="25"> <ingredient id="57" count="200000"/> <production id="728" count="100"/> </item> <!-- Spirit Ore --> <item id="45"> <ingredient id="57" count="2000000"/> <production id="3031" count="1000"/> </item> <!-- Soul Ore --> <item id="46"> <ingredient id="57" count="2000000"/> <production id="1785" count="1000"/> </item> <!-- Energy Stone --> <item id="47"> <ingredient id="57" count="1000000"/> <production id="5589" count="1000"/> </item> <!-- Battle Symbol --> <item id="48"> <ingredient id="57" count="2000000"/> <production id="8875" count="100"/> </item> <!-- Magic Symbol --> <item id="49"> <ingredient id="57" count="2000000"/> <production id="8876" count="100"/> </item> <!-- Phoenix Blood --> <item id="50"> <ingredient id="57" count="2000000"/> <production id="8873" count="100"/> </item> <!-- Einhasad's Holy Water --> <item id="51"> <ingredient id="57" count="2000000"/> <production id="8874" count="100"/> </item> <!-- Cursed Bone --> <item id="52"> <ingredient id="57" count="2000000"/> <production id="2508" count="1000"/> </item> <!-- Summon crystal --> <item id="53"> <ingredient id="57" count="1000000"/> <production id="8615" count="10"/> </item> <!-- Bone Arrow --> <item id="54"> <ingredient id="57" count="200000"/> <production id="1341" count="1000"/> </item> <!-- Iron Arrow --> <item id="55"> <ingredient id="57" count="2000000"/> <production id="1342" count="1000"/> </item> <!-- Silver Arrow --> <item id="56"> <ingredient id="57" count="2000000"/> <production id="1343" count="1000"/> </item> <!-- Mithril Arrow --> <item id="57"> <ingredient id="57" count="2000000"/> <production id="1344" count="1000"/> </item> <!-- Shining Arrow --> <item id="58"> <ingredient id="57" count="2000000"/> <production id="1345" count="1000"/> </item> <!-- Scroll: Recovery (Grade S) --> <item id="59"> <ingredient id="57" count="200000"/> <production id="8599" count="1"/> </item> <!-- Crystal: S Grade --> <item id="61"> <ingredient id="57" count="10000000"/> <production id="1462" count="100"/> </item> <!-- Crystal: A-Grade --> <item id="62"> <ingredient id="57" count="5000000"/> <production id="1461" count="100"/> </item> <!-- Crystal: B-Grade --> <item id="63"> <ingredient id="57" count="2000000"/> <production id="1460" count="100"/> </item> <!-- Crystal: C-Grade --> <item id="64"> <ingredient id="57" count="1000000"/> <production id="1459" count="100"/> </item> <!-- Crystal: D-Grade --> <item id="65"> <ingredient id="57" count="500000"/> <production id="1458" count="100"/> </item> </list>
  19. Voice Command .gmshop i tried to change multisell and html files everything is visible but when i tried to buy something and press "Yes I am sure" exchange just not happen gameserver does not show any error just nothing happens All others Voice Commands are working fine /* * L2jFrozen Project - www.l2jfrozen.com * * 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 2, 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package com.l2jfrozen.gameserver.powerpak.gmshop; import com.l2jfrozen.Config; import com.l2jfrozen.gameserver.cache.HtmCache; import com.l2jfrozen.gameserver.handler.IBBSHandler; import com.l2jfrozen.gameserver.handler.ICustomByPassHandler; import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler; import com.l2jfrozen.gameserver.model.L2Character; import com.l2jfrozen.gameserver.model.actor.instance.L2NpcInstance; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.entity.event.CTF; import com.l2jfrozen.gameserver.model.entity.event.DM; import com.l2jfrozen.gameserver.model.entity.event.TvT; import com.l2jfrozen.gameserver.model.entity.olympiad.Olympiad; import com.l2jfrozen.gameserver.model.multisell.L2Multisell; import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jfrozen.gameserver.powerpak.PowerPakConfig; import com.l2jfrozen.gameserver.taskmanager.AttackStanceTaskManager; /** * @author L2JFrozen */ public class GMShop implements IVoicedCommandHandler, ICustomByPassHandler, IBBSHandler { @Override public String[] getVoicedCommandList() { return new String[] { PowerPakConfig.GMSHOP_COMMAND }; } private boolean checkAllowed(final L2PcInstance activeChar) { String msg = null; if (activeChar.isSitting()) msg = "GMShop is not available when you sit"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("ALL")) msg = "GMShop is not available in this area"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("CURSED") && activeChar.isCursedWeaponEquiped()) msg = "GMShop is not available with the cursed sword"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("ATTACK") && AttackStanceTaskManager.getInstance().getAttackStanceTask(activeChar)) msg = "GMShop is not available during the battle"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("DUNGEON") && activeChar.isIn7sDungeon()) msg = "GMShop is not available in the catacombs and necropolis"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("RB") && activeChar.isInsideZone(L2Character.ZONE_NOSUMMONFRIEND)) msg = "GMShop is not available in this area"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("PVP") && activeChar.isInsideZone(L2Character.ZONE_PVP)) msg = "GMShop is not available in this area"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("PEACE") && activeChar.isInsideZone(L2Character.ZONE_PEACE)) msg = "GMShop is not available in this area"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("SIEGE") && activeChar.isInsideZone(L2Character.ZONE_SIEGE)) msg = "GMShop is not available in this area"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("OLYMPIAD") && (activeChar.isInOlympiadMode() || activeChar.isInsideZone(L2Character.ZONE_OLY) || Olympiad.getInstance().isRegistered(activeChar) || Olympiad.getInstance().isRegisteredInComp(activeChar))) msg = "GMShop is not available at Olympiad"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("EVENT") && (activeChar._inEvent)) msg = "GMShop is not available at the opening event"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("TVT") && activeChar._inEventTvT && TvT.is_started()) msg = "GMShop is not available in TVT"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("CTF") && activeChar._inEventCTF && CTF.is_started()) msg = "GMShop is not available in CTF"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("DM") && activeChar._inEventDM && DM.is_started()) msg = "GMShop is not available in DM"; if (msg != null) activeChar.sendMessage(msg); return msg == null; } @Override public boolean useVoicedCommand(final String command, final L2PcInstance activeChar, final String params) { if (activeChar == null) return false; if (!checkAllowed(activeChar)) return false; if (command.compareTo(PowerPakConfig.GMSHOP_COMMAND) == 0) { String index = ""; if (params != null && params.length() != 0) if (!params.equals("0")) index = "-" + params; final String text = HtmCache.getInstance().getHtm("data/html/gmshop/gmshop" + index + ".htm"); final NpcHtmlMessage htm = new NpcHtmlMessage(activeChar.getLastQuestNpcObject()); htm.setHtml(text); activeChar.sendPacket(htm); } return false; } private static String[] _CMD = { "gmshop" }; @Override public String[] getByPassCommands() { return _CMD; } @Override public void handleCommand(final String command, final L2PcInstance player, final String parameters) { if (player == null) return; if (parameters == null || parameters.length() == 0) return; if (!checkAllowed(player)) return; if (!PowerPakConfig.GMSHOP_USEBBS && !PowerPakConfig.GMSHOP_USECOMMAND) { L2NpcInstance gmshopnpc = null; if (player.getTarget() != null) if (player.getTarget() instanceof L2NpcInstance) { gmshopnpc = (L2NpcInstance) player.getTarget(); if (gmshopnpc.getTemplate().getNpcId() != PowerPakConfig.GMSHOP_NPC) gmshopnpc = null; } // Possible fix to Buffer - 1 if (gmshopnpc == null) return; // Possible fix to Buffer - 2 if (!player.isInsideRadius(gmshopnpc, L2NpcInstance.INTERACTION_DISTANCE, false, false)) return; }// else (voice and bbs) if (parameters.startsWith("multisell")) { try { L2Multisell.getInstance().SeparateAndSend(Integer.parseInt(parameters.substring(9).trim()), player, false, 0); } catch (final Exception e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); player.sendMessage("This list does not exist"); } } else if (parameters.startsWith("Chat")) useVoicedCommand("", player, parameters.substring(4).trim()); } @Override public String[] getBBSCommands() { return _CMD; } }
  20. Voice Command .gmshop οτι multisell και να βαλω ολα φαινονται ενταξει αλλα μολις πατισω να αγορασω κατι και πατισω "πως ειμαι σιγουρος" δεν γινεται η αγορα ο gameserver δεν βγαζει καποιο error απλα δεν γινεται τιποτα Ολα τα υπολοιπα voice commands λειτουργουν κανονικα /* * L2jFrozen Project - www.l2jfrozen.com * * 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 2, 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package com.l2jfrozen.gameserver.powerpak.gmshop; import com.l2jfrozen.Config; import com.l2jfrozen.gameserver.cache.HtmCache; import com.l2jfrozen.gameserver.handler.IBBSHandler; import com.l2jfrozen.gameserver.handler.ICustomByPassHandler; import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler; import com.l2jfrozen.gameserver.model.L2Character; import com.l2jfrozen.gameserver.model.actor.instance.L2NpcInstance; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.entity.event.CTF; import com.l2jfrozen.gameserver.model.entity.event.DM; import com.l2jfrozen.gameserver.model.entity.event.TvT; import com.l2jfrozen.gameserver.model.entity.olympiad.Olympiad; import com.l2jfrozen.gameserver.model.multisell.L2Multisell; import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jfrozen.gameserver.powerpak.PowerPakConfig; import com.l2jfrozen.gameserver.taskmanager.AttackStanceTaskManager; /** * @author L2JFrozen */ public class GMShop implements IVoicedCommandHandler, ICustomByPassHandler, IBBSHandler { @Override public String[] getVoicedCommandList() { return new String[] { PowerPakConfig.GMSHOP_COMMAND }; } private boolean checkAllowed(final L2PcInstance activeChar) { String msg = null; if (activeChar.isSitting()) msg = "GMShop is not available when you sit"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("ALL")) msg = "GMShop is not available in this area"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("CURSED") && activeChar.isCursedWeaponEquiped()) msg = "GMShop is not available with the cursed sword"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("ATTACK") && AttackStanceTaskManager.getInstance().getAttackStanceTask(activeChar)) msg = "GMShop is not available during the battle"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("DUNGEON") && activeChar.isIn7sDungeon()) msg = "GMShop is not available in the catacombs and necropolis"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("RB") && activeChar.isInsideZone(L2Character.ZONE_NOSUMMONFRIEND)) msg = "GMShop is not available in this area"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("PVP") && activeChar.isInsideZone(L2Character.ZONE_PVP)) msg = "GMShop is not available in this area"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("PEACE") && activeChar.isInsideZone(L2Character.ZONE_PEACE)) msg = "GMShop is not available in this area"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("SIEGE") && activeChar.isInsideZone(L2Character.ZONE_SIEGE)) msg = "GMShop is not available in this area"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("OLYMPIAD") && (activeChar.isInOlympiadMode() || activeChar.isInsideZone(L2Character.ZONE_OLY) || Olympiad.getInstance().isRegistered(activeChar) || Olympiad.getInstance().isRegisteredInComp(activeChar))) msg = "GMShop is not available at Olympiad"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("EVENT") && (activeChar._inEvent)) msg = "GMShop is not available at the opening event"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("TVT") && activeChar._inEventTvT && TvT.is_started()) msg = "GMShop is not available in TVT"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("CTF") && activeChar._inEventCTF && CTF.is_started()) msg = "GMShop is not available in CTF"; else if (PowerPakConfig.GMSHOP_EXCLUDE_ON.contains("DM") && activeChar._inEventDM && DM.is_started()) msg = "GMShop is not available in DM"; if (msg != null) activeChar.sendMessage(msg); return msg == null; } @Override public boolean useVoicedCommand(final String command, final L2PcInstance activeChar, final String params) { if (activeChar == null) return false; if (!checkAllowed(activeChar)) return false; if (command.compareTo(PowerPakConfig.GMSHOP_COMMAND) == 0) { String index = ""; if (params != null && params.length() != 0) if (!params.equals("0")) index = "-" + params; final String text = HtmCache.getInstance().getHtm("data/html/gmshop/gmshop" + index + ".htm"); final NpcHtmlMessage htm = new NpcHtmlMessage(activeChar.getLastQuestNpcObject()); htm.setHtml(text); activeChar.sendPacket(htm); } return false; } private static String[] _CMD = { "gmshop" }; @Override public String[] getByPassCommands() { return _CMD; } @Override public void handleCommand(final String command, final L2PcInstance player, final String parameters) { if (player == null) return; if (parameters == null || parameters.length() == 0) return; if (!checkAllowed(player)) return; if (!PowerPakConfig.GMSHOP_USEBBS && !PowerPakConfig.GMSHOP_USECOMMAND) { L2NpcInstance gmshopnpc = null; if (player.getTarget() != null) if (player.getTarget() instanceof L2NpcInstance) { gmshopnpc = (L2NpcInstance) player.getTarget(); if (gmshopnpc.getTemplate().getNpcId() != PowerPakConfig.GMSHOP_NPC) gmshopnpc = null; } // Possible fix to Buffer - 1 if (gmshopnpc == null) return; // Possible fix to Buffer - 2 if (!player.isInsideRadius(gmshopnpc, L2NpcInstance.INTERACTION_DISTANCE, false, false)) return; }// else (voice and bbs) if (parameters.startsWith("multisell")) { try { L2Multisell.getInstance().SeparateAndSend(Integer.parseInt(parameters.substring(9).trim()), player, false, 0); } catch (final Exception e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); player.sendMessage("This list does not exist"); } } else if (parameters.startsWith("Chat")) useVoicedCommand("", player, parameters.substring(4).trim()); } @Override public String[] getBBSCommands() { return _CMD; } }
  21. Δεν μπορω να βρω το Reward ουτε στο java code ουτε στα config δεν βρηκα κατι σχετικο με Vote μπορει καποιος να μου προτεiνει κατι? code com.l2jfrozen.gameserver.handler; package com.l2jfrozen.gameserver.handler; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Set; import org.apache.log4j.Level; import org.apache.log4j.Logger; import com.gargoylesoftware.htmlunit.BrowserVersion; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlPage; import com.l2jfrozen.Config; import com.l2jfrozen.gameserver.model.L2World; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.entity.Announcements; import com.l2jfrozen.gameserver.powerpak.PowerPakConfig; import com.l2jfrozen.gameserver.thread.ThreadPoolManager; /** * @author L2jFrozen <br> * <br> * Network working with L2jFrozen AutoVoteReward: <br> * Hopzone -> http://l2.hopzone.net/ <br> * Topzone -> http://l2topzone.com/ <br> * L2network -> http://l2network.eu/ <br> */ public class AutoVoteRewardHandler { protected static final Logger LOGGER = Logger.getLogger(AutoVoteRewardHandler.class); protected List<String> already_rewarded; private int _l2networkVotesCount = 0; private int _hopzoneVotesCount = 0; private int _topzoneVotesCount = 0; protected List<String> _already_rewarded; protected static boolean _l2network = false; protected static boolean _topzone = false; protected static boolean _hopzone = false; private AutoVoteRewardHandler() { LOGGER.info("Vote Reward System Initiated."); if (_hopzone) { int hopzone_votes = getHopZoneVotes(); if (hopzone_votes == -1) { hopzone_votes = 0; } setHopZoneVoteCount(hopzone_votes); } if (_l2network) { int l2network_votes = getL2NetworkVotes(); if (l2network_votes == -1) { l2network_votes = 0; } setL2NetworkVoteCount(l2network_votes); } if (_topzone) { int topzone_votes = getTopZoneVotes(); if (topzone_votes == -1) { topzone_votes = 0; } setTopZoneVoteCount(topzone_votes); } ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new AutoReward(), PowerPakConfig.VOTES_SYSYEM_INITIAL_DELAY, PowerPakConfig.VOTES_SYSYEM_STEP_DELAY); } protected class AutoReward implements Runnable { @Override public void run() { final int minutes = (PowerPakConfig.VOTES_SYSYEM_STEP_DELAY / 1000) / 60; if (_hopzone) { final int hopzone_votes = getHopZoneVotes(); if (hopzone_votes != -1) { LOGGER.info("[AutoVoteReward] Server HOPZONE Votes: " + hopzone_votes); Announcements.getInstance().gameAnnounceToAll("[AutoVoteReward] Actual HOPZONE Votes are " + hopzone_votes + "..."); if (hopzone_votes != 0 && hopzone_votes >= getHopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) { _already_rewarded = new ArrayList<>(); final Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers(); Announcements.getInstance().gameAnnounceToAll("[AutoVoteReward] Great Work! Check your inventory for Reward!!"); // L2ItemInstance item; for (final L2PcInstance player : pls) { if (player != null && !player.isInOfflineMode() && player.isOnline() == 1) { if (player._active_boxes <= 1 || (player._active_boxes > 1 && checkSingleBox(player))) { final Set<Integer> items = PowerPakConfig.VOTES_REWARDS_LIST.keySet(); for (final Integer i : items) { // item = player.getInventory().getItemByItemId(i); // TODO: check on maxstack for item player.addItem("reward", i, PowerPakConfig.VOTES_REWARDS_LIST.get(i), player, true); } } } } setHopZoneVoteCount(hopzone_votes); } Announcements.getInstance().gameAnnounceToAll("[AutoVoteReward] Next HOPZONE Reward in " + minutes + " minutes at " + (getHopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) + " Votes!!"); // site web Announcements.getInstance().gameAnnounceToAll("[SiteWeb] " + PowerPakConfig.SERVER_WEB_SITE); } } if (_topzone && _hopzone && PowerPakConfig.VOTES_SYSYEM_STEP_DELAY > 0) { try { Thread.sleep(PowerPakConfig.VOTES_SYSYEM_STEP_DELAY / 2); } catch (final InterruptedException e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); } } if (_topzone) { final int topzone_votes = getTopZoneVotes(); if (topzone_votes != -1) { LOGGER.info("[AutoVoteReward] Server TOPZONE Votes: " + topzone_votes); Announcements.getInstance().gameAnnounceToAll("[AutoVoteReward] Actual TOPZONE Votes are " + topzone_votes + "..."); if (topzone_votes != 0 && topzone_votes >= getTopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) { _already_rewarded = new ArrayList<>(); final Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers(); Announcements.getInstance().gameAnnounceToAll("[AutoVoteReward] Great Work! Check your inventory for Reward!!"); // L2ItemInstance item; for (final L2PcInstance player : pls) { if (player != null && !player.isInOfflineMode() && player.isOnline() == 1) { if (player._active_boxes <= 1 || (player._active_boxes > 1 && checkSingleBox(player))) { final Set<Integer> items = PowerPakConfig.VOTES_REWARDS_LIST.keySet(); for (final Integer i : items) { // item = player.getInventory().getItemByItemId(i); // TODO: check on maxstack for item player.addItem("reward", i, PowerPakConfig.VOTES_REWARDS_LIST.get(i), player, true); } } } } setTopZoneVoteCount(topzone_votes); } Announcements.getInstance().gameAnnounceToAll("[AutoVoteReward] Next TOPZONE Reward in " + minutes + " minutes at " + (getTopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) + " Votes!!"); // site web Announcements.getInstance().gameAnnounceToAll("[SiteWeb] " + PowerPakConfig.SERVER_WEB_SITE); } } if (_topzone && _hopzone && _l2network && PowerPakConfig.VOTES_SYSYEM_STEP_DELAY > 0) { try { Thread.sleep(PowerPakConfig.VOTES_SYSYEM_STEP_DELAY / 2); } catch (final InterruptedException e) { if (Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); } } if (_l2network) { final int l2network_votes = getL2NetworkVotes(); if (l2network_votes != -1) { LOGGER.info("[AutoVoteReward] Server L2NETWORK Votes: " + l2network_votes); Announcements.getInstance().gameAnnounceToAll("[AutoVoteReward] Actual L2Network Votes are " + l2network_votes + "..."); if (l2network_votes != 0 && l2network_votes >= getL2NetworkVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) { already_rewarded = new ArrayList<>(); final Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers(); Announcements.getInstance().gameAnnounceToAll("[AutoVoteReward] Great Work! Check your inventory for Reward!!"); // L2ItemInstance item; for (final L2PcInstance player : pls) { if (player != null && !player.isInOfflineMode() && player.isOnline() == 1) { if (player._active_boxes <= 1 || (player._active_boxes > 1 && checkSingleBox(player))) { final Set<Integer> items = PowerPakConfig.VOTES_REWARDS_LIST.keySet(); for (final Integer i : items) { // item = player.getInventory().getItemByItemId(i); // TODO: check on maxstack for item player.addItem("reward", i, PowerPakConfig.VOTES_REWARDS_LIST.get(i), player, true); } } } } setL2NetworkVoteCount(l2network_votes); } Announcements.getInstance().gameAnnounceToAll("[AutoVoteReward] Next L2Network Reward in " + minutes + " minutes at " + (getL2NetworkVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) + " Votes!!"); // site web Announcements.getInstance().gameAnnounceToAll("[SiteWeb] " + PowerPakConfig.SERVER_WEB_SITE); } } } } // Check boxes protected boolean checkSingleBox(final L2PcInstance player) { if (player == null) return false; if (player.getClient() != null && player.getClient().getConnection() != null && !player.getClient().getConnection().isClosed() && player.isOnline() == 1 && !player.isInOfflineMode()) { final String playerip = player.getClient().getConnection().getInetAddress().getHostAddress(); if (_already_rewarded.contains(playerip)) return false; _already_rewarded.add(playerip); return true; } // if no connection (maybe offline shop) dnt reward return false; } protected int getHopZoneVotes() { int votes = -1; try { final WebClient webClient = new WebClient(BrowserVersion.CHROME); webClient.getOptions().setThrowExceptionOnFailingStatusCode(false); webClient.getOptions().setThrowExceptionOnScriptError(false); webClient.getOptions().setPrintContentOnFailingStatusCode(false); final HtmlPage page = webClient.getPage(PowerPakConfig.VOTES_SITE_HOPZONE_URL); final String fullPage = page.asXml(); final int constrainA = fullPage.indexOf("rank anonymous tooltip") + 24; String voteSection = fullPage.substring(constrainA); final int constrainB = voteSection.indexOf("span") - 2; voteSection = voteSection.substring(0, constrainB).trim(); votes = Integer.parseInt(voteSection); // Try to free all the freaking resources page.cleanUp(); webClient.getJavaScriptEngine().shutdown(); webClient.closeAllWindows(); } catch (final Exception e) { LOGGER.warn("[AutoVoteReward] Server HOPZONE is offline or something is wrong in link", e); Announcements.getInstance().gameAnnounceToAll("[AutoVoteReward] HOPZONE is offline. We will check reward as it will be online again"); } return votes; } protected int getTopZoneVotes() { int votes = -1; URL url = null; URLConnection con = null; InputStream is = null; InputStreamReader isr = null; BufferedReader in = null; try { url = new URL(PowerPakConfig.VOTES_SITE_TOPZONE_URL); con = url.openConnection(); con.addRequestProperty("User-Agent", "L2TopZone"); is = con.getInputStream(); isr = new InputStreamReader(is); in = new BufferedReader(isr); String inputLine; while ((inputLine = in.readLine()) != null) { if (inputLine.contains("Votes")) { votes = Integer.valueOf(inputLine.split(">")[3].replace("</div", "")); break; } } } catch (final Exception e) { LOGGER.warn("[AutoVoteReward] Server TOPZONE is offline or something is wrong in link"); Announcements.getInstance().gameAnnounceToAll("[AutoVoteReward] TOPZONE is offline. We will check reward as it will be online again"); // e.printStackTrace(); } finally { if (in != null) try { in.close(); } catch (final IOException e1) { e1.printStackTrace(); } if (isr != null) try { isr.close(); } catch (final IOException e1) { e1.printStackTrace(); } if (is != null) try { is.close(); } catch (final IOException e1) { e1.printStackTrace(); } } return votes; } protected int getL2NetworkVotes() { int votes = -1; URL url = null; URLConnection con = null; InputStream is = null; InputStreamReader isr = null; BufferedReader in = null; try { url = new URL(PowerPakConfig.VOTES_SITE_L2NETWORK_URL); con = url.openConnection(); con.addRequestProperty("User-Agent", "L2Network"); is = con.getInputStream(); isr = new InputStreamReader(is); in = new BufferedReader(isr); String inputLine; while ((inputLine = in.readLine()) != null) { if (inputLine.contains("color:#e7ebf2")) { votes = Integer.valueOf(inputLine.split(">")[2].replace("</b", "")); break; } } } catch (final Exception e) { LOGGER.warn("[AutoVoteReward] Server L2NETWORK is offline or something is wrong in link"); Announcements.getInstance().gameAnnounceToAll("[AutoVoteReward] L2Network is offline. We will check reward as it will be online again"); // e.printStackTrace(); } finally { if (in != null) try { in.close(); } catch (final IOException e1) { e1.printStackTrace(); } if (isr != null) try { isr.close(); } catch (final IOException e1) { e1.printStackTrace(); } if (is != null) try { is.close(); } catch (final IOException e1) { e1.printStackTrace(); } } return votes; } protected void setHopZoneVoteCount(final int voteCount) { _hopzoneVotesCount = voteCount; } protected int getHopZoneVoteCount() { return _hopzoneVotesCount; } protected void setTopZoneVoteCount(final int voteCount) { _topzoneVotesCount = voteCount; } protected int getTopZoneVoteCount() { return _topzoneVotesCount; } protected void setL2NetworkVoteCount(final int voteCount) { _l2networkVotesCount = voteCount; } protected int getL2NetworkVoteCount() { return _l2networkVotesCount; } public static AutoVoteRewardHandler getInstance() { Logger.getLogger("com.gargoylesoftware").setLevel(Level.OFF); if (PowerPakConfig.VOTES_SITE_HOPZONE_URL != null && !PowerPakConfig.VOTES_SITE_HOPZONE_URL.equals("")) _hopzone = true; if (PowerPakConfig.VOTES_SITE_TOPZONE_URL != null && !PowerPakConfig.VOTES_SITE_TOPZONE_URL.equals("")) _topzone = true; if (PowerPakConfig.VOTES_SITE_L2NETWORK_URL != null && !PowerPakConfig.VOTES_SITE_L2NETWORK_URL.equals("")) _l2network = true; if (_topzone || _hopzone || _l2network) return SingletonHolder._instance; return null; } @SuppressWarnings("synthetic-access") private static class SingletonHolder { protected static final AutoVoteRewardHandler _instance = new AutoVoteRewardHandler(); } }
  22. exeis ftiaksei to path sou na odhgei sto jdk7? px JAVA_HOME - C:\Program Files\Java\jdk1.8.0_20\bin ean den exeis kati tipota apola auta des auto http://www.maxcheaters.com/topic/70522-%CF%80%CF%89%CF%82-%CE%B8%CE%B1-%CE%B1%CE%BD%CE%BF%CE%AF%CE%BE%CE%B5%CF%84%CE%B5-%CE%AD%CE%BD%CE%B1%CE%BD-l2j-gracia-final-server%CE%BA%CE%B1%CE%B9-%CF%80%CF%89%CF%82-%CE%BA%CE%AC%CE%BD%CE%BF%CF%85%CE%BC%CE%B5-compile/
  23. you didint use the right path for java Start>right click on Computer> properties>Advanced system setings>Enviroment Varibles at system veribles set new Varible name : JAVA_HOME - Varible value : C:\Program Files\Java\jdk1.8.0_20\bin FIND THIS------ > path <------- C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.8.0_20 DOWNLOAD the new version of java 8
×
×
  • Create New...