Enableall and afk command [swift]

Page 1 of 2 12 LastLast
Results 1 to 25 of 47
  1. #1
    DO YOU HAVE THE POWER? Power is offline
    MemberRank
    Aug 2012 Join Date
    Haverhill, SuffLocation
    248Posts

    big grin Enableall and afk command [swift]

    New commands havent seen them released and didnt take me long so here you go :)

    PHP Code:
    internal void afk()
            {
                
                
    int namechange;
                
    Room room ButterflyEnvironment.GetGame().GetRoomManager().GetRoom(this.Session.GetHabbo().CurrentRoomId);
                 
    IQueryAdapter adapter;
                    
    string str;
                    
    using (adapter ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                    {
                        
    adapter.setQuery("SELECT namechange FROM users WHERE id =" Session.GetHabbo().Id);
                        
    namechange adapter.getInteger();
                    }
                if (
    namechange == 0)
                {
                    
    string s Session.GetHabbo().Username "[Afk] " Session.GetHabbo().Username;
                    
    ServerMessage message = new ServerMessage(Outgoing.GetName);
                    
    message.AppendInt32(0);
                    
    message.AppendString(s);
                    
    message.AppendInt32(0);
                    
    this.Session.SendMessage(message);
                    
    ServerMessage message2 = new ServerMessage(Outgoing.ChangePublicName);
                    
    message2.AppendInt32(this.Session.GetHabbo().Id);
                    
    message2.AppendInt32(this.Session.CurrentRoomUserID);
                    
    message2.AppendString(s);
                    
    room.SendMessage(message2);
                    
    using (adapter ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                    {
                        
    int num 1;
                        
    adapter.runFastQuery(string.Concat(new object[] { "UPDATE users SET namechange = "num" WHERE id = "Session.GetHabbo().Id }));
                       
                    }
                }
                else
                {

                   
                    
    using (adapter ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                    {
                        
    adapter.setQuery("SELECT username FROM users WHERE id =" Session.GetHabbo().Id);
                        
    str adapter.getString();
                        
    int num2 0;
                        
    adapter.runFastQuery(string.Concat(new object[] { "UPDATE users SET namechange = "num2" WHERE id = "Session.GetHabbo().Id }));

                    }
                    
    string s Session.GetHabbo().Username str;
                    
    ServerMessage message = new ServerMessage(Outgoing.GetName);
                    
    message.AppendInt32(0);
                    
    message.AppendString(s);
                    
    message.AppendInt32(0);
                    
    this.Session.SendMessage(message);
                    
    ServerMessage message2 = new ServerMessage(Outgoing.ChangePublicName);
                    
    message2.AppendInt32(this.Session.GetHabbo().Id);
                    
    message2.AppendInt32(this.Session.CurrentRoomUserID);
                    
    message2.AppendString(s);
                    
    room.SendMessage(message2);
                   
                }

            } 
    add to your user database namechange int32 default 0

    PHP Code:
    internal void enableall()
            {
                
    Room currentRoom this.Session.GetHabbo().CurrentRoom;
                
    int effectId int.Parse(this.Params[1]);
                List<
    RoomUserroomUsers currentRoom.GetRoomUserManager().GetRoomUsers();
                foreach (
    RoomUser user in roomUsers)
                {
                    
    user.GetClient().GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(effectId);
                }
                
            } 
    If you dont know how to add these comment below or pm me and ill help

    coding a little sloppy but ohh well :)

    also with the afk command

    PHP Code:
     internal void CreateRoom()
            {
                 
    IQueryAdapter adapter;
                    
                
    int namechange;
                    
    using (adapter ButterflyEnvironment.GetDatabaseManager().getQueryreactor())
                    {
                        
    adapter.setQuery("SELECT namechange FROM users WHERE id =" Session.GetHabbo().Id);
                        
    namechange adapter.getInteger();
                    }
                    if (
    namechange == 0)
                    {
                        
    string name ButterflyEnvironment.FilterInjectionChars(this.Request.PopFixedString());
                        
    string model this.Request.PopFixedString();
                        
    RoomData data ButterflyEnvironment.GetGame().GetRoomManager().CreateRoom(this.Sessionnamemodel);
                        if (
    data != null)
                        {
                            
    this.Response.Init(Outgoing.OnCreateRoomInfo);
                            
    this.Response.AppendInt32(data.Id);
                            
    this.Response.AppendString(data.Name);
                            
    this.SendResponse();
                        }
                    }
                    else {
                        
    this.Session.SendNotif("You are still afk please reload and try again.");
                  
                    }
            } 
    There you go :)


  2. #2
    Proficient Member Keyuko is offline
    MemberRank
    Aug 2012 Join Date
    162Posts

    Re: Enableall and afk command [swift]

    So you change your name from Example to [AFK]Example ?

    What about if a user create a user with the name Example?
    I prefer to use a afk badge

  3. #3
    DO YOU HAVE THE POWER? Power is offline
    MemberRank
    Aug 2012 Join Date
    Haverhill, SuffLocation
    248Posts

    Re: Enableall and afk command [swift]

    it doesnt change the name in the database so even if someone already has that name it wont conflict ive tested

    offtopic deathnote rocks!

  4. #4
    DO YOU HAVE THE POWER? Power is offline
    MemberRank
    Aug 2012 Join Date
    Haverhill, SuffLocation
    248Posts

    Re: Enableall and afk command [swift]

    English please?

  5. #5
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,608Posts

    Re: Enableall and afk command [swift]

    spaghetti code for dinner.

  6. #6
    DO YOU HAVE THE POWER? Power is offline
    MemberRank
    Aug 2012 Join Date
    Haverhill, SuffLocation
    248Posts

    Re: Enableall and afk command [swift]

    Like said messy code :P clean them up if you want xD love to see how else you could code the afk command xD willing to learn and improve :)

  7. #7
    Account Upgraded | Title Enabled! Fishing Rod is offline
    MemberRank
    Dec 2013 Join Date
    214Posts

    Re: Enableall and afk command [swift]

    How about fixed pull and push?

  8. #8
    DO YOU HAVE THE POWER? Power is offline
    MemberRank
    Aug 2012 Join Date
    Haverhill, SuffLocation
    248Posts

    Re: Enableall and afk command [swift]

    There not broken

    Just write :push with no name
    And same with pull :)

  9. #9
    Account Upgraded | Title Enabled! Fishing Rod is offline
    MemberRank
    Dec 2013 Join Date
    214Posts

    Re: Enableall and afk command [swift]

    Quote Originally Posted by Ben Owen View Post
    There not broken

    Just write :push with no name
    And same with pull :)
    Can you fix it? when you type :push (withname) they will move to unknown square and push too -_-

  10. #10
    LETS REACH 666 POSTS?!!!! ImNotSatan is offline
    MemberRank
    Apr 2013 Join Date
    google.devLocation
    573Posts

    Re: Enableall and afk command [swift]

    Could you explain it with like a video?
    i dont get what the AFK does?

  11. #11
    DO YOU HAVE THE POWER? Power is offline
    MemberRank
    Aug 2012 Join Date
    Haverhill, SuffLocation
    248Posts

    Re: Enableall and afk command [swift]

    :afk

    changes your name to [afk] username

    thats all

  12. #12
    LETS REACH 666 POSTS?!!!! ImNotSatan is offline
    MemberRank
    Apr 2013 Join Date
    google.devLocation
    573Posts

    Re: Enableall and afk command [swift]

    Quote Originally Posted by Power69 View Post
    :afk

    changes your name to [afk] username

    thats all
    Do you have to reload the room to see it?

  13. #13
    DO YOU HAVE THE POWER? Power is offline
    MemberRank
    Aug 2012 Join Date
    Haverhill, SuffLocation
    248Posts

    Re: Enableall and afk command [swift]

    Quote Originally Posted by ImNotSatan View Post
    Do you have to reload the room to see it?
    nope it updates instantly :)

  14. #14
    LETS REACH 666 POSTS?!!!! ImNotSatan is offline
    MemberRank
    Apr 2013 Join Date
    google.devLocation
    573Posts

    Re: Enableall and afk command [swift]

    Quote Originally Posted by Power69 View Post
    nope it updates instantly :)
    Mmm thats nice =)

    If u type it again it disables?

  15. #15
    DO YOU HAVE THE POWER? Power is offline
    MemberRank
    Aug 2012 Join Date
    Haverhill, SuffLocation
    248Posts

    Re: Enableall and afk command [swift]

    yes :) and if you add all the codes also stops people making rooms while afk.

  16. #16
    LETS REACH 666 POSTS?!!!! ImNotSatan is offline
    MemberRank
    Apr 2013 Join Date
    google.devLocation
    573Posts

    Re: Enableall and afk command [swift]

    Quote Originally Posted by Power69 View Post
    yes :) and if you add all the codes also stops people making rooms while afk.
    ONT: Mm would te room owner else also include AFK?

    OFFT: btw do you know the fix for wall items i cant place the moodlights

    I can place other wall items tough

  17. #17
    DO YOU HAVE THE POWER? Power is offline
    MemberRank
    Aug 2012 Join Date
    Haverhill, SuffLocation
    248Posts

    Re: Enableall and afk command [swift]

    Quote Originally Posted by ImNotSatan View Post
    ONT: Mm would te room owner else also include AFK?

    OFFT: btw do you know the fix for wall items i cant place the moodlights

    I can place other wall items tough
    yeah if the room made while afk it makes the room name afk username

    offt: works fine for me and ive added no fix?

  18. #18
    LETS REACH 666 POSTS?!!!! ImNotSatan is offline
    MemberRank
    Apr 2013 Join Date
    google.devLocation
    573Posts

    Re: Enableall and afk command [swift]

    Quote Originally Posted by Power69 View Post
    yeah if the room made while afk it makes the room name afk username

    offt: works fine for me and ive added no fix?
    Cant you fix that if you make a room it checks if u got afk in ur name?

    Offt:
    Mmm thats weird?
    Can i maby have ur emu to try?

  19. #19
    DO YOU HAVE THE POWER? Power is offline
    MemberRank
    Aug 2012 Join Date
    Haverhill, SuffLocation
    248Posts

    Re: Enableall and afk command [swift]

    Quote Originally Posted by ImNotSatan View Post
    Cant you fix that if you make a room it checks if u got afk in ur name?

    Offt:
    Mmm thats weird?
    Can i maby have ur emu to try?
    PHP Code:
    internal void CreateRoom() 
            { 
                 
    IQueryAdapter adapter
                     
                
    int namechange
                    
    using (adapter ButterflyEnvironment.GetDatabaseManager().getQueryreactor()) 
                    { 
                        
    adapter.setQuery("SELECT namechange FROM users WHERE id =" Session.GetHabbo().Id); 
                        
    namechange adapter.getInteger(); 
                    } 
                    if (
    namechange == 0
                    { 
                        
    string name ButterflyEnvironment.FilterInjectionChars(this.Request.PopFixedString()); 
                        
    string model this.Request.PopFixedString(); 
                        
    RoomData data ButterflyEnvironment.GetGame().GetRoomManager().CreateRoom(this.Sessionnamemodel); 
                        if (
    data != null
                        { 
                            
    this.Response.Init(Outgoing.OnCreateRoomInfo); 
                            
    this.Response.AppendInt32(data.Id); 
                            
    this.Response.AppendString(data.Name); 
                            
    this.SendResponse(); 
                        } 
                    } 
                    else { 
                        
    this.Session.SendNotif("You are still afk please reload and try again."); 
                   
                    } 
            } 
    that is what this code does.

    and mine is just the latest swift emu :)

  20. #20
    LETS REACH 666 POSTS?!!!! ImNotSatan is offline
    MemberRank
    Apr 2013 Join Date
    google.devLocation
    573Posts

    Re: Enableall and afk command [swift]

    Quote Originally Posted by Power69 View Post
    PHP Code:
    internal void CreateRoom() 
            { 
                 
    IQueryAdapter adapter
                     
                
    int namechange
                    
    using (adapter ButterflyEnvironment.GetDatabaseManager().getQueryreactor()) 
                    { 
                        
    adapter.setQuery("SELECT namechange FROM users WHERE id =" Session.GetHabbo().Id); 
                        
    namechange adapter.getInteger(); 
                    } 
                    if (
    namechange == 0
                    { 
                        
    string name ButterflyEnvironment.FilterInjectionChars(this.Request.PopFixedString()); 
                        
    string model this.Request.PopFixedString(); 
                        
    RoomData data ButterflyEnvironment.GetGame().GetRoomManager().CreateRoom(this.Sessionnamemodel); 
                        if (
    data != null
                        { 
                            
    this.Response.Init(Outgoing.OnCreateRoomInfo); 
                            
    this.Response.AppendInt32(data.Id); 
                            
    this.Response.AppendString(data.Name); 
                            
    this.SendResponse(); 
                        } 
                    } 
                    else { 
                        
    this.Session.SendNotif("You are still afk please reload and try again."); 
                   
                    } 
            } 
    that is what this code does.

    and mine is just the latest swift emu :)
    If you changed ur name to.. Afk can poeple still minic stalf whisper etc?

    And does the trade go well?

  21. #21
    DO YOU HAVE THE POWER? Power is offline
    MemberRank
    Aug 2012 Join Date
    Haverhill, SuffLocation
    248Posts

    Re: Enableall and afk command [swift]

    Quote Originally Posted by ImNotSatan View Post
    If you changed ur name to.. Afk can poeple still minic stalf whisper etc?

    And does the trade go well?
    havent tested trade thanks! and you cant see staff whispers

  22. #22
    LETS REACH 666 POSTS?!!!! ImNotSatan is offline
    MemberRank
    Apr 2013 Join Date
    google.devLocation
    573Posts

    Re: Enableall and afk command [swift]

    Quote Originally Posted by Power69 View Post
    havent tested trade thanks! and you cant see staff whispers
    Well, not sure if its here too but when i used phoenix my name was

    STARmyname
    Due that poeple couldnt whisper me, also spaces in the name idk if it works here

  23. #23
    DO YOU HAVE THE POWER? Power is offline
    MemberRank
    Aug 2012 Join Date
    Haverhill, SuffLocation
    248Posts

    Re: Enableall and afk command [swift]

    Quote Originally Posted by ImNotSatan View Post
    Well, not sure if its here too but when i used phoenix my name was

    STARmyname
    Due that poeple couldnt whisper me, also spaces in the name idk if it works here
    Afk works fine whispering
    :)

  24. #24
    LETS REACH 666 POSTS?!!!! ImNotSatan is offline
    MemberRank
    Apr 2013 Join Date
    google.devLocation
    573Posts

    Re: Enableall and afk command [swift]

    Quote Originally Posted by Power69 View Post
    Afk works fine whispering
    :)
    But can poeple also whisper to you?

  25. #25
    DO YOU HAVE THE POWER? Power is offline
    MemberRank
    Aug 2012 Join Date
    Haverhill, SuffLocation
    248Posts

    Re: Enableall and afk command [swift]

    yeah i just tested



Page 1 of 2 12 LastLast

Advertisement