[Fix] No more cm.dispose();

Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    Ooo, shiny! FateJiki is offline
    MemberRank
    Feb 2008 Join Date
    1,057Posts

    [Fix] No more cm.dispose();

    I coded this a few months ago and I decided to release a fix to completely obliterate cm.dispose() problems.

    Put this in NPCTalkHandler under "int oid = slea.readInt();"

    PHP Code:
            if(NPCScriptManager.getInstance().getCM(c) != null){
            
    dispose(c);
            } 
    Here's the dispose method:
    PHP Code:
        public void dispose(MapleClient c){
            
    c.announce(MaplePacketCreator.enableActions());
            
    NPCScriptManager.getInstance().getCM(c).dispose();
        } 
    If you decide to migrate this release anywhere else, please provide credits. If you don't, then you're a poopoo head.









  2. #2
    Alpha Member Soulfist is offline
    MemberRank
    Dec 2010 Join Date
    a hovelLocation
    1,835Posts

    Re: [Fix] No more cm.dispose();

    Nice job Mr.Jikian, but I'm not really sure what you are trying to accomplish with this. Are you changing the dispose method? Are you making it so it automatically disposes?

    If its #2 then I really like this :).

  3. #3
    may web.very maple.pls. iAkira is offline
    MemberRank
    Aug 2009 Join Date
    somewhere..Location
    2,378Posts

    Re: [Fix] No more cm.dispose();

    If it's the second option then I'll love you
    Posted via Mobile Device

    ---------- Post added at 02:51 AM ---------- Previous post was at 02:49 AM ----------

    Sorry on double post but before I had something similar to this and it caused some errors on npcs
    Posted via Mobile Device

  4. #4
    Account Upgraded | Title Enabled! hindie is offline
    MemberRank
    Jun 2010 Join Date
    253Posts

    Re: [Fix] No more cm.dispose();

    I believed I was the first to release something similar to this on my old account( shall not mention who) :D
    Last edited by hindie; 24-04-11 at 05:06 AM.

  5. #5
    Alpha Member Soulfist is offline
    MemberRank
    Dec 2010 Join Date
    a hovelLocation
    1,835Posts

    Re: [Fix] No more cm.dispose();

    Quote Originally Posted by iAkira View Post
    If it's the second option then I'll love you
    Posted via Mobile Device

    ---------- Post added at 02:51 AM ---------- Previous post was at 02:49 AM ----------

    Sorry on double post but before I had something similar to this and it caused some errors on npcs
    Posted via Mobile Device
    Hey hey hey, Don't steal my line mofo

  6. #6
    Ooo, shiny! FateJiki is offline
    MemberRank
    Feb 2008 Join Date
    1,057Posts

    Re: [Fix] No more cm.dispose();

    What this does, is that before the NPC is launched, it checks if your session is already talking to an NPC. If it is, then it 'auto-disposes' you, then launches the NPC.


    So yes, it's the second option!

  7. #7
    Gamma Sparrow is offline
    MemberRank
    Mar 2009 Join Date
    SydneyLocation
    2,960Posts

    Re: [Fix] No more cm.dispose();

    Quote Originally Posted by FateJiki View Post
    What this does, is that before the NPC is launched, it checks if your session is already talking to an NPC. If it is, then it 'auto-disposes' you, then launches the NPC.


    So yes, it's the second option!
    I don't see how that needed to be explained, but yes, thanks alot! :)

  8. #8
    Account Upgraded | Title Enabled! AuroX is offline
    MemberRank
    Sep 2008 Join Date
    1,431Posts

    Re: [Fix] No more cm.dispose();

    The way you put the title -> No more cm.dispose() make makes everyone think that you do not need the cm.dispose() for the NPC. This is just a temporary fix, but you still need the cm.dispose() for your NPC. If you didn't do so, your NPC will keep on talking till the last time of the code. Means you won't be able to have different status.

  9. #9
    Alpha Member Soulfist is offline
    MemberRank
    Dec 2010 Join Date
    a hovelLocation
    1,835Posts

    Re: [Fix] No more cm.dispose();

    Quote Originally Posted by FateJiki View Post
    What this does, is that before the NPC is launched, it checks if your session is already talking to an NPC. If it is, then it 'auto-disposes' you, then launches the NPC.


    So yes, it's the second option!
    I love you

  10. #10
    Account Upgraded | Title Enabled! Expedia is offline
    MemberRank
    Nov 2009 Join Date
    884Posts

    Re: [Fix] No more cm.dispose();

    I've seriously never had this npc dispose problem, unless it was like a super crappy script. But nice job anyways :P

  11. #11
    Alpha Member Soulfist is offline
    MemberRank
    Dec 2010 Join Date
    a hovelLocation
    1,835Posts

    Re: [Fix] No more cm.dispose();

    Quote Originally Posted by Expedia View Post
    I've seriously never had this npc dispose problem, unless it was like a super crappy script. But nice job anyways :P
    No no Kevin you don't understand. Yes teh crappy scripts cause problems, but thats not the point. This makes it unnecessary to even use dispose, shortening scripts and removing problems

  12. #12
    Interesting... SharpAceX is offline
    MemberRank
    Oct 2008 Join Date
    2,011Posts

    Re: [Fix] No more cm.dispose();

    I'm pretty sure that even with this fix you can't go around removing all the cm.dispose()'s from your NPC scripts.

    The REAL fix is to just learn to code proper NPC scripts.

  13. #13
    Alpha Member Soulfist is offline
    MemberRank
    Dec 2010 Join Date
    a hovelLocation
    1,835Posts

    Re: [Fix] No more cm.dispose();

    Quote Originally Posted by BloodAngel13 View Post
    I'm pretty sure that even with this fix you can't go around removing all the cm.dispose()'s from your NPC scripts.

    The REAL fix is to just learn to code proper NPC scripts.
    You actually can remove all the cm.dispose()'s from your scripts.

    The REAL fix will never happen. People will always make the same mistakes.

  14. #14
    Computer Science Student Vintage is offline
    MemberRank
    Mar 2008 Join Date
    286Posts

    Re: [Fix] No more cm.dispose();

    oh ragezone...
    I was wondering how I could do this, nice

  15. #15
    :) iJFAC is offline
    MemberRank
    Sep 2007 Join Date
    SomewhereLocation
    519Posts

    Re: [Fix] No more cm.dispose();

    Good job man :)... awesome fix



Page 1 of 2 12 LastLast

Advertisement