Jump to content

Recommended Posts

Posted

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.

Posted

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'.

Posted

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.

Posted

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.

Posted

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.

Posted
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.

Posted

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

Posted

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.

Posted

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

Posted

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)

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...