my image isn't loading.. any idea of how to fix it?
Check the entire thread before you post the same error over and over again please!
09-01-16
Jose Carlos
re: Official PlusEMU - Help Thread
commands eventha, credits, masscredits help :/
09-01-16
XxMurphyxX
re: Official PlusEMU - Help Thread
Quote:
Originally Posted by Jose Carlos
commands eventha, credits, masscredits help :/
Give credits, :give %USER% %TYPE% %AMOUNT%
I think it doesn't have masscredits or eventha... (Masscredits needs to be there tho)
09-01-16
dominic
re: Official PlusEMU - Help Thread
Quote:
Originally Posted by XxMurphyxX
Give credits, :give %USER% %TYPE% %AMOUNT%
I think it doesn't have masscredits or eventha... (Masscredits needs to be there tho)
Add this to Commands -> Moderator -> MassGiveCommand.cs
Code:
using System.Linq;
using Plus.Communication.Packets.Outgoing.Inventory.Purse;
using Plus.HabboHotel.GameClients;
namespace Plus.HabboHotel.Rooms.Chat.Commands.Moderator
{
class MassGiveCommand : IChatCommand
{
public string PermissionRequired
{
get { return "command_mass_give"; }
}
public string Parameters
{
get { return "%type% %amount%"; }
}
public string Description
{
get { return ""; }
}
public void Execute(GameClient session, Room room, string[] Params)
{
if (Params.Length == 1)
{
session.SendWhisper("Please enter a currency type! (coins, duckets, diamonds, gotw)");
return;
}
var updateVal = Params[1];
switch (updateVal.ToLower())
{
case "coins":
case "credits":
{
if (!session.GetHabbo().GetPermissions().HasCommand("command_give_coins"))
{
session.SendWhisper("Oops, it appears that you do not have the permissions to use this command!");
break;
}
int amount;
if (int.TryParse(Params[2], out amount))
{
foreach (var client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList().Where(client => client?.GetHabbo() != null && client.GetHabbo().Username != session.GetHabbo().Username))
{
client.GetHabbo().Credits = client.GetHabbo().Credits += amount;
client.SendMessage(new CreditBalanceComposer(client.GetHabbo().Credits));
if (client.GetHabbo().Id != session.GetHabbo().Id)
client.SendNotification(session.GetHabbo().Username + " has given you " + amount +
" Credit(s)!");
session.SendWhisper("Successfully given " + amount + " Credit(s) to " +
client.GetHabbo().Username + "!");
}
break;
}
session.SendWhisper("Oops, that appears to be an invalid amount!");
break;
}
case "pixels":
case "duckets":
{
if (!session.GetHabbo().GetPermissions().HasCommand("command_give_pixels"))
{
session.SendWhisper("Oops, it appears that you do not have the permissions to use this command!");
break;
}
int amount;
if (int.TryParse(Params[2], out amount))
{
foreach (var client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList().Where(client => client?.GetHabbo() != null && client.GetHabbo().Username != session.GetHabbo().Username))
{
client.GetHabbo().Duckets += amount;
client.SendMessage(new HabboActivityPointNotificationComposer(
client.GetHabbo().Duckets, amount));
if (client.GetHabbo().Id != session.GetHabbo().Id)
client.SendNotification(session.GetHabbo().Username + " has given you " + amount +
" Ducket(s)!");
session.SendWhisper("Successfully given " + amount + " Ducket(s) to " +
client.GetHabbo().Username + "!");
}
break;
}
session.SendWhisper("Oops, that appears to be an invalid amount!");
break;
}
case "diamonds":
{
if (!session.GetHabbo().GetPermissions().HasCommand("command_give_diamonds"))
{
session.SendWhisper("Oops, it appears that you do not have the permissions to use this command!");
break;
}
int amount;
if (int.TryParse(Params[2], out amount))
{
foreach (var client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList().Where(client => client?.GetHabbo() != null && client.GetHabbo().Username != session.GetHabbo().Username))
{
client.GetHabbo().Diamonds += amount;
client.SendMessage(new HabboActivityPointNotificationComposer(client.GetHabbo().Diamonds,
amount,
5));
if (client.GetHabbo().Id != session.GetHabbo().Id)
client.SendNotification(session.GetHabbo().Username + " has given you " + amount +
" Diamond(s)!");
session.SendWhisper("Successfully given " + amount + " Diamond(s) to " +
client.GetHabbo().Username + "!");
}
break;
}
session.SendWhisper("Oops, that appears to be an invalid amount!");
break;
}
case "gotw":
case "gotwpoints":
{
if (!session.GetHabbo().GetPermissions().HasCommand("command_give_gotw"))
{
session.SendWhisper("Oops, it appears that you do not have the permissions to use this command!");
break;
}
int amount;
if (int.TryParse(Params[2], out amount))
{
foreach (var client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList().Where(client => client?.GetHabbo() != null && client.GetHabbo().Username != session.GetHabbo().Username))
{
client.GetHabbo().GotwPoints = client.GetHabbo().GotwPoints + amount;
client.SendMessage(new HabboActivityPointNotificationComposer(client.GetHabbo().GotwPoints,
amount, 103));
if (client.GetHabbo().Id != session.GetHabbo().Id)
client.SendNotification(session.GetHabbo().Username + " has given you " + amount +
" GOTW Point(s)!");
session.SendWhisper("Successfully given " + amount + " GOTW point(s) to " +
client.GetHabbo().Username + "!");
}
break;
}
session.SendWhisper("Oops, that appears to be an invalid amount!");
break;
}
default:
session.SendWhisper("'" + updateVal + "' is not a valid currency!");
break;
}
}
}
}
And in CommandManager add
Register("massgive", new MassGiveCommand());
above Register("massbadge", new MassBadgeCommand());
Usage; ":massgive %USER% %TYPE% %AMOUNT%"
09-01-16
XxMurphyxX
re: Official PlusEMU - Help Thread
Quote:
Originally Posted by Dominic
Add this to Commands -> Moderator -> MassGiveCommand.cs
Wuwuwuw! :love: thank you so much:3 I'll add it immediately ^.^ This emulator is the BOMB!:thumbup1:
09-01-16
KyleeIsProzZ
re: Official PlusEMU - Help Thread
Quote:
Originally Posted by Dominic
Add this to Commands -> Moderator -> MassGiveCommand.cs
Code:
using System.Linq;
using Plus.Communication.Packets.Outgoing.Inventory.Purse;
using Plus.HabboHotel.GameClients;
namespace Plus.HabboHotel.Rooms.Chat.Commands.Moderator
{
class MassGiveCommand : IChatCommand
{
public string PermissionRequired
{
get { return "command_give"; }
}
public string Parameters
{
get { return "%username% %type% %amount%"; }
}
public string Description
{
get { return ""; }
}
public void Execute(GameClient session, Room room, string[] Params)
{
if (Params.Length == 1)
{
session.SendWhisper("Please enter a currency type! (coins, duckets, diamonds, gotw)");
return;
}
var updateVal = Params[2];
switch (updateVal.ToLower())
{
case "coins":
case "credits":
{
if (!session.GetHabbo().GetPermissions().HasCommand("command_give_coins"))
{
session.SendWhisper("Oops, it appears that you do not have the permissions to use this command!");
break;
}
int amount;
if (int.TryParse(Params[3], out amount))
{
foreach (var client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList())
{
if (client?.GetHabbo() == null ||
client.GetHabbo().Username == session.GetHabbo().Username)
continue;
if (client.GetHabbo().Id != session.GetHabbo().Id)
client.SendNotification(session.GetHabbo().Username + " has given you " + amount +
" Credit(s)!");
session.SendWhisper("Successfully given " + amount + " Credit(s) to " +
client.GetHabbo().Username + "!");
}
break;
}
session.SendWhisper("Oops, that appears to be an invalid amount!");
break;
}
case "pixels":
case "duckets":
{
if (!session.GetHabbo().GetPermissions().HasCommand("command_give_pixels"))
{
session.SendWhisper("Oops, it appears that you do not have the permissions to use this command!");
break;
}
int amount;
if (int.TryParse(Params[3], out amount))
{
foreach (var client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList())
{
if (client?.GetHabbo() == null ||
client.GetHabbo().Username == session.GetHabbo().Username)
continue;
client.GetHabbo().Duckets += amount;
client.SendMessage(new HabboActivityPointNotificationComposer(
client.GetHabbo().Duckets, amount));
if (client.GetHabbo().Id != session.GetHabbo().Id)
client.SendNotification(session.GetHabbo().Username + " has given you " + amount +
" Ducket(s)!");
session.SendWhisper("Successfully given " + amount + " Ducket(s) to " +
client.GetHabbo().Username + "!");
}
break;
}
session.SendWhisper("Oops, that appears to be an invalid amount!");
break;
}
case "diamonds":
{
if (!session.GetHabbo().GetPermissions().HasCommand("command_give_diamonds"))
{
session.SendWhisper("Oops, it appears that you do not have the permissions to use this command!");
break;
}
int amount;
if (int.TryParse(Params[3], out amount))
{
foreach (var client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList())
{
if (client?.GetHabbo() == null ||
client.GetHabbo().Username == session.GetHabbo().Username)
continue;
client.GetHabbo().Diamonds += amount;
client.SendMessage(new HabboActivityPointNotificationComposer(client.GetHabbo().Diamonds,
amount,
5));
if (client.GetHabbo().Id != session.GetHabbo().Id)
client.SendNotification(session.GetHabbo().Username + " has given you " + amount +
" Diamond(s)!");
session.SendWhisper("Successfully given " + amount + " Diamond(s) to " +
client.GetHabbo().Username + "!");
}
break;
}
session.SendWhisper("Oops, that appears to be an invalid amount!");
break;
}
case "gotw":
case "gotwpoints":
{
if (!session.GetHabbo().GetPermissions().HasCommand("command_give_gotw"))
{
session.SendWhisper("Oops, it appears that you do not have the permissions to use this command!");
break;
}
int amount;
if (int.TryParse(Params[3], out amount))
{
foreach (var client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList())
{
if (client?.GetHabbo() == null ||
client.GetHabbo().Username == session.GetHabbo().Username)
continue;
client.GetHabbo().GotwPoints = client.GetHabbo().GotwPoints + amount;
client.SendMessage(new HabboActivityPointNotificationComposer(client.GetHabbo().GotwPoints,
amount, 103));
if (client.GetHabbo().Id != session.GetHabbo().Id)
client.SendNotification(session.GetHabbo().Username + " has given you " + amount +
" GOTW Point(s)!");
session.SendWhisper("Successfully given " + amount + " GOTW point(s) to " +
client.GetHabbo().Username + "!");
}
break;
}
session.SendWhisper("Oops, that appears to be an invalid amount!");
break;
}
default:
session.SendWhisper("'" + updateVal + "' is not a valid currency!");
break;
}
}
}
}
And in CommandManager add
Register("massgive", new MassGiveCommand());
above Register("massbadge", new MassBadgeCommand());
Usage; ":massgive %USER% %TYPE% %AMOUNT%"
Nice brother.
09-01-16
dominic
re: Official PlusEMU - Help Thread
Should probably use this as well..
Run this as a query:
Code:
INSERT INTO `permissions_commands` (`command`, `group_id`) VALUES ('command_mass_give', '6')
And change your PermissionRequired to:
Code:
public string PermissionRequired
{
get { return "command_mass_give"; }
}
@KyleeIsProzZ @XxMurphyxX - updated my other comment, seemed to be a bug with it. Please undo changes and use the new code
09-01-16
YoWesty
re: Official PlusEMU - Help Thread
Quote:
Originally Posted by Dominic
Add this to Commands -> Moderator -> MassGiveCommand.cs
Code:
using System.Linq;
using Plus.Communication.Packets.Outgoing.Inventory.Purse;
using Plus.HabboHotel.GameClients;
namespace Plus.HabboHotel.Rooms.Chat.Commands.Moderator
{
class MassGiveCommand : IChatCommand
{
public string PermissionRequired
{
get { return "command_mass_give"; }
}
public string Parameters
{
get { return "%type% %amount%"; }
}
public string Description
{
get { return ""; }
}
public void Execute(GameClient session, Room room, string[] Params)
{
if (Params.Length == 1)
{
session.SendWhisper("Please enter a currency type! (coins, duckets, diamonds, gotw)");
return;
}
var updateVal = Params[1];
switch (updateVal.ToLower())
{
case "coins":
case "credits":
{
if (!session.GetHabbo().GetPermissions().HasCommand("command_give_coins"))
{
session.SendWhisper("Oops, it appears that you do not have the permissions to use this command!");
break;
}
int amount;
if (int.TryParse(Params[2], out amount))
{
foreach (var client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList().Where(client => client?.GetHabbo() != null && client.GetHabbo().Username != session.GetHabbo().Username))
{
client.GetHabbo().Credits = client.GetHabbo().Credits += amount;
client.SendMessage(new CreditBalanceComposer(client.GetHabbo().Credits));
if (client.GetHabbo().Id != session.GetHabbo().Id)
client.SendNotification(session.GetHabbo().Username + " has given you " + amount +
" Credit(s)!");
session.SendWhisper("Successfully given " + amount + " Credit(s) to " +
client.GetHabbo().Username + "!");
}
break;
}
session.SendWhisper("Oops, that appears to be an invalid amount!");
break;
}
case "pixels":
case "duckets":
{
if (!session.GetHabbo().GetPermissions().HasCommand("command_give_pixels"))
{
session.SendWhisper("Oops, it appears that you do not have the permissions to use this command!");
break;
}
int amount;
if (int.TryParse(Params[2], out amount))
{
foreach (var client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList().Where(client => client?.GetHabbo() != null && client.GetHabbo().Username != session.GetHabbo().Username))
{
client.GetHabbo().Duckets += amount;
client.SendMessage(new HabboActivityPointNotificationComposer(
client.GetHabbo().Duckets, amount));
if (client.GetHabbo().Id != session.GetHabbo().Id)
client.SendNotification(session.GetHabbo().Username + " has given you " + amount +
" Ducket(s)!");
session.SendWhisper("Successfully given " + amount + " Ducket(s) to " +
client.GetHabbo().Username + "!");
}
break;
}
session.SendWhisper("Oops, that appears to be an invalid amount!");
break;
}
case "diamonds":
{
if (!session.GetHabbo().GetPermissions().HasCommand("command_give_diamonds"))
{
session.SendWhisper("Oops, it appears that you do not have the permissions to use this command!");
break;
}
int amount;
if (int.TryParse(Params[2], out amount))
{
foreach (var client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList().Where(client => client?.GetHabbo() != null && client.GetHabbo().Username != session.GetHabbo().Username))
{
client.GetHabbo().Diamonds += amount;
client.SendMessage(new HabboActivityPointNotificationComposer(client.GetHabbo().Diamonds,
amount,
5));
if (client.GetHabbo().Id != session.GetHabbo().Id)
client.SendNotification(session.GetHabbo().Username + " has given you " + amount +
" Diamond(s)!");
session.SendWhisper("Successfully given " + amount + " Diamond(s) to " +
client.GetHabbo().Username + "!");
}
break;
}
session.SendWhisper("Oops, that appears to be an invalid amount!");
break;
}
case "gotw":
case "gotwpoints":
{
if (!session.GetHabbo().GetPermissions().HasCommand("command_give_gotw"))
{
session.SendWhisper("Oops, it appears that you do not have the permissions to use this command!");
break;
}
int amount;
if (int.TryParse(Params[2], out amount))
{
foreach (var client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList().Where(client => client?.GetHabbo() != null && client.GetHabbo().Username != session.GetHabbo().Username))
{
client.GetHabbo().GotwPoints = client.GetHabbo().GotwPoints + amount;
client.SendMessage(new HabboActivityPointNotificationComposer(client.GetHabbo().GotwPoints,
amount, 103));
if (client.GetHabbo().Id != session.GetHabbo().Id)
client.SendNotification(session.GetHabbo().Username + " has given you " + amount +
" GOTW Point(s)!");
session.SendWhisper("Successfully given " + amount + " GOTW point(s) to " +
client.GetHabbo().Username + "!");
}
break;
}
session.SendWhisper("Oops, that appears to be an invalid amount!");
break;
}
default:
session.SendWhisper("'" + updateVal + "' is not a valid currency!");
break;
}
}
}
}
And in CommandManager add
Register("massgive", new MassGiveCommand());
above Register("massbadge", new MassBadgeCommand());
Usage; ":massgive %USER% %TYPE% %AMOUNT%"
When using this dont forget to change GotwPoints to GOTWPoints :P
09-01-16
dominic
re: Official PlusEMU - Help Thread
GlobalGive command
SQL:
Code:
INSERT INTO `permissions_commands` (`command`, `group_id`) VALUES ('command_global_currency', '7')
And add Register("globalgive", new GlobalGiveCommand());
above Register("massgive", new MassGiveCommand());
Please be aware of these commands has NOT been tested in a live environment! Report any bugs to me or here as a comment, thanks
using System;using System.Linq;
using System.Text;
using System.Collections.Generic;
using Plus.HabboHotel.Rooms;
using Plus.Communication.Packets.Outgoing.Rooms.Engine;
using Plus.Communication.Packets.Outgoing.Rooms.AI.Pets;
using Plus.HabboHotel.Catalog.Utilities;
using Plus.HabboHotel.Items;
using Plus.Communication.Packets.Outgoing.Inventory.Furni;
using Plus.Communication.Packets.Outgoing.Catalog;
using Plus.Database.Interfaces;
using System.Drawing;
namespace Plus.Communication.Packets.Incoming.Rooms.AI.Pets.Horse
{
class RemoveSaddleFromHorseEvent : IPacketEvent
{
public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
{
if (!Session.GetHabbo().InRoom)
return;
Room Room = null;
if(!PlusEnvironment.GetGame().GetRoomManager().TryGetRoom(Session.GetHabbo().CurrentRoomId, out Room))
return;
RoomUser PetUser = null;
if (!Room.GetRoomUserManager().TryGetPet(Packet.PopInt(), out PetUser))
return;
//Fetch the furniture Id for the pets current saddle.
int SaddleId = ItemUtility.GetSaddleId(PetUser.PetData.Saddle);
//Remove the saddle from the pet.
PetUser.PetData.Saddle = 0;
using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
{
dbClient.RunQuery("UPDATE `bots_petdata` SET `have_saddle` = 0 WHERE `id` = '" + PetUser.PetData.PetId + "' LIMIT 1");
}
//When removing Saddle From Horse the user gets down the horse
if (PetUser.RidingHorse)
{
RoomUser UserRiding = Room.GetRoomUserManager().GetRoomUserByVirtualId(PetUser.HorseID);
if (UserRiding != null)
{
UserRiding.RidingHorse = false;
PetUser.RidingHorse = false;
UserRiding.ApplyEffect(-1);
UserRiding.MoveTo(new Point(UserRiding.X + 1, UserRiding.Y + 1));
}
else
PetUser.RidingHorse = false;
}
ItemData ItemData = null;
if (!PlusEnvironment.GetGame().GetItemManager().GetItem(SaddleId, out ItemData))
return;
//Creates the item for the user
Item Item = ItemFactory.CreateSingleItemNullable(ItemData, Session.GetHabbo(), "", "", 0, 0, 0);
public static int GetSaddleId(int Saddle)
{
switch (Saddle)
{
default:
case 9:
return 7100; //4221 Changed to the right BaseItem, so it can be saved.
case 10:
return 4450;
}
}
public static bool IsRare(Item Item)
{
if (Item.LimitedNo > 0)
return true;
if (Item.Data.IsRare)
return true;
return false;
}
}
}
Btw, thanks again:3 I'm using this release to test my knowledge and I think I'm not doing pretty bad, #RESPECT for you my friend, and I wish you the best:love:
Thanks for the fixes bro!
But ItemUtility.cs have so much error watch it:
public static int GetSaddleId(int Saddle)
{
switch (Saddle)
{
default:
case 9:
return 7100; //4221 Changed to the right BaseItem, so it can be saved.
case 10:
return 4450;
}
}
public static bool IsRare(Item Item)
{
if (Item.LimitedNo > 0)
return true;
if (Item.Data.IsRare)
return true;
return false;
}
}
}
- - - Updated - - -
Quote:
Originally Posted by Dominic
GlobalGive command
SQL:
Code:
INSERT INTO `permissions_commands` (`command`, `group_id`) VALUES ('command_global_currency', '7')
And add Register("globalgive", new GlobalGiveCommand());
above Register("massgive", new MassGiveCommand());
Please be aware of these commands has NOT been tested in a live environment! Report any bugs to me or here as a comment, thanks
MassGive not work, global yes ^^
Guys you know why i no see diamonds into my client?
public static int GetSaddleId(int Saddle)
{
switch (Saddle)
{
default:
case 9:
return 7100; //4221 Changed to the right BaseItem, so it can be saved.
case 10:
return 4450;
}
}
public static bool IsRare(Item Item)
{
if (Item.LimitedNo > 0)
return true;
if (Item.Data.IsRare)
return true;
return false;
}
}
}
- - - Updated - - -
MassGive not work, global yes ^^
Guys you know why i no see diamonds into my client?