- Joined
- Nov 9, 2012
- Messages
- 608
- Reaction score
- 164
Rewrite the code in Ruby, and find a gem for it.
Do I have to learn how to cut precious rock?
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!Rewrite the code in Ruby, and find a gem for it.
Not sure just me or everybody has the same issue, referred from TrollMS (credit to Eric), here's a little fix for Horntail not able to spawn.
First, locate your ReactorManagerAction.java, and add this sentence:
Code:// thanks to eric's trollms source :) public void killMonster(int monsId) { reactor.getMap().killMonster(monsId); }
Then, at your reactor script (2401000.js), add this:
under,Code:rm.killMonster(8810026);
Code:rm.spawnMonster(8810026, 71, 260);
And, voila, it should works!
case 8192: // MP
/*if (APTo != 2048) {
c.announce(MaplePacketCreator.enableActions());
return;
}*/
int mp = player.getMp();
int level = player.getLevel();
MapleJob job = player.getJob();
boolean canWash = true;
if (job.isA(MapleJob.SPEARMAN) && mp < 4 * level + 156) {
canWash = false;
} else if (job.isA(MapleJob.FIGHTER) && mp < 4 * level + 56) {
canWash = false;
} else if (job.isA(MapleJob.THIEF) && job.getId() % 100 > 0 && mp < level * 14 - 4) {
canWash = false;
} else if (mp < level * 14 + 148) {
canWash = false;
}
if (canWash) {
int minmp = 0;
if (job.isA(MapleJob.WARRIOR) || job.isA(MapleJob.DAWNWARRIOR1) || job.isA(MapleJob.ARAN1)) {
minmp += 4;
} else if (job.isA(MapleJob.MAGICIAN) || job.isA(MapleJob.BLAZEWIZARD1)) {
minmp += 36;
} else if (job.isA(MapleJob.BOWMAN) || job.isA(MapleJob.WINDARCHER1) || job.isA(MapleJob.THIEF) || job.isA(MapleJob.NIGHTWALKER1)) {
minmp += 12;
} else if (job.isA(MapleJob.PIRATE) || job.isA(MapleJob.THUNDERBREAKER1)) {
minmp += 16;
} else {
minmp += 8;
}
player.setMp(player.getMp() - minmp);
player.setMaxMp(player.getMaxMp() - minmp);
statupdate.add(new Pair<>(MapleStat.MP, player.getMp()));
statupdate.add(new Pair<>(MapleStat.MAXMP, player.getMaxMp()));
break;
}
default:
c.announce(MaplePacketCreator.updatePlayerStats(MaplePacketCreator.EMPTY_STATUPDATE, true, c.getPlayer()));
return;
}
DistributeAPHandler.addStat(c, APTo);
c.announce(MaplePacketCreator.updatePlayerStats(statupdate, true, c.getPlayer()));
}
remove(c, itemId);
}
Error thrown: PacketHandler/net.server.handlers.login.CharlistRequestHandler.txtjava.lang.NullPointerException at server.MapleItemInformationProvider.canWearEquipment(MapleItemInformationProvider.java:1071) at tools.MaplePacketCreator.addCharEquips(MaplePacketCreator.java:268) at tools.MaplePacketCreator.addCharLook(MaplePacketCreator.java:185) at tools.MaplePacketCreator.addCharEntry(MaplePacketCreator.java:308) at tools.MaplePacketCreator.getCharList(MaplePacketCreator.java:850) at client.MapleClient.sendCharList(MapleClient.java:144) at net.server.handlers.login.CharlistRequestHandler.handlePacket(CharlistRequestHandler.java:36) at net.MapleServerHandler.messageReceived(MapleServerHandler.java:134) at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:690) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417) at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47) at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765) at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:407) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:236) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417) at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47) at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765) at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417) at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:410) at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:710) at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:664) at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:653) at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:67) at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1124) at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
public Collection<Item> canWearEquipment(MapleCharacter chr, Collection<Item> items) { MapleInventory inv = chr.getInventory(MapleInventoryType.EQUIPPED); if (inv.checked()) { return items; } Collection<Item> itemz = new LinkedList<>(); if (chr.getJob() == MapleJob.SUPERGM || chr.getJob() == MapleJob.GM) { for (Item item : items) { Equip equip = (Equip) item; equip.wear(true); itemz.add(item); } return itemz; } boolean highfivestamp = false; /* Removed because players shouldn't even get this, and gm's should just be gm job. try { for (Pair<Item, MapleInventoryType> ii : ItemFactory.INVENTORY.loadItems(chr.getId(), false)) { if (ii.getRight() == MapleInventoryType.CASH) { if (ii.getLeft().getItemId() == 5590000) { highfivestamp = true; } } } } catch (SQLException ex) { }*/ int tdex = chr.getDex(), tstr = chr.getStr(), tint = chr.getInt(), tluk = chr.getLuk(), fame = chr.getFame(); if (chr.getJob() != MapleJob.SUPERGM || chr.getJob() != MapleJob.GM) { for (Item item : inv.list()) { Equip equip = (Equip) item; tdex += equip.getDex(); tstr += equip.getStr(); tluk += equip.getLuk(); tint += equip.getInt(); } } for (Item item : items) { Equip equip = (Equip) item; int reqLevel = getEquipStats(equip.getItemId()).get("reqLevel"); if (highfivestamp) { reqLevel -= 5; if (reqLevel < 0) { reqLevel = 0; } } /* int reqJob = getEquipStats(equip.getItemId()).get("reqJob"); if (reqJob != 0) { Really hard check, and not really needed in this one Gm's should just be GM job, and players cannot change jobs. }*/ if (reqLevel > chr.getLevel()) { continue; } else if (getEquipStats(equip.getItemId()).get("reqDEX") > tdex) { continue; } else if (getEquipStats(equip.getItemId()).get("reqSTR") > tstr) { continue; } else if (getEquipStats(equip.getItemId()).get("reqLUK") > tluk) { continue; } else if (getEquipStats(equip.getItemId()).get("reqINT") > tint) { continue; } int reqPOP = getEquipStats(equip.getItemId()).get("reqPOP"); if (reqPOP > 0) { if (getEquipStats(equip.getItemId()).get("reqPOP") > fame) { continue; } } equip.wear(true); itemz.add(equip); } inv.checked(true); return itemz; }
[COLOR=#666666] public void setMasteries(int jobId) { int[] skills = new int[4];[/COLOR] for (int i = 0; i > skills.length; i++) {
skills[i] = 0; //that initalization meng
}
if (jobId == 112) {
skills[0] = Hero.ACHILLES;
skills[1] = Hero.MONSTER_MAGNET;
skills[2] = Hero.BRANDISH;
} else if (jobId == 122) {
skills[0] = Paladin.ACHILLES;
skills[1] = Paladin.MONSTER_MAGNET;
skills[2] = Paladin.BLAST;
} else if (jobId == 132) {
skills[0] = DarkKnight.BEHOLDER;
skills[1] = DarkKnight.ACHILLES;
skills[2] = DarkKnight.MONSTER_MAGNET;
} else if (jobId == 212) {
skills[0] = FPArchMage.BIG_BANG;
skills[1] = FPArchMage.MANA_REFLECTION;
skills[2] = FPArchMage.PARALYZE;
} else if (jobId == 222) {
skills[0] = ILArchMage.BIG_BANG;
skills[1] = ILArchMage.MANA_REFLECTION;
skills[2] = ILArchMage.CHAIN_LIGHTNING;
} else if (jobId == 232) {
skills[0] = Bishop.BIG_BANG;
skills[1] = Bishop.MANA_REFLECTION;
skills[2] = Bishop.HOLY_SHIELD;
} else if (jobId == 312) {
skills[0] = Bowmaster.BOW_EXPERT;
skills[1] = Bowmaster.HAMSTRING;
skills[2] = Bowmaster.SHARP_EYES;
} else if (jobId == 322) {
skills[0] = Marksman.MARKSMAN_BOOST;
skills[1] = Marksman.BLIND;
skills[2] = Marksman.SHARP_EYES;
} else if (jobId == 412) {
skills[0] = NightLord.SHADOW_STARS;
skills[1] = NightLord.SHADOW_SHIFTER;
skills[2] = NightLord.VENOMOUS_STAR;
} else if (jobId == 422) {
skills[0] = Shadower.SHADOW_SHIFTER;
skills[1] = Shadower.VENOMOUS_STAB;
skills[2] = Shadower.BOOMERANG_STEP;
} else if (jobId == 512) {
skills[0] = Buccaneer.BARRAGE;
skills[1] = Buccaneer.ENERGY_ORB;
skills[2] = Buccaneer.SPEED_INFUSION;
skills[3] = Buccaneer.DRAGON_STRIKE;
} else if (jobId == 522) {
skills[0] = Corsair.ELEMENTAL_BOOST;
skills[1] = Corsair.BULLSEYE;
skills[2] = Corsair.WRATH_OF_THE_OCTOPI;
skills[3] = Corsair.RAPID_FIRE;
} else if (jobId == 2112) {
skills[0] = Aran.OVER_SWING;
skills[1] = Aran.HIGH_MASTERY;
skills[2] = Aran.FREEZE_STANDING;
} else if (jobId == 2217) {
skills[0] = Evan.MAPLE_WARRIOR;
skills[1] = Evan.ILLUSION;
} else if (jobId == 2218) {
skills[0] = Evan.BLESSING_OF_THE_ONYX;
skills[1] = Evan.BLAZE;
}
for (Integer skillId : skills) {
if (skillId != 0) {
Skill skill = SkillFactory.getSkill(skillId);
changeSkillLevel(skill, (byte) 0, 10, -1);
}
}
[COLOR=#666666] }[/COLOR]
Hello everyone,
While I don't like this community very much, I figured I may as well release the source code from the server I was a developer on. The server has since gone offline, and as I have no use for the source any more I figured someone else may get some use out of it.
Twdtwd
im kinda new on this, but seems that every file on the folder "scripts" (event, item, map Etc..) isn't working :/ any lead? im trying it out and everything works kinda fine. Just some issues with the potion shops and events, i can't enter to the 3rd job, and stuff like that.
Need some help please ( im not an advanced user of Java... explain for dumbs please ) :
You must be registered to see links
I mean like, if you'd at least include the line that's actually throwing the exception in your screenshot that'd be helpful for determining what's wrong. It's line 71.
here we go thanks for helping
You must be registered to see links
Yeah alright that just looks like it can't find the scripts. Check the code to see which path it reads and make sure that the path matches the actual location of these scripts.