[Release] MapleTV

Page 1 of 5 12345 LastLast
Results 1 to 15 of 75
  1. #1
    Infraction Banned MrMysterious is offline
    MemberRank
    Dec 2008 Join Date
    In a treeLocation
    752Posts

    [Release] MapleTV

    v62 Maple TV.


    In UseCashItemHandler find
    PHP Code:
     if (itemType == 507) { 
    and replace it with this.

    PHP Code:
    if (itemType == 507) {
                            switch (
    itemId 1000 10) {
                                case 
    1// Megaphone
                                    
    if (player.getLevel() >= 10) {
                                        
    player.getMap().broadcastMessage(MaplePacketCreator.serverNotice(2player.getName() + " : " slea.readMapleAsciiString()));
                                    } else { 
    // Client does it but ehh..
                                        
    player.dropMessage("You may not use this until you're level 10");
                                    }
                                    break;
                                case 
    2// Super megaphone
                                    
    c.getChannelServer().getWorldInterface().broadcastMessage(nullMaplePacketCreator.serverNotice(3c.getChannel(), player.getName() + " : " slea.readMapleAsciiString(), (slea.readByte() != 0)).getBytes());
                                    break;
                                case 
    3// Heart megaphone
                                    
    log.info("Unhandled Megaphone Packet : " slea.toString());
                                    
    log.info("Megaphone ID: " itemId);
                                    break;
                                case 
    4// Skull megaphone
                                    
    log.info("Unhandled Megaphone Packet : " slea.toString());
                                    
    log.info("Megaphone ID: " itemId);
                                    break;
                                case 
    5// Maple TV
                                    
    int tvType itemId 10;
                                    
    boolean megassenger false;
                                    
    boolean ear false;
                                    
    MapleCharacter victim null;

                                    if (
    tvType != 1) { // 1 is the odd one out since it doesnt allow 2 players.
                                        
    if (tvType >= 3) {
                                            
    megassenger true;
                                            if (
    tvType == 3) {
                                                
    slea.readByte();
                                            }
                                            
    ear == slea.readByte();
                                        } else if (
    tvType != 2) {
                                            
    slea.readByte();
                                        }
                                        if (
    tvType != 4) {
                                            
    victim c.getChannelServer().getPlayerStorage().getCharacterByName(slea.readMapleAsciiString());
                                        }
                                    }
                                    List<
    Stringmessages = new LinkedList<String>();
                                    
    StringBuilder builder = new StringBuilder();
                                    for (
    int i 05i++) {
                                        
    String message slea.readMapleAsciiString();
                                        if (
    megassenger) {
                                            
    builder.append(" ");
                                            
    builder.append(message); // builder.append(" "+message);
                                        
    }
                                        
    messages.add(message);
                                    }
                                    
    slea.readInt(); // some random shit
                                    
    if (megassenger) {
                                        
    c.getChannelServer().getWorldInterface().broadcastMessage(nullMaplePacketCreator.serverNotice(3c.getChannel(), player.getName() + " : " builder.toString(), ear).getBytes());
                                    }
                                    if (!
    MapleTVEffect.isActive()) {
                                        new 
    MapleTVEffect(playervictimmessagestvType);
                                        
    MapleInventoryManipulator.removeById(cMapleInventoryType.CASHitemId1truefalse);
                                    } else {
                                        
    player.dropMessage("MapleTV is already in use :D");
                                    }
                                    break;
                            }
                            
    MapleInventoryManipulator.removeById(cMapleInventoryType.CASHitemId1truefalse);
                      } 
    In MaplePacketCreator
    PHP Code:

      
    public static MaplePacket enableTV() {
            
    // [0F 01] [00 00 00 00] [00] <-- 0x112 in v63,
            
    MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
            
    mplew.writeShort(SendPacketOpcode.ENABLE_TV.getValue()); // enableTV = 0x10F
            
    mplew.writeInt(0);
            
    mplew.write(0);
            return 
    mplew.getPacket();
        }

        public static 
    MaplePacket removeTV() {
            
    // 11 01 <-- 0x10E in v62
            
    MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
            
    mplew.writeShort(SendPacketOpcode.REMOVE_TV.getValue()); // removeTV = 0x111 <-- v63
            
    return mplew.getPacket();
        }

        public static 
    MaplePacket sendTV(MapleCharacter chr, List<Stringmessagesint typeMapleCharacter partner) {
            
    // [10 01] [01] [00 00 03 B1 4F 00 00 00 67 75 00 00 01 75 4B 0F 00 0C E3 FA 10 00 FF FF
            // 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00] [0B 00 64 75 73 74 72 65 6D 6F 76
            // 65 72] [00 00] [07 00] [70 61 63 6B 65 74 73] 00 00 00 00 00 00 00 00 0F 00 00 00
            
            
    MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
            
    mplew.writeShort(SendPacketOpcode.SEND_TV.getValue()); // SEND_TV = 0x11D
            
    mplew.write(partner != null 0);
            
    mplew.write(type); // type   Heart = 2  Star = 1  Normal = 0
            
    addCharLook(mplewchrfalse);
            
    mplew.writeMapleAsciiString(chr.getName());
            if (
    partner != null) {
                
    mplew.writeMapleAsciiString(partner.getName());
            } else {
                
    mplew.writeShort(0); // could be partner
            
    }
            for (
    int i 0messages.size(); i++) { // for (String message : messages) {
                
    if (== && messages.get(4).length() > 15) {
                    
    mplew.writeMapleAsciiString(messages.get(4).substring(015)); // hmm ?
                
    } else {
                    
    mplew.writeMapleAsciiString(messages.get(i));
                }
            }
            
    mplew.writeInt(1337); // time limit shit lol 'Your thing still start in blah blah seconds'
            
    if (partner != null) {
                
    addCharLook(mplewpartnerfalse);
            }
            return 
    mplew.getPacket();
        } 
    In MapleMap find
    PHP Code:
    if (getTimeLimit() > && getForcedReturnMap() != null) {
                
    chr.getClient().getSession().write(MaplePacketCreator.getClock(getTimeLimit()));
                
    chr.startMapTimeLimitTask(thisthis.getForcedReturnMap());
            } 
    and put this under
    PHP Code:

    if (MapleTVEffect.isActive()) {
                if (
    hasMapleTV()) {
                    
    chr.getClient().getSession().write(MapleTVEffect.startTV());
                }
            } 
    Place this somewhere at the bottom
    PHP Code:
        public boolean hasMapleTV() {
            
    int tvIds[] = {9250042925004392500459250044927000192700029250023925002492700039270004925002692700069270007925004692700009201066};
            for (
    int id tvIds) {
                if (
    this.containsNPC(id)) {
                    return 
    true;
                }
            }
            return 
    false;
        } 





    Make a new class in server/maps
    PHP Code:
    package net.sf.odinms.server.maps;

    import java.rmi.RemoteException;
    import java.util.LinkedList;
    import java.util.List;
    import net.sf.odinms.client.MapleCharacter;
    import net.sf.odinms.net.MaplePacket;
    import net.sf.odinms.net.world.remote.WorldChannelInterface;
    import net.sf.odinms.server.TimerManager;
    import net.sf.odinms.tools.MaplePacketCreator;
    //@This file is property of Cheetah and XoticStory. ;D
    //*

    public class MapleTVEffect {

        private static List<
    Stringmessage = new LinkedList<String>();
        private static 
    MapleCharacter user;
        private static 
    boolean active;
        private static 
    int type;
        private static 
    MapleCharacter partner null;

        public 
    MapleTVEffect(MapleCharacter user_MapleCharacter partner_, List<Stringmsgint type_) {
            
    message msg;
            
    user user_;
            
    type type_;
            
    partner partner_;
            
    broadCastTV(true);
        }

        public static 
    boolean isActive() {
            return 
    active;
        }

        private static 
    void setActive(boolean set) {
            
    active set;
        }

        private static 
    MaplePacket removeTV() {
            return 
    MaplePacketCreator.removeTV();
        }

        public static 
    MaplePacket startTV() {
            return 
    MaplePacketCreator.sendTV(usermessagetype <= type type 3partner);
        }

        public static 
    void broadCastTV(boolean active_) {
            
    WorldChannelInterface wci user.getClient().getChannelServer().getWorldInterface();
            
    setActive(active_);
            try {
                if (
    active_) {
                    
    wci.broadcastMessage(nullMaplePacketCreator.enableTV().getBytes());
                    
    wci.broadcastMessage(nullstartTV().getBytes());
                    
    scheduleCancel();
                } else {
                    
    wci.broadcastMessage(nullremoveTV().getBytes());
                }

            } catch (
    RemoteException noob) {
            }
        }

        private static 
    void scheduleCancel() {
            
    int delay 15000// default. cbf adding it to switch
            
    switch (type) {
                case 
    0:
                case 
    3:
                    
    delay 15000;
                    break;
                case 
    1:
                case 
    4:
                    
    delay 30000;
                    break;
                case 
    2:
                case 
    5:
                    
    delay 60000;
            }
            
    TimerManager.getInstance().schedule(new Runnable() {

                @
    Override
                
    public void run() {
                    
    broadCastTV(false);
                }
            }, 
    delay);
        }

    In sendops
    PHP Code:
    SEND_TV 0x10D
    REMOVE_TV 
    0x10E
    ENABLE_TV 
    0x10F 
    Screenshots







    EDIT: Put MapleCharacter player = c.getPlayer(); after if (itemType == 507) { if you havent got player defined
    Last edited by MrMysterious; 10-01-09 at 06:13 AM.


  2. #2
    Account Upgraded | Title Enabled! AzuS is offline
    MemberRank
    Jul 2008 Join Date
    871Posts

    Re: [Release] MapleTV

    Lol...Nice xD! First?

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

    Re: [Release] MapleTV

    This is sexy.

  4. #4
    Account Upgraded | Title Enabled! AzuS is offline
    MemberRank
    Jul 2008 Join Date
    871Posts

    Re: [Release] MapleTV

    Dammit..I failed at compiling already xD!!

  5. #5
    Alpha Member watzmename is offline
    MemberRank
    Aug 2008 Join Date
    2,835Posts

    Re: [Release] MapleTV

    OMG SEXY.. but its only for v62 isn't it?
    very very very very very very very very very very very nice release

  6. #6
    Alpha Member Markii is offline
    MemberRank
    Nov 2008 Join Date
    NewyorkLocation
    1,917Posts

    Re: [Release] MapleTV

    Very Nice Release

  7. #7
    Account Upgraded | Title Enabled! JusticeDK is offline
    MemberRank
    Aug 2008 Join Date
    McDonaldLocation
    806Posts

    Re: [Release] MapleTV

    Nice nice nice!!!

  8. #8
    Account Upgraded | Title Enabled! iamSTEVE is offline
    MemberRank
    Jul 2008 Join Date
    528Posts

    Re: [Release] MapleTV

    Lol@ DO not release anywhere else that Cheetah posted when releasing on Valhalla, anyway nice job I guess :P

  9. #9
    Proficient Member og.Lios is offline
    MemberRank
    Dec 2008 Join Date
    Bismarck, NorthLocation
    157Posts

    Re: [Release] MapleTV

    As I told this to cheetah before, Nice release. This is the best thing I've seen done in weeks.

    Also, at those about to flame him, MrMysterious helped create this. Read cheetah's post on Valhalla if you need proof that they worked together.

  10. #10
    Account Upgraded | Title Enabled! Chinese is offline
    MemberRank
    Dec 2008 Join Date
    Taiwan/CanadaLocation
    327Posts

    Re: [Release] MapleTV

    This is a great release. +1 Rep and Development point.

  11. #11
    Infraction Banned MrMysterious is offline
    MemberRank
    Dec 2008 Join Date
    In a treeLocation
    752Posts

    Re: [Release] MapleTV

    Quote Originally Posted by og.Lios View Post
    As I told this to cheetah before, Nice release. This is the best thing I've seen done in weeks.

    Also, at those about to flame him, MrMysterious helped create this. Read cheetah's post on Valhalla if you need proof that they worked together.
    LOL I actually did most of it, cheetah did the sniffing.

    PS: Cheetah is awesome <3, too bad he got banned from RZ LOOOL

  12. #12
    Member KingT is offline
    MemberRank
    Jan 2009 Join Date
    New YorkLocation
    74Posts

    Re: [Release] MapleTV

    Good job i like the top message on top of the T.V lol

  13. #13
    Infraction Banned viinnh is offline
    MemberRank
    Sep 2008 Join Date
    AustraliaLocation
    1,189Posts

    Re: [Release] MapleTV

    nice i gueesss

  14. #14
    Account Upgraded | Title Enabled! EspadaFung is offline
    MemberRank
    Jul 2008 Join Date
    Home, don't stalk meLocation
    1,030Posts

    Re: [Release] MapleTV

    >.>
    give me the packets for version 55 lulz

  15. #15
    Account Upgraded | Title Enabled! Supiangel is offline
    MemberRank
    Feb 2008 Join Date
    436Posts

    Re: [Release] MapleTV

    Great Release.

    You could've cleaned the code a little bit, but it's still a great release :)...

    Come to the irc ;D... You'll get addicted to it, lol.



Page 1 of 5 12345 LastLast

Advertisement