ronancpl / heavenms Goto Github PK
View Code? Open in Web Editor NEWAn improved server based on MapleSolaxia (v83 MapleStory private server)
License: GNU Affero General Public License v3.0
An improved server based on MapleSolaxia (v83 MapleStory private server)
License: GNU Affero General Public License v3.0
`/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy [email protected]
Matthias Butz [email protected]
Jan Christian Meyer [email protected]
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
*/
package net.server.channel.handlers;
import java.awt.Point;
import java.util.ArrayList;
import java.util.List;
import net.AbstractMaplePacketHandler;
import server.maps.AnimatedMapleMapObject;
import server.movement.AbsoluteLifeMovement;
import server.movement.ChangeEquip;
import server.movement.JumpDownMovement;
import server.movement.LifeMovement;
import server.movement.LifeMovementFragment;
import server.movement.RelativeLifeMovement;
import server.movement.TeleportMovement;
import tools.data.input.LittleEndianAccessor;
public abstract class AbstractMovementPacketHandler extends AbstractMaplePacketHandler {
protected List<LifeMovementFragment> parseMovement(LittleEndianAccessor lea) {
List<LifeMovementFragment> res = new ArrayList<>();
byte numCommands = lea.readByte();
for (byte i = 0; i < numCommands; i++) {
byte command = lea.readByte();
switch (command) {
case 0: // normal move
case 5:
case 12:
case 14:
case 35:
case 36:
{
short xpos = lea.readShort();
short ypos = lea.readShort();
short xwobble = lea.readShort();
short ywobble = lea.readShort();
short unk = lea.readShort();
if (command == 12) {
byte newstate = lea.readByte();
short duration = lea.readShort();
AbsoluteLifeMovement alm = new AbsoluteLifeMovement(command, new Point(xpos, ypos), duration, newstate);
alm.setUnk(unk);
alm.setPixelsPerSecond(new Point(xwobble, ywobble));
res.add(alm);
break;
}
}
case 1:
case 2:
case 13: // Shot-jump-back thing
case 16: // Float
case 17:
case 18:
case 19: // Springs on maps
case 20: // Aran Combat Step
case 21:
case 22:
case 23:
case 24:
case 25:
case 26:
case 27:
case 28:
case 29:
case 30:
case 31:
case 32:
case 33:
case 34:
{
short xpos = lea.readShort();
short ypos = lea.readShort();
byte newstate = lea.readByte();
short duration = lea.readShort();
RelativeLifeMovement rlm = new RelativeLifeMovement(command, new Point(xpos, ypos), duration, newstate);
res.add(rlm);
break;
}
case 3:
case 4: // tele... -.-
case 6: // fj
case 7: // assaulter
case 8: // assassinate
case 9: // rush
case 11: //chair
{
short xpos = lea.readShort();
short ypos = lea.readShort();
short xwobble = lea.readShort();
short ywobble = lea.readShort();
byte newstate = lea.readByte();
TeleportMovement tm = new TeleportMovement(command, new Point(xpos, ypos), newstate);
tm.setPixelsPerSecond(new Point(xwobble, ywobble));
res.add(tm);
break;
}
case 10: // Change Equip
res.add(new ChangeEquip(lea.readByte()));
break;
case 15: {
short xpos = lea.readShort();
short ypos = lea.readShort();
short xwobble = lea.readShort();
short ywobble = lea.readShort();
short unk = lea.readShort();
short fh = lea.readShort();
byte newstate = lea.readByte();
short duration = lea.readShort();
JumpDownMovement jdm = new JumpDownMovement(command, new Point(xpos, ypos), duration, newstate);
jdm.setUnk(unk);
jdm.setPixelsPerSecond(new Point(xwobble, ywobble));
jdm.setFH(fh);
res.add(jdm);
break;
}
default:
System.out.println("Unhandled Case:" + command);
return null;
}
}
return res;
}
protected void updatePosition(List<LifeMovementFragment> movement, AnimatedMapleMapObject target, int yoffset) {
for (LifeMovementFragment move : movement) {
if (move instanceof LifeMovement) {
if (move instanceof AbsoluteLifeMovement) {
Point position = ((LifeMovement) move).getPosition();
position.y += yoffset;
target.setPosition(position);
}
target.setStance(((LifeMovement) move).getNewstate());
}
}
}
}
`
AbstractMovementPacketHandler :)
Hi Ronan,
Is there any way that I can contact you for some questions? :)
Also sooner or later, I'll contribute some of my script to you!
Have fun developing!
The stone centipedes do not drop any items. They are supposed to drop a "Diluted" item when killed near a pool of water and drop a "Concentrated" item when killed elsewhere.
http://bbb.hidden-street.net/party-quest/ellin-forest/stage-2
coming from this line
MapleMapObject[] visibleObjectsNow = visibleObjects.toArray(new MapleMapObject[visibleObjects.size()]);
something about nextnode and collections
All: 29 00 00 66 1F 84 D7 C5 FC C6 FE 05 00 EE FC D8 FE 0D 01 0E 01 00 00 06 96 00 00 EE FC D9 FE 86 00 00 00 00 00 06 03 00 00 FC FC D9 FE 05 00 00 00 2F 00 08 B1 00 00 FC FC D9 FE 00 00 00 00 2F 00 08 78 00 00 F9 FC D9 FE AC FF 00 00 2F 00 03 3C 00 11 00 00 00 00 00 00 00 80 08 C5 FC C6 FE FC FC D9 FE
Now: 11 00 00 00 00 00 00 00 80 08 C5 FC C6 FE FC FC D9 FE
java.util.ConcurrentModificationException
at java.util.LinkedHashMap$LinkedHashIterator.nextNode(Unknown Source)
at java.util.LinkedHashMap$LinkedKeyIterator.next(Unknown Source)
at java.util.AbstractCollection.toArray(Unknown Source)
at java.util.Collections$UnmodifiableCollection.toArray(Unknown Source)
at server.maps.MapleMap.movePlayer(MapleMap.java:2420)
at net.server.channel.handlers.MovePlayerHandler.handlePacket(MovePlayerHandler.java:37)
at net.MapleServerHandler.messageReceived(MapleServerHandler.java:139)
any chance of adding this in down the road?
javax.script.ScriptException: TypeError: null has no such function "restartEventTimer" in <eval> at line number 32
at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470)
at jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:392)
at jdk.nashorn.api.scripting.NashornScriptEngine.invokeFunction(NashornScriptEngine.java:190)
at scripting.reactor.ReactorScriptManager.act(ReactorScriptManager.java:74)
at server.maps.MapleReactor.hitReactor(MapleReactor.java:217)
at net.server.channel.handlers.ReactorHitHandler.handlePacket(ReactorHitHandler.java:44)
at net.MapleServerHandler.messageReceived(MapleServerHandler.java:139)
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)
Caused by: <eval>:32 TypeError: null has no such function "restartEventTimer"
at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213)
at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185)
at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:172)
at jdk.nashorn.internal.runtime.linker.NashornBottomLinker.linkNull(NashornBottomLinker.java:180)
at jdk.nashorn.internal.runtime.linker.NashornBottomLinker.getGuardedInvocation(NashornBottomLinker.java:66)
at jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)
at jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:154)
at jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:253)
at jdk.nashorn.internal.scripts.Script$Recompilation$2789$1077$\^eval\_.act(<eval>:32)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
at jdk.nashorn.api.scripting.ScriptObjectMirror.callMember(ScriptObjectMirror.java:199)
at jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:386)
... 26 more
---------------------------------
everything seems fine on dojo but this line is missing
ms.getPlayer().setDojoStart();
seems that everything else is there lol
hi,
the provider that odin used was a bad implementation of wz back in those days of 2008, I would
suggest using the nx file provider or mcdb. the xml uses too much memory.
http://nxformat.github.io/
https://github.com/diamondo25/mcdb-files/tree/master/mcdb-4.3-global-83
you can test xmlwz vs mcdb vs nx, you will noticed that xmlwz uses up alot of memory.
ppl enter painus and when they do entire spawn timer breaks for some reason. no mods where done.
B
https://gyazo.com/a7824d4402067e17405678db602b7b87
gif animation of the bug
thats what my buddy see's he says its from archers only
i noticed once that one snail got stunned he couldnt kill anything after that
no mods were done in src to trigger this
How about, I can help you in some simple things clear if you can?
Like, what's up in Ragezone to add as a console?
the bowman error u saw in gif was cuz it was critical damages
so yea thats the bug and in rev 100 we didnt see crits and in rev 101 we saw 3rd party crits some how
EDIT:
you have bugged text inside the protected AttackInfo parseDamage
i delete ALL the anti hack stuff and crits work fine now
cant tell if it was a hacker on server using illegal rings or what not but i do have item level up enabled and i have spingleman rings dropping from mobs.
All: 05 00 02 00 00 49 8C 86 8F
Now: 49 8C 86 8F
java.lang.NullPointerException
at tools.MaplePacketCreator.addCharStats(MaplePacketCreator.java:144)
at tools.MaplePacketCreator.addCharEntry(MaplePacketCreator.java:318)
at tools.MaplePacketCreator.getCharList(MaplePacketCreator.java:866)
at client.MapleClient.sendCharList(MapleClient.java:155)
at net.server.handlers.login.CharlistRequestHandler.handlePacket(CharlistRequestHandler.java:36)
at net.MapleServerHandler.messageReceived(MapleServerHandler.java:139)
any kind of event such as a boat or PQ, after u leave them theres extremely slow map transitions when changing maps
when too many items spawn on a map all players dc instantly. ETC around like 100 - 200 items on ground
Hello friend , i think you forgot call setMap when you disconnect in PQ .
in ur newest reactor update u need to put it like this for it to work else server errors like no other
myReactor.setName(MapleDataTool.getString(reactor.getChildByPath("name"), ""));
myReactor.resetReactorActions();
using item gain exp, even inside an NPC if u gain too much exp even targeted on a single char, itll overload all other clients in the map and dc them. not you tho. i think its from packet overflow issue.
it seems changing the method to this works
public void forceUpdateItem(Item item) {
final List<ModifyInventory> mods = new LinkedList<>();
mods.add(new ModifyInventory(3, item));
mods.add(new ModifyInventory(0, item));
this.client.announce(MaplePacketCreator.modifyInventory(true, mods));
}
this.client.announce(MaplePacketCreator.modifyInventory(true, mods)); was changed added this.
Fechado.
4th Job Advancement quest not working
java.lang.NullPointerException
at provider.MapleDataTool.getIntConvert(MapleDataTool.java:101)
at server.MapleItemInformationProvider.isConsumeOnPickup(MapleItemInformationProvider.java:1080)
at client.MapleCharacter.pickupItem(MapleCharacter.java:1417)
at client.MapleCharacter.pickupItem(MapleCharacter.java:1398)
at client.command.Commands.executePlayerCommand(Commands.java:698)
at net.server.channel.handlers.GeneralChatHandler.handlePacket(GeneralChatHandler.java:53)
at net.MapleServerHandler.messageReceived(MapleServerHandler.java:139)
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)
Hello friend, boss or sir.... how can i fix monster despawn. When me and my friends killing monster, after awhile monster freeze and just stuck? They give exp and drops. But monster then freeze. Unless u do a relog everytime to fix and then it keep happening? Freeze. Please help and show how i can fix this matter thanks man
Fechado.
ive had a player on my server report to me about archers not doing damage with all skills.
he told me that it sometimes does damage and sometimes it does nothing to mobs.
the server console has shown no errors on this glitch
https://cdn.discordapp.com/attachments/316844071224213504/345803609486655488/unknown.png
if u wanna sit and talk and i can explain how to install this system. it works 100% for me weve been using it for few weeks now
players in party dc randomly when attacking bosses, server throws no error relating to why it happens
i applied this npc code to enter cash shop
NPCScriptManager.getInstance().start(c, 9000030, null);
the npc is direct clone of a fairy nearby, i talk to fairy fine over and over no issues
but for some reason when i click on cash shop button to open npc then click END CHAT
player is locked until @dispose
For some of the NPC's (Steward Command NPC and LudiPQ Blue Balloon) I get errors such as;
"Cannot call method "split" of null " - Blue Balloon in LudiPQ
i have no clue why but whenever i use this ANYWHERE targeted for 1 char aka killer
attacker.increaseEquipExp((getStats().getLevel() / 10) + 1);
everyone dcs on map when using skills like genesis that do mass kills but system works perfectly fine when killing under 8 targets, only dcs when genesis hits over 8 targets
i have NO clue how or why this is happening
I seem to be having troubles with the new layout of commands. Characters at level 0 cant use any commands but when set to level 1, they can use the player commands and not the regular commands. When they are set to level 2 they cant use any commands at all ?_?
Fechado
dunno whats up but going into 2nd job map, one where u get the marbles, breaks server wide respawn timers
the cranes doesnt teleport players to orbis
this code needs to be added to npc ID: 2090005
} else if(status == 2) { //under
if(slct == 1) {
if(cm.getMeso() < cost[1]) {
cm.sendNext("Are you sure you have enough mesos?");
cm.dispose();
} else {
cm.gainMeso(-cost[1]);
cm.warp(200000100);
cm.dispose();
}
}
some of quests in tot cant be completed.... ppl keep whining about it to me lol on my server
MaplePacketCreator.modifyInventory(true, mods)
when its ran more than 16 times at once it dcs everyone on map but person gaining the exp/levels on items
genesis skill dcs everyone on map.
when a buddy on his corsair used battleship he crashed instantly
i traced error back to List getEligibleParty
if you try to go in portal at after killing pianus server throws tons of errors, dont know how to go about fixin the portal cuz theres soo many clone maps lol
not able to import new SQL files from rev100
works fine from last version however
something with TEMP DATA
replace
fr = new FileReader(scriptFile);
with
fr = new FileReader(scriptFile);
portal.eval("load('nashorn:mozilla_compat.js');");
i dont use gith enough to make pull fix things so this is to help u ronan
reason i posted this is for use custom modders, we can have unlimited access to any part of the src from map scripts without having to make useless addons lol
The function restartEventTimer is missing.
it's the script problem?
logs.zip
instead of using random spawn point for normal jumping we do this instead
this is built where if theres no portals on a map, itll revert to random spawn portal.
this fixes issues with mystic doors and FM market where u spawn at the main portal instead of a random portal lol
public void changeMap(int map) {
MapleMap warpMap;
if (getEventInstance() != null) {
warpMap = getEventInstance().getMapInstance(map);
} else {
warpMap = client.getChannelServer().getMapFactory().getMap(map);
}
if (warpMap.getPortals() == null) {
changeMap(warpMap, warpMap.getRandomPlayerSpawnpoint());
} else {
changeMap(warpMap, warpMap.getPortal(0));
}
}
public static byte[] petStatUpdate(MapleCharacter chr) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.STAT_CHANGED.getValue());
int mask = 0;
mask |= MapleStat.PET.getValue();
mplew.write(0);
mplew.writeInt(mask);
MaplePet[] pets = chr.getPets();
for (int i = 0; i < 3; i++) {
if (pets[i] != null) {
mplew.writeInt(pets[i].getUniqueId());
mplew.writeInt(0);
} else {
mplew.writeLong(0);
}
}
mplew.write(0);
return mplew.getPacket();
}
be shifted to updatePlayerStats Example ....
} else if (statupdate.getLeft().getValue() == 0x08) { // Pet
mplew.writeLong(statupdate.getRight().longValue());
}
+1: everyone is doing it wrong man.
The players on my server have run in to a guild issue where, if a regular player joins a guild, sometimes their displayed level in the guild isn't the same as their actual current level. It seems to display the level that the character was when the server first opened (if they levelled up after the server opened and before they joined the guild).
If the player joined the guild before levelling up, the correct level seems to be displayed and the levelup messages are also displayed. No idea what could be causing this... x_x
Hello, Do you have a discord? If so whats your name and #. Great job on the updates!
PS: Your Boss Rush PQ doesn't read party leader correctly it just says "make sure your party leader talked with me"
EDIT: Your new horntail thing is broken as well. Not sure if its your isLeader method but it is broke.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.