Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
[PLUS EMU] Super Wired: Give Diamonds [R2]
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Marko97" data-source="post: 419309" data-attributes="member: 36313"><p>Hello anyone,</p><p>Today I will share with you my creation. A simple wired effect can send an amount of diamonds. The amount could be positive and negative.</p><p></p><p><strong>1) </strong>Open your Emulator solution, go to<strong> HabboHotel\Items\Wired\Boxes\Effects </strong>and create a new class with this name: <strong>GiveDiamondsBox.cs </strong>and inside this class paste this content:</p><p>[CODE]</p><p>using System;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Collections.Generic;</p><p>using System.Collections.Concurrent;</p><p></p><p>using Plus.Communication.Packets.Incoming;</p><p>using Plus.HabboHotel.Rooms;</p><p>using Plus.HabboHotel.Users;</p><p>using Plus.Communication.Packets.Outgoing.Rooms.Chat;</p><p>using Plus.Communication.Packets.Outgoing.Inventory.Purse;</p><p></p><p>namespace Plus.HabboHotel.Items.Wired.Boxes.Effects</p><p>{</p><p> class GiveDiamondsBox : IWiredItem</p><p> {</p><p> public Room Instance { get; set; }</p><p></p><p> public Item Item { get; set; }</p><p></p><p> public WiredBoxType Type { get { return WiredBoxType.EffectGiveDiamonds; } }</p><p></p><p> public ConcurrentDictionary<int, Item> SetItems { get; set; }</p><p></p><p> public string StringData { get; set; }</p><p></p><p> public bool BoolData { get; set; }</p><p></p><p> public string ItemsData { get; set; }</p><p></p><p> public GiveDiamondsBox(Room Instance, Item Item)</p><p> {</p><p> this.Instance = Instance;</p><p> this.Item = Item;</p><p> this.SetItems = new ConcurrentDictionary<int, Item>();</p><p> }</p><p></p><p> public void HandleSave(ClientPacket Packet)</p><p> {</p><p> int Unknown = Packet.PopInt();</p><p> string Coin = Packet.PopString();</p><p></p><p> this.StringData = Coin;</p><p> }</p><p></p><p> public bool Execute(params object[] Params)</p><p> {</p><p> if (Params == null || Params.Length == 0)</p><p> return false;</p><p></p><p> Habbo Owner = PlusEnvironment.GetHabboById(Item.UserID);</p><p> if (Owner == null || !Owner.GetPermissions().HasRight("room_item_wired_rewards"))</p><p> return false;</p><p></p><p> Habbo Player = (Habbo)Params[0];</p><p> if (Player == null || Player.GetClient() == null)</p><p> return false;</p><p></p><p> RoomUser User = Player.CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Player.Username);</p><p> if (User == null)</p><p> return false;</p><p></p><p> if (String.IsNullOrEmpty(StringData))</p><p> return false;</p><p></p><p> int Amount;</p><p> Amount = Convert.ToInt32(StringData);</p><p> if (Amount > 100)</p><p> {</p><p> Player.GetClient().SendNotification("You can't send +100 diamonds.");</p><p> return false;</p><p> }</p><p> else</p><p> {</p><p> Player.GetClient().GetHabbo().Diamonds += Amount;</p><p> Player.GetClient().SendPacket(new HabboActivityPointNotificationComposer(Player.GetClient().GetHabbo().Diamonds, Amount, 5));</p><p> Player.GetClient().SendWhisper("Amazing! You've obtained " + Amount.ToString() + " diamonds!", 34); //Marko97</p><p></p><p> return true;</p><p> }</p><p> }</p><p> }</p><p>}</p><p>[/CODE]</p><p></p><p><strong>2) </strong>Go to <strong>HabboHotel\Items\Wired</strong> and inside the class <strong>WiredBoxType.cs</strong> after this line</p><p>[CODE]</p><p>EffectExecuteWiredStacks,</p><p>[/CODE]</p><p>add</p><p>[CODE]</p><p>EffectGiveDiamonds,</p><p>[/CODE]</p><p></p><p><strong>3)</strong> Go to <strong>HabboHotel\Items\Wired</strong> and inside the class <strong>WiredBoxTypeUtility.cs</strong> after this line</p><p>[CODE]</p><p>case 61:</p><p>return WiredBoxType.EffectGiveUserBadge;</p><p>[/CODE]</p><p>add</p><p>[CODE]</p><p>case 62:</p><p>return WiredBoxType.EffectGiveDiamonds;</p><p>[/CODE]</p><p><strong>AND </strong>after this line (return 7)</p><p>[CODE]</p><p>case WiredBoxType.EffectSetRollerSpeed:</p><p>[/CODE]</p><p>add</p><p>[CODE]</p><p>case WiredBoxType.EffectGiveDiamonds:</p><p>[/CODE]</p><p><strong></strong></p><p><strong><strong>4)</strong> </strong>Go to<strong> <strong>HabboHotel\Rooms\Instance</strong> </strong>and inside the class<strong> <strong>WiredComponent.cs</strong> </strong>after this line</p><p>[CODE]</p><p>case WiredBoxType.EffectMuteTriggerer:</p><p>return new MuteTriggererBox(_room, Item);</p><p>[/CODE]</p><p>add</p><p>[CODE]</p><p>case WiredBoxType.EffectGiveDiamonds:</p><p>return new GiveDiamondsBox(_room, Item);</p><p>[/CODE]</p><p></p><p>You need to download the SQL and SWF file. For download <a href="https://mega.nz/#!8YUjDbyI!2B1-DnPJIdWFuzkpQl0fpCcdfbsqS_1RjC396K93a_M" target="_blank">click here</a>.</p><p>VirusTotal: <a href="https://www.virustotal.com/#/file/d10f482eabc9b7da2d86b04c3a731bc633f8b8138c15e3c00c8f6145f51f92e2/detection" target="_blank">Click here</a>.</p><p></p><p><span style="color: #ff0000"><strong><u>SECURITY ISSUE:</u></strong></span></p><p>[SPOILER]All users can modify and use this wired! Follow this fix:</p><p>Go to <strong>SaveWiredConfigEvent.cs</strong> and search this <em>(row 39)</em></p><p>[CODE]</p><p> if (Box.Type == WiredBoxType.EffectGiveUserBadge && !Session.GetHabbo().GetPermissions().HasRight("room_item_wired_rewards"))</p><p> {</p><p> Session.SendNotification("You don't have the correct permissions to do this.");</p><p> return;</p><p> }</p><p>[/CODE]</p><p>Add under this:</p><p>[CODE]</p><p> if (Box.Type == WiredBoxType.EffectGiveDiamonds && !Session.GetHabbo().GetPermissions().HasRight("room_item_wired_rewards"))</p><p> {</p><p> Session.SendNotification("You don't have the correct permissions to do this.");</p><p> return;</p><p> }</p><p>[/CODE]</p><p><img src="https://s17.postimg.org/swxdoe6xr/fix.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p>[/SPOILER]</p><p></p><p><span style="color: #0059b3"><strong>SC<img src="https://cdn.devbest.com/data/assets/smilies/REE.png" srcset="https://cdn.devbest.com/data/assets/smilies/REE.png 1x, https://cdn.devbest.com/data/assets/smilies/REE-2x.png 2x" class="smilie" loading="lazy" alt="REE" title="REE REE" data-shortname="REE" />NSHOT AND GIF</strong></span></p><p><span style="color: #0059b3"><strong>[SPOILER][/SPOILER]</strong>[SPOILER]</span></p><p><span style="color: #0059b3"><strong><img src="https://i.imgur.com/Ms9T1Jp.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /> <img src="https://i.imgur.com/y7KB2RE.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /> <img src="https://i.imgur.com/CIevQ3g.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </strong></span></p><p><span style="color: #0059b3">[/SPOILER]</span></p><p><span style="color: #0059b3"><strong>[SPOILER][/SPOILER]</strong>[SPOILER][/spoiler]</span>[SPOILER]</p><p><span style="color: #000000"><strong>GIF: </strong><a href="https://gyazo.com/9cf76262c82607a66beea1d0ac88c95a" target="_blank">Click here</a>.</span></p><p>[/SPOILER]</p><p><span style="color: #000000"></span></p><p><span style="color: #000000">If I helped you, send a like <img src="/styles/default/xenforo/smilies/emojione/smile.png" class="smilie" loading="lazy" alt=":)" title="Smile :)" data-shortname=":)" /></span></p></blockquote><p></p>
[QUOTE="Marko97, post: 419309, member: 36313"] Hello anyone, Today I will share with you my creation. A simple wired effect can send an amount of diamonds. The amount could be positive and negative. [B]1) [/B]Open your Emulator solution, go to[B] HabboHotel\Items\Wired\Boxes\Effects [/B]and create a new class with this name: [B]GiveDiamondsBox.cs [/B]and inside this class paste this content: [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.Purse; namespace Plus.HabboHotel.Items.Wired.Boxes.Effects { class GiveDiamondsBox : IWiredItem { public Room Instance { get; set; } public Item Item { get; set; } public WiredBoxType Type { get { return WiredBoxType.EffectGiveDiamonds; } } public ConcurrentDictionary<int, Item> SetItems { get; set; } public string StringData { get; set; } public bool BoolData { get; set; } public string ItemsData { get; set; } public GiveDiamondsBox(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(); string Coin = Packet.PopString(); this.StringData = Coin; } 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 Amount; Amount = Convert.ToInt32(StringData); if (Amount > 100) { Player.GetClient().SendNotification("You can't send +100 diamonds."); return false; } else { Player.GetClient().GetHabbo().Diamonds += Amount; Player.GetClient().SendPacket(new HabboActivityPointNotificationComposer(Player.GetClient().GetHabbo().Diamonds, Amount, 5)); Player.GetClient().SendWhisper("Amazing! You've obtained " + Amount.ToString() + " diamonds!", 34); //Marko97 return true; } } } } [/CODE] [B]2) [/B]Go to [B]HabboHotel\Items\Wired[/B] and inside the class [B]WiredBoxType.cs[/B] after this line [CODE] EffectExecuteWiredStacks, [/CODE] add [CODE] EffectGiveDiamonds, [/CODE] [B]3)[/B] Go to [B]HabboHotel\Items\Wired[/B] and inside the class [B]WiredBoxTypeUtility.cs[/B] after this line [CODE] case 61: return WiredBoxType.EffectGiveUserBadge; [/CODE] add [CODE] case 62: return WiredBoxType.EffectGiveDiamonds; [/CODE] [B]AND [/B]after this line (return 7) [CODE] case WiredBoxType.EffectSetRollerSpeed: [/CODE] add [CODE] case WiredBoxType.EffectGiveDiamonds: [/CODE] [B] [B]4)[/B] [/B]Go to[B] [B]HabboHotel\Rooms\Instance[/B] [/B]and inside the class[B] [B]WiredComponent.cs[/B] [/B]after this line [CODE] case WiredBoxType.EffectMuteTriggerer: return new MuteTriggererBox(_room, Item); [/CODE] add [CODE] case WiredBoxType.EffectGiveDiamonds: return new GiveDiamondsBox(_room, Item); [/CODE] You need to download the SQL and SWF file. For download [URL='https://mega.nz/#!8YUjDbyI!2B1-DnPJIdWFuzkpQl0fpCcdfbsqS_1RjC396K93a_M']click here[/URL]. VirusTotal: [URL='https://www.virustotal.com/#/file/d10f482eabc9b7da2d86b04c3a731bc633f8b8138c15e3c00c8f6145f51f92e2/detection']Click here[/URL]. [COLOR=#ff0000][B][U]SECURITY ISSUE:[/U][/B][/COLOR] [SPOILER]All users can modify and use this wired! Follow this fix: Go to [B]SaveWiredConfigEvent.cs[/B] and search this [I](row 39)[/I] [CODE] if (Box.Type == WiredBoxType.EffectGiveUserBadge && !Session.GetHabbo().GetPermissions().HasRight("room_item_wired_rewards")) { Session.SendNotification("You don't have the correct permissions to do this."); return; } [/CODE] Add under this: [CODE] if (Box.Type == WiredBoxType.EffectGiveDiamonds && !Session.GetHabbo().GetPermissions().HasRight("room_item_wired_rewards")) { Session.SendNotification("You don't have the correct permissions to do this."); return; } [/CODE] [IMG]https://s17.postimg.org/swxdoe6xr/fix.png[/IMG] [/SPOILER] [COLOR=#0059b3][B]SCREENSHOT AND GIF[/B] [B][SPOILER][/SPOILER][/B][SPOILER] [B][IMG]https://i.imgur.com/Ms9T1Jp.png[/IMG] [IMG]https://i.imgur.com/y7KB2RE.png[/IMG] [IMG]https://i.imgur.com/CIevQ3g.png[/IMG] [/B] [/SPOILER] [B][SPOILER][/SPOILER][/B][SPOILER][/spoiler][/COLOR][SPOILER] [COLOR=#000000][B]GIF: [/B][URL='https://gyazo.com/9cf76262c82607a66beea1d0ac88c95a']Click here[/URL].[/COLOR] [/SPOILER] [COLOR=#000000] If I helped you, send a like :)[/COLOR] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
[PLUS EMU] Super Wired: Give Diamonds [R2]
Top