Trade Scam.

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
maxstyleboy
Posts: 183
Joined: Thu Jul 15, 2010 12:26 am

Trade Scam.

Post by maxstyleboy »

How to block sending trade to character in combat or flag?

thanks!

:twisted:
lion
L2j Veteran
L2j Veteran
Posts: 967
Joined: Sun Mar 11, 2007 7:49 pm
Location: Ukraine

Re: Trade Scam.

Post by lion »

add check in TradeRequest
User avatar
Micr0
Posts: 119
Joined: Sun Sep 05, 2010 5:44 pm

Re: Trade Scam.

Post by Micr0 »

add this in TradeRequest.java

Code: Select all

        if (!target.isPlayer())        {            player.sendPacket(SystemMessageId.INCORRECT_TARGET);            return;        }                +if(player.isInCombat())        +{        +   player.sendMessage("You cannot trade while you are in a combat state.");        +   return;        +} 
Luna
Posts: 34
Joined: Sat Mar 16, 2013 6:59 pm

Re: Trade Scam.

Post by Luna »

It only blocks when the target is in flag state, not when it is in combat.
maxstyleboy
Posts: 183
Joined: Thu Jul 15, 2010 12:26 am

Re: Trade Scam.

Post by maxstyleboy »

Code: Select all

===================================================================--- TradeRequest.java@@ -138,6 +138,18 @@            return;        }        +       if (partner.isInCombat())+       {+           player.sendMessage("That person is in combat.");+           return;+       }+       +       if (player.isInCombat())+       {+           player.sendMessage("You cannot trade while in combat.");+           return;+       }+               if (BlockList.isBlocked(partner, player))        {            sm = SystemMessage.getSystemMessage(SystemMessageId.S1_HAS_ADDED_YOU_TO_IGNORE_LIST);
Thanks :)

:lol:
User avatar
Konstantinos
Posts: 501
Joined: Wed Feb 08, 2012 12:19 pm

Re: Trade Scam.

Post by Konstantinos »

maxstyleboy wrote:How to block sending trade to character in combat or flag?

thanks!

:twisted:
Do you have any problem with that?
Luna
Posts: 34
Joined: Sat Mar 16, 2013 6:59 pm

Re: Trade Scam.

Post by Luna »

Code: Select all

[javac]         if (partner.isInCombat())[javac]             ^[javac]   symbol:   variable partner[javac]   location: class TradeRequest[javac]  1 error
:s
User avatar
tukune
Posts: 533
Joined: Sun Mar 29, 2009 2:35 pm
Location: Japan

Re: Trade Scam.

Post by tukune »

:!: if (player.isInCombat() || player.getPvpFlag() > 0)
Luna
Posts: 34
Joined: Sat Mar 16, 2013 6:59 pm

Re: Trade Scam.

Post by Luna »

It works, thanks tho ;)
maxstyleboy
Posts: 183
Joined: Thu Jul 15, 2010 12:26 am

Re: Trade Scam.

Post by maxstyleboy »

Konstantinos wrote:
maxstyleboy wrote:How to block sending trade to character in combat or flag?

thanks!

:twisted:
Do you have any problem with that?

Yes, players scam in siege!
If you request trade for any player, this player cannot use skills...
User avatar
Konstantinos
Posts: 501
Joined: Wed Feb 08, 2012 12:19 pm

Re: Trade Scam.

Post by Konstantinos »

maxstyleboy wrote:
Konstantinos wrote:
maxstyleboy wrote:How to block sending trade to character in combat or flag?

thanks!

:twisted:
Do you have any problem with that?

Yes, players scam in siege!
If you request trade for any player, this player cannot use skills...
thanks.
User avatar
Konstantinos
Posts: 501
Joined: Wed Feb 08, 2012 12:19 pm

Re: Trade Scam.

Post by Konstantinos »

maxstyleboy wrote:

Code: Select all

===================================================================--- TradeRequest.java@@ -138,6 +138,18 @@            return;        }        +       if (partner.isInCombat())+       {+           player.sendMessage("That person is in combat.");+           return;+       }+       +       if (player.isInCombat())+       {+           player.sendMessage("You cannot trade while in combat.");+           return;+       }+               if (BlockList.isBlocked(partner, player))        {            sm = SystemMessage.getSystemMessage(SystemMessageId.S1_HAS_ADDED_YOU_TO_IGNORE_LIST);
Thanks :)

:lol:
ty i have to check that bug :)
User avatar
Pandragon
Posts: 704
Joined: Tue Jul 26, 2005 7:38 pm

Re: Trade Scam.

Post by Pandragon »

:D

Code: Select all

        if (partner.isInCombat() || (partner.getPvpFlag() > 0))        {            player.sendMessage("That person is in combat.");            return;        }                if (player.isInCombat() || (player.getPvpFlag() > 0))        {            player.sendMessage("You cannot trade while in combat.");            return;        }
Post Reply