GM Buffs Fix For AstralMS Based..

Page 1 of 2 12 LastLast
Results 1 to 25 of 27
  1. #1
    Account Upgraded | Title Enabled! ExtremeDevilz is offline
    MemberRank
    Apr 2008 Join Date
    647Posts

    GM Buffs Fix For AstralMS Based..

    Code:
    package server.buffs.buffclasses.gamemaster;
    
    
    import client.MapleBuffStat;
    import constants.GameConstants;
    import server.MapleStatEffect;
    import server.MapleStatInfo;
    import server.buffs.AbstractBuffClass;
    
    
    /**
    *
    * @author ExtremeDevilz
    */
    
    
    public class GameMasterBuff extends AbstractBuffClass  {
        
        public GameMasterBuff() {
            buffs = new int [] {
                    9001000, // GM Haste (Normal)
                    9001001, // GM Super Dragon Roar
                    9001002, // GM Teleport
                    9001003, // GM Bless
                    9001005, // GM resurrection
                    9001008, // GM Hyper body
                    
                        9101000, // GM Heal + Dispel
                                    9101001, // GM Haste (Super)
                                    9101002, // GM Holy Symbol
                                    9101003, // GM Bless
                                    9101004, // GM Hide
                                    9101005, // GM Resurrection
                                    9101008  // GM Hyper Body
                    
            };
        }
        
     @Override
        public boolean containsJob(int job) {
            return GameConstants.isAdventurer(job) && job / 100 == 9;
        }
    
    
     @Override
        public void handleBuff(MapleStatEffect eff, int skill) {
            
            switch(skill) {
                case 9101000:
                    break;
                case 9001000:
                case 9101001: // Super GM Haste
                    eff.statups.put(MapleBuffStat.JUMP, eff.info.get(MapleStatInfo.jump));
                                    eff.statups.put(MapleBuffStat.SPEED, eff.info.get(MapleStatInfo.speed));
                                    break;            
                case 9101002:
                    eff.statups.put(MapleBuffStat.HOLY_SYMBOL, eff.info.get(MapleStatInfo.x));
                    break;
                case 9001003:
                case 9101003:
                    eff.statups.put(MapleBuffStat.BLESS, eff.info.get(MapleStatInfo.x));
                    break;
                case 9001004:
                case 9101004:
                    eff.info.put(MapleStatInfo.time, 30000); // 30 Seconds
                    eff.statups.put(MapleBuffStat.DARKSIGHT, eff.info.get(MapleStatInfo.x));
                    break;
                case 9001005:
                case 9101005:
                    break;
                case 9001008:
                case 9101008:
                    eff.statups.put(MapleBuffStat.MAXHP, eff.info.get(MapleStatInfo.x));
                    eff.statups.put(MapleBuffStat.MAXMP, eff.info.get(MapleStatInfo.x));
                                    break;                  
                    default:
                               System.out.println("GM skill not coded: " + skill);
                               break;
            }
        }
    }
    Last edited by ExtremeDevilz; 06-01-14 at 04:48 PM. Reason: Correction/Identation


  2. #2
    Omega sunnyboy is offline
    MemberRank
    Mar 2010 Join Date
    6,108Posts

    Re: GM Buffs Fix For AstralMS Based..

    You don't deserve @author credits, you did not make this structure, with all your big talk about how good you are, make ur own source don't use a leaked one


    EDIT:

    lmao, you could of just put the 1 fucking buff in maplestateffect, why the hell are you making one whole new file for 1 single buff?? more characters good for u?? yummy??

  3. #3
    Account Upgraded | Title Enabled! ExtremeDevilz is offline
    MemberRank
    Apr 2008 Join Date
    647Posts

    Re: GM Buffs Fix For AstralMS Based..

    nah I could not care less what others said anymore.. I releasing it so other someone can learn something... I never did put @author sunnyboy it is auto generated... so much for a so called Java developer know even knowing this LMAO... anyway the buff isn't working.. I need to checks what's wrong it does not seems to buff at all in game.. the last I check the copyright holds still belong to the originals developers of the source.. neither do you or anyone call the shots.. yeah I hear you are a developer for astralms good for you..

    also it seems like astralms developers has label haste as dispel cool

    Last edited by ExtremeDevilz; 06-01-14 at 02:37 PM.

  4. #4
    Omega sunnyboy is offline
    MemberRank
    Mar 2010 Join Date
    6,108Posts

    Re: GM Buffs Fix For AstralMS Based..

    Quote Originally Posted by Apparition View Post
    nah I could not care less what others said anymore.. I releasing it so other someone can learn something... I never did put @author sunnyboy it is auto generated... so much for a so called Java developer know even knowing this LMAO... anyway the buff isn't working.. I need to checks what's wrong it does not seems to buff at all in game.. the last I check the copyright holds still belong to the originals developers of the source.. neither do you or anyone call the shots.. yeah I hear you are a developer for astralms good for you..

    also it seems like astralms developers has label haste as dispel cool

    srry im not a java developer, i dun even know java

  5. #5
    Apprentice g0dbless is offline
    MemberRank
    Dec 2013 Join Date
    7Posts

    Re: GM Buffs Fix For AstralMS Based..

    Since my post magically disappeared, I'll have to say it again.

    You don't understand how the buff classes work. I don't think you even understand how buffs work. Your statups are wrong. By the way, the source already handles GM Haste.

  6. #6
    Account Upgraded | Title Enabled! ExtremeDevilz is offline
    MemberRank
    Apr 2008 Join Date
    647Posts

    Re: GM Buffs Fix For AstralMS Based..

    statups ? are wrong please correct me ? how is it wrong ?

    and the source dont handle gm haste..

  7. #7
    RaGEZONER maxcloud is offline
    MemberRank
    Feb 2009 Join Date
    312Posts

    Re: GM Buffs Fix For AstralMS Based..

    Acting like a bully on these forums is the result of the community going down hill. Instead of flaming people for their releases, try correcting them in a humble way.
    If they decide to lash at you like a child then just ignore the response and carry on.

  8. #8
    Account Upgraded | Title Enabled! ExtremeDevilz is offline
    MemberRank
    Apr 2008 Join Date
    647Posts

    Fix GameMaster Random Remaining SP/Lacking Level 1 Skills

    Go To MapleCharacter

    Add

    PHP Code:
    if (GameConstants.isGameMaster(job) && level >= 1) {                   
            
    updateSingleStat(MapleStat.AVAILABLESP0);           
            
    remainingSp[0] += 0;        

    this should pretty much fix the random sp you are getting when you level up if you are having the job as a gamemaster as it force the sp to be 0 and no sp will be given to you when you level up..

  9. #9
    Member Itai Caspi is offline
    MemberRank
    Aug 2012 Join Date
    56Posts

    Re: Fix GameMaster Random Remaining SP/Lacking Level 1 Skills

    why using external method when u can use ternary operators ??

    or just use:

    public void updateSingleStat(MapleStat stat, long newval, boolean itemReaction) {
    if (client.isGm() && stat == MapleStat.AVAILABLESP)
    return;
    Map<MapleStat, Long> statup = new EnumMap<>(MapleStat.class);
    statup.put(stat, newval);
    client.getSession().write(CWvsContext.updatePlayerStats(statup, itemReaction, this));
    }
    Last edited by Itai Caspi; 06-01-14 at 06:48 PM.

  10. #10
    Account Upgraded | Title Enabled! AristoCat is offline
    MemberRank
    Apr 2012 Join Date
    947Posts

    Re: Fix GameMaster Random Remaining SP/Lacking Level 1 Skills

    Quote Originally Posted by Itai Caspi View Post
    why using external method when u can use ternary operators ??

    or just use:
    Why being gay when you can read the thread title and understand it?
    Who taught you how to code???

  11. #11
    Omega sunnyboy is offline
    MemberRank
    Mar 2010 Join Date
    6,108Posts

    Re: GM Buffs Fix For AstralMS Based..

    Quote Originally Posted by maxcloud View Post
    Acting like a bully on these forums is the result of the community going down hill. Instead of flaming people for their releases, try correcting them in a humble way.
    If they decide to lash at you like a child then just ignore the response and carry on.
    Hard to help when they use leaked stuff you didn't really want people to have

    Quote Originally Posted by Spotted View Post
    Lol why bring Mental into this, this is just you and your /release/. No one is flaming you, if that is what you think. The ones flaming are the ones trying to protect you.
    because he's scared


    @maxcloud
    i've simply stated the obvious and have not flamed him. I mentioned he could of just put the 1 buff in maplestateffect since it's 1, don't need a bunch, but now I see he edited and added more crap, useless imo, still he could keep it like that or just add it in maplestateffect, not like the masks will ever change anyway, why bother with simplicity ya tho i shud say

    @Apparition aka ExtremeDevilz you shouldn't bother adding ids that you don't even use since ull just get "GM skill not coded + skill" printing on ur console since like u know 9001001, // GM Super Dragon Roar isn't a buff! I see you made a 9101005 then break; why? it's not a buff either, but u know you could make it still give effects as i fit's one! So in the end if it's your intention, I say, by all means HAVE FUN with custom buffs
    Last edited by sunnyboy; 07-01-14 at 12:32 AM.

  12. #12
    I'm overrated. Fraysa is offline
    MemberRank
    Apr 2008 Join Date
    4,891Posts

    Re: GM Buffs Fix For AstralMS Based..

    Quote Originally Posted by maxcloud View Post
    Acting like a bully on these forums is the result of the community going down hill. Instead of flaming people for their releases, try correcting them in a humble way.
    If they decide to lash at you like a child then just ignore the response and carry on.
    This section is going downhill because of people like the OP. From what I know, the OP tries to be seen as a developer, but truly - he doesn't know what he's doing, flooding this forums with useless code snippets to gain e-fame. Another good example is xStr0nGx, and some more others.

    The real developers rarely exist here anymore, and they most likely left because of people like the ones I've mentioned. Why would they contribute to this community when all they do is leech the work, never appreciate it and trash it?... I'm surprised people like Kevin, Peter and some more others haven't lost their minds yet.

    Sure, this community always had Leechers, but back in 2008 things were different. Look at this forum's first page. 70% of the threads are simply leaks. There are no "real" quality releases anymore because people simply dont know what they're doing because they're being spoiled with free updated leaked files, so instead of having the thrive of learning Java or whatever - their main drive is to open server to get money. This community is about to die soon anyway, which saddens me as I've been here for almost 6 years. It's a shame.

  13. #13
    Account Upgraded | Title Enabled! SuperLol is offline
    MemberRank
    Jun 2010 Join Date
    801Posts

    Re: GM Buffs Fix For AstralMS Based..

    Quote Originally Posted by Apparition View Post
    statups ? are wrong please correct me ? how is it wrong ?

    and the source dont handle gm haste..
    They are wrong because you have the order wrong. Speed has to go before jump. It doesn't matter in some sources (like mine) where the order is sorted every time the packet is sent though. However sorting it every time is bad and is for lazy people (also like me). The source also handles GM haste because of addBuffStatPairToListIfNotZero like stated above. Before any calculations are done, it checks to see if all the basic stats like STR, DEX, SPEED are present and if so, it adds it. This is why you never have to add the basic stats.

    Also I'll tell you why this release doesn't do anything.
    Code:
                    boolean handle = BuffClassFetcher.getHandleMethod(ret, sourceid);
                    if (!handle) {
    Because of this, if it isn't in BuffClassFetcher (which this also isn't, so that's why your code also is never reached), then it will load the skill normally like it did before. So you can delete all the buff classes and the code will still work.

    Quote Originally Posted by StripedCow View Post
    actually 900 || 910 there's only those 2 jobs so why go through 11 selections to find the job.
    It only checks for 2 and not 11 :(

  14. #14
    Account Upgraded | Title Enabled! ExtremeDevilz is offline
    MemberRank
    Apr 2008 Join Date
    647Posts

    Re: GM Buffs Fix For AstralMS Based..

    Quote Originally Posted by SuperLol View Post
    They are wrong because you have the order wrong. Speed has to go before jump. It doesn't matter in some sources (like mine) where the order is sorted every time the packet is sent though. However sorting it every time is bad and is for lazy people (also like me). The source also handles GM haste because of addBuffStatPairToListIfNotZero like stated above. Before any calculations are done, it checks to see if all the basic stats like STR, DEX, SPEED are present and if so, it adds it. This is why you never have to add the basic stats.

    Also I'll tell you why this release doesn't do anything.
    Code:
                    boolean handle = BuffClassFetcher.getHandleMethod(ret, sourceid);
                    if (!handle) {
    Because of this, if it isn't in BuffClassFetcher (which this also isn't, so that's why your code also is never reached), then it will load the skill normally like it did before. So you can delete all the buff classes and the code will still work.


    It only checks for 2 and not 11 :(
    the addBuffStatPairToListIfNotZero simply add basic states to list the only reason it was working before cause it wasn't handled by the buffclassfetcher but handled in maplestateeffect.. also you can see it for yourself.. if you remove it the buff wont work anymore..

  15. #15
    Account Upgraded | Title Enabled! SuperLol is offline
    MemberRank
    Jun 2010 Join Date
    801Posts

    Re: GM Buffs Fix For AstralMS Based..

    Quote Originally Posted by Apparition View Post
    the addBuffStatPairToListIfNotZero simply add basic states to list the only reason it was working before cause it wasn't handled by the buffclassfetcher but handled in maplestateeffect.. also you can see it for yourself.. if you remove it the buff wont work anymore..
    I thought it added it regardless of the fact that it was in buffclassfetcher or not. I'm saying your code will not really do anything because it will go to handle gm skills even if there wasn't a class that you released. It's still an okay release because it's consistent code with the rest of the buff stuff but it isn't a fix of any sort.

  16. #16
    Apprentice Gollux is offline
    MemberRank
    Dec 2013 Join Date
    24Posts

    Re: GM Buffs Fix For AstralMS Based..

    Quote Originally Posted by Fraysa View Post
    This section is going downhill because of people like the OP. From what I know, the OP tries to be seen as a developer, but truly - he doesn't know what he's doing, flooding this forums with useless code snippets to gain e-fame. Another good example is xStr0nGx, and some more others.

    The real developers rarely exist here anymore, and they most likely left because of people like the ones I've mentioned. Why would they contribute to this community when all they do is leech the work, never appreciate it and trash it?... I'm surprised people like Kevin, Peter and some more others haven't lost their minds yet.

    Sure, this community always had Leechers, but back in 2008 things were different. Look at this forum's first page. 70% of the threads are simply leaks. There are no "real" quality releases anymore because people simply dont know what they're doing because they're being spoiled with free updated leaked files, so instead of having the thrive of learning Java or whatever - their main drive is to open server to get money. This community is about to die soon anyway, which saddens me as I've been here for almost 6 years. It's a shame.
    Join Date: Mar 2010
    It also dies because of people like you. Posting Off-topic in every single thread.

  17. #17
    I'm overrated. Fraysa is offline
    MemberRank
    Apr 2008 Join Date
    4,891Posts

    Re: GM Buffs Fix For AstralMS Based..

    Quote Originally Posted by Gollux View Post
    Join Date: Mar 2010
    It also dies because of people like you. Posting Off-topic in every single thread.
    I never said this is my first account, did I? Also, I'm pretty sure you are Coen, who leaked AstralMS source - so I don't think you should be talking.

  18. #18
    while(true) spam(); kevintjuh93 is offline
    MemberRank
    Jun 2008 Join Date
    The NetherlandsLocation
    4,119Posts

    Re: GM Buffs Fix For AstralMS Based..

    Quote Originally Posted by Fraysa View Post
    I never said this is my first account, did I? Also, I'm pretty sure you are Coen, who leaked AstralMS source - so I don't think you should be talking.
    I think that the both of you shouldn't be talking. Only because you see everything with different eyes (because you aren't at level: leeching) doesn't mean that this section is going downhill. It actually has never changed.

    Now get back on topic and if you want to talk, PM me or Skype.

  19. #19
    Account Upgraded | Title Enabled! NemesisToKill is offline
    MemberRank
    Nov 2009 Join Date
    874Posts

    Re: Fix GameMaster Random Remaining SP/Lacking Level 1 Skills

    Quote Originally Posted by Itai Caspi View Post
    why using external method when u can use ternary operators ??

    or just use:
    Code:
    public void updateSingleStat(MapleStat stat, long newval, boolean itemReaction) {
    if (client.isGm() && stat == MapleStat.AVAILABLESP) 
    return; 
    Map<MapleStat, Long> statup = new EnumMap<>(MapleStat.class);
    statup.put(stat, newval);
    client.getSession().write(CWvsContext.updatePlayerStats(statup, itemReaction, this));
    }
    Also EnumMap is internally backed by an array of the enum objects and is of length Enum.values().length, so your code is actually doing something like:

    Object[] vals = new Object[MapleStat.values().length];
    and indexing based on the ordinal of each enum entry.
    Considering the method is for updating a single stat, you really should be doing:
    Collections.singletonMap(K key, V value); instead.
    Last edited by NemesisToKill; 08-01-14 at 02:00 AM. Reason: corrected code after looking at the actual thing

  20. #20
    Account Upgraded | Title Enabled! ExtremeDevilz is offline
    MemberRank
    Apr 2008 Join Date
    647Posts

    Fix NPC/Mob Disappearing Movement In AstralMS Source

    Go To

    handling.channel.handler/MovementParse.Java

    go to Case 60:

    Code:
    if (command == 15) { // Fixes NPC/Mob Disappearing                         
    fh = lea.readShort();
    }

    now go ingame and test it should work

    that's all :) report any other bugs you may have hear of I may try to fix it :) does anyone know why cash items isnt displayed cause it is missing a cashitem.txt which is suppose to have a packet in it which is suppose to decrypt and make a sql call items/category_all.sql
    so if you know what is that packet pm me ;)

    please dont pm me and ask me for help with your server.. I dont have time for that.

    also there will be people who will dislike a post or flame me for this release ;) this are the very same people who wants to keep everything to themselves and wants the community to burn...

  21. #21
    Banned SilentThief is offline
    BannedRank
    Sep 2012 Join Date
    The MatrixLocation
    466Posts

    Re: Fix NPC/Mob Disappearing Movement In AstralMS Source

    @kevintjuh93 Didn't you tell him to stop posting these and just make a collection of them?

    OT: This is a very simplistic release, but good for the people that don't know Java, thanks I guess.

  22. #22
    Account Upgraded | Title Enabled! ExtremeDevilz is offline
    MemberRank
    Apr 2008 Join Date
    647Posts

    Re: GM Buffs Fix For AstralMS Based..

    @SlikStik @xstrongx

    or who the fuck you are learn to retain some credits and learn some fucking java taking credits for something you never did is pure stupid


  23. #23
    while(true) spam(); kevintjuh93 is offline
    MemberRank
    Jun 2008 Join Date
    The NetherlandsLocation
    4,119Posts

    Re: Fix NPC/Mob Disappearing Movement In AstralMS Source

    Quote Originally Posted by SilentThief View Post
    @kevintjuh93 Didn't you tell him to stop posting these and just make a collection of them?

    OT: This is a very simplistic release, but good for the people that don't know Java, thanks I guess.
    Merged the threads, @Apparition fix your main post yourself pls

  24. #24
    Account Upgraded | Title Enabled! ExtremeDevilz is offline
    MemberRank
    Apr 2008 Join Date
    647Posts

    Re: GM Buffs Fix For AstralMS Based..

    npc id 46 28 00 00 - > 00 00 28 46
    "Do you want to exit this place and go to a new world?"

    4000001 Map ID

    Unhandled portal script talkToLight

  25. #25
    Apprentice Xerxe is offline
    MemberRank
    Jan 2014 Join Date
    19Posts

    Re: GM Buffs Fix For AstralMS Based..




Page 1 of 2 12 LastLast

Advertisement