I was at cold sharks for a total of 8-9 hours in the past two days and i found 7 books and none of them worked so I'm starting to suspect either i am bugged or the book itself is. I asked the GM rain to check but there were some difficulties which im not at liberty to go in depth about. (considering i know next to nothing about being a gm) i just want to know.. if i could get some help here? maybe even some sympathy. i never in the history of this game have failed that many 70% books in a row. thank you.
I have tested this on a new character level 130, without GM status and got the book to work 5 out of 6 times. (kept changing the skill mastery level back down via the database). It's pretty impossible that your character could be bugged. I think you are just very unlucky =/
Here is the skillbook handler script which you can examine if you like: Code: public SkillBookHandler() { } public void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) { if (!c.getPlayer().isAlive()) { c.getSession().write(MaplePacketCreator.enableActions()); return; } slea.readInt(); byte slot = (byte) slea.readShort(); int itemId = slea.readInt(); MapleCharacter player = c.getPlayer(); IItem toUse = c.getPlayer().getInventory(MapleInventoryType.USE).getItem(slot); if (toUse != null && toUse.getQuantity() == 1) { if (toUse.getItemId() != itemId) { return; } MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance(); Map<String, Integer> skilldata = ii.getSkillStats(toUse.getItemId(), c.getPlayer().getJob().getId()); boolean canuse = false; boolean success = false; int skill = 0; int maxlevel = 0; if (skilldata == null) { // Hacking or used an unknown item return; } if (skilldata.get("skillid") == 0) { // Wrong Job canuse = false; } else if (player.getMasterLevel(SkillFactory.getSkill(skilldata.get("skillid"))) >= skilldata.get("reqSkillLevel") || skilldata.get("reqSkillLevel") == 0) { canuse = true; int random = (int) Math.floor(Math.random() * 100) + 1; if (random <= skilldata.get("success") && skilldata.get("success") != 0) { success = true; ISkill skill2 = SkillFactory.getSkill(skilldata.get("skillid")); int curlevel = player.getSkillLevel(skill2); player.changeSkillLevel(skill2, curlevel, skilldata.get("masterLevel")); MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.USE, slot, (short) 1, false); } else { success = false; MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.USE, slot, (short) 1, false); } } else { // Failed to meet skill requirements canuse = false; } player.getClient().getSession().write(MaplePacketCreator.skillBookSuccess(player, skill, maxlevel, canuse, success)); } else { return; } } } So basically it chooses a random number between 0 and 100, if the chosen number is less than or equal to the success % (which would be 70), then continue the script and apply the mastery increase. It gets the skill data from the wz xml files on the data by using this script in skillfactory: Code: public static ISkill getSkill(int id) { ISkill ret = skills.get(Integer.valueOf(id)); if (ret != null) { return ret; } synchronized (skills) { // see if someone else that's also synchronized has loaded the skill by now ret = skills.get(Integer.valueOf(id)); if (ret == null) { int job = id / 10000; MapleData skillroot = datasource.getData(StringUtil.getLeftPaddedStr(String.valueOf(job), '0', 3) + ".img"); MapleData skillData = skillroot.getChildByPath("skill/" + StringUtil.getLeftPaddedStr(String.valueOf(id), '0', 7)); if (skillData != null) { ret = Skill.loadFromData(id, skillData); } skills.put(Integer.valueOf(id), ret); } return ret; } }
I appreciate going this far to find that there's nothing wrong. I once had extremely bad luck with chaos scrolls, there was actually a 0,0002% of possibility of getting such bad results out of so many scrolls, so I became super superstitious about chaos. I asked it a few times and didn't get any response, I just kept on still forcing through with chaos and eventually after using 100'ish chaos I started getting some results again. This all in a 1x rated server. Would have really helped to get a response, it was quite hard to keep on going!
Mhmmm in my opinion I don't think people should base their luck on having failed or succeeded so many scrolls/books in a row. It's a certain chance on each attempt, having failed so many in a row doesn't mean you are more likely to pass the next one. For chaos scrolls for example, it's pretty much a 50/50 chance. And it's very possible to fail or pass 20+ in a row. I know you probably know this and feel the same way but just putting this out there.
The superstition just grows slowly bigger and bigger if you aren't certain of the function working correctly. The thought is like a seed that grows every time a failure simulates the thought, and after a certain point, you get succumbed by the thought. Walking down a dark alley, is there someone behind you? Same thing.