1. Tired of not being able to see links? Want to chat with other members? Need help?

PlusEMU Support thread.

Discussion in 'Habbo Help & Support' started by Sledmore, Apr 24, 2016.

Thread Status:
Not open for further replies.
  1. INCOLENZEN

    INCOLENZEN New Member

    Yes, I did. Don't working.
     
  2. NathanCarn3y

    NathanCarn3y Habbo Developer

    whats your issue?
    ❤❤❤❤
     
  3. INCOLENZEN

    INCOLENZEN New Member

    If I set can_stack to 0 I can stack my furnis. On 1 I can stack my furnis, too.. I can't make furnis unstackable..
     
  4. Dominic

    Dominic Active Member

    Does anyone happen to know why some furniture won't rotate when placed on some specific tiles? (e.g marble tiles)
     
    LukeOx likes this.
  5. jordeyyy

    jordeyyy New Member

    I do have a working wf_act_give_reward code.
    Add this to your GiveRewardBox.cs
    Code:
    using System;
    using System.Linq;
    using System.Text;
    using System.Collections.Generic;
    using System.Collections.Concurrent;
    
    using Plus.Communication.Packets.Incoming;
    using Plus.HabboHotel.Rooms;
    using Plus.HabboHotel.Users;
    using Plus.Communication.Packets.Outgoing.Rooms.Chat;
    using Plus.Communication.Packets.Outgoing.Inventory.Furni;
    using Plus.Communication.Packets.Outgoing.Catalog;
    
    namespace Plus.HabboHotel.Items.Wired.Boxes.Effects
    {
        class GiveRewardBox : IWiredItem
        {
            public Room Instance { get; set; }
            public Item Item { get; set; }
            public WiredBoxType Type { get { return WiredBoxType.EffectGiveReward; } }
            public ConcurrentDictionary<int, Item> SetItems { get; set; }
            public string StringData { get; set; }
            public bool BoolData { get; set; }
            public string ItemsData { get; set; }
    
            public GiveRewardBox(Room Instance, Item Item)
            {
                this.Instance = Instance;
                this.Item = Item;
                this.SetItems = new ConcurrentDictionary<int, Item>();
            }
    
            public void HandleSave(ClientPacket Packet)
            {
                int Unknown = Packet.PopInt();
                int Often = Packet.PopInt();
                bool Unique = (Packet.PopInt() == 1);
                int Limit = Packet.PopInt();
                int Often_No = Packet.PopInt();
                string Reward = Packet.PopString();
    
                this.BoolData = Unique;
                this.StringData = Reward + "-" + Often + "-" + Limit;
            }
    
            public bool Execute(params object[] Params)
            {
                if (Params == null || Params.Length == 0)
                    return false;
    
                Habbo Owner = PlusEnvironment.GetHabboById(Item.UserID);
                if (Owner == null || !Owner.GetPermissions().HasRight("room_item_wired_rewards"))
                    return false;
    
                Habbo Player = (Habbo)Params[0];
                if (Player == null || Player.GetClient() == null)
                    return false;
    
                RoomUser User = Player.CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Player.Username);
                if (User == null)
                    return false;
    
                if (String.IsNullOrEmpty(StringData))
                    return false;
    
                int amountLeft = int.Parse(this.StringData.Split('-')[2]);
                int often = int.Parse(this.StringData.Split('-')[1]);
                bool unique = this.BoolData;
    
                bool premied = false;
    
                if (amountLeft == 1)
                {
                    Player.GetClient().SendNotification("De prijs is vandaag niet meer te halen! Sorry!");
                    return true;
                }
    
                foreach (var dataStr in (this.StringData.Split('-')[0]).Split(';'))
                {
                    var dataArray = dataStr.Split(',');
    
                    var isbadge = dataArray[0] == "0";
                    var code = dataArray[1];
                    var percentage = int.Parse(dataArray[2]);
    
                    var random = PlusEnvironment.GetRandomNumber(0, 100);
    
                    if (!unique && percentage < random)
                        continue;
                    premied = true;
    
                    if (isbadge)
                    {
                        if (Player.GetBadgeComponent().HasBadge(code))
                            Player.GetClient().SendMessage(new WhisperComposer(User.VirtualId, "Oeps! Het lijkt erop dat je deze Badge al hebt!", 0, User.LastBubble));
                        else
                        {
                            Player.GetBadgeComponent().GiveBadge(code, true, Player.GetClient());
                            Player.GetClient().SendNotification("He! Je hebt zojuist een badge gekregen!");
                        }
                    }
                    else
                    {
                        ItemData ItemData = null;
    
                        if (!PlusEnvironment.GetGame().GetItemManager().GetItem(int.Parse(code), out ItemData))
                        {
                            Player.GetClient().SendMessage(new WhisperComposer(User.VirtualId, "Geen bekende item met id: " + code, 0, User.LastBubble));
                            return false;
                        }
    
                        Item Item = ItemFactory.CreateSingleItemNullable(ItemData, Player.GetClient().GetHabbo(), "", "", 0, 0, 0);
    
    
                        if (Item != null)
                        {
                            Player.GetClient().GetHabbo().GetInventoryComponent().TryAddItem(Item);
                            Player.GetClient().SendMessage(new FurniListNotificationComposer(Item.Id, 1));
                            Player.GetClient().SendMessage(new PurchaseOKComposer());
                            Player.GetClient().SendMessage(new FurniListAddComposer(Item));
                            Player.GetClient().SendMessage(new FurniListUpdateComposer());
                            Player.GetClient().SendNotification("Je hebt zojuist een beloning gekregen! Check je inventaris!");
                        }
                    }
                }
    
                if (!premied)
                {
                    Player.GetClient().SendNotification("Je hebt deze keer geen prijs gekregen! Volgende keer beter!");
                }
                else if (amountLeft > 1)
                {
                    amountLeft--;
                    this.StringData.Split('-')[2] = amountLeft.ToString();
                }
    
                return true;
            }
        }
    }
    
    Only problem i have at the moment is that the Limit of uses and the limit of uses per user isn't working yet.. so if anyone knows how to fix that that would be great.
     
  6. NathanCarn3y

    NathanCarn3y Habbo Developer

    pm me
     
  7. INCOLENZEN

    INCOLENZEN New Member

    I can't because I need 25 posts.. so can you tell me your skypename or something?
     
  8. NathanCarn3y

    NathanCarn3y Habbo Developer

    what skype username. i can fix it when i have time
     
  9. SpreedBlood

    SpreedBlood Member

    You know you're not allowed to offer help via skype, it's a new rule. Please read/re-read the rules. :) [​IMG]
     
  10. FourDaFer

    FourDaFer New Member

    What is the latest version of Plus emu? and where i can buy it or download it?
     
  11. SpreedBlood

    SpreedBlood Member

    The one on retroripper is the latest stable one currently. Sledmore is working on one right now though that is updated. :)

    Skickat från min FRD-L09 via Tapatalk
     
    FourDaFer likes this.
  12. FourDaFer

    FourDaFer New Member

    Thank you :)
     
  13. INCOLENZEN

    INCOLENZEN New Member

    Can someone help me, pls?
     
  14. JMG

    JMG wut wut Staff Member

    Type :update items, :update furniture then unload the room.
     
  15. INCOLENZEN

    INCOLENZEN New Member

    As I said.. it isn't working.
     
  16. JMG

    JMG wut wut Staff Member

    Works fine for me.
     
  17. INCOLENZEN

    INCOLENZEN New Member

    Can you send me your catalog, so I can try it? Maybe my catalog is broken..
     
  18. Sentinel

    Sentinel Soldier at Sayeret Matkal

    yo, I'm having bit of a trouble to get sockets working. No errors were shown when the function was executed, but nothing happened. I've tried various different commands and data, but still nothing. Any one who actually got this to work?
    PHP:
    function MUS($command$data="") {

        
    $MUSdata $command chr(1) . $data;
        
    $socket socket_create(AF_INETSOCK_STREAMgetprotobyname('tcp')) or die ('Could not create socket.\n');
        
    socket_connect($socket'VPS_IP'30001) or die('Could not connect socket.\n');
        
    socket_send($socket$MUSdatastrlen($MUSdata), MSG_DONTROUTE) or die('Could not send socket data.\n');
        
    socket_close($socket);

    }

    MUS("kill""EXON");
    btw, is it possible to run a command that gives users a certain item and badge aswell as update stats in usertable? Got it sorted out in PHP, but since people would have to reload their client, I'd rather use sockets, if they'd actually work..
     
  19. INCOLENZEN

    INCOLENZEN New Member

    Can someone help here?
     
  20. Sentinel

    Sentinel Soldier at Sayeret Matkal

    Why it doesn't work? Check the wired statement dude, "user walks on" you simply don't walk onto something if it gets summoned beneath you. You need to do a "if furni has users" and then a "user collision" which teleports them back.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...