Jump to content

AbsolutePower

Legendary Member
  • Posts

    748
  • Credits

  • Joined

  • Last visited

  • Days Won

    3
  • Feedback

    0%

Everything posted by AbsolutePower

  1. when you are sitting the html appear... so you can buff... omg test it first...
  2. they aren't working... i just wanna help you to make it better :) edit: this is better... because you must return your checks... anyway i like your idea :) public final class L2BBufferInstance extends L2NpcInstance { public L2BBufferInstance(int objectId, L2NpcTemplate template) { super(objectId, template); } @Override public void onBypassFeedback(L2PcInstance player, String command) { StringTokenizer st = new StringTokenizer(command, " "); String actualCommand = st.nextToken(); int buffid = 0; int bufflevel = 1; if (st.countTokens() == 2) { buffid = Integer.valueOf(st.nextToken()); bufflevel = Integer.valueOf(st.nextToken()); } else if (st.countTokens() == 1) buffid = Integer.valueOf(st.nextToken()); if (actualCommand.equalsIgnoreCase("getbuff")) { if (buffid != 0) { MagicSkillUse mgc = new MagicSkillUse(this, player, buffid, bufflevel, 5, 0); SkillTable.getInstance().getInfo(buffid, bufflevel).getEffects(this, player); showMessageWindow(player); player.broadcastPacket(mgc); } } else if (actualCommand.equalsIgnoreCase("restore")) { player.setCurrentHpMp(player.getMaxHp(), player.getMaxMp()); player.setCurrentCp(player.getMaxCp()); showMessageWindow(player); } else if (actualCommand.equalsIgnoreCase("cancel")) { player.stopAllEffects(); showMessageWindow(player); } else super.onBypassFeedback(player, command); } @Override public void onAction(L2PcInstance player) { if (this != player.getTarget()) { player.setTarget(this); player.sendPacket(new MyTargetSelected(getObjectId(), player.getLevel() - getLevel())); player.sendPacket(new ValidateLocation(this)); } else if (isInsideRadius(player, INTERACTION_DISTANCE, false, false)) { player.setCurrentFolkNPC(this); showMessageWindow(player); player.sendPacket(new ActionFailed()); } else { player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); player.sendPacket(new ActionFailed()); } } private void showMessageWindow(L2PcInstance player) { NpcHtmlMessage html = new NpcHtmlMessage(1); final StringBuilder strBuffer = StringUtil.startAppend(3500, "<html><title>Magician</title><body><center>"); if (player == null)return; if (player.isOnline()==0 && player.isCastingNow() && player.isAfraid() && !player.isAttackable() && player.isInJail() && !player.isVisible() && player.isAway() && player.isMuted() && player.isMounted() && player.isOutOfControl() && player.isOverloaded()) { player.sendMessage("You can't use buffer right now!."); showMessageError(player); return; } if (player.isCursedWeaponEquiped()) { player.sendMessage("You can't use buffer when you got cursed weapons."); showMessageError(player); return; } if (player.isSitting()) { player.sendMessage("You can't use buffer while you're sitting."); showMessageError(player); return; } if (player.isLocked()) { player.sendMessage("You can't use buffer while you're changing-adding sub(generaly using sub master)."); showMessageError(player); return; } if (player.isLearningSkill()) { player.sendMessage("You can't use buffer while you're learning skills."); showMessageError(player); return; } else if (player.isAlikeDead() && player.isDead()) { player.sendMessage("You can't use buffer while you're dead or using fake death."); showMessageError(player); return; } else if (player.isInCombat()) { player.sendMessage("You can't use buffer while you're in combat."); showMessageError(player); return; } else { strBuffer.append("Welcome, <font color=\"LEVEL\">%charname%</font>!<br>"); strBuffer.append("Here is the list of all available effects:<br>"); strBuffer.append("<img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32 align=left>"); strBuffer.append("<table width=300>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1204 2\">Wind Walk</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1040 3\">Shield</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1243 6\">Bless Shield</a></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1068 3\">Might</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1036 2\">Magic Barrier</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1259 4\">Resist Shock</a></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1035 4\">Mental Shield</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1045 6\">Blessed Body</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1304 3\">Advanced Block</a></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1048 6\">Blessed Soul</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1062 2\">Berserker Spirit</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1189 3\">Resist Wind</a></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1086 2\">Haste</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1240 3\">Guidance</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1393 3\">Unholy Resistance</a></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1242 3\">Death Whisper</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1077 3\">Focus</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1033 3\">Resist Poison</a></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1268 4\">Vampiric Rage</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1087 3\">Agility</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1191 3\">Resist Fire</a></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1085 3\">Acumen</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1059 3\">Empower</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1182 3\">Resist Aqua</a></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1303 2\">Wild Magic</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1078 6\">Concentration</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1352 1\">Elemental Protection</a></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1353 1\">Divine Protection</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1397 3\">Clarity</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1392 3\">Holy Resistance</a></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1043 1\">Holy Weapon</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1032 3\">Invigor</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1044 3\">Regeneration</a></td></tr>"); strBuffer.append("<tr><td></td></tr>"); strBuffer.append("<tr><td><font color=\"ff9900\">Dances:</font></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 275 1\">Fury</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 273 1\">Mystic</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 365 1\">Siren's</a></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 274 1\">Fire</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 276 1\">Concentration</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 310 1\">Vampire</a></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 271 1\">Warrior</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 277 1\">Light</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 272 1\">Inspiration</a></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 311 1\">Protection</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 309 1\">Earth Guard</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 307 1\">Aqua Guard</a></td></tr>"); strBuffer.append("<tr><td></td></tr>"); strBuffer.append("<tr><td><font color=\"ff9900\">Songs:</font></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 264 1\">Earth</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 269 1\">Hunter</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 270 1\">Invocation</a></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 266 1\">Water</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 267 1\">Warding</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 304 1\">Vitality</a></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 268 1\">Wind</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 364 1\">Champion</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 349 1\">Renewal</a></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 265 1\">Life</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 363 1\">Meditation</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 305 1\">Vengeance</a></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 308 1\">Storm Guard</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 306 1\">Flame Guard</a></td></tr>"); strBuffer.append("<tr><td></td></tr>"); strBuffer.append("<tr><td><font color=\"ff9900\">Other:</font></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_cancel\"><font color=\"ffffff\">Cancel</font></a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1388 3\">Greater Might</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1389 3\">Greater Shield</a></td></tr>"); strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_restore\"><font color=\"ffffff\">Restore</font></a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1363 1\">Chant of Victory</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1356 1\">Prophecy of Fire</a></td></tr>"); strBuffer.append("<tr><td></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1355 1\">Prophecy of Water</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1357 1\">Prophecy of Wind</a></td></tr>"); strBuffer.append("<tr><td></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1413 1\">Magnus' Chant</a></td><td></td></tr>"); strBuffer.append("</table><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32 align=left>"); } strBuffer.append("</center></body></html>"); html.setHtml(strBuffer.toString()); html.replace("%objectId%", String.valueOf(getObjectId())); html.replace("%charname%", player.getName()); player.sendPacket(html); } private void showMessageError(L2PcInstance player) { NpcHtmlMessage html = new NpcHtmlMessage(1); final StringBuilder strBuffer = StringUtil.startAppend(3500, "<html><title>Magician</title><body><center>"); { strBuffer.append("<img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32 align=left>"); strBuffer.append("<font color=\"LEVEL\">%charname%</font> I am sorry but you can't buff right now!:<br>"); strBuffer.append("<table width=300>"); strBuffer.append("</table><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32 align=left>"); } strBuffer.append("</center></body></html>"); html.setHtml(strBuffer.toString()); html.replace("%objectId%", String.valueOf(getObjectId())); html.replace("%charname%", player.getName()); player.sendPacket(html); } }
  3. you got some errors in checks... they can do buffs while they are in combat-sitting bla-bla... 1)you can make a private void private void showMessageError(L2PcInstance player) { NpcHtmlMessage html = new NpcHtmlMessage(1); final StringBuilder strBuffer = StringUtil.startAppend(3500, "<html><title>Magician</title><body><center>"); { strBuffer.append("<img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32 align=left>"); strBuffer.append("<font color=\"LEVEL\">%charname%</font>You can't buff right now!:<br>"); strBuffer.append("<table width=300>"); strBuffer.append("</table><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32 align=left>"); } strBuffer.append("</center></body></html>"); html.setHtml(strBuffer.toString()); html.replace("%objectId%", String.valueOf(getObjectId())); html.replace("%charname%", player.getName()); player.sendPacket(html); } and then send the message like this if (player.isSitting()) { player.sendMessage("You can't use buffer while you're sitting."); showMessageError(player); return; } 2) you can make the same for all checks... px: make voids for all checks private void showMessageErrorSitting(L2PcInstance player) { NpcHtmlMessage html = new NpcHtmlMessage(1); final StringBuilder strBuffer = StringUtil.startAppend(3500, "<html><title>Magician</title><body><center>"); { strBuffer.append("<img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32 align=left>"); strBuffer.append("<font color=\"LEVEL\">%charname%</font> You can't buff while sitting!:<br>"); strBuffer.append("<table width=300>"); strBuffer.append("</table><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32 align=left>"); } strBuffer.append("</center></body></html>"); html.setHtml(strBuffer.toString()); html.replace("%objectId%", String.valueOf(getObjectId())); html.replace("%charname%", player.getName()); player.sendPacket(html); } if (player.isSitting()) { showMessageErrorSitting(player); return; }
  4. 8a mas dieukolines an mas eleges ti error sou bgazei kai ti pack...
  5. ox kalo sxoleio apo ton vl4d... mipws me geloun ta matia mou??? xaxa :P dn 3erw file egw tra to skeftika... an uparxei tote sorry :P
  6. Credits to me (AbSoLuTePoWeR)??????? simeni otan kanis kati diko --->"""mas"""<--- oxi pernis ena code apo alon kai vazis +3 line... kai des ligo to rnd gt kai afto la9os to ekanes. to problem sto rnd p einai? :S:S:S (--->WhiteDevs<---- diko """"mas""") den xriazete na pw perisotera elpizw na katalabes
  7. pios sou eipe oti to ekana cp kai pws tolmas na to les auto xwris na me 3ereis? pira ena event pou eixa dei kai to ekana pio advanced... kapios mod as to dei auto eleos spam
  8. i don't think so... the server is online
  9. Admin/Owner: AbsolutePower Supporter: Zeon Head GM: GoD GM: AllStar WebDesigner: NikosDi Experience: 5000x Sp: 5000x Adena Drop: 5000x Enchant Rates: Safe Enchant : +4 Weapon Max Enchant : +20 Armor Max Enchant : +20 Jewels Max Enchant : +20 enchant Weapon : 75% enchant Armor : 75% enchnat Jewels : 75% Blessed enchant Weapon : 100% enchant Armor : 100% enchnat Jewels : 100% -Auto-Event, Every 60 minutes - Reward 15 Gold bars -Max Sub-Class- 3 -pk Color System -Custom Shop - Lifestones, Blessed Scrolls, Boss Jewles, Custom Shields , Dynasty Armor-weapon -Full GM Shop -Player Commands- .deposit - make Adena to Gold Bars, .withdraw - make Gold Bars to Adena. .info .online .stat -All Skills Work 99% -Over-Enchant Protection -Flood Protectors -Smart Protection -Protection From L2J Attacker, L2Jkiller , L2Walker, L2Phx and other hacking programs. -Auto-Learn Skills -Balanced Classes -Wedding System -Clan Hall System -No Clan Penalty -Augmentation System fully working -All Noblesse Skills -All Hero Skills -All Augmentation Skills -Every Buff / Dance / Song / Chant Lasts 3 Hours -Cursed Weapons Zariche and Akamanah -Unstuck Command 10 seconds -Wedding Manager -Custom Gatekeeper -Gold Bar System -Many Custom Events with Special Prizes Daily -Custom Farm Zones -Custom starting zone -Custom RB Zone -Vote System -Custom L][GoD Armor [Apella] [ Hidden part. View original post. ] www.l2-god.tk
  10. geia sas paidia 8a i8ela na mou steilete to skill time change....to exasa kai dn mporw na to brw gt dn work to search.... :S
×
×
  • Create New...