Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Innocence Scroll Fix for v117

Newbie Spellweaver
Joined
Oct 15, 2014
Messages
25
Reaction score
0
Hi , any kind souls can help me on fixing Innocence scroll on v117 ? Testing MapleCrystal's source at the moment but can't seem to get it working.
( After clicking 'Ok' nothing happens )

------------------------
Also , another small question.
How do people script their NPC such a way that there's a chance for that particular item to fail.
Example > Npc helps players to scroll their item with a custom scroll & it has 20% chance of failure meaning not getting their item back.
 
Last edited:
Skilled Illusionist
Joined
Jul 16, 2010
Messages
318
Reaction score
116
MapleCrystal's source doesn't have it coded, but it'd be trivial to add it.

Here, I came up with this off the top of my head:
PHP:
if (GameConstants.isInnocenceScroll(scrollId.getItemId())) {
    if(Randomizer.nextInt(100) < succ){
        Equip template = (Equip)getEquipById(equip.getItemId());
        nEquip.setStr(template.getStr());
        nEquip.setDex(template.getDex());
        nEquip.setInt(template.getInt());
        nEquip.setLuk(template.getLuk());
        nEquip.setAcc(template.getAcc());
        nEquip.setAvoid(template.getAvoid());
        nEquip.setSpeed(template.getSpeed());
        nEquip.setJump(template.getJump());
        nEquip.setEnhance(template.getEnhance());
        nEquip.setExp(template.getExp());
        nEquip.setItemEXP(template.getItemEXP());
        nEquip.setHp(template.getHp());
        nEquip.setMp(template.getMp());
        nEquip.setLevel(template.getLevel());
        nEquip.setWatk(template.getWatk());
        nEquip.setMatk(template.getMatk());
        nEquip.setWdef(template.getWdef());
        nEquip.setMdef(template.getMdef());
        nEquip.setUpgradeSlots(template.getUpgradeSlots());
        nEquip.setViciousHammer(template.getViciousHammer());
        nEquip.setIncSkill(template.getIncSkill());
    } else {
        if(Randomizer.nextInt(100) < curse){
            return null; //destroyed, nib
        }
    }
 
Upvote 0
Newbie Spellweaver
Joined
Oct 15, 2014
Messages
25
Reaction score
0
I tried adding :
public static boolean isInnocenceScroll(int itemId) { // created by iLikeMe return itemId == 2049604;
}
Under gameconstant & your code under "MapleItemInformationProvider" , under the function named "scrollEquipWithId"

No help at all :/
 
Upvote 0
Newbie Spellweaver
Joined
Oct 15, 2014
Messages
25
Reaction score
0
Still LF>help ~



If innocence scroll can't be fixed , is there any ways to make the NPC refresh their selected item & take away 1 Innocence scroll ?
Like how MSI creates a clone item of what is MSI-ed.
 
Upvote 0
Junior Spellweaver
Joined
Oct 18, 2009
Messages
143
Reaction score
24
Nope, any scroll in the range of 2049600 to 2049699 should be some type of innocence scroll or not a real item there for you check to see if it is in that range.
 
Upvote 0
Newbie Spellweaver
Joined
Oct 15, 2014
Messages
25
Reaction score
0
Can't double confirm something I'm unsure of ?



ReBump.
Still the same even after replacing using avivi's way. Nothing happens after clicking "OK"'

Or is there another way to script a NPC & whereby the NPC takes away & gives another of that certain item but clean one.
 
Upvote 0
Supreme Arcanarch
Joined
Apr 1, 2012
Messages
946
Reaction score
329
Can't double confirm something I'm unsure of ?



ReBump.
Still the same even after replacing using avivi's way. Nothing happens after clicking "OK"'

Or is there another way to script a NPC & whereby the NPC takes away & gives another of that certain item but clean one.

can't double confirm math

you don't send a stat update packet
 
Upvote 0
Experienced Elementalist
Joined
Jan 17, 2012
Messages
256
Reaction score
10
Try this one
PHP:
                        } else if (GameConstants.isInnocenceScroll(scrollId.getItemId())) {
                            if(Randomizer.nextInt(100) < succ){
                                Equip clean = (Equip)getEquipById(equip.getItemId()); 
                                nEquip.setStr(clean.getStr()); 
                                nEquip.setDex(clean.getDex()); 
                                nEquip.setInt(clean.getInt()); 
                                nEquip.setLuk(clean.getLuk()); 
                                nEquip.setAcc(clean.getAcc()); 
                                nEquip.setAvoid(clean.getAvoid()); 
                                nEquip.setSpeed(clean.getSpeed()); 
                                nEquip.setJump(clean.getJump()); 
                                nEquip.setEnhance(clean.getEnhance()); 
                                nEquip.setItemEXP(clean.getItemEXP()); 
                                nEquip.setHp(clean.getHp()); 
                                nEquip.setMp(clean.getMp()); 
                                nEquip.setLevel(clean.getLevel()); 
                                nEquip.setWatk(clean.getWatk()); 
                                nEquip.setMatk(clean.getMatk()); 
                                nEquip.setWdef(clean.getWdef()); 
                                nEquip.setMdef(clean.getMdef()); 
                                nEquip.setUpgradeSlots(clean.getUpgradeSlots()); 
                                nEquip.setViciousHammer(clean.getViciousHammer()); 
                                nEquip.setIncSkill(clean.getIncSkill()); 
                                chr.getClient().getPlayer().forceReAddItem(nEquip, MapleInventoryType.EQUIPPED);
                            } else {
                            if(Randomizer.nextInt(100) < curse){ 
                                  return null; //destroyed, nib 
                            } 
                            }
 
Upvote 0
Back
Top