Jump to content

te0x

Members
  • Posts

    460
  • Credits

  • Joined

  • Last visited

  • Days Won

    2
  • Feedback

    0%

Everything posted by te0x

  1. ye well thats just the first idea.. as i said u have to add restrictions in chat, on title change, refusal mode etc.. also you can add invisible mode till the game starts to avoid the change on items.. :)
  2. hello, i was thinking something for the olympiad to avoid the feed.. so with some help i created an annonymous system that "covers" the names inside it. so i want to share the basic version of it. gameserver/network/serverpackets/CharInfo.java 169 if(_activeChar.getAppearance().getInvisible()) 170 //if(gmSeeInvis) 171 { 172 writeS("Invisible"); 173 } 174 + else if(_activeChar.isInOlympiadMode()) 175 + { 176 + writeS("Olympiad"); 177 + } 211 writeD(_activeChar.getObjectId()); 212 - writeS(_activeChar.getName()); 212 if (_activeChar.isInOlympiadMode()) 213 + { 214 + writeS("Challenger"); 215 + } 216 + else 217 + { 218 + writeS(_activeChar.getName()); 219 + } 288 if(_activeChar.getAppearance().getInvisible()) 289 //if(gmSeeInvis) 290 { 291 writeS("Invisible"); 292 } 293 + else if(_activeChar.isInOlympiadMode()) 294 + { 295 + writeS("Olympiad"); 296 + } 298 - writeD(_activeChar.getClanId()); 299 - writeD(_activeChar.getClanCrestId()); 300 - writeD(_activeChar.getAllyId()); 301 - writeD(_activeChar.getAllyCrestId()); 298 + if (_activeChar.isInOlympiadMode()) 299 + { 300 + writeD(0); 301 + writeD(0); 302 + writeD(0); 303 + writeD(0); 304 + } 305 + else 306 + { 307 + writeD(_activeChar.getClanId()); 308 + writeD(_activeChar.getClanCrestId()); 309 + writeD(_activeChar.getAllyId()); 310 + writeD(_activeChar.getAllyCrestId()); 311 + } gameserver/network/serverpackets/ExOlympiadUserInfo.java 58 - writeS(_activeChar.getName()); 58 + writeS("Challenger"); gameserver/model/entity/olympiad/OlympiadGame.java 62 protected String _playerOneName; 63 protected String _playerTwoName; 64 + protected String _try1; 65 + protected String _try2; 100 _players = list; 101 _playerOne = list.get(0); 102 _playerTwo = list.get(1); 103 104 try 105 { 106 + _try1 = _playerOne.getClassId().name(); 107 + _try2 = _playerTwo.getClassId().name(); 921 protected String getTitle() 922 { 923 String msg = ""; 924 - msg += _playerOneName + " / " + _playerTwoName; 924 + msg += _try1 + " vs " + _try2; 925 return msg; 926 } thats'it i think. So check the image below for the results http://prntscr.com/49mam5 [ it shows the classes that are playing not the names of the players ] http://prntscr.com/49mazo [ the invisible mode part misses from here. The title will say's "Olympiad" ] http://prntscr.com/49mbox [ in the end of the match will shout the names of the players ] anyway thats just the basics. To work normally without bugs you have to add restrictions and new damage message system in olympiad to cover the names completely.
  3. well i dont know.. i've checked every file on the system i cannot find something that have to do with the dyes slot bar..
  4. i dont think that is about chargrp cauze there it shows about races appearence & their moves.. i am going to check out the classinfo now.. ps. classinfo checked also 1 "Even if my heart should cease to beat, my sword and honor shall live forever!"«¬«¬Fighters possess superior strength and dexterity. They pride themselves as being the most skilled in close-range physical combat, mainly using swords and other handheld weapons. They may also choose to focus on long-range attacks to develop into archers later in their careers. 2 "Burn, burn bright, my fierce white flames. Illuminate the darkness and destroy those who dare to attack us."«¬«¬Mystics study the ways of sorcery, and may summon magical creatures, cure grievous wounds, cast deadly attack spells, and create other wondrous miracles through the power of their intellect. 3 "My blade sings like the wind and will carry you to a place of eternal peace, where tranquil waters run soft into the great ocean."«¬Delicate, willowy, and graceful, Elven Fighters are adept warriors that practice precise, deadly swordsmanship. The mere sight of them wielding their long, slender whip-like swords has led some scholars to call it the "beautiful dance." 4 "Spirits, I seek the aid that was promised, forged in the pact of our friendship, solemnly sworn in the year of my birth!"«¬Magic runs deep in Elven blood, and as such the Elven Mystics are perhaps the mightiest sorcerers in Aden. They focus on the strength of their mind, often to the detriment of their constitution, and therefore may be weak in physical combat. Yet their command of the elemental forces makes them formidable opponents. 5 ".Quiet. Why do you talk so much? There's no need for strategy or plans-you need just slay the enemy without a word."«¬«¬Dark Elf Fighters are dangerous close-combat fighters who rely on their speed and agility to give them an edge in battle. Letting down one's guard when facing them may lead to a quick and painful death from their flashing cold blades. 6 "I call upon the awesome energies of the great Gran Kain to annihilate my enemies and erase their names from the world!"«¬«¬Dark Elf Mystics are infamous for their ability to command dark magic. They relish their powerful attack spells that can smite an enemy with a single word. Some say that their innate magical abilities surpass even those of the Elves. 7 "You fools dare to block my path?! Do you truly believe that your puny bodies and those flimsy scraps of metal will withstand my attack?"«¬«¬No one can match the might of an Orc Fighter when it comes to pure physical strength. With their unflagging endurance and their incredible stubbornness, they are a fearful presence on the battlefield that no one wishes to face. 8 "In the name of the eternal fire, may our enemies be burned, boiled, and roasted! Scour them mercilessly with flame, and drive them from our path!"«¬Their command of ancient magics has given Orc Mystics tremendous political influence within Orc society. As Orcs, they are physically stronger than Mages of other races, but most believe their magic effects to be weaker. 9 "I'll fight when I have to. Lemme see that sword. Hmm. Good balance, fine work. Listen, fetch me a drink and I'll tell you the history of this fine blade."«¬«¬Dwarves make solid Fighters, but they are more renowned for their craftsmanship, scavenging, and trade skills. Dwarves work tirelessly to create wondrous objects, and maintain a reputation as the greatest traders in the land. classes info..
  5. they are all correct ids, lvlupgain , char_templates, skilltrees, classlist, hennatrees etc.. everything works fine but it doesn't show me only the dyes bar but i still can make dyes without show em in the bar..
  6. up with a pic..
  7. hello, i was trying to make the subclass to be direct on the last class but when i press for example in Eva's siant class it makes me human mystic and i cant undrestand why..
  8. hello, i made some new classes on interlude everything works fine except the dyes bar. it doesnt shows the 3 slots.. anyway when i make a dye it makes the symbol but it doesnt shows em anyway have any idea? http://prntscr.com/4988fu here is a pick with the empty dye slots in the new class. i can add dyes but it doesnt show up..
  9. to addapt dn ine tpt allazis ta import k pl spania kati allo. tora ean dn s vgazi p ine ta errrors na dokimazis na svinis kana allo komati t kodika tha s vgali sigura kapou error
  10. lpn agorina to kalitero p boris na kaneis ine na paris 2 project frozen px. ++ ena allo opiodipote . egw pira hellas k frozen k arxisa na diagrafo ta main part merikon kodikon p ithela k etc m evgaze ola ta error p ipirxan k etc ematha ta pio vasika k exo proxorisi para pl me aftn tn tropo. epidi kaneis dn prokite na s mathi 4free k ta dorakia k afta mlkies tha erthun oloi i ligurides bas k parun tpt xoris na s mathun k tpt. to kltero p boris na kaneis ine na arxisis na mathis monos m liga pragmata k siga siga sinexizis ;d
  11. good luck with ur server mate :) i am gonna join 4sure ;D
  12. ok :)
  13. well for me it works just fine.. maybe u have done something wrong dunno..
  14. nice work ;d but frozen doesnt have vip system only donator system i think ^^ so the if (player.isVip()) should be if(player.isDonator()) anyway nice ;D
  15. try to use the imports import com.l2jfrozen.gameserver.network.serverpackets.SiegeInfo; import com.l2jfrozen.gameserver.managers.CastleManager; import com.l2jfrozen.gameserver.model.entity.siege.Castle;
  16. actually now i am learning.. thats why they are badly coded ;D thanks btw
  17. well i forgot the imports import com.l2jfrozen.gameserver.network.serverpackets.SiegeInfo; import com.l2jfrozen.gameserver.managers.CastleManager; import com.l2jfrozen.gameserver.model.entity.siege.Castle; well try it and tell me
  18. first here is a max lvl 91 with normal xp bars <experience level="80" tolevel="4200000000" /> <experience level="81" tolevel="6300000000" /> <experience level="82" tolevel="10500000000" /> <experience level="83" tolevel="16800000000" /> <experience level="84" tolevel="27300000000" /> <experience level="85" tolevel="44100000000" /> <experience level="86" tolevel="71400000000" /> <experience level="87" tolevel="115500000000" /> <experience level="88" tolevel="186900000000" /> <experience level="89" tolevel="302400000000" /> <experience level="90" tolevel="489300000000" /> <experience level="91" tolevel="791700000000" /> now model/entity/olympiad/olympiad.java find this if (!noble.isNoble()) { sm = new SystemMessage(SystemMessageId.ONLY_NOBLESS_CAN_PARTICIPATE_IN_THE_OLYMPIAD); noble.sendPacket(sm); return false; } below add this if (noble.getLevel() < Config.ALT_OLY_LEVEL_NEED && Config.ALT_OLY_LEVEL_JOIN) { noble.sendMessage("You can't participate to Olympiad. You must be at least " + Config.ALT_OLY_LEVEL_NEED + " Level!"); return false; } if (noble.getPvpKills() < Config.ALT_OLY_PVP_NEED && Config.ALT_OLY_PVP_JOIN) { noble.sendMessage("You can't participate to Olympiad. You must have at least " + Config.ALT_OLY_PVP_NEED + " Pvp!"); return false; } now in olympiad/OlympiadGame.java find this else if (player.getInventoryLimit()*0.8 <= player.getInventory().getSize()) { sm = new SystemMessage(SystemMessageId.SINCE_80_PERCENT_OR_MORE_OF_YOUR_INVENTORY_SLOTS_ARE_FULL_YOU_CANNOT_PARTICIPATE_IN_THE_OLYMPIAD); defaulted = true; } below add this else if (player.getLevel() < Config.ALT_OLY_LEVEL_NEED && Config.ALT_OLY_LEVEL_JOIN) { defaulted = true; } else if (player.getPvpKills() < Config.ALT_OLY_PVP_NEED && Config.ALT_OLY_PVP_JOIN) { defaulted = true; } now in configs find this public static boolean ALT_OLY_RECHARGE_SKILLS; below add public static boolean ALT_OLY_LEVEL_JOIN; public static int ALT_OLY_LEVEL_NEED; public static boolean ALT_OLY_PVP_JOIN; public static int ALT_OLY_PVP_NEED; now find ALT_OLY_RECHARGE_SKILLS = Boolean.parseBoolean(OLYMPSetting.getProperty("AltOlyRechargeSkills", "False")); below add ALT_OLY_LEVEL_JOIN = Boolean.parseBoolean(OLYMPSetting.getProperty("AltOlyLevelJoin", "False")); ALT_OLY_LEVEL_NEED = Integer.parseInt(OLYMPSetting.getProperty("LevelToJoin", "18")); ALT_OLY_PVP_JOIN = Boolean.parseBoolean(OLYMPSetting.getProperty("AltOlyPvpJoin", "False")); ALT_OLY_PVP_NEED = Integer.parseInt(OLYMPSetting.getProperty("PvpsToJoin", "18")); now in olympiad setting # Join in oly with an specific level [True enable || False disable] AltOlyLevelJoin = True # If LevelToJoin = 85 only players 85++ level can join LevelToJoin = 85 # Join in oly with an specific pvp amount [True enable || False disable] # If PvpsToJoin = 250 only players with 250++ pvps can join AltOlyPvpJoin = True PvpsToJoin = 250
  19. so in frozen there is a gm command that shows u ur buffs/debuffs and u can cancel em by pressing remove. so i did that for the players. u press a item and a html shows up with all ur bufflist and u are able to remove any buff that u want. i made it with an item press cauze i had smthing else in my mind but u can make it with command ;d so. gameserver/handler/itemhandlers create file also dont forget to register it package com.l2jfrozen.gameserver.handler.itemhandlers; import javolution.text.TextBuilder; import com.l2jfrozen.gameserver.handler.IItemHandler; import com.l2jfrozen.gameserver.model.L2Effect; import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.model.actor.instance.L2PlayableInstance; import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed; import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage; public class BuffRemove implements IItemHandler { public BuffRemove() { //null } @Override public void useItem(L2PlayableInstance playable, L2ItemInstance item) { if(!(playable instanceof L2PcInstance)) return; L2PcInstance activeChar = (L2PcInstance) playable; if (!activeChar.getFloodProtectors().getDropItem().tryPerformAction("Use")) { activeChar.sendPacket(ActionFailed.STATIC_PACKET); return; } if(activeChar.getKarma() > 0 || activeChar.getPvpFlag() > 0 || activeChar.isInCombat()) { activeChar.sendMessage("You cannot use the bufflist view right now"); return; } if(activeChar.isInOlympiadMode() || activeChar.getOlympiadGameId() != -1) { activeChar.sendMessage("You cannot use the bufflist view right now"); return; } else { showBuffs(activeChar, activeChar); } activeChar = null; } public void showBuffs(L2PcInstance player, L2PcInstance activeChar) { TextBuilder html = new TextBuilder(); html.append("<html><head><title>Character Buffs</title></head>"); html.append("<body>"); html.append("<center>"); html.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"999999\">"); html.append("<tr>"); html.append("<td align=\"center\"><font color=\"FF4400\">My buff list</font>"); html.append("<br1><font color=\"333333\">You can remove any buff you want</font>"); html.append("<br1><font color=\"333333\">Debuffs can be removed too</font>"); html.append("<br1><font color=\"333333\">Cannot be used while you are in oly or in pvp</font></td>"); html.append("</tr>"); html.append("</table>"); html.append("</center>"); html.append("<br>"); html.append("<img src=\"l2ui.squaregray\" width=\"300\" height=\"1\">"); html.append("<table>"); html.append("<tr><td width=215><font color=\"FF6600\">SkillName</td><td width=55>Action</font></td></tr>"); html.append("</table>"); html.append("<img src=\"l2ui.squaregray\" width=\"300\" height=\"1\">"); html.append("<table>"); html.append("<tr><td width=200></td><td width=70></td></tr>"); L2Effect[] effects = player.getAllEffects(); for(L2Effect e : effects) { if(e != null) { html.append("<tr><td><font color=\"666666\">" + e.getSkill().getName() + "</font></td><td><button value=\"Remove\" action=\"bypass -h stopbuff " + player.getName() + " " + String.valueOf(e.getSkill().getId()) + "\" width=60 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>"); } } html.append("</table><br>"); html.append("<center>"); html.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32 align=center><br>"); html.append("</center>"); html.append("</html>"); NpcHtmlMessage ms = new NpcHtmlMessage(1); ms.setHtml(html.toString()); activeChar.sendPacket(ms); html = null; ms = null; effects = null; } @Override public int[] getItemIds() { return ITEM_IDS; } private static final int ITEM_IDS[] = { 6392 }; } now network/clientpacks/RequestBypassToServer.java find this else if (_command.startsWith("OlympiadArenaChange")) { Olympiad.bypassChangeArena(_command, activeChar); } below add if (_command.startsWith("stopbuff")) { StringTokenizer st = new StringTokenizer(_command); st.nextToken(); try { if(st.hasMoreTokens()) { String playername = st.nextToken(); if(st.hasMoreTokens()){ int SkillId = 0; try{ SkillId = Integer.parseInt(st.nextToken()); }catch(NumberFormatException e){ return; } if(SkillId>0) removeBuff(activeChar, playername, SkillId); else{ return; } st = null; playername = null; return; } return; } return; } catch (StringIndexOutOfBoundsException e) { } } now find private void comeHere(L2PcInstance activeChar) and above add the code public void showBuffs(L2PcInstance player, L2PcInstance activeChar) { if(activeChar.getKarma() > 0 || activeChar.getPvpFlag() > 0 || activeChar.isInCombat()) { activeChar.sendMessage("You cannot use the bufflist view right now"); return; } if(activeChar.isInOlympiadMode() || activeChar.getOlympiadGameId() != -1) { activeChar.sendMessage("You cannot use the bufflist view right now"); return; } TextBuilder html = new TextBuilder(); html.append("<html><head><title>Character Buffs</title></head>"); html.append("<body>"); html.append("<center>"); html.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"999999\">"); html.append("<tr>"); html.append("<td align=\"center\"><font color=\"FF4400\">My buff list</font>"); html.append("<br1><font color=\"333333\">You can remove any buff you want</font>"); html.append("<br1><font color=\"333333\">Debuffs can be removed too</font>"); html.append("<br1><font color=\"333333\">Cannot be used while you are in oly or in pvp</font></td>"); html.append("</tr>"); html.append("</table>"); html.append("</center>"); html.append("<br>"); html.append("<img src=\"l2ui.squaregray\" width=\"300\" height=\"1\">"); html.append("<table>"); html.append("<tr><td width=215><font color=\"FF6600\">SkillName</td><td width=65>Action</font></td></tr>"); html.append("</table>"); html.append("<img src=\"l2ui.squaregray\" width=\"300\" height=\"1\">"); html.append("<table>"); html.append("<tr><td width=200></td><td width=70></td></tr>"); L2Effect[] effects = player.getAllEffects(); for(L2Effect e : effects) { if(e != null) { html.append("<tr><td><font color=\"666666\">" + e.getSkill().getName() + "</font></td><td><button value=\"Remove\" action=\"bypass -h stopbuff " + player.getName() + " " + String.valueOf(e.getSkill().getId()) + "\" width=60 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>"); } } html.append("</table><br>"); html.append("<center>"); html.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32 align=center><br>"); html.append("</center>"); html.append("</html>"); NpcHtmlMessage ms = new NpcHtmlMessage(1); ms.setHtml(html.toString()); activeChar.sendPacket(ms); html = null; ms = null; effects = null; } private void removeBuff(L2PcInstance remover, String playername, int SkillId) { L2PcInstance player = L2World.getInstance().getPlayer(playername); if(player.getKarma() > 0 || player.getPvpFlag() > 0 || player.isInCombat()) { player.sendMessage("You cannot remove buffs right now"); return; } if(player.isInOlympiadMode() || player.getOlympiadGameId() != -1) { player.sendMessage("You cannot remove buffs right now"); return; } if(player != null && SkillId > 0) { L2Effect[] effects = player.getAllEffects(); for(L2Effect e : effects) { if(e != null && e.getSkill().getId() == SkillId) { e.exit(true); } } showBuffs(player, remover); player = null; effects = null; } } the item id is 6392. u cant use it in olympiad or when u are flagged, in combat or with karma
  20. well i guess now its reshared ;D in .menu due to some ppl that coudn't change it from the /menu ;p also fixed the button that enable disable pm's cauze it didnt worked also it shows online people on the top
  21. there a lot of posts like this but anyway ;D u use .castle command and it shows up a html with all the castles so u can join in a siege gameserver/handler/voicedcommandhandlers create this package com.l2jfrozen.gameserver.handler.voicedcommandhandlers; import javolution.text.TextBuilder; import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage; /** * @author te0x */ public class CastleManagersVCmd implements IVoicedCommandHandler { private static final String[] VOICED_COMMANDS = { "castle", }; @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { if (command.startsWith("castle")) { sendHtml(activeChar); } return true; } private void sendHtml(L2PcInstance activeChar) { TextBuilder tb = new TextBuilder(); NpcHtmlMessage html = new NpcHtmlMessage(1); tb.append("<html><head><title>Castle Manager</title></head>"); tb.append("<body>"); tb.append("<center>"); tb.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"999999\">"); tb.append("<tr>"); tb.append("<td align=\"center\"><font color=\"FF4400\">Castles Panel</font>"); tb.append("<br1><font color=\"333333\">An easy way to participate in a castle siege</font>"); tb.append("<br1><font color=\"333333\">Be the Ruler!</font></td>"); tb.append("</tr>"); tb.append("</table>"); tb.append("</center>"); tb.append("<br>"); tb.append("<img src=\"l2ui.squaregray\" width=\"300\" height=\"1\">"); tb.append("<br>"); tb.append("<center>"); tb.append("<button value=\"Giran\" action=\"bypass -h giran\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\">"); tb.append("<table>"); tb.append("<tr><td><button value=\"Aden\" action=\"bypass -h aden\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td><td><button value=\"Rune\" action=\"bypass -h rune\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr>"); tb.append("<tr><td><button value=\"Goddard\" action=\"bypass -h goddard\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td><td><button value=\"Schuttgart\" action=\"bypass -h schuttgart\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr>"); tb.append("<tr><td><button value=\"Oren\" action=\"bypass -h oren\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td><td><button value=\"Innadril\" action=\"bypass -h innadril\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr>"); tb.append("<tr><td><button value=\"Dion\" action=\"bypass -h dion\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td><td><button value=\"Gludio\" action=\"bypass -h gludio\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td></tr>"); tb.append("</table>"); tb.append("</center>"); tb.append("<br>"); tb.append("<center>"); tb.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32><br>"); tb.append("</center>"); tb.append("<center>"); tb.append("</center>"); tb.append("</body></html>"); html.setHtml(tb.toString()); activeChar.sendPacket(html); } @Override public String[] getVoicedCommandList() { return VOICED_COMMANDS; } } now network/clientpackets/RequestBypassToServer.java put the import import com.l2jfrozen.gameserver.network.serverpackets.SiegeInfo; import com.l2jfrozen.gameserver.managers.CastleManager; import com.l2jfrozen.gameserver.model.entity.siege.Castle; find this else if (_command.startsWith("OlympiadArenaChange")) { Olympiad.bypassChangeArena(_command, activeChar); } below add these else if (_command.startsWith("gludio")) { int castleId = 1; Castle castle = CastleManager.getInstance().getCastleById(castleId); activeChar.sendPacket(new SiegeInfo(castle)); } else if (_command.startsWith("dion")) { int castleId = 2; Castle castle = CastleManager.getInstance().getCastleById(castleId); activeChar.sendPacket(new SiegeInfo(castle)); } else if (_command.startsWith("giran")) { int castleId = 3; Castle castle = CastleManager.getInstance().getCastleById(castleId); activeChar.sendPacket(new SiegeInfo(castle)); } else if (_command.startsWith("oren")) { int castleId = 4; Castle castle = CastleManager.getInstance().getCastleById(castleId); activeChar.sendPacket(new SiegeInfo(castle)); } else if (_command.startsWith("aden")) { int castleId = 5; Castle castle = CastleManager.getInstance().getCastleById(castleId); activeChar.sendPacket(new SiegeInfo(castle)); } else if (_command.startsWith("innadril")) { int castleId = 6; Castle castle = CastleManager.getInstance().getCastleById(castleId); activeChar.sendPacket(new SiegeInfo(castle)); } else if (_command.startsWith("goddard")) { int castleId = 7; Castle castle = CastleManager.getInstance().getCastleById(castleId); activeChar.sendPacket(new SiegeInfo(castle)); } else if (_command.startsWith("rune")) { int castleId = 8; Castle castle = CastleManager.getInstance().getCastleById(castleId); activeChar.sendPacket(new SiegeInfo(castle)); } else if (_command.startsWith("schuttgart")) { int castleId = 9; Castle castle = CastleManager.getInstance().getCastleById(castleId); activeChar.sendPacket(new SiegeInfo(castle)); } propably there is a better way to do this but this works also ^^ dont forget to register the voicedcommand. thats all ;D
  22. well all u know the special effects that gm's have. the effect to dance when u are stunning and the effect of stun with a fire in the ground so i was thinking about some new skills on bd and i remembered that effect of the stunning dance so i thought that it will be cool a skill like dat ;D anyway lets start ;D create in gameserver/skills/effects this /* * 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.skills.effects; import com.l2jfrozen.gameserver.model.L2Character; import com.l2jfrozen.gameserver.model.L2Effect; import com.l2jfrozen.gameserver.skills.Env; final class EffectStunDance extends L2Effect { public EffectStunDance(Env env, EffectTemplate template) { super(env, template); } @Override public EffectType getEffectType() { return EffectType.STUNDANCE; } @Override public void onStart() { getEffected().stopMove(null); getEffected().startAbnormalEffect(L2Character.ABNORMAL_EFFECT_DANCE_STUNNED); getEffected().setIsParalyzed(true); } @Override public void onExit() { getEffected().stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_DANCE_STUNNED); getEffected().setIsParalyzed(false); } @Override public boolean onActionTime() { return false; } } and this /* * 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.skills.effects; import com.l2jfrozen.gameserver.model.L2Character; import com.l2jfrozen.gameserver.model.L2Effect; import com.l2jfrozen.gameserver.skills.Env; final class EffectStunFireRoot extends L2Effect { public EffectStunFireRoot(Env env, EffectTemplate template) { super(env, template); } @Override public EffectType getEffectType() { return EffectType.FIREROOT; } @Override public void onStart() { getEffected().stopMove(null); getEffected().startAbnormalEffect(L2Character.ABNORMAL_EFFECT_FIREROOT_STUN); getEffected().setIsParalyzed(true); } @Override public void onExit() { getEffected().stopAbnormalEffect(L2Character.ABNORMAL_EFFECT_FIREROOT_STUN); getEffected().setIsParalyzed(false); } @Override public boolean onActionTime() { return false; } } now in model/L2Effect.java find this NEGATE, and below add these STUNDANCE, FIREROOT, now in model/L2Character.java find this public static final int ABNORMAL_EFFECT_GROW = 0x010000; and add below these /** The Constant ABNORMAL_EFFECT_DANCE_STUNNED. */ public static final int ABNORMAL_EFFECT_DANCE_STUNNED = 0x040000; /** The Constant ABNORMAL_EFFECT_FIREROOT_STUN. */ public static final int ABNORMAL_EFFECT_FIREROOT_STUN = 0x080000; and last in gameserver/skills/DocumentBase.java find this else if(abn.equals("stealth")) { abnormal = L2Character.ABNORMAL_EFFECT_STEALTH; } and below add these else if(abn.equals("dance")) { abnormal = L2Character.ABNORMAL_EFFECT_DANCE_STUNNED; } else if(abn.equals("fireroot")) { abnormal = L2Character.ABNORMAL_EFFECT_FIREROOT_STUN; } now u can add new skills with these effects ;D example: <skill id="367" levels="1" name="Dance of Medusa"> <set name="magicLvl" val="77"/> <set name="mpConsume" val="53"/> <set name="weaponsAllowed" val="512"/> <set name="power" val="80"/> <set name="saveVs" val="MEN"/> <set name="skillRadius" val="150"/> <set name="target" val="TARGET_AURA"/> <set name="skillType" val="PARALYZE"/> <set name="operateType" val="OP_ACTIVE"/> <set name="hitTime" val="2000"/> <set name="reuseDelay" val="120000"/> <set name="isDebuff" val="true"/> <set name="element" val="4"/> <!-- Earth --> <set name="lvlDepend" val="1"/> <for> <!-- <effect count="1" name="Petrification" time="30" val="0"/> --> <!-- The player that will "eat" the debuff will get stunned and start dancing for 30sec. the dancing effect doesnt work in monster --> <effect count="1" name="StunDance" time="30" val="0"/> </for> </skill> <skill id="402" levels="10" name="Arrest" enchantLevels1="30" enchantLevels2="30"> <table name="#enchantMagicLvl">76 76 76 77 77 77 78 78 78 79 79 79 80 80 80 81 81 81 82 82 82 82 83 83 83 84 84 85 85 85</table> <enchant1 name="magicLvl" val="#enchantMagicLvl"/> <enchant2 name="magicLvl" val="#enchantMagicLvl"/> <table name="#power">80 81 82 82 83 84 84 85 86 86 87 88 88 89 90 90 91 92 92 93 94 94 95 96 96 97 98 98 99 100</table> <table name="#chance">80 81 82 82 83 84 84 85 86 86 87 88 88 89 90 90 91 92 92 93 94 94 95 96 96 97 98 98 99 100</table> <table name="#mpConsume">25 27 28 29 30 31 32 33 34 34</table> <set name="mpConsume" val="#mpConsume"/> <set name="power" val="125"/> <set name="saveVs" val="MEN"/> <set name="lvlDepend" val="2"/> <set name="target" val="TARGET_ONE"/> <set name="reuseDelay" val="16000"/> <set name="hitTime" val="2000"/> <set name="skillType" val="ROOT"/> <set name="operateType" val="OP_ACTIVE"/> <set name="castRange" val="150"/> <set name="effectRange" val="650"/> <set name="isDebuff" val="true" /> <enchant1 name="power" val="#power"/> <enchant2 name="power" val="#chance"/> <for> <!-- <effect count="1" name="Root" time="7" val="0" stackOrder="1" stackType="Root"/> --> <!-- The player that will "eat" the debuff will get stunned and shows a fire arrest him for 7sec. the fire effect doesnt work in monster --> <effect count="1" name="StunFireRoot" time="7" val="0" stackOrder="1" stackType="Root"/> </for> </skill> thats for the effects ;p now the conditions. the conditions are taken from client gracia++ i dont even know ;D it works like the restorations skills of kamael. u need to have a effect on u so u can use another skill gameserver/skills/conditions.java create new files /* * 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://www.gnu.org/licenses/>. */ package com.l2jfrozen.gameserver.skills.conditions; import com.l2jfrozen.gameserver.model.L2Effect; import com.l2jfrozen.gameserver.skills.Env; public class ConditionTargetActiveEffectId extends Condition { private final int _effectId; public ConditionTargetActiveEffectId(int effectId) { _effectId = effectId; } @Override public boolean testImpl(Env env) { for (L2Effect e : env.target.getAllEffects()) { if (e != null) { if (e.getSkill().getId() == _effectId) return true; } } return false; } } /* * 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://www.gnu.org/licenses/>. */ package com.l2jfrozen.gameserver.skills.conditions; import com.l2jfrozen.gameserver.model.L2Skill; import com.l2jfrozen.gameserver.skills.Env; public class ConditionTargetActiveSkillId extends Condition { private final int _skillId; public ConditionTargetActiveSkillId(int skillId) { _skillId = skillId; } @Override public boolean testImpl(Env env) { for (L2Skill sk : env.target.getAllSkills()) { if (sk != null) { if (sk.getId() == _skillId) return true; } } return false; } } /* * 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.skills.conditions; import com.l2jfrozen.gameserver.skills.Env; /** * @author mkizub */ public class ConditionTargetSkill extends Condition { private final int _skill; public ConditionTargetSkill(int skillId) { _skill = skillId; } @Override public boolean testImpl(Env env) { if(env.target == null) return false; return env.target.getAbnormalEffect() == _skill; } } thats it now in gameserver/skills/DocumentBase.java find this import com.l2jfrozen.gameserver.skills.conditions.ConditionPlayerState; and add these below import com.l2jfrozen.gameserver.skills.conditions.ConditionTargetActiveEffectId; import com.l2jfrozen.gameserver.skills.conditions.ConditionTargetActiveSkillId; now find this else if("class_id_restriction".equalsIgnoreCase(a.getNodeName())) { FastList<Integer> array = new FastList<Integer>(); StringTokenizer st = new StringTokenizer(a.getNodeValue(), ","); while(st.hasMoreTokens()) { String item = st.nextToken().trim(); array.add(Integer.decode(getValue(item, null))); } cond = joinAnd(cond, new ConditionTargetClassIdRestriction(array)); } and below add these else if ("active_effect_id".equalsIgnoreCase(a.getNodeName())) { int effect_id = Integer.decode(getValue(a.getNodeValue(), template)); cond = joinAnd(cond, new ConditionTargetActiveEffectId(effect_id)); } else if ("active_skill_id".equalsIgnoreCase(a.getNodeName())) { int skill_id = Integer.decode(getValue(a.getNodeValue(), template)); cond = joinAnd(cond, new ConditionTargetActiveSkillId(skill_id)); } thats it ;D finished. example create this (its spoil skill transformed into restoration) <skill id="254" levels="8" name="Restoration"> <table name="#mpConsume_Init"> 21 25 14 16 17 19 20 20 </table> <table name="#mpConsume"> 49 57 34 38 41 43 45 48 </table> <table name="#hot"> 45 54 66 75 81 87 90 96 </table> <table name="#ench1Heal"> 96 99 99 102 105 108 111 114 114 117 120 123 126 126 129 132 135 138 141 141 144 147 150 153 153 156 159 162 165 168 </table> <table name="#ench2Count"> 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 40 41 42 43 44 45 </table> <table name="#ench2mpInitialConsume"> 13 13 13 12 12 12 12 12 11 11 11 11 10 10 10 10 9 9 9 9 9 8 8 8 8 7 7 7 7 7 </table> <table name="#ench2mpConsume"> 53 52 50 50 49 48 48 46 46 45 44 42 42 41 40 38 38 38 37 36 34 34 33 32 30 30 29 29 28 26 </table> <set name="mpInitialConsume" val="#mpConsume_Init" /> <set name="mpConsume" val="#mpConsume" /> <set name="hitTime" val="2500" /> <set name="operateType" val="OP_ACTIVE" /> <set name="isMagic" val="true" /> <set name="target" val="TARGET_ONE" /> <set name="skillType" val="HOT" /> <set name="castRange" val="600" /> <set name="effectRange" val="1100" /> <set name="reuseDelay" val="3000" /> <enchant2 name="mpInitialConsume" val="#ench2mpInitialConsume" /> <enchant2 name="mpConsume" val="#ench2mpConsume" /> <for> <effect count="5" name="HealOverTime" time="3" val="#hot" stackOrder="1" stackType="touch_of_life"> </effect> </for> </skill> <skill id="302" levels="3" name="Restoration Impact" enchantGroup1="1"> <table name="#mpConsume_Init"> 7 8 10 </table> <table name="#mpConsume"> 16 20 23 </table> <table name="#power"> 10 15 20 </table> <table name="#ench1Power"> 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 </table> <set name="aggroPoints" val="#power" /> <set name="mpInitialConsume" val="#mpConsume_Init" /> <set name="mpConsume" val="#mpConsume" /> <set name="power" val="#power" /> <set name="hitTime" val="1000" /> <set name="operateType" val="OP_ACTIVE" /> <set name="isMagic" val="true" /> <set name="target" val="TARGET_ONE" /> <set name="skillType" val="HEAL_PERCENT" /> <set name="castRange" val="600" /> <set name="effectRange" val="1100" /> <set name="reuseDelay" val="15000" /> <set name="negateId" val="254" /> <enchant1 name="power" val="#ench1Power" /> <cond msg="You must use Restoration first"> <target active_effect_id="254" /> </cond> <for> <effect name="Negate" val="0" noicon="1" effectType="NEGATE" /> </for> </skill> so in order to use Restoration Impact u need the effect of "<target active_effect_id="254" />" 254 = Restoration and u're done ;D u will be able to use Restoration Impact only if u have the effect of Restoration on you :)
  23. thats why ppl dont want /commands?;D for 1 more line in system? hehe anyway thanks for ur answer :)
  24. .menu command based on elfo's /menu i still cant get the difference between .command and /command but ppl prefer commands with . ### Eclipse Workspace Patch 1.0 #P L2jFrozen_GameServer Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSoulShot.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSoulShot.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSoulShot.java (working copy) @@ -156,7 +156,8 @@ // Pet uses the power of spirit. activeOwner.sendPacket(new SystemMessage(SystemMessageId.PET_USE_THE_POWER_OF_SPIRIT)); - Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUser(activePet, activePet, 2033, 1, 0, 0), 360000/*600*/); + if (!activeOwner.isSSDisabled()) + Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUser(activePet, activePet, 2033, 1, 0, 0), 360000/*600*/); activeOwner = null; activePet = null; Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/FishShots.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/FishShots.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/FishShots.java (working copy) @@ -92,7 +92,8 @@ //activeChar.sendPacket(new SystemMessage(SystemMessage.ENABLED_SPIRITSHOT)); MagicSkillUser MSU = new MagicSkillUser(activeChar, SKILL_IDS[grade], 1, 0, 0); - Broadcast.toSelfAndKnownPlayers(activeChar, MSU); + if (!activeChar.isSSDisabled()) + Broadcast.toSelfAndKnownPlayers(activeChar, MSU); MSU = null; activeChar.setTarget(oldTarget); Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -20222,4 +20222,60 @@ } sendSkillList(); } + + private boolean _cantGainXP = false; + private boolean _isPartyInvProt = false; + private boolean _isInTradeProt = false; + private boolean _isSSDisabled = false; + private boolean _isInRefusal = false; + + public boolean isInTradeProt() + { + return _isInTradeProt; + } + + public void setIsInTradeProt(boolean value) + { + _isInTradeProt = value; + } + + public boolean isSSDisabled() + { + return _isSSDisabled; + } + + public void setIsSSDisabled(boolean value) + { + _isSSDisabled = value; + } + + public boolean isPartyInvProt() + { + return _isPartyInvProt; + } + + public void setIsPartyInvProt(boolean value) + { + _isPartyInvProt = value; + } + + public void cantGainXP(boolean b) + { + _cantGainXP = b; + } + + public boolean cantGainXP() + { + return _cantGainXP; + } + + public void setInRefusalMode(boolean b) + { + _isInRefusal = b; + } + + public boolean isInRefusalMode() + { + return _isInRefusal; + } } \ No newline at end of file Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestJoinParty.java =================================================================== --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestJoinParty.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestJoinParty.java (working copy) @@ -78,6 +78,12 @@ return; } + if (target.isPartyInvProt()) + { + requestor.sendMessage("You can't invite that player because he is in party protection."); + return; + } + if (target.isInParty()) { SystemMessage msg = new SystemMessage(SystemMessageId.S1_IS_ALREADY_IN_PARTY); Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BlessedSpiritShot.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BlessedSpiritShot.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BlessedSpiritShot.java (working copy) @@ -137,7 +137,8 @@ // Send message to client activeChar.sendPacket(new SystemMessage(SystemMessageId.ENABLED_SPIRITSHOT)); - Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/); + if (!activeChar.isSSDisabled()) + Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/); activeChar = null; weaponInst = null; Index: head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (working copy) import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Wedding; +import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Menu; +registerVoicedCommandHandler( new Menu()); if (Config.BANKING_SYSTEM_ENABLED) Index: head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Menu.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Menu.java (revision 0) +++ head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Menu.java (revision 0) @@ -0,0 +1,173 @@ /* * 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://www.gnu.org/licenses/>. */ package com.l2jfrozen.gameserver.handler.voicedcommandhandlers; import javolution.text.TextBuilder; import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler; import com.l2jfrozen.gameserver.model.L2World; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage; public class Menu implements IVoicedCommandHandler { private final String[] _voicedCommands = { "menu" }; @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { mainHtml(activeChar); return true; } public static void mainHtml(L2PcInstance activeChar) { NpcHtmlMessage nhm = new NpcHtmlMessage(5); TextBuilder tb = new TextBuilder(""); tb.append("<html><head><title>Personal Menu</title></head><body>"); tb.append("<center>"); tb.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"L2ui_ch3.menubutton4\" width=\"38\" height=\"38\"></td>"); tb.append("<td valign=\"top\">Players online <font color=\"FF6600\"> "+L2World.getInstance().getAllPlayers().size()+"</font>"); tb.append("<br1><font color=\"00FF00\">"+activeChar.getName()+"</font>, use this menu for everything related to your gameplay.<br1></td>"); tb.append("</tr>"); tb.append("</table>"); tb.append("</center>"); tb.append("<center>"); tb.append("<table border=\"1\" width=\"100\" height=\"12\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td width=\"52\">ON</td>"); tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>"); tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>"); tb.append("</tr>"); tb.append("<tr>"); tb.append("<td width=\"52\">OFF</td>"); tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>"); tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>"); tb.append("</tr>"); tb.append("</table><br>"); tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td align=\"center\" width=\"52\">Buff Protection</td>"); if(activeChar.isBuffProtected()) tb.append("<td width=\"16\"><button action=\"bypass -h buffprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>"); if(!activeChar.isBuffProtected()) tb.append("<td width=\"16\"><button action=\"bypass -h buffprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>"); tb.append("</tr>"); tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve ANY buff from another character.</font></td></tr>"); tb.append("</table>"); tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td align=\"center\" width=\"52\">Personal Message Refusal</td>"); if(activeChar.getMessageRefusal()) tb.append("<td width=\"16\"><button action=\"bypass -h pmref\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>"); if(!activeChar.getMessageRefusal()) tb.append("<td width=\"16\"><button action=\"bypass -h pmref\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>"); tb.append("</tr>"); tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve ANY pm from another character.</font></td></tr>"); tb.append("</table>"); tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td align=\"center\" width=\"52\">Trade Request Protection</td>"); if(activeChar.isInTradeProt()) tb.append("<td width=\"16\"><button action=\"bypass -h tradeprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>"); if(!activeChar.isInTradeProt()) tb.append("<td width=\"16\"><button action=\"bypass -h tradeprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>"); tb.append("</tr>"); tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve ANY trade request from another character.</font></td></tr>"); tb.append("</table>"); tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td align=\"center\" width=\"52\">Soulshot/Spiritshot Effect</td>"); if(activeChar.isSSDisabled()) tb.append("<td width=\"16\"><button action=\"bypass -h ssprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>"); if(!activeChar.isSSDisabled()) tb.append("<td width=\"16\"><button action=\"bypass -h ssprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>"); tb.append("</tr>"); tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you will enchance your pc's performance by disabling your ss effects.</font></td><td align=\"center\" valign=\"middle\"><button action=\"bypass -h page2\" width=16 height=16 back=\"L2UI_CH3.next1\" fore=\"L2UI_CH3.next1\"></td></tr>"); tb.append("</table>"); tb.append("</center>"); tb.append("</body></html>"); nhm.setHtml(tb.toString()); activeChar.sendPacket(nhm); } public static void mainHtml2(L2PcInstance activeChar) { NpcHtmlMessage nhm = new NpcHtmlMessage(5); TextBuilder tb = new TextBuilder(""); tb.append("<html><head><title>Personal Menu</title></head><body>"); tb.append("<center>"); tb.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"L2ui_ch3.menubutton4\" width=\"38\" height=\"38\"></td>"); tb.append("<td valign=\"top\">Players online <font color=\"FF6600\"> "+L2World.getInstance().getAllPlayers().size()+"</font>"); tb.append("<br1><font color=\"00FF00\">"+activeChar.getName()+"</font>, use this menu for everything related to your gameplay.<br1></td>"); tb.append("</tr>"); tb.append("</table>"); tb.append("</center>"); tb.append("<center>"); tb.append("<table border=\"1\" width=\"100\" height=\"12\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td width=\"52\">ON</td>"); tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>"); tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>"); tb.append("</tr>"); tb.append("<tr>"); tb.append("<td width=\"52\">OFF</td>"); tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>"); tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>"); tb.append("</tr>"); tb.append("</table><br>"); tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td align=\"center\" width=\"52\">Party Invite Protection</td>"); if(activeChar.isPartyInvProt()) tb.append("<td width=\"16\"><button action=\"bypass -h partyin\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>"); if(!activeChar.isPartyInvProt()) tb.append("<td width=\"16\"><button action=\"bypass -h partyin\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>"); tb.append("</tr>"); tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve ANY party invite from another character.</font></td></tr>"); tb.append("</table>"); tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td align=\"center\" width=\"52\">Exp Gain Protection</td>"); if(activeChar.cantGainXP()) tb.append("<td width=\"16\"><button action=\"bypass -h xpnot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>"); if(!activeChar.cantGainXP()) tb.append("<td width=\"16\"><button action=\"bypass -h xpnot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>"); tb.append("</tr>"); tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve expirience from killing monsters.</font></td><td align=\"center\" valign=\"middle\"><button action=\"bypass -h page1\" width=16 height=16 back=\"L2UI_CH3.back1\" fore=\"L2UI_CH3.next1\"></td></tr>"); tb.append("</table>"); tb.append("</center>"); tb.append("</body></html>"); nhm.setHtml(tb.toString()); activeChar.sendPacket(nhm); } @Override public String[] getVoicedCommandList() { return _voicedCommands; } } \ No newline at end of file Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SpiritShot.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SpiritShot.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SpiritShot.java (working copy) @@ -128,7 +128,8 @@ // Send message to client activeChar.sendPacket(new SystemMessage(SystemMessageId.ENABLED_SPIRITSHOT)); - Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/); + if (!activeChar.isSSDisabled()) + Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/); activeChar = null; } Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/TradeRequest.java =================================================================== --- head-src/com/l2jfrozen/gameserver/network/clientpackets/TradeRequest.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/TradeRequest.java (working copy) @@ -202,7 +202,13 @@ player.sendPacket(new SystemMessage(SystemMessageId.TARGET_TOO_FAR)); return; } - + + if (partner.isInTradeProt()) + { + player.sendMessage(partner.getName() + " is in Trade Protection Mode"); + return; + } + // Alt game - Karma punishment if(!Config.ALT_GAME_KARMA_PLAYER_CAN_TRADE && (player.getKarma() > 0 || partner.getKarma() > 0)) { Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SoulShots.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SoulShots.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SoulShots.java (working copy) @@ -142,7 +142,8 @@ // Send message to client activeChar.sendPacket(new SystemMessage(SystemMessageId.ENABLED_SOULSHOT)); - Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/); + if (!activeChar.isSSDisabled()) + Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/); activeChar = null; } Index: head-src/com/l2jfrozen/gameserver/model/actor/stat/PcStat.java =================================================================== --- head-src/com/l2jfrozen/gameserver/model/actor/stat/PcStat.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/model/actor/stat/PcStat.java (working copy) @@ -58,6 +58,9 @@ //Player is Gm and access level is below or equal to canGainExp and is in party, don't give Xp if(!getActiveChar().getAccessLevel().canGainExp() && getActiveChar().isInParty()) return false; + + if (activeChar.cantGainXP()) + return false; if(!super.addExp(value)) return false; @@ -111,6 +114,9 @@ L2PcInstance activeChar = getActiveChar(); if(!activeChar.getAccessLevel().canGainExp() && activeChar.isInParty()) return false; + + if (activeChar.cantGainXP()) + return false; // if this player has a pet that takes from the owner's Exp, give the pet Exp now Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java =================================================================== --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java (working copy) @@ -28,6 +28,7 @@ import com.l2jfrozen.gameserver.handler.AdminCommandHandler; import com.l2jfrozen.gameserver.handler.IAdminCommandHandler; import com.l2jfrozen.gameserver.handler.custom.CustomBypassHandler; +import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Menu; import com.l2jfrozen.gameserver.model.L2Object; import com.l2jfrozen.gameserver.model.L2World; import com.l2jfrozen.gameserver.model.actor.instance.L2ClassMasterInstance; @@ -41,8 +42,10 @@ import com.l2jfrozen.gameserver.model.entity.event.TvT; import com.l2jfrozen.gameserver.model.entity.event.VIP; import com.l2jfrozen.gameserver.model.entity.olympiad.Olympiad; +import com.l2jfrozen.gameserver.network.SystemMessageId; import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed; import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage; +import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage; import com.l2jfrozen.gameserver.util.GMAudit; public final class RequestBypassToServer extends L2GameClientPacket @@ -308,7 +311,90 @@ player.processQuestEvent(p.substring(0, idx), p.substring(idx).trim()); } } - + else if (_command.startsWith("page1")) + Menu.mainHtml(activeChar); + else if (_command.startsWith("buffprot")) + { + if (activeChar.isBuffProtected()) + { + +activeChar.setIsBuffProtected(false); + +activeChar.sendMessage("Buff protection is disabled."); + +Menu.mainHtml(activeChar); + } + else + { + activeChar.setIsBuffProtected(true); + activeChar.sendMessage("Buff protection is enabled."); + Menu.mainHtml(activeChar); + } + } + else if (_command.startsWith("tradeprot")) + { + if (activeChar.isInTradeProt()) + { + +activeChar.setIsInTradeProt(false); + +activeChar.sendMessage("Trade acceptance mode is enabled."); + +Menu.mainHtml(activeChar); + } + else + { + activeChar.setIsInTradeProt(true); + activeChar.sendMessage("Trade refusal mode is enabled."); + Menu.mainHtml(activeChar); + } + } + else if (_command.startsWith("ssprot")) + { + if (activeChar.isSSDisabled()) + { + activeChar.setIsSSDisabled(false); + activeChar.sendMessage("Soulshots effects are enabled."); + Menu.mainHtml(activeChar); + } + else + { + activeChar.setIsSSDisabled(true); + activeChar.sendMessage("Soulshots effects are disabled."); + Menu.mainHtml(activeChar); + } + } + else if (_command.startsWith("xpnot")) + { + if (activeChar.cantGainXP()) + { + activeChar.cantGainXP(false); + activeChar.sendMessage("Enable Xp"); + Menu.mainHtml2(activeChar); + } + else + { + activeChar.cantGainXP(true); + activeChar.sendMessage("Disable Xp"); + Menu.mainHtml2(activeChar); + } + } + else if (_command.startsWith("pmref")) + { + if (activeChar.getMessageRefusal()) + { + activeChar.setMessageRefusal(false); + activeChar.sendPacket(new SystemMessage(SystemMessageId.MESSAGE_ACCEPTANCE_MODE)); + Menu.mainHtml(activeChar); + } + else + { + activeChar.setMessageRefusal(true); + activeChar.sendPacket(new SystemMessage(SystemMessageId.MESSAGE_REFUSAL_MODE)); + Menu.mainHtml(activeChar); + } + } + else if (_command.startsWith("partyin")) + { + if (activeChar.isPartyInvProt()) + { + activeChar.setIsPartyInvProt(false); + activeChar.sendMessage("Party acceptance mode is enabled."); + Menu.mainHtml2(activeChar); + } + else + { + activeChar.setIsPartyInvProt(true); + activeChar.sendMessage("Party refusal mode is enabled."); + Menu.mainHtml2(activeChar); + } + } + else if (_command.startsWith("page2")) + Menu.mainHtml2(activeChar); // Jstar's Custom Bypass Caller! else if(_command.startsWith("custom_")) { Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSpiritShot.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSpiritShot.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSpiritShot.java (working copy) @@ -169,7 +169,8 @@ // Pet uses the power of spirit. activeOwner.sendPacket(new SystemMessage(SystemMessageId.PET_USE_THE_POWER_OF_SPIRIT)); - Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUser(activePet, activePet, isBlessed ? 2009 : 2008, 1, 0, 0), 360000/*600*/); + if (!activeOwner.isSSDisabled()) + Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUser(activePet, activePet, isBlessed ? 2009 : 2008, 1, 0, 0), 360000/*600*/); activeOwner = null; activePet = null; Index: head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Continuous.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Continuous.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Continuous.java (working copy) @@ -143,7 +143,16 @@ || skill.getSkillType() == L2Skill.SkillType.MANAHEAL_PERCENT || skill.getSkillType() == L2Skill.SkillType.COMBATPOINTHEAL || skill.getSkillType() == L2Skill.SkillType.REFLECT)) - continue; + continue; + + if (activeChar instanceof L2PcInstance && target != activeChar && target.isBuffProtected() && !skill.isHeroSkill() + && (skill.getSkillType() == L2Skill.SkillType.BUFF + || skill.getSkillType() == L2Skill.SkillType.HEAL_PERCENT + || skill.getSkillType() == L2Skill.SkillType.FORCE_BUFF + || skill.getSkillType() == L2Skill.SkillType.MANAHEAL_PERCENT + || skill.getSkillType() == L2Skill.SkillType.COMBATPOINTHEAL + || skill.getSkillType() == L2Skill.SkillType.REFLECT)) + continue; // Player holding a cursed weapon can't be buffed and can't buff if(skill.getSkillType() == L2Skill.SkillType.BUFF)
×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock