- Joined
- Nov 30, 2007
- Messages
- 511
- Reaction score
- 0
If you don't want players to buy a certain item when using the cash shop, use this.
In BuyCSItemhandler.java:
Under
Place
-------------
Under
Place
I've already blocked off 2x EXP cards from being bought, so remove that if you want.
In BuyCSItemhandler.java:
Under
Code:
private final static Logger log = LoggerFactory.getLogger(MapleServerHandler.class);
Place
Code:
private final static int[] blockedItems = {1};
Under
Code:
CashItemInfo item = CashItemFactory.getItem(snCS);
Place
PHP:
for (int i = 0; i < blockedItems.length; i++) {
if (item.getId() >= 5211000 && item.getId() <= 5211048 || item.getId() != blockedItems[i]) {
c.getPlayer().getClient().getSession().write(broadcastPacket(MaplePacketCreator.serverNotice(1, "You may not purchase this item.")));
c.getSession().write(MaplePacketCreator.showNXMapleTokens(c.getPlayer()));
c.getSession().write(MaplePacketCreator.enableCSUse0());
c.getSession().write(MaplePacketCreator.enableCSUse1());
c.getSession().write(MaplePacketCreator.enableCSUse2());
c.getSession().write(MaplePacketCreator.enableCSUse3());
return;
}
}
I've already blocked off 2x EXP cards from being bought, so remove that if you want.
Last edited: