Hello, I need some help. How or where do I add this line "boolean checkIfGM = c.getPlayer().isGM();" so that all scrolls will work 100% for GM? I can't seem to find the ScrollHandler.java in the Lithium Source. I appreciate your help. Thank you! :D:
Printable View
Hello, I need some help. How or where do I add this line "boolean checkIfGM = c.getPlayer().isGM();" so that all scrolls will work 100% for GM? I can't seem to find the ScrollHandler.java in the Lithium Source. I appreciate your help. Thank you! :D:
scrollEquipWithId
I found it already in InventoryHandler.java as such:
However, I have no idea where to add boolean checkIfGM = c.getPlayer().isGM(); as it is very different from OdinMS. Still very new to java scripting.Quote:
Equip scrolled = (Equip) ii.scrollEquipWithId(toScroll, scroll, whiteScroll, chr, vegas);
ScrollResult scrollSuccess;
if (scrolled == null) {
if (ItemFlag.SHIELD_WARD.check(oldFlag)) {
scrolled = toScroll;
scrollSuccess = Equip.ScrollResult.FAIL;
scrolled.setFlag((short) (oldFlag - ItemFlag.SHIELD_WARD.getValue()));
} else {
scrollSuccess = Equip.ScrollResult.CURSE;
}
} else if ((scroll.getItemId() / 100 == 20497 && scrolled.getState() == 1) || scrolled.getLevel() > oldLevel || scrolled.getEnhance() > oldEnhance || scrolled.getState() > oldState || scrolled.getFlag() > oldFlag) {
scrollSuccess = Equip.ScrollResult.SUCCESS;
} else if ((GameConstants.isCleanSlate(scroll.getItemId()) && scrolled.getUpgradeSlots() > oldSlots)) {
scrollSuccess = Equip.ScrollResult.SUCCESS;
} else {
scrollSuccess = Equip.ScrollResult.FAIL;
}
like I said in the previous post, go to the method scrollEquipWithId