AFK Commando

Results 1 to 6 of 6
  1. #1
    Enthusiast SpirtuX is offline
    MemberRank
    Nov 2013 Join Date
    ЛинчёпиLocation
    36Posts

    AFK Commando

    Hello, I search for someone who could help me create a command.

    What I want:

    :afk-command and when you say :afk I want this to happend:

    User shouts out "*USERNAME* is afk!" and the :idle effect starts. When the user then move or something, the idle-effect goes away..

    Can anyone help me with this?

    Thanks!


  2. #2
    Apprentice raaaf is offline
    MemberRank
    Jun 2014 Join Date
    6Posts

    Re: AFK Commando

    I will add my skype: raf-de-king1

  3. #3
    iiiiiiiiiii Brought is offline
    MemberRank
    Aug 2013 Join Date
    469Posts

    Re: AFK Commando

    Quote Originally Posted by raaaf View Post
    I will add my skype: raf-de-king1
    Why would you not complete it here so that it can be contributed to the community?

    I'd suggest looking at a few of the Release threads as some of them are services that offer the ability to create commands. I would not trust dodgy users who randomly want you to add them on Skype.

  4. #4
    Member Charlotte Potts is offline
    MemberRank
    Aug 2015 Join Date
    YorkshireLocation
    64Posts

    Re: AFK Commando

    Quote Originally Posted by Brought View Post
    Why would you not complete it here so that it can be contributed to the community?

    I'd suggest looking at a few of the Release threads as some of them are services that offer the ability to create commands. I would not trust dodgy users who randomly want you to add them on Skype.
    100% agree.
    The afk isn't really that hard and you'll benefit more if you do it yourself. Most of what you said can be found in other commands. Try looking at other commands to see how they function and make one yourself. As for the idle. I think you just need to simply set a variable in your habbo.cs to false when the command is activated.

    Good luck
    -Charlotte

  5. #5
    Enthusiast SpirtuX is offline
    MemberRank
    Nov 2013 Join Date
    ЛинчёпиLocation
    36Posts

    Re: AFK Commando

    What does you think about this?


    case "afk":
    if (!this.Session.GetHabbo().GotCommand("afk"))
    {
    Room room = Session.GetHabbo().CurrentRoom;
    RoomUser roomuser = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
    if (roomuser.IsAsleep == false)
    {
    roomuser.Chat(Session, "*" + Session.GetHabbo().Username + " is now AFK!*", true, 1);
    roomuser.IsAsleep = true;
    roomUserByHabbo.Statusses.Add("idle", "0.55");
    roomuser.UpdateNeeded = true;
    return true;
    }
    } return true;


    EDIT:

    Yeah the user now says "USERNAME is AFK", but the idle effect dos'nt start. :/
    Last edited by SpirtuX; 18-11-15 at 01:24 PM.

  6. #6
    Member Charlotte Potts is offline
    MemberRank
    Aug 2015 Join Date
    YorkshireLocation
    64Posts

    Re: AFK Commando

    Quote Originally Posted by SpirtuX View Post
    What does you think about this?


    case "afk":
    if (!this.Session.GetHabbo().GotCommand("afk"))
    {
    Room room = Session.GetHabbo().CurrentRoom;
    RoomUser roomuser = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
    if (roomuser.IsAsleep == false)
    {
    roomuser.Chat(Session, "*" + Session.GetHabbo().Username + " is now AFK!*", true, 1);
    roomuser.IsAsleep = true;
    roomUserByHabbo.Statusses.Add("idle", "0.55");
    roomuser.UpdateNeeded = true;
    return true;
    }
    } return true;


    EDIT:

    Yeah the user now says "USERNAME is AFK", but the idle effect dos'nt start. :/
    Looks good.
    It looks like you've used the sit/lay command to give the user an "idle" status. I'm fairly sure that's not how it works, but good effort.
    "roomuser.IsAsleep = true;" is perfect. But try looking for a way to set the "idleTime" to 0. That way the room cycle will make you idle for you.

    Good luck and well done so far :)



Advertisement