Phoenix 3.11.0 Commands

Results 1 to 2 of 2
  1. #1
    Elite Member danbenson93 is offline
    Member +Rank
    May 2013 Join Date
    240Posts

    Phoenix 3.11.0 Commands

    I'm wanting to add kiss, hug, punch and some custom commands to my emulator and I know the coding for them will be pretty much the same but I don't know where to start with the code, so I'm wondering if anyone can copy and paste one of the commands I have mentioned or even offer some help/advise on where to start.

    Before anyone mentions GTE, I want to learn as I do it hence why I want to add them myself.


  2. #2
    Newbie nysde is offline
    MemberRank
    Apr 2014 Join Date
    FRENCHLocation
    20Posts

    Re: Phoenix 3.11.0 Commands

    /RoleManager.cs

    this.dictionary_4.Add("kiss", ID);

    /ChatCommandHandler.cs

    case ID:


    {
    if (!Session.GetHabbo().HasFuse("cmd_kiss"))
    {
    Session.GetHabbo().Whisper("Vous n'êtes pas autorisé à utiliser cette commande!");
    return false;
    }
    string text = Params[1];
    string a = Params[1];

    TargetClient = Phoenix.GetGame().GetClientManager().GetClientByHabbo(text);
    class2 = class2 = Phoenix.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
    if (Session == null || TargetClient == null)
    {
    return false;
    }
    RoomUser class6 = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
    class6 = class2.GetRoomUserByHabbo(Session.GetHabbo().Id);
    RoomUser class4 = class2.GetRoomUserByHabbo(TargetClient.GetHabbo().Id);
    if (TargetClient.GetHabbo().Username == Session.GetHabbo().Username)
    {
    Session.GetHabbo().Whisper("Vous ne pouvez pas vous embrasser!");
    return true;
    }
    if (TargetClient.GetHabbo().CurrentRoomId == Session.GetHabbo().CurrentRoomId && Math.Abs(class6.X - class4.X) < 2 && Math.Abs(class6.Y - class4.Y) < 2)
    {
    Session.GetHabbo().GetEffectsInventoryComponent().method_2(9, true);
    TargetClient.GetHabbo().GetEffectsInventoryComponent().method_2(9, true);
    class6.HandleSpeech(Session, "*kisses " + TargetClient.GetHabbo().Username + "*", true);


    if (class6.BodyRotation == 0)
    {
    a = "up";
    }
    if (class6.BodyRotation == 2)
    {
    a = "right";
    }
    if (class6.BodyRotation == 4)
    {
    a = "down";
    }
    if (class6.BodyRotation == 6)
    {
    a = "left";
    }
    return true;
    }
    if (Session.GetHabbo().CurrentRoomId == Session.GetHabbo().CurrentRoomId)
    {
    Session.GetHabbo().Whisper("Pour embrasser cette personne, vous devez vous rapprocher!");
    return true;
    }
    return false;
    }

    /RoleManager.cs

    if (Phoenix.StringToBoolean(dataRow["cmd_kiss"].ToString()))
    {
    list.Add("cmd_kiss");
    }



Advertisement