iAlreadyExist Posted July 24, 2016 Posted July 24, 2016 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?
0 SweeTs Posted July 24, 2016 Posted July 24, 2016 (edited) Looks ok, but if you still can get the reward, add as I said before && !player.getClient().isDetached() Edited July 24, 2016 by SweeTs
0 SweeTs Posted July 24, 2016 Posted July 24, 2016 (edited) Post checkSingleBox method. Also player cant be null there, drop the null check. You basically have to check !client.isDetached() Edited July 24, 2016 by SweeTs
0 iAlreadyExist Posted July 24, 2016 Author Posted July 24, 2016 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; }
Question
iAlreadyExist
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?
5 answers to this question
Recommended Posts