Excellzone

Forum and disscussions since 2010


You are not connected. Please login or register

View previous topic View next topic Go down Message [Page 1 of 1]

#1
Excell

avatar
Head Administer
Head Administer
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.



Quote:
In ScrollHandler.java, which is located in
net.sf.odinms.net.channel.handler, find these lines:



<table class="\&quot;quote_global" quote_global-quote\="" width="\&quot;95%\&quot;" cellspacing="\&quot;0\&quot;"> <tr><td class="\&quot;quote_head\&quot;">

</td> </tr> <tr> <td class="\&quot;quote_name\&quot;"> Quote:
</td> </tr> <tr><td class="\&quot;quote_body\&quot;"> if (scroll.getQuantity() <= 0) {
throw new InventoryException(\"<= 0 quantity when scrolling\");
}
</td> </tr> <tr> <td class="\&quot;quote_foot\&quot;">

</td></tr> </table>Below that, add this line:



<table class="\&quot;quote_global" quote_global-quote\="" width="\&quot;95%\&quot;" cellspacing="\&quot;0\&quot;"> <tr><td class="\&quot;quote_head\&quot;">

</td> </tr> <tr> <td class="\&quot;quote_name\&quot;"> Quote:
</td> </tr> <tr><td class="\&quot;quote_body\&quot;"> boolean checkIfGM = c.getPlayer().isGM();
</td> </tr> <tr> <td class="\&quot;quote_foot\&quot;">

</td></tr> </table>---------------------------------------------------------------------------------------------

In the same file, find this line (right below the edit you just made):



<table class="\&quot;quote_global" quote_global-quote\="" width="\&quot;95%\&quot;" cellspacing="\&quot;0\&quot;"> <tr> <td class="\&quot;quote_head\&quot;">

</td></tr> <tr> <td class="\&quot;quote_name\&quot;"> Quote:
</td></tr> <tr> <td class="\&quot;quote_body\&quot;"> IEquip scrolled = (IEquip) ii.scrollEquipWithId(toScroll,
scroll.getItemId(), whiteScroll);
</td> </tr> <tr> <td class="\&quot;quote_foot\&quot;">

</td></tr> </table>Change it to this (the modified part is bolded):



<table class="\&quot;quote_global" quote_global-quote\="" width="\&quot;95%\&quot;" cellspacing="\&quot;0\&quot;"> <tr> <td class="\&quot;quote_head\&quot;">

</td></tr> <tr> <td class="\&quot;quote_name\&quot;"> Quote:
</td></tr> <tr> <td class="\&quot;quote_body\&quot;"> IEquip scrolled = (IEquip) ii.scrollEquipWithId(toScroll,
scroll.getItemId(), whiteScroll, checkIfGM);
</td> </tr> <tr> <td class="\&quot;quote_foot\&quot;">

</td></tr> </table>---------------------------------------------------------------------------------------------

In MapleItemInformationProvider.java, which is located in
net.sf.odinms.server, find this line:


<table class="\&quot;quote_global">
quote_global-quote\" width=\"95%\" cellspacing=\"0\"> <tr> <td class="\&quot;quote_head\&quot;">

</td> </tr> <tr> <td class="\&quot;quote_name\&quot;"> Quote:
</td> </tr> <tr><td class="\&quot;quote_body\&quot;"> public IItem scrollEquipWithId(IItem equip, int scrollId,
boolean usingWhiteScroll) {
</td> </tr> <tr> <td class="\&quot;quote_foot\&quot;">

</td></tr> </table>Change it to this (modified part in bold):



<table class="\&quot;quote_global" quote_global-quote\="" width="\&quot;95%\&quot;" cellspacing="\&quot;0\&quot;"> <tr><td class="\&quot;quote_head\&quot;">

</td> </tr> <tr> <td class="\&quot;quote_name\&quot;"> Quote:
</td> </tr> <tr><td class="\&quot;quote_body\&quot;"> public IItem scrollEquipWithId(IItem equip, int scrollId,
boolean usingWhiteScroll, boolean checkIfGM) {
</td> </tr> <tr> <td class="\&quot;quote_foot\&quot;">

</td></tr> </table>---------------------------------------------------------------------------------------------

Also in MapleItemInformationProvider.java, find this line (a couple of
lines down):



<table class="\&quot;quote_global" quote_global-quote\="" width="\&quot;95%\&quot;" cellspacing="\&quot;0\&quot;"> <tr> <td class="\&quot;quote_head\&quot;">

</td></tr> <tr> <td class="\&quot;quote_name\&quot;"> Quote:
</td></tr> <tr> <td class="\&quot;quote_body\&quot;"> if (nEquip.getUpgradeSlots() > 0 &&
Math.ceil(Math.random() * 100.0) <= stats.get(\"success\")) {
</td> </tr> <tr> <td class="\&quot;quote_foot\&quot;">

</td></tr> </table>Change that to this:



<table class="\&quot;quote_global" quote_global-quote\="" width="\&quot;95%\&quot;" cellspacing="\&quot;0\&quot;"> <tr><td class="\&quot;quote_head\&quot;">

</td> </tr> <tr> <td class="\&quot;quote_name\&quot;"> Quote:
</td> </tr> <tr><td class="\&quot;quote_body\&quot;"> if (nEquip.getUpgradeSlots() > 0 &&
((Math.ceil(Math.random() * 100.0) <= stats.get(\"success\")) ||
(checkIfGM == true))) {
</td> </tr> <tr> <td class="\&quot;quote_foot\&quot;">

</td></tr> </table>---------------------------------------------------------------------------------------------
Last thing, also in MapleItemInformationProvider.java, find this
Find



<table class="\&quot;quote_global" quote_global-quote\="" width="\&quot;95%\&quot;" cellspacing="\&quot;0\&quot;"> <tr> <td class="\&quot;quote_head\&quot;">

</td></tr> <tr> <td class="\&quot;quote_name\&quot;"> Quote:
</td></tr> <tr> <td class="\&quot;quote_body\&quot;"> nEquip.setUpgradeSlots((byte) (nEquip.getUpgradeSlots() -
1));
nEquip.setLevel((byte) (nEquip.getLevel() 1));
</td> </tr> <tr> <td class="\&quot;quote_foot\&quot;">

</td></tr> </table>Replace it with this


<table class="\&quot;quote_global" quote_global-quote\="" width="\&quot;95%\&quot;" cellspacing="\&quot;0\&quot;"> <tr><td class="\&quot;quote_head\&quot;">

</td> </tr> <tr> <td class="\&quot;quote_name\&quot;"> Quote:
</td> </tr> <tr><td class="\&quot;quote_body\&quot;"> if (checkIfGM == false) {
nEquip.setUpgradeSlots((byte) (nEquip.getUpgradeSlots() - 1));
}
nEquip.setLevel((byte) (nEquip.getLevel() 1));
</td></tr></table>

View user profile http://excellzone.mrforum.net

View previous topic View next topic Back to top Message [Page 1 of 1]


Permissions in this forum:
You cannot reply to topics in this forum