Chair fix for XeonMs V97

Results 1 to 7 of 7
  1. #1
    Account Inactive daniel4evar is offline
    InactiveRank
    Feb 2010 Join Date
    467Posts

    thumbs up Chair fix for XeonMs V97


    RaGEZONE Recommends

    RaGEZONE Recommends

    I'm not sure if everyone has this, but I did.
    When I changed a channel and sit, it stuck me like I was in a HUGE ENDLESS lag even tho there was no lag..
    So if you got this and wanna fix it:

    I'm not a coder, I took this for another thread of a fishing system and it fixed my chair issue so if you have anything bad to say about the coding.. im not your guy.

    Credit to iAkira for this!


    useChairHandler:

    PHP Code:
    package net.channel.handler;

    import client.MapleClient;
    import client.MapleInventoryType;
    import net.AbstractMaplePacketHandler;
    import tools.MaplePacketCreator;
    import tools.data.input.SeekableLittleEndianAccessor;
    import server.TimerManager;
    import java.util.concurrent.ScheduledFuture;

    public final class 
    UseChairHandler extends AbstractMaplePacketHandler {
        public final 
    void handlePacket(SeekableLittleEndianAccessor sleaMapleClient c) {
            
    int itemId slea.readInt();
            if (
    c.getPlayer().getInventory(MapleInventoryType.SETUP).findById(itemId) == null) {
                return;
            }
           if(
    c.getPlayer().getMapId() == 251000100 && itemId == 3011000 && !c.getPlayer().isFishing){
            
    c.getPlayer().isFishing true;
            }
            
    c.getPlayer().setChair(itemId);
            
    c.getPlayer().getMap().broadcastMessage(c.getPlayer(), MaplePacketCreator.showChair(c.getPlayer().getId(), itemId), false);
            
    c.getSession().write(MaplePacketCreator.enableActions());
        }


    CancelChairHandler:

    PHP Code:
    package net.channel.handler;

    import client.MapleClient;
    import net.AbstractMaplePacketHandler;
    import tools.MaplePacketCreator;
    import tools.data.input.SeekableLittleEndianAccessor;

    public final class 
    CancelChairHandler extends AbstractMaplePacketHandler {
        public final 
    void handlePacket(SeekableLittleEndianAccessor sleaMapleClient c) {
            
    int id slea.readShort();
            if (
    id == -1) { // Cancel Chair
                
    c.getPlayer().setChair(0);
               
    c.getPlayer().isFishing false;
                
    c.getSession().write(MaplePacketCreator.cancelChair(-1));
                
    c.getPlayer().getMap().broadcastMessage(c.getPlayer(), MaplePacketCreator.showChair(c.getPlayer().getId(), 0), false);
            } else { 
    // Use In-Map Chair
                
    c.getPlayer().setChair(id);
                
    c.getSession().write(MaplePacketCreator.cancelChair(id));
            }
        }


    From useChairHandler remove this if you don't have fishing:

    PHP Code:
    if(c.getPlayer().getMapId() == 251000100 && itemId == 3011000 && !c.getPlayer().isFishing){
            
    c.getPlayer().isFishing true;
            } 

    For cancelChairHandler:

    PHP Code:
    c.getPlayer().isFishing false
    Last edited by daniel4evar; 29-04-12 at 12:48 PM.


  2. #2
    I'm The God pauljeki is offline
    True MemberRank
    Oct 2011 Join Date
    IsraelLocation
    736Posts

    Re: Chair fix for XeonMs V97

    Great release

  3. #3
    Account Inactive daniel4evar is offline
    InactiveRank
    Feb 2010 Join Date
    467Posts

    Re: Chair fix for XeonMs V97

    Thank you :)
    Hope it helps.

  4. #4
    Account Inactive daniel4evar is offline
    InactiveRank
    Feb 2010 Join Date
    467Posts

    Re: Chair fix for XeonMs V97

    Any thoughts? Is it working for you guys?

  5. #5
    Account Upgraded | Title Enabled! orikiller is offline
    True MemberRank
    May 2011 Join Date
    IsraelLocation
    215Posts

    Re: Chair fix for XeonMs V97

    It does not work already?

  6. #6
    Account Inactive iCaseVac is offline
    InactiveRank
    May 2012 Join Date
    37Posts

    Re: Chair fix for XeonMs V97

    Thank you, had that problem :)
    For me it didn't if I tried to go to ch2 for example and sit it wouldnt let me stand back up and talk and stuff.

  7. #7
    Account Upgraded | Title Enabled! Cheezpuff is offline
    True MemberRank
    Jul 2011 Join Date
    In programmingLocation
    226Posts

    Re: Chair fix for XeonMs V97

    look good =] thanks




Advertisement