Marko97
M97 Project based Plus EMU
- Aug 7, 2013
- 99
- 45
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.
1) Open your Emulator solution, go to HabboHotel\Items\Wired\Boxes\Effects and create a new class with this name: GiveDiamondsBox.cs and inside this class paste this content:
2) Go to HabboHotel\Items\Wired and inside the class WiredBoxType.cs after this line
add
3) Go to HabboHotel\Items\Wired and inside the class WiredBoxTypeUtility.cs after this line
add
AND after this line (return 7)
add
4) Go to HabboHotel\Rooms\Instance and inside the class WiredComponent.cs after this line
add
You need to download the SQL and SWF file. For download
VirusTotal:
SECURITY ISSUE:
SCNSHOT AND GIF
If I helped you, send a like
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.
1) Open your Emulator solution, go to HabboHotel\Items\Wired\Boxes\Effects and create a new class with this name: GiveDiamondsBox.cs 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;
}
}
}
}
2) Go to HabboHotel\Items\Wired and inside the class WiredBoxType.cs after this line
Code:
EffectExecuteWiredStacks,
Code:
EffectGiveDiamonds,
3) Go to HabboHotel\Items\Wired and inside the class WiredBoxTypeUtility.cs after this line
Code:
case 61:
return WiredBoxType.EffectGiveUserBadge;
Code:
case 62:
return WiredBoxType.EffectGiveDiamonds;
Code:
case WiredBoxType.EffectSetRollerSpeed:
Code:
case WiredBoxType.EffectGiveDiamonds:
4) Go to HabboHotel\Rooms\Instance and inside the class WiredComponent.cs after this line
Code:
case WiredBoxType.EffectMuteTriggerer:
return new MuteTriggererBox(_room, Item);
Code:
case WiredBoxType.EffectGiveDiamonds:
return new GiveDiamondsBox(_room, Item);
You need to download the SQL and SWF file. For download
You must be registered for see links
.VirusTotal:
You must be registered for see links
.SECURITY ISSUE:
All users can modify and use this wired! Follow this fix:
Go to SaveWiredConfigEvent.cs and search this (row 39)
Add under this:
Go to SaveWiredConfigEvent.cs and search this (row 39)
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:
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;
}
SCNSHOT AND GIF
GIF:
You must be registered for see links
.If I helped you, send a like
Last edited: