Jump to content
  • 0

No Reward For Offline Traders


iAlreadyExist

Question

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?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

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

&& !player.getClient().isDetached()
Edited by SweeTs
Link to comment
Share on other sites

  • 0

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

 

You basically have to check !client.isDetached()

Edited by SweeTs
Link to comment
Share on other sites

  • 0


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;

}

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...