Cod3x Posted July 17, 2010 Author Posted July 17, 2010 This is actually 'Transfer Adena' Voiced Command, which simply provides the target with an increased amount of adena. Although you lack of some checks. Anyway, kinda useless but gj. That's just a sample, i am not going to create 500 configs for this command like you always do, facepalm! Yep. @Codex ..do it following .transfer item-id count player :) Good idea, i checked the createitem admin command ill do it later.. Enjoy.
Coyote™ Posted July 18, 2010 Posted July 18, 2010 That's just a sample, i am not going to create 500 configs for this command like you always do, facepalm! Did I ever say that you need to make 500 configs? Your system is 100% bypassable =] And by the way don't use words whose meanings you don't understand. PS: And once again I'll say that your code is 'limited'.
adenaman Posted July 18, 2010 Posted July 18, 2010 this can have a problem. You dont check if the first person has adena to transfer, so if you dont have any adena and write .transfer the first person will get extra adena
Cod3x Posted July 18, 2010 Author Posted July 18, 2010 Did I ever say that you need to make 500 configs? Your system is 100% bypassable =] And by the way don't use words whose meanings you don't understand. PS: And once again I'll say that your code is 'limited'. Stop replying configurable tard.
Viruzzz Posted July 18, 2010 Posted July 18, 2010 Yep. @Codex ..do it following .transfer item-id count player :) thx for reply :)
Cod3x Posted July 18, 2010 Author Posted July 18, 2010 thx for reply :) wtf spammer. not usefull for me and for many others I would never share something useful in this kind of forum rolf! Relax, all the shares here are useless.
Coyote™ Posted July 18, 2010 Posted July 18, 2010 Stop replying configurable tard. Hahaha, you are a BIG Fail. Is this okay for you, I mean can you understand this english, or should I bring a dictionary? You dont check if the first person has adena to transfer, so if you dont have any adena and write .transfer the first person will get extra adena Jeez, what a mega-idiot.
Sarpedon Posted July 19, 2010 Posted July 19, 2010 package net.sf.l2j.gameserver.handler.voicedcommandhandlers; import net.sf.l2j.gameserver.handler.IVoicedCommandHandler; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.serverpackets.InventoryUpdate; import net.sf.l2j.gameserver.serverpackets.ActionFailed; import net.sf.l2j.gameserver.util.Util; import net.sf.l2j.gameserver.model.L2Object; public class transferhelp implements IVoicedCommandHandler { private static String[] _voicedCommands = { "transfer" }; public boolean useVoicedCommand(String command, L2PcInstance activeChar) { if (Util.calculateDistance(activeChar, target, true) > 150) return false; 1 if (activeChar.getTarget() == null) return false; if (command.equalsIgnoreCase("transer")) { L2Object target = activeChar.getTarget(); // check if the target is missing and if it is a player. if (target != null && target instanceof L2PcInstance) ((L2PcInstance)target).addItem("Transferred", 57, 10000000, target, true); //the item is transferred. 2 // remove the item the sender transferred. activeChar.getInventory().reduceAdena("AdenaTransfer", 10000000, activeChar, null); 3 InventoryUpdate iu = new InventoryUpdate(); ((L2PcInstance)target).sendMessage("You have been given 10.000.000 adena."); activeChar.sendMessage("Your 10.000.000 adena dissapeared."); activeChar.sendPacket(iu); 4 } return true; } public String[] getVoicedCommandList() { return _voicedCommands; } } I will avoid to take the risk and point out your getTarget() method, since I suppose that i will be flamed as well. Let us take a look on what I have pointed out right now. 1. Isn't that check a little bit useless? And even if you decide to add it, make sure to inform the player with a message saying the reason why he can't transfer. 2. Avoid adding the item to the player first and removing them afterwards. 3. There is no check to see if the player has the proper quantity in his inventory. In this way, even if the player has 1 adena, the other adena will be successfully transfered, and the player will simply lose 1 adena. Pretty easy way to farm adena by making bots. 4. Kinda useless, ain't it? I mean, the result is the same even without it, check it out. As an overall comment, I'll have to say that you creation lacks of the proper checking and has some bad-written methods. Take your time to fix your errors and add the proper checks and I hope that you'll keep practicing on it. PS: Making mistakes is not bad, just try to avoid them in simple codes like this one.
Intrepid Posted July 19, 2010 Posted July 19, 2010 I will avoid to take the risk and point out your getTarget() method, since I suppose that i will be flamed as well. Let us take a look on what I have pointed out right now. 1. Isn't that check a little bit useless? And even if you decide to add it, make sure to inform the player with a message saying the reason why he can't transfer. 2. Avoid adding the item to the player first and removing them afterwards. 3. There is no check to see if the player has the proper quantity in his inventory. In this way, even if the player has 1 adena, the other adena will be successfully transfered, and the player will simply lose 1 adena. Pretty easy way to farm adena by making bots. 4. Kinda useless, ain't it? I mean, the result is the same even without it, check it out. As an overall comment, I'll have to say that you creation lacks of the proper checking and has some bad-written methods. Take your time to fix your errors and add the proper checks and I hope that you'll keep practicing on it. PS: Making mistakes is not bad, just try to avoid them in simple codes like this one. damn i really like you :D but you cant change them nobody can they think and always will think that such codes make them good
adenaman Posted July 19, 2010 Posted July 19, 2010 You dont check if the first person has adena to transfer, so if you dont have any adena and write .transfer the first person will get extra adena Jeez, what a mega-idiot. 3. There is no check to see if the player has the proper quantity in his inventory. In this way, even if the player has 1 adena, the other adena will be successfully transfered, and the player will simply lose 1 adena. Pretty easy way to farm adena by making bots.
mogo Posted July 19, 2010 Posted July 19, 2010 The code is awful and useless. I've also noticed the thing that you can make "free money" but you guys were faster ;) and i hope Coyote wasn't refering to adenaman :o
adenaman Posted July 20, 2010 Posted July 20, 2010 Jeez what a mega-idiot was about Cod3x. sorry then :-[
Cod3x Posted July 20, 2010 Author Posted July 20, 2010 And i repeat... I would never share something useful in this kind of forum rolf! Relax, all the shares here are useless. Cayote you are a (i deleted myself the bad comments ;D)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now