Skip to content

[Share] Transfer item voiced command

Featured Replies

  • Author

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.

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

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

  • Author

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.

Yep.

 

@Codex ..do it following .transfer item-id count player :)

 

thx for reply :)

  • Author

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.

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.

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.

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

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.

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

 

 

Jeez what a mega-idiot was about Cod3x.

Jeez what a mega-idiot was about Cod3x.

sorry then  :-[

  • Author

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)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.