- Joined
- Jun 22, 2008
- Messages
- 36
- Reaction score
- 0
I've seen a few people asking for this, so I'll post it again. It makes it so that when GM's scroll, it always works and doesn't take slots.
In ScrollHandler.java, which is located in net.sf.odinms.net.channel.handler, find these lines:
Below that, add this line:if (scroll.getQuantity() <= 0) {
throw new InventoryException("<= 0 quantity when scrolling");
}
---------------------------------------------------------------------------------------------boolean checkIfGM = c.getPlayer().isGM();
In the same file, find this line (right below the edit you just made):
Change it to this (the modified part is bolded):IEquip scrolled = (IEquip) ii.scrollEquipWithId(toScroll, scroll.getItemId(), whiteScroll);
---------------------------------------------------------------------------------------------IEquip scrolled = (IEquip) ii.scrollEquipWithId(toScroll, scroll.getItemId(), whiteScroll, checkIfGM);
In MapleItemInformationProvider.java, which is located in net.sf.odinms.server, find this line:
Change it to this (modified part in bold):public IItem scrollEquipWithId(IItem equip, int scrollId, boolean usingWhiteScroll) {
---------------------------------------------------------------------------------------------public IItem scrollEquipWithId(IItem equip, int scrollId, boolean usingWhiteScroll, boolean checkIfGM) {
Also in MapleItemInformationProvider.java, find this line (a couple of lines down):
Change that to this:if (nEquip.getUpgradeSlots() > 0 && Math.ceil(Math.random() * 100.0) <= stats.get("success")) {
---------------------------------------------------------------------------------------------if (nEquip.getUpgradeSlots() > 0 && ((Math.ceil(Math.random() * 100.0) <= stats.get("success")) || (checkIfGM == true))) {
Last thing, also in MapleItemInformationProvider.java, find this
Find
nEquip.setUpgradeSlots((byte) (nEquip.getUpgradeSlots() - 1));
nEquip.setLevel((byte) (nEquip.getLevel() + 1));
Replace it with this
if (checkIfGM == false) {
nEquip.setUpgradeSlots((byte) (nEquip.getUpgradeSlots() - 1));
}
nEquip.setLevel((byte) (nEquip.getLevel() + 1));
Credits to Sathon for the thing I based this on:
http://forum.ragezone.com/showthread.php?t=407179
Hopefully, someone notices that lovely link in my sig![]()