Aller au contenu

Loieys

Membre
  • Compteur de contenus

    34
  • Inscription

  • Dernière visite

Messages posté(e)s par Loieys

  1. Bonsoir, récemment j'ai ajouté la commande givereward, mais quand le joueur reçoit notification comme quoi il avait reçu un lot : dgMt.pnget j'aimerai bien mettre un bouton " Fermer " mais je ne sais pas comment le mettre.

     

    Code de givereward.cs

     

    Citation

    using System;
    using System.Data;
    using System.Linq;
    using System.Text;
    using System.Collections.Generic;
    using Plus.Utilities;
    using Plus.HabboHotel.Users;
    using Plus.HabboHotel.GameClients;
    using Plus.HabboHotel.Moderation;
    using Plus.Database.Interfaces;
    using Plus.Communication.Packets.Outgoing.Notifications;
    using Plus.Communication.Packets.Outgoing.Rooms.Notifications;
    using Plus.HabboHotel.Users.Inventory;
    using Plus.Communication.Packets.Outgoing.Catalog;
    using Plus.Communication.Packets.Outgoing.Inventory.Purse;
    using Plus.Communication.Packets.Outgoing.Inventory.Furni;
    using Plus.HabboHotel.Items.Utilities;
    using Plus.HabboHotel.Quests;
    using Plus.HabboHotel.Items;
    using Plus.Communication.Packets.Incoming;

    namespace Plus.HabboHotel.Rooms.Chat.Commands.Events
    {
        class GiveRewards : IChatCommand
        {
            public string PermissionRequired
            {
                get { return "command_giverewards"; }
            }

            public string Parameters
            {
                get { return "%username%"; }
            }

            public string Description
            {
                get { return "Envoyer un cadeaux."; }
            }

            public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
            {
                if (Params.Length == 1)
                {
                    Session.SendWhisper("S'il vous plaît entrez le nom de l'utilisateur.");
                    return;
                }

                Habbo Habbo = PlusEnvironment.GetHabboByUsername(Params[1]);
                GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                if (Habbo == null)
                {
                    Session.SendWhisper("Une erreur est survenue tout en trouvant cet utilisateur dans la base de données.");
                    return;
                }
                if (Habbo.Username == Session.GetHabbo().Username)
                {
                    Session.SendWhisper("Vous ne pouvez pas vous give vous même.");
                    return;
                }

                using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
                {
                    DataTable Table = null;
                    dbClient.SetQuery("SELECT * FROM catalog_items WHERE page_id = '9214' ORDER BY RAND() LIMIT 1");
                    Table = dbClient.getTable();
                    foreach (DataRow dRow in Table.Rows)
                    {
                        Session.SendWhisper("Lot envoyé avec succès");
                        TargetClient.SendMessage(new RoomNotificationComposer("Informations importante!",
                        "Vous venez de recevoir un lot ! Merci de votre participation", "cadeau", ""));
                        DataRow dFurni = null;
                        dbClient.SetQuery("SELECT public_name FROM furniture WHERE id = '" + Convert.ToInt32(dRow["item_id"]) + "'");
                        dFurni = dbClient.getRow();
                        TargetClient.GetHabbo().GetInventoryComponent().AddNewItem(0, Convert.ToInt32(dRow["item_id"]), Convert.ToString(dFurni["public_name"]), 1, true, false, 0, 0);
                    }
                    TargetClient.GetHabbo().GetInventoryComponent().UpdateItems(false);
                }

            }
        }
    }

    Merci d'avance

  2. Bonsoir,

     

    Au lancement de PlusEmu tout fonctionne puis quand je me connecte le client reste à 76% et mon émulateur affiche ceci : 

    Citation


                         ____  __           ________  _____  __
                        / __ \/ /_  _______/ ____/  |/  / / / /
                       / /_/ / / / / / ___/ __/ / /|_/ / / / /
                      / ____/ / /_/ (__  ) /___/ /  / / /_/ /
                     /_/   /_/\__,_/____/_____/_/  /_/\____/
                                    Plus Emulator <Build 3.4.3.0>
                                    http://PlusIndustry.com

    19:12:46 - [INFO] Connected to Database!
    19:12:47 - [INFO] Loaded 9 language locales.
    19:12:47 - [INFO] Loaded 15 server settings.
    19:12:48 - [INFO] Loaded 3 Color Palettes
    19:12:48 - [INFO] Loaded 13 Set Types
    19:12:48 - [INFO] Successfully setup GameSocketManager on port (30000)!
    19:12:48 - [INFO] Maximum connections per IP has been set to [5]!
    19:12:48 - [INFO] Loaded 7 moderation presets.
    19:12:48 - [INFO] Loaded 6 moderation categories.
    19:12:48 - [INFO] Loaded 6 moderation action preset messages.
    19:12:48 - [INFO] Cached 0 username and machine bans.
    19:12:49 - [INFO] Item Manager -> LOADED
    19:12:50 - [INFO] Catalog Manager -> LOADED
    19:12:50 - [INFO] Television Items -> LOADED
    19:12:50 - [INFO] Navigator -> LOADED
    19:12:50 - [INFO] Room Manager -> LOADED
    19:12:50 - [INFO] Loaded 38 chat styles.
    19:12:50 - [INFO] Chat Manager -> LOADED
    19:12:50 - [INFO] Quest Manager -> LOADED
    19:12:50 - [INFO] Achievement Manager -> LOADED
    19:12:50 - [INFO] Landing View Manager -> LOADED
    19:12:50 - [INFO] Game Data Manager -> LOADED
    19:12:50 - [INFO] Server Status Updater has been started.
    19:12:50 - [INFO] Cache Manager -> LOADED
    19:12:51 - [INFO] Loaded 5299 badge definitions.
    19:12:51 - [INFO] Loaded 50 permissions.
    19:12:51 - [INFO] Loaded 9 permissions groups.
    19:12:51 - [INFO] Loaded 8 permissions group rights.
    19:12:51 - [INFO] Loaded 3 permissions subscription rights.
    19:12:51 - [INFO] Loaded 3 subscriptions.

    19:12:51 - [INFO] EMULATOR -> READY! (8 s, 606 ms)
    19:13:28 - [ERROR] Exception:
    System.FormatException: Le format de la chaîne d'entrée est incorrect.
       à System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
       à System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
       à System.Convert.ToInt32(String value)
       à Plus.HabboHotel.Rooms.RoomData.Fill(DataRow Row) dans C:\Users\Sledmore\Desktop\PlusEMU\HabboHotel\Rooms\RoomData.cs:ligne 87
       à Plus.HabboHotel.Rooms.RoomManager.FetchRoomData(Int32 RoomId, DataRow dRow) dans C:\Users\Sledmore\Desktop\PlusEMU\HabboHotel\Rooms\RoomManager.cs:ligne 400
       à Plus.HabboHotel.Users.UserData.UserDataFactory.GetUserData(String SessionTicket, Byte& errorCode) dans C:\Users\Sledmore\Desktop\PlusEMU\HabboHotel\Users\UserData\UserDataFactory.cs:ligne 158
       à Plus.HabboHotel.GameClients.GameClient.TryAuthenticate(String AuthTicket) dans C:\Users\Sledmore\Desktop\PlusEMU\HabboHotel\GameClients\GameClient.cs:ligne 100


     

    Emulateur et SWF provient de RetroRipper

     

    Merci d'avance

  3. @Solife merci :) j'ai changé 127.0.0.1 en localhost ça a marché :) 

     

    Par contre j'ai un autre problème, j'ai la dernière production (PRODUCTION-201701242205-837386173) j'ai mis le BubbleNotification

     

    mais je ne sais pas comment le mettre comme par exemple au lieu d'envoyer bulle // Session.SendWhisper("Utilisateur introuvable"); //j'aimerais envoyé une bulle sauf que je n'y arrive pas. COnseil ?

     

  4. Bonsoir,

     

    Après avoir configuré mes swf et démarrer mon émulateur. La console affiche ceci : dihi.png et le client crash. Comment résoudre se problème ? ( L'emulateur n'affiche aucune erreur )

     

    Merci d'avance. 

  5. Bonsoir,

     

    Je fais ce tuto car, je cherche à modifier les commandes comme par exemple fixer l'eventha

     

    Mais quand j'ouvre le fichier sln pour debug il y a écrit : Aucun projet définis un truc dans le genre.

     

    Ou s'il vous plaît quelqu'un aurait un tuto pour montrer comment modifier des commandes ?

  6. il y a 3 minutes, Masako a dit :

    Dans ce cas là, il manque l'icone & tu as biens placé le furnidata bien en haut? vérifie que l'id mobis et furnidata correspondent, après tu peux regarder avec la console de développement (ctrl maj i) pour voir les diverses erreur si il y'a n'a ^^

    Les icones je les places dans quel fichier ?

  7. Je vois la case du mobis mais sans le nom et il y a un carré noir quand on le pose : 

     

    Capture.PNG.52a6336f8e913270351a5fc22fde2532.PNGPourtant j'ai mis le swf dans dcr / hof_furni

    il y a 10 minutes, Masako a dit :

    Le mobis dans la table "catalog_items" qui utilise l'id = 9066 n'existe pas

     

  8. il y a 19 minutes, Masako a dit :

    Si aucun mobis ne s'affiche c'est que l'id ne correspond pas à la page, si tu galères toujours ajoute mon skype je t'aiderai^^

    Mon émulateur affiche ça : [ERROR] Couldn't load Catalog Item 9066, no furniture record found.

  9. Bjr, quand je rentre dans le client de mon site en local je vais sur la vue aerienne et ça crash et mon emulateur ecrit ça :

     

    Citation

    [ERROR] Exception:
    System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
       à Plus.Communication.Packets.Incoming.Messenger.MessengerInitEvent.Parse(GameClient Session, ClientPacket Packet) dans C:\Users\Sledmore\Desktop\PlusEMU\Communication\Packets\Incoming\Messenger\MessengerInitEvent.cs:ligne 48
       à Plus.Communication.Packets.PacketManager.TryExecutePacket(GameClient Session, ClientPacket Packet) dans C:\Users\Sledmore\Desktop\PlusEMU\Communication\Packets\PacketManager.cs:ligne 154
       à Plus.HabboHotel.GameClients.GameClient.parser_onNewPacket(ClientPacket Message) dans C:\Users\Sledmore\Desktop\PlusEMU\HabboHotel\GameClients\GameClient.cs:ligne 65

     

    de l'aide svp

    merci

×
×
  • Créer...