- Joined
- Jun 24, 2007
- Messages
- 25
- Reaction score
- 0
Omg, I'm so excited about this. This is the FIRST thing I've contributed to the community. Lol I have 11 posts. 
For those who DIDN'T find a way for blocking CS items from being bought, since iGoofy's method blocks ALL items on accident. This method, MY method, is basically iGoofy's method just with a couple of edits to make it work. It's just a bit ugly. It's not my fault I don't know any java. I just moved my original post from iGoofy's thread because I wanted people to benefit from this and I just realized how to add more item IDs without adding the WHOLE script over again. Not many people read old posts that apparently died because the owner didn't GIVE a fix for it. I'm pretty sure iGoofy did this already....As did other people who are experienced with java. I've tested this and it works 100%!!
ALL CREDITS GO TO iGoofy. Without further ado. The fix! You do not need to apply iGoofy's block CS items method. I've included parts of his method in here because this IS entirely based off it. This shouldn't even be considered mine. Here it is:
In BuyCSItemhandler.java:
Under
Place
Under
Place
This ALREADY blocks out the EXP cards from being bought. You need to edit it to block more items in the Cash Shop. (Duh?) To block more item id's, just Add:
After:
And Repeat to block more items
To block a range of items, just Add:
After:
And Repeat to block more items
Hope I helped someone.
Note: I doubt you would need
but I included it, just incase iGoofy comes back with a BETTER fix for his original script.
Some people still use this thread. (I think...) So... THIS WAS FOR V.55. IT MAY NOT WORK WITH ANY OTHER VERSIONS. USE AT YOUR OWN RISK! <:= WARNING!

For those who DIDN'T find a way for blocking CS items from being bought, since iGoofy's method blocks ALL items on accident. This method, MY method, is basically iGoofy's method just with a couple of edits to make it work. It's just a bit ugly. It's not my fault I don't know any java. I just moved my original post from iGoofy's thread because I wanted people to benefit from this and I just realized how to add more item IDs without adding the WHOLE script over again. Not many people read old posts that apparently died because the owner didn't GIVE a fix for it. I'm pretty sure iGoofy did this already....As did other people who are experienced with java. I've tested this and it works 100%!!
ALL CREDITS GO TO iGoofy. Without further ado. The fix! You do not need to apply iGoofy's block CS items method. I've included parts of his method in here because this IS entirely based off it. This shouldn't even be considered mine. Here it is:
In BuyCSItemhandler.java:
Under
Code:
private final static Logger log = LoggerFactory.getLogger(MapleServerHandler.class);
Code:
private final static int[] blockedItems = {1};
Code:
CashItemInfo item = CashItemFactory.getItem(snCS);
PHP:
if (item.getId() >= 5211000 && item.getId() <= 5211048 || item.getId() == Enter_Item_Id_Here) {
c.getPlayer().getClient().getSession().write(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;
}
PHP:
|| item.getId() == ENTER_ITEM_ID_HERE
PHP:
|| item.getId() == Enter_Item_Id_Here
To block a range of items, just Add:
PHP:
|| item.getId() >= Item_ID_Here && item.getId() <= Item_ID_Here
PHP:
|| item.getId() == Enter_Item_Id_Here
Hope I helped someone.

Note: I doubt you would need
PHP:
private final static int[] blockedItems = {1};
Some people still use this thread. (I think...) So... THIS WAS FOR V.55. IT MAY NOT WORK WITH ANY OTHER VERSIONS. USE AT YOUR OWN RISK! <:= WARNING!
Last edited: