Donator Text Change

Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 32
  1. #16
    Account Upgraded | Title Enabled! Syre is offline
    MemberRank
    Jan 2013 Join Date
    700Posts

    Re: Donator Text Change

    Quote Originally Posted by TacoBell View Post
    Erm. Would (switch) make it look cleaner and simpler? I'm still a noob and took months off coding and lost a bit of touch.

    I don't think I have ever seen switch selections with a function like GeneralChatHandler. How would it look like? (like a basic template)
    If he were to add different colors for every level of GM, yes, definitely.


    as for a basic template..

    PHP Code:
    switch (chr.getGMLevel()) {
               case 
    1:
                      
    donor text color
                      
    break;
               case 
    2:
                      
    Intern text color
                      
    break;
               case 
    3:
                      
    GM Text color
                      
    break;
               case 
    4:
                      
    Admin text color
                      
    break;
               default: 
                       
    everything else. (and anything above 4)
                       break;

    In fact if you want to see a lot of switch cases used, here..


    http://pastebin.com/v9sVDZQh

    I went out of hand ha

  2. #17
    Account Upgraded | Title Enabled! ooSnowCapxx is offline
    MemberRank
    Jul 2011 Join Date
    250Posts

    Re: Donator Text Change

    Quote Originally Posted by TacoBell View Post
    I'm guessing it should look something like this:

    PHP Code:
    if (!chr.isHidden()) {
                    
    chr.getMap().broadcastMessage(MaplePacketCreator.getChatText(chr.getId(), schr.isGM(), slea.readByte()));
                } else {
                    
    chr.getMap().broadcastGMMessage(MaplePacketCreator.getChatText(chr.getId(), schr.isGM(), slea.readByte()));
                }
                if (
    chr.isDonor()) {
                    
    chr.getMap().broadcastMessage(MaplePacketCreator.multiChat("[Donor]" c.getPlayer().getName(), s3));
                    
    chr.getMap().broadcastMessage(MaplePacketCreator.getChatText(c.getPlayer().getId(), sfalse1));
                }
            } 
    This still doesn't seem to work :/

  3. #18
    Account Upgraded | Title Enabled! TacoBell is offline
    MemberRank
    Aug 2011 Join Date
    518Posts

    Re: Donator Text Change

    Quote Originally Posted by ooSnowCapxx View Post
    This still doesn't seem to work :/
    Where did you add it?

  4. #19
    Account Upgraded | Title Enabled! ooSnowCapxx is offline
    MemberRank
    Jul 2011 Join Date
    250Posts

    Re: Donator Text Change

    Quote Originally Posted by TacoBell View Post
    Where did you add it?
    GeneralChatHandler.

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

    Re: Donator Text Change

    Quote Originally Posted by ooSnowCapxx View Post
    GeneralChatHandler.
    That should work, unless your donators are defined else where than GM Level 1.

  6. #21
    Account Upgraded | Title Enabled! ooSnowCapxx is offline
    MemberRank
    Jul 2011 Join Date
    250Posts

    Re: Donator Text Change

    Quote Originally Posted by Fraysa View Post
    That should work, unless your donators are defined else where than GM Level 1.
    My donor is defined as Level 1

    PHP Code:
    public boolean isGM() {
            return 
    gmLevel 1;
        }

        public 
    boolean isDonor() {
            return 
    gmLevel == 1;
        }

        public 
    boolean isSDonor() {
            return 
    donor 1;
        } 
    0:

  7. #22
    Account Upgraded | Title Enabled! StripedCow is offline
    MemberRank
    Jun 2011 Join Date
    813Posts

    Re: Donator Text Change

    You can save their chat type to SQL, so make a variable to save in MapleCharacter and do something like:


    Code:
    } else if (type == 3) { // if chatType = 3 then this will be performed
                    c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.multiChat(c.getPlayer().getName(), text, 1));
                    c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.getChatText(c.getPlayer().getId(), text, false, 1));
    and you can set chat type through SQL. I had it like this because donors in my server had 9 types of chats to use :-) and had a ~chattype command!

  8. #23
    Account Upgraded | Title Enabled! TacoBell is offline
    MemberRank
    Aug 2011 Join Date
    518Posts

    Re: Donator Text Change

    Quote Originally Posted by StripedCow View Post
    You can save their chat type to SQL, so make a variable to save in MapleCharacter and do something like:


    Code:
    } else if (type == 3) { // if chatType = 3 then this will be performed
                    c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.multiChat(c.getPlayer().getName(), text, 1));
                    c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.getChatText(c.getPlayer().getId(), text, false, 1));
    and you can set chat type through SQL. I had it like this because donors in my server had 9 types of chats to use :-) and had a ~chattype command!
    How would donors have like 9 chats? I can only enable like 4-5 regularly? How'd you get the marriage to work? Don't you need to tell the client they're married in order for donors to speak in pinkish color or something like that?

  9. #24
    Account Upgraded | Title Enabled! StripedCow is offline
    MemberRank
    Jun 2011 Join Date
    813Posts

    Re: Donator Text Change

    Quote Originally Posted by TacoBell View Post
    How would donors have like 9 chats? I can only enable like 4-5 regularly? How'd you get the marriage to work? Don't you need to tell the client they're married in order for donors to speak in pinkish color or something like that?
    There's like 9 different types of chats man and I got marriages to work because I got the packets :-). No, you don't need to tell the client nothing.

  10. #25
    Account Upgraded | Title Enabled! Syre is offline
    MemberRank
    Jan 2013 Join Date
    700Posts

    Re: Donator Text Change

    Sick idea blue. I never thought of loading chat types via sql haha. Could make for an interesting market scheme too..

  11. #26
    Account Upgraded | Title Enabled! TacoBell is offline
    MemberRank
    Aug 2011 Join Date
    518Posts

    Re: Donator Text Change

    Quote Originally Posted by StripedCow View Post
    There's like 9 different types of chats man and I got marriages to work because I got the packets :-). No, you don't need to tell the client nothing.
    I agree with Syre, very cool idea. Thanks for clearing it up too. Seems really interesting and I will probably take a look at pink chat!

  12. #27
    Account Upgraded | Title Enabled! ooSnowCapxx is offline
    MemberRank
    Jul 2011 Join Date
    250Posts

    Re: Donator Text Change

    Quote Originally Posted by StripedCow View Post
    You can save their chat type to SQL, so make a variable to save in MapleCharacter and do something like:


    Code:
    } else if (type == 3) { // if chatType = 3 then this will be performed
                    c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.multiChat(c.getPlayer().getName(), text, 1));
                    c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.getChatText(c.getPlayer().getId(), text, false, 1));
    and you can set chat type through SQL. I had it like this because donors in my server had 9 types of chats to use :-) and had a ~chattype command!
    I don't understand... :/ lol

  13. #28
    Account Upgraded | Title Enabled! TacoBell is offline
    MemberRank
    Aug 2011 Join Date
    518Posts

    Re: Donator Text Change

    Quote Originally Posted by ooSnowCapxx View Post
    I don't understand... :/ lol
    What source are you using?

  14. #29
    Account Upgraded | Title Enabled! StripedCow is offline
    MemberRank
    Jun 2011 Join Date
    813Posts

    Re: Donator Text Change

    Quote Originally Posted by ooSnowCapxx View Post
    I don't understand... :/ lol
    You must be retarded then.

  15. #30
    Account Upgraded | Title Enabled! ooSnowCapxx is offline
    MemberRank
    Jul 2011 Join Date
    250Posts

    Re: Donator Text Change

    Quote Originally Posted by TacoBell View Post
    What source are you using?
    It's based of moople but it doesn't make sense... o:



Page 2 of 3 FirstFirst 123 LastLast

Advertisement