-
Re: [Release] Increase Storage Space from Cash Shop
Thanks for your sharing. Currently, it will more like as GMS...
-
Re: [Release] Increase Storage Space from Cash Shop
People are too stupid to copy and paste, so I won't be releasing my present.
-
Re: [Release] Increase Storage Space from Cash Shop
Quote:
Originally Posted by
FloppyDisk
People are too stupid to copy and paste, so I won't be releasing my present.
Well thats RaGEZONE...
-
Re: [Release] Increase Storage Space from Cash Shop
Quote:
Originally Posted by
FloppyDisk
People are too stupid to copy and paste, so I won't be releasing my present.
Lol Jay, what was the present anyway?
And get on msn o.o
-
Re: [Release] Increase Storage Space from Cash Shop
-
Re: [Release] Increase Storage Space from Cash Shop
Quote:
Originally Posted by
Hector
aww, lol kk , gl with what ur doing :D And don't release it :P make ppl work ?:D
That totally defeats the purpose of this section.
-
Re: [Release] Increase Storage Space from Cash Shop
Quote:
Originally Posted by
Murawd
That totally defeats the purpose of this section.
i honestly don't care D: sorry if i made u mad *deletes post*
-
Re: [Release] Increase Storage Space from Cash Shop
Quote:
Originally Posted by
Hector
i honestly don't care D: sorry if i made u mad *deletes post*
Nah lol it's fine. It's just that mentality that led to the downfall of this section.
Oh by the way guys, that present is pretty sweet o.o Jay told me about it on msn :P
-
Re: [Release] Increase Storage Space from Cash Shop
The world will look up and shout, "Save us," and I'll whisper, "No."
-
Re: [Release] Increase Storage Space from Cash Shop
Quote:
Originally Posted by
leaker
The world will look up and shout, "Save us," and I'll whisper, "No."
the world doesnt revolve around maplestory though sorry thats all you know, so you will be crying to the world and we will say no! WHAT NOW
Yup i can be deep D:
-
Re: [Release] Increase Storage Space from Cash Shop
Quote:
Originally Posted by
Hector
the world doesnt revolve around maplestory though sorry thats all you know, so you will be crying to the world and we will say no! WHAT NOW
Yup i can be deep D:
Lol it's a quote from my siggie/The Watchmen
-
Re: [Release] Increase Storage Space from Cash Shop
package net.sf.odinms.net.channel.handler;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import net.sf.odinms.client.*;
import net.sf.odinms.client.messages.ServernoticeMapleClientMessageCallback;
import net.sf.odinms.database.DatabaseConnection;
import net.sf.odinms.net.AbstractMaplePacketHandler;
import net.sf.odinms.server.*;
import net.sf.odinms.tools.MaplePacketCreator;
import net.sf.odinms.tools.data.input.SeekableLittleEndianAccessor;
/**
*
* @author Acrylic (Terry Han)
*/
public class BuyCSItemHandler extends AbstractMaplePacketHandler {
private final static int[] blockedItems = {5000028, 5400000};
@Override
public void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
int action = slea.readByte();
if (action == 3) {
slea.skip(1);
int useNX = slea.readInt();
int snCS = slea.readInt();
CashItemInfo item = CashItemFactory.getItem(snCS);
for (int i = 0; i < blockedItems.length; i++) {
if (item.getId() >= 1812002 && item.getId() <= 1812007 || item.getId() == blockedItems[i]) {
new ServernoticeMapleClientMessageCallback(1, c).dropMessage("[風迷題醒] 此物品不能購買.");
c.getSession().write(MaplePacketCreator.showNXMapleTokens(c.getPlayer()));
c.getSession().write(MaplePacketCreator.enableCSorMTS());
c.getSession().write(MaplePacketCreator.enableCSUse1());
c.getSession().write(MaplePacketCreator.enableCSUse2());
return;
}
}
if (c.getPlayer().getCSPoints(useNX) >= item.getPrice()) {
c.getPlayer().modifyCSPoints(useNX, -item.getPrice());
} else {
//lol we hate you so we disconnect...
c.disconnect();
return;
}
if (item.getId() >= 5000000 && item.getId() <= 5000100) {
int petId = MaplePet.createPet(item.getId());
if (petId == -1) {
return;
}
MapleInventoryManipulator.addById(c, item.getId(), (short) 1, "Cash Item was purchased.", null, petId);
} else {
MapleInventoryManipulator.addById(c, item.getId(), (short) item.getCount(), "Cash Item was purchased.", null, -1);
}
c.getSession().write(MaplePacketCreator.showBoughtCSItem(item.getId()));
c.getSession().write(MaplePacketCreator.showNXMapleTokens(c.getPlayer()));
c.getSession().write(MaplePacketCreator.enableCSorMTS());
c.getSession().write(MaplePacketCreator.enableCSUse1());
c.getSession().write(MaplePacketCreator.enableCSUse2());
c.getSession().write(MaplePacketCreator.enableActions());
} else if (action == 5) {
try {
Connection con = DatabaseConnection.getConnection();
PreparedStatement ps = con.prepareStatement("DELETE FROM wishlist WHERE charid = ?");
ps.setInt(1, c.getPlayer().getId());
ps.executeUpdate();
ps.close();
int i = 10;
while (i > 0) {
int sn = slea.readInt();
if (sn != 0) {
ps = con.prepareStatement("INSERT INTO wishlist(charid, sn) VALUES(?, ?) ");
ps.setInt(1, c.getPlayer().getId());
ps.setInt(2, sn);
ps.executeUpdate();
ps.close();
}
i--;
}
} catch (SQLException se) {
}
c.getSession().write(MaplePacketCreator.updateWishList(c.getPlayer().getId()));
} else if (action == 7) { // Increase slot space
slea.skip(1);
byte toCharge = slea.readByte();
int toIncrease = slea.readInt();
if (c.getPlayer().getCSPoints(toCharge) >= 4000 && c.getPlayer().getStorage().getSlots() < 48) { // 48 is max.
c.getPlayer().modifyCSPoints(toCharge, 4000);
if (toIncrease == 0) { // Increase Storage
c.getPlayer().getStorage().increaseSlots((byte) 4);
}
c.getSession().write(MaplePacketCreator.showNXMapleTokens(c.getPlayer()));
c.getSession().write(MaplePacketCreator.enableCSorMTS());
c.getSession().write(MaplePacketCreator.enableCSUse1());
c.getSession().write(MaplePacketCreator.enableCSUse2());
c.getSession().write(MaplePacketCreator.enableCSUse3());
c.getSession().write(MaplePacketCreator.enableActions());
}
} else if (action == 30) {
int snCS = slea.readInt();
CashItemInfo item = CashItemFactory.getItem(snCS);
if (c.getPlayer().getMeso() >= item.getPrice()) {
c.getPlayer().gainMeso(-item.getPrice(), false);
MapleInventoryManipulator.addById(c, item.getId(), (short) item.getCount(), "Quest Item was purchased.", null, -1);
MapleInventory etcInventory = c.getPlayer().getInventory(MapleInventoryType.ETC);
byte slot = etcInventory.findById(item.getId()).getPosition();
c.getSession().write(MaplePacketCreator.showBoughtCSQuestItem(slot, item.getId()));
} else {
//we hate you so we disconnect..
c.disconnect();
return;
}
c.getSession().write(MaplePacketCreator.showNXMapleTokens(c.getPlayer()));
c.getSession().write(MaplePacketCreator.enableCSorMTS());
c.getSession().write(MaplePacketCreator.enableCSUse1());
c.getSession().write(MaplePacketCreator.enableCSUse2());
return;
}
}
}
I can't work...Plesae tell me what to do
-
Re: [Release] Increase Storage Space from Cash Shop
Quote:
Originally Posted by
b8892778
package net.sf.odinms.net.channel.handler;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import net.sf.odinms.client.*;
import net.sf.odinms.client.messages.ServernoticeMapleClientMessageCallback;
import net.sf.odinms.database.DatabaseConnection;
import net.sf.odinms.net.AbstractMaplePacketHandler;
import net.sf.odinms.server.*;
import net.sf.odinms.tools.MaplePacketCreator;
import net.sf.odinms.tools.data.input.SeekableLittleEndianAccessor;
/**
*
* @author Acrylic (Terry Han)
*/
public class BuyCSItemHandler extends AbstractMaplePacketHandler {
private final static int[] blockedItems = {5000028, 5400000};
@Override
public void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
int action = slea.readByte();
if (action == 3) {
slea.skip(1);
int useNX = slea.readInt();
int snCS = slea.readInt();
CashItemInfo item = CashItemFactory.getItem(snCS);
for (int i = 0; i < blockedItems.length; i++) {
if (item.getId() >= 1812002 && item.getId() <= 1812007 || item.getId() == blockedItems[i]) {
new ServernoticeMapleClientMessageCallback(1, c).dropMessage("[風迷題醒] 此物品不能購買.");
c.getSession().write(MaplePacketCreator.showNXMapleTokens(c.getPlayer()));
c.getSession().write(MaplePacketCreator.enableCSorMTS());
c.getSession().write(MaplePacketCreator.enableCSUse1());
c.getSession().write(MaplePacketCreator.enableCSUse2());
return;
}
}
if (c.getPlayer().getCSPoints(useNX) >= item.getPrice()) {
c.getPlayer().modifyCSPoints(useNX, -item.getPrice());
} else {
//lol we hate you so we disconnect...
c.disconnect();
return;
}
if (item.getId() >= 5000000 && item.getId() <= 5000100) {
int petId = MaplePet.createPet(item.getId());
if (petId == -1) {
return;
}
MapleInventoryManipulator.addById(c, item.getId(), (short) 1, "Cash Item was purchased.", null, petId);
} else {
MapleInventoryManipulator.addById(c, item.getId(), (short) item.getCount(), "Cash Item was purchased.", null, -1);
}
c.getSession().write(MaplePacketCreator.showBoughtCSItem(item.getId()));
c.getSession().write(MaplePacketCreator.showNXMapleTokens(c.getPlayer()));
c.getSession().write(MaplePacketCreator.enableCSorMTS());
c.getSession().write(MaplePacketCreator.enableCSUse1());
c.getSession().write(MaplePacketCreator.enableCSUse2());
c.getSession().write(MaplePacketCreator.enableActions());
} else if (action == 5) {
try {
Connection con = DatabaseConnection.getConnection();
PreparedStatement ps = con.prepareStatement("DELETE FROM wishlist WHERE charid = ?");
ps.setInt(1, c.getPlayer().getId());
ps.executeUpdate();
ps.close();
int i = 10;
while (i > 0) {
int sn = slea.readInt();
if (sn != 0) {
ps = con.prepareStatement("INSERT INTO wishlist(charid, sn) VALUES(?, ?) ");
ps.setInt(1, c.getPlayer().getId());
ps.setInt(2, sn);
ps.executeUpdate();
ps.close();
}
i--;
}
} catch (SQLException se) {
}
c.getSession().write(MaplePacketCreator.updateWishList(c.getPlayer().getId()));
} else if (action == 7) { // Increase slot space
slea.skip(1);
byte toCharge = slea.readByte();
int toIncrease = slea.readInt();
if (c.getPlayer().getCSPoints(toCharge) >= 4000 && c.getPlayer().getStorage().getSlots() < 48) { // 48 is max.
c.getPlayer().modifyCSPoints(toCharge, 4000);
if (toIncrease == 0) { // Increase Storage
c.getPlayer().getStorage().increaseSlots((byte) 4);
}
c.getSession().write(MaplePacketCreator.showNXMapleTokens(c.getPlayer()));
c.getSession().write(MaplePacketCreator.enableCSorMTS());
c.getSession().write(MaplePacketCreator.enableCSUse1());
c.getSession().write(MaplePacketCreator.enableCSUse2());
c.getSession().write(MaplePacketCreator.enableCSUse3());
c.getSession().write(MaplePacketCreator.enableActions());
}
} else if (action == 30) {
int snCS = slea.readInt();
CashItemInfo item = CashItemFactory.getItem(snCS);
if (c.getPlayer().getMeso() >= item.getPrice()) {
c.getPlayer().gainMeso(-item.getPrice(), false);
MapleInventoryManipulator.addById(c, item.getId(), (short) item.getCount(), "Quest Item was purchased.", null, -1);
MapleInventory etcInventory = c.getPlayer().getInventory(MapleInventoryType.ETC);
byte slot = etcInventory.findById(item.getId()).getPosition();
c.getSession().write(MaplePacketCreator.showBoughtCSQuestItem(slot, item.getId()));
} else {
//we hate you so we disconnect..
c.disconnect();
return;
}
c.getSession().write(MaplePacketCreator.showNXMapleTokens(c.getPlayer()));
c.getSession().write(MaplePacketCreator.enableCSorMTS());
c.getSession().write(MaplePacketCreator.enableCSUse1());
c.getSession().write(MaplePacketCreator.enableCSUse2());
return;
}
}
}
I can't work...Plesae tell me what to do
shut ur server down and never come back.
fucking noob i can see the error with out reading the lines ( {} )
-
Re: [Release] Increase Storage Space from Cash Shop
Quote:
Originally Posted by
waltobc6
shut ur server down and never come back.
fucking noob i can see the error with out reading the lines ( {} )
stfu asshole, if you aren't here to help, your not welcome!
-
Re: [Release] Increase Storage Space from Cash Shop
-
Re: [Release] Increase Storage Space from Cash Shop
Hey..i tot xterminator did this??
-
Re: [Release] Increase Storage Space from Cash Shop
Cool! very nice. thx alot!
-
Re: [Release] Increase Storage Space from Cash Shop
Can u make a nooby guide to add this?
-
Re: [Release] Increase Storage Space from Cash Shop
nice realease more storage slots =D
-
Re: [Release] Increase Storage Space from Cash Shop
Quote:
Originally Posted by
EC15
stfu asshole, if you aren't here to help, your not welcome!
This is not the help section or thread so please delete it or deal with an infraction.
-
Re: [Release] Increase Storage Space from Cash Shop
Quote:
Originally Posted by
waltobc6
shut ur server down and never come back.
fucking noob i can see the error with out reading the lines ( {} )
Point it out then, beacuse it's not obvious at all.
I don't get errors when I copy and paste that in.
-
Re: [Release] Increase Storage Space from Cash Shop