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!

v83 OpenPortal

RaGEZONE VIP
[VIP] Member
Joined
Aug 3, 2008
Messages
172
Reaction score
26
Hey everyone -

Trying to get the openPortal command to work, particularly in the Fitness Waiting Room map (109040000):

OpenPortalCommand:
PHP:
public class OpenPortalCommand extends Command {
    {
        setDescription("");
    }

    @Override
    public void execute(MapleClient c, String[] params) {
        MapleCharacter player = c.getPlayer();
        if (params.length < 1) {
            player.yellowMessage("Syntax: !openportal <portalid>");
            return;
        }
        player.getMap().getPortal(params[0]).setPortalState(true);
    }
}

After finding the correct portal ID via !debug portal (23), then doing !openportal 23 I get the following error:

Z41N - v83 OpenPortal - RaGEZONE Forums


Here's the exact error log:
PHP:
Error for player ; XXXX on map ; 109040000 - account ; YYYY
All: 31 00 0E 00 21 6F 70 65 6E 70 6F 72 74 61 6C 20 32 38 00
Now: 00
java.lang.NullPointerException
	at client.command.commands.gm3.OpenPortalCommand.execute(OpenPortalCommand.java:42)
	at client.command.CommandsExecutor.handleInternal(CommandsExecutor.java:133)
	at client.command.CommandsExecutor.handle(CommandsExecutor.java:93)
	at net.server.channel.handlers.GeneralChatHandler.handlePacket(GeneralChatHandler.java:52)
	at net.MapleServerHandler.messageReceived(MapleServerHandler.java:197)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:997)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:641)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1114)
	at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:437)
	at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:256)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:641)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1114)
	at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:121)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:641)
	at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:634)
	at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:539)
	at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$1200(AbstractPollingIoProcessor.java:68)
	at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.process(AbstractPollingIoProcessor.java:1242)
	at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.process(AbstractPollingIoProcessor.java:1231)
	at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:683)
	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)

I thought maybe it was because I'm stating params[0] as the parameter instead of params[1], but that doesn't work (just how the commands are setup).

I'd like some help at being able to troubleshoot this.
I see jthere's obviously a NullPointerException at the command, but then is it the same error for all the lines below it? If so, what exactly does a NPE require me to do?

Thanks in advance
 
Last edited:
Newbie Spellweaver
Joined
May 26, 2013
Messages
35
Reaction score
1
For one, the portal name on the Fitness Test Waiting room is "join00" also, in the command change:

player.getMap().getPortal(params[0]).setPortalState(true);
to
player.getMap().getPortal(params[0]).setPortalStatus(true);

There you go.
 
Upvote 0
RaGEZONE VIP
[VIP] Member
Joined
Aug 3, 2008
Messages
172
Reaction score
26
For one, the portal name on the Fitness Test Waiting room is "join00" also, in the command change:

player.getMap().getPortal(params[0]).setPortalState(true);
to
player.getMap().getPortal(params[0]).setPortalStatus(true);

There you go.

Thanks for the reply.
This works!

How did you know to change the state to status? I'd like to avoid wasting people's time haha
Thanks again
 
Upvote 0
Newbie Spellweaver
Joined
May 26, 2013
Messages
35
Reaction score
1
I've been messing around with HeavenMS source so I already had the source handy. When I saw your issue, I looked at the methods in MaplePortal.java. Really just went from there. Also, checked out your server but had to cut it short, might hop on more times just to see the progress. Wish you luck.
 
Upvote 0
RaGEZONE VIP
[VIP] Member
Joined
Aug 3, 2008
Messages
172
Reaction score
26
I've been messing around with HeavenMS source so I already had the source handy. When I saw your issue, I looked at the methods in MaplePortal.java. Really just went from there. Also, checked out your server but had to cut it short, might hop on more times just to see the progress. Wish you luck.

I appreciate that, thanks. Be well
 
Upvote 0
Back
Top