• Scheduled Server Maintenance | Friday 7 November

    Our hardware provider has scheduled RAM maintenance to address the recent server instability. Work is expected by 17:00 Central European time.

    Brief downtime or interruptions may occur while the faulty memory modules are replaced. We apologise for the recent disruption and appreciate your patience.


    Special thanks to our sponsor, HyperFilter!

    We keep our community safe. They keep our servers safe. Running your own game servers? Keep them protected with HyperFilter.

Anti-packet database

Do you have a fix for that double clicking NPC = dc thing? :D
Would love if you had that :D

MapleCharacter.java
Add
Code:
    private long lastNPCTalk;

    public long getLastNPCTalk() {
        return lastNPCTalk;
    }

    public void setLastNPCTalk() {
        lastNPCTalk = System.currentTimeMillis();
    }

NPCTalkHandler.java
Add
Code:
        if (c.getPlayer().getLastNPCTalk() > System.currentTimeMillis() - 500)
            return;
        else
            c.getPlayer().setLastNPCTalk();
Under
Code:
MapleMapObject obj = c.getPlayer().getMap().getMapObject(oid);

You can change the delay of 500 milli seconds if you feel like but it seems to be fine.
 
Last edited:
MapleCharacter.java
Add
Code:
    private long lastNPCTalk;

    public long getLastNPCTalk() {
        return lastNPCTalk;
    }

    public void setLastNPCTalk() {
        lastNPCTalk = System.currentTimeMillis();
    }

NPCTalkHandler.java
Add
Code:
        if (c.getPlayer().getLastNPCTalk() > System.currentTimeMillis() - 500)
            return;
        else
            c.getPlayer().setLastNPCTalk();
Under
Code:
MapleMapObject obj = c.getPlayer().getMap().getMapObject(oid);

You can change the delay of 500 milli seconds if you feel like but it seems to be fine.

Why not just a public long lastNPCTalk =0; or even the same latestUse I use in every spam patch?
Oh and i'm not sure weither that would fix it as I don't know what the actual caus eof the dc is.
Personally I didn't have any problems with npc's but if anyone could give me the packets that were sent at the point of dc'ing, I would be able to have a closer look. for now imma just assume flav's fix work.

Nice Deagan. Hopefully it'll kill most packet editors.

^^

Oh btw blue gave me that one packet.

Code:
if (name.equals("FuckTheAdmin")) { //hurhur =D
            c.getPlayer().ban("Autoban for Pat. fucktheadmin?", true);
}
 
Last edited:
Why not just a public long lastNPCTalk =0; or even the same latestUse I use in every spam patch?
Oh and i'm not sure weither that would fix it as I don't know what the actual caus eof the dc is.
Personally I didn't have any problems with npc's but if anyone could give me the packets that were sent at the point of dc'ing, I would be able to have a closer look. for now imma just assume flav's fix work.



Oh btw blue gave me that one packet.

Code:
if (name.equals("FuckTheAdmin")) { //hurhur =D
            c.getPlayer().ban("Autoban for Pat. fucktheadmin?", true);
}

Flav's fix works fine, if you know what privates and publics are.
 
I never said it didn't. I just asked why he went for the private and then made it public with that function.

Because it increases flexibility, maintainability, understandability and it's conventional. Yes making public variables could be easier for you, but it'd be harder for people, who follow your footsteps, to understand what you're trying to achieve.
 
Because it increases flexibility, maintainability, understandability and it's conventional. Yes making public variables could be easier for you, but it'd be harder for people, who follow your footsteps, to understand what you're trying to achieve.

I see, let me make some edits in my own source, loool.
 
Back