Skip to content

No Reward For Offline Traders

Featured Replies

hey guys can u help me make my vote reward system to no give rewards to offline traders

 

im using this offline trade system http://www.maxcheaters.com/topic/165825-offline-shop-craft-309-rev/

 

and my check for dual box is

for(L2PcInstance player : pls)
						{
							if(player != null)
							{
								if(checkSingleBox(player))
								{
								   player.addItem("reward", Config.TOPZONE_REWARD_ID, Config.TOPZONE_REWARD_COUNT, player, true);
								}
							}
						}

can u tell me how to fix this?

Solved by SweeTs

Post checkSingleBox method. Also player cant be null there, drop the null check.

 

You basically have to check !client.isDetached()

Edited by SweeTs

  • Author


protected boolean checkSingleBox(L2PcInstance player)

{

if(player.getClient()!=null && player.getClient().getConnection()!=null && !player.getClient().getConnection().isClosed()){

 

String playerip = player.getClient().getConnection().getInetAddress().getHostAddress();

 

if(already_rewarded.contains(playerip))

return false;

already_rewarded.add(playerip);

return true;

}

return false;

}

  • Solution

Looks ok, but if you still can get the reward, add as I said before

&& !player.getClient().isDetached()

Edited by SweeTs

Guest
This topic is now closed to further replies.

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.