SySt3MGaM3RFr3aKs Posted January 4, 2010 Posted January 4, 2010 w0w, hello MxC. Today while i was searching in L2J Forums i found something freaking cool. - I am not sure if is working - I haven't tested it. That's how it works: <a action="bypass -h npc_%objectId%_GiveBuffs SkilldId SkillLvl PriceItemId Priceammount">get buff XXXX</a> See ?? You write after GiveBuffs(space)SkillId(space)SkillLvl(space)PriceItemId(space)Priceammount. Here is a real Example. <a action="bypass -h npc_%objectId%_GiveBuffs 1204 2 57 5000000">get buff XXXX</a> 1204 ( The id of the skill ), 2 ( Skill level or buff level ), 57 ( Is adena, id of adena ), 500000 ( The ammount of adena, for this buff ) ^^ is windwalk Buff, level 2. And you get this for xxxxx adena. This is the simple diff, for this function: Index: D:/Workspace/L2_GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java =================================================================== --- /java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java (revision 2501) +++ /java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java (working copy) @@ -890,6 +891,27 @@ html.replace("%playername%", player.getName()); player.sendPacket(html); } + else if(command.startsWith("GiveBuff")){ + String[] params = command.split(" "); + int SkillId = Integer.parseInt(params[1]); + int SkillLvl = Integer.parseInt(params[2]); + int ItemId = Integer.parseInt(params[3]); + int ItemAmmount = Integer.parseInt(params[4]); + int Ammount = player.getInventory().getItemByItemId(ItemId).getCount(); + L2Item item = ItemTable.getInstance().getTemplate(ItemId); + + if(Ammount < ItemAmmount) + { + player.sendMessage("You don't have enough " + item.getName() + " to get this buff." ); + player.sendMessage("You need " + ItemAmmount + " " + item.getName() + " to be able to get this buff."); + } + else + { + player.getInventory().destroyItemByItemId("getting buffs", ItemId, ItemAmmount, player, null); + L2Skill skill = SkillTable.getInstance().getInfo(SkillId, SkillLvl); + skill.getEffects(this, L2Character.class.cast(player)); + } + } else if (command.equalsIgnoreCase("TerritoryStatus")) { NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); Credits: L2JForum Quote
SySt3MGaM3RFr3aKs Posted January 4, 2010 Author Posted January 4, 2010 Note: This function is not reccomended !, Hackers may send packets ! Although with some protections :D It can be useful. I will try to protect it. Quote
Belzebul Posted January 4, 2010 Posted January 4, 2010 wait wait, is this for a buffer .. or? i didnt understand. Also if its not protected why do you share it? Quote
Devangell™ Posted January 4, 2010 Posted January 4, 2010 man no make double post...!!:S btw this can be hacked? Quote
DominiQue Posted January 4, 2010 Posted January 4, 2010 Easier : Make a phyton and change ITEM_ID and price of bufs xD Quote
SySt3MGaM3RFr3aKs Posted January 4, 2010 Author Posted January 4, 2010 Easier : Make a phyton and change ITEM_ID and price of bufs xD Python sucks, and always STUCKS. man no make double post...!!:S btw this can be hacked? For now yes.. wait wait, is this for a buffer .. or? i didnt understand. Also if its not protected why do you share it? Because i want. Quote
xAddytzu Posted January 4, 2010 Posted January 4, 2010 Python sucks, and always STUCKS. For now yes.. Because i want. You'are wrong about python. Quote
SySt3MGaM3RFr3aKs Posted January 4, 2010 Author Posted January 4, 2010 You'are wrong about python. I am not wrong at all ! I Have bypass protection ( Advanced ), and still stucking some times ! Quote
xAddytzu Posted January 4, 2010 Posted January 4, 2010 I am not wrong at all ! I Have bypass protection ( Advanced ), and still stucking some times ! Explain me why in Azshara you could not stuck ? Quote
SySt3MGaM3RFr3aKs Posted January 4, 2010 Author Posted January 4, 2010 Explain me why in Azshara you could not stuck ? Maybe because you have it on C:/ ? :D Anyway, Python buffers Stuck ( I know it ). Not all the time, in same cases they stuck. Quote
Leprus Posted January 4, 2010 Posted January 4, 2010 Note: This function is not reccomended !, Hackers may send packets ! Although with some protections :D It can be useful. I will try to protect it. idiot.. you can always make a check if the player is in peace zone or not >.< Quote
Belzebul Posted January 4, 2010 Posted January 4, 2010 Is this an answer? lol. I want to learn what is this and why do you share it if its not protected. Quote
xAddytzu Posted January 4, 2010 Posted January 4, 2010 idiot.. you can always make a check if the player is in peace zone or not >.< He refers at send many packets in 1ms Quote
SySt3MGaM3RFr3aKs Posted January 4, 2010 Author Posted January 4, 2010 idiot.. you can always make a check if the player is in peace zone or not >.< Sorry if i am an idiot, Thanks for your reply ( Useful ) @Ontopic: I will update the share, with some protections and some optimizations ! Quote
CastAway Posted January 4, 2010 Posted January 4, 2010 Because i want. dont make double posts and and becarefull with ur language mate he just asked. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.