This is somewhat-tested, so if there is a problem, let me know.
It's four simple modifications that will make it so all scrolls, no matter what %, will work all the time for GM's. I did this because scrolling godly items that there aren't GM scrolls for (eg. Earring Int) was a pain in the ass.
I realize this is a very simple edit, but I consider it a useful one and unexperienced server hosts might not know how to do this without help.
So anyways,
---------------------------------------------------------------------------------------------
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());
---------------------------------------------------------------------------------------------IEquip scrolled = (IEquip) ii.scrollEquipWithId(toScroll, scroll.getItemId(), 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) {
---------------------------------------------------------------------------------------------public IItem scrollEquipWithId(IItem equip, int scrollId, 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))) {
That should do it. Like I said, if there is an error somewhere, please let me know.
To get it to work with SeanPack and other newer repacks:
http://forum.ragezone.com/showpost.p...4&postcount=42
(thanks the3l0b)



Reply With Quote![[Release] All scrolls work for GM's (OdinMS)](http://ragezone.com/hyper728.png)


