Oh sorry, I forgot to put the English tab xD
Printable View
Oh sorry, I forgot to put the English tab xD
I have already.. http://forum.ragezone.com/f333/bug-b...mu-r2-1022268/
for plusemu!
go to MusSocket.cs
Quote:
case "givebadge":
{
String placa = MergeParams(Params, 1);
Client = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUserID(Convert.ToUInt32(Params[0]));
if (Client != null && !Client.GetHabbo().GetBadgeComponent().HasBadge(placa))
{
Client.SendNotif("Tu as reçu(e) un badge!");
Client.GetHabbo().GetBadgeComponent().GiveBadge(placa, true, Client);
}
else
{
//Console.WriteLine("");
}
break;
}
case "updatemotto":
{
Client = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUserID(Convert.ToUInt32(Params[0]));
Client.GetHabbo().Motto = MergeParams(Params, 1);
ServerMessage Update = new ServerMessage(Outgoing.UpdateUserInformation);
Update.AppendInt32(-1);
Update.AppendString(Client.GetHabbo().Look);
Update.AppendString(Client.GetHabbo().Gender.ToLower());
Update.AppendString(Client.GetHabbo().Motto);
Update.AppendInt32(Client.GetHabbo().AchievementPoints);
Client.SendMessage(Update);
if (Client.GetHabbo().CurrentRoom != null)
{
User = Client.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Client.GetHabbo().Username);
ServerMessage RoomUpdate = new ServerMessage(Outgoing.UpdateUserInformation);
RoomUpdate.AppendInt32(User.VirtualId);
RoomUpdate.AppendString(Client.GetHabbo().Look);
RoomUpdate.AppendString(Client.GetHabbo().Gender.ToLower());
RoomUpdate.AppendString(Client.GetHabbo().Motto);
RoomUpdate.AppendInt32(Client.GetHabbo().AchievementPoints);
Client.GetHabbo().CurrentRoom.SendMessage(RoomUpdate);
}
break;
}
case "reloadbans":
{
using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
{
SilverwaveEnvironment.GetGame().GetBanManager().LoadBans(dbClient);
}
return;
}
case "updaterooms":
{
uint OwnerId = Convert.ToUInt32(Params[0]);
string Owner = Params[1];
foreach (Room room in SilverwaveEnvironment.GetGame().GetRoomManager().loadedRooms.Values)
{
if (room.OwnerId == OwnerId)
{
SilverwaveEnvironment.GetGame().GetRoomManager().UnloadRoom(room);
room.RequestReload();
}
}
break;
}
case "addtoinventory":
{
uint UserId = Convert.ToUInt32(Params[0]);
int ItemId = Convert.ToInt32(Params[1]);
Client = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUserID(UserId);
if (Client != null && Client.GetHabbo() != null && Client.GetHabbo().GetInventoryComponent() != null)
{
Client.GetHabbo().GetInventoryComponent().UpdateItems(true);
Client.GetHabbo().GetInventoryComponent().SendNewItems(ItemId);
}
break;
}
case "updatecredits":
{
uint UserId = Convert.ToUInt32(Params[0]);
int NewCredits = Convert.ToInt32(Params[1]);
Client = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUserID(UserId);
if (Client != null && Client.GetHabbo() != null)
{
Client.GetHabbo().Credits = NewCredits;
Client.GetHabbo().UpdateCreditsBalance();
}
break;
}
case "updatesubscription":
{
uint UserId = Convert.ToUInt32(Params[0]);
int DurationSeconds = Convert.ToInt32(Params[1]);
Client = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUserID(UserId);
if (Client != null && Client.GetHabbo() != null)
{
Client.GetHabbo().GetSubscriptionManager().ReloadSubscription(1, DurationSeconds, Client);
Client.GetHabbo().SerializeClub();
Client.SendMessage(new ServerMessage(Outgoing.UpdateShop));
}
break;
}
case "signout":
{
SilverwaveEnvironment.GetGame().GetClientManager().GetClient(uint.Parse(param)).Disconnect();
break;
}
//MERCURY :)
case "shutdown":
{
Task ShutdownTask = new Task(SilverwaveEnvironment.PerformShutDown);
ShutdownTask.Start();
break;
}
case "ha":
{
ServerMessage HotelAlert = new ServerMessage(Outgoing.SendNotif);
HotelAlert.AppendString(LanguageLocale.GetValue("hotelallert.notice") + "\r\n" +
param + "\r\n");
HotelAlert.AppendString("");
SilverwaveEnvironment.GetGame().GetClientManager().QueueBroadcaseMessage(HotelAlert);
break;
}
case "useralert":
{
String extradata = data.Split(Convert.ToChar(1))[2];
String url = extradata.Split(Convert.ToChar(1))[0];
GameClient TargetClient = null;
TargetClient = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(param);
if (TargetClient == null)
{
return;
}
if (url.Contains("://"))
{
extradata = extradata + Convert.ToChar(2) + url;
}
TargetClient.SendNotif(extradata);
break;
}
case "gotoroom":
{
uint UserId = Convert.ToUInt32(Params[0]);
int RoomId = Convert.ToInt32(Params[1]);
Client = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUserID(UserId);
if (Client == null || Client.GetHabbo() == null)
{
return;
}
if (Client.GetHabbo().CurrentRoom != null && Client.GetHabbo().CurrentRoom != null)
{
if (Client.GetHabbo().CurrentRoom.RoomId == RoomId)
{
return;
}
}
Client.SendMessage(new RoomForwardComposer(false, Client.GetHabbo().CurrentRoomId));
break;
}
@Bjork
Pfffff see this because most peaple are saying i got hacked xD but heres is something where you see how it is.
This is the same code as upstears but then i added a check to it (EDITED) because if you dont have that check and they can send packets they can make a group in all rooms and have rights too because of the group owner :OOOOO :(PHP Code:internal void PurchaseGroup()
{
if (Session.GetHabbo().Credits < 5000)
{
return;
}
else
{
Session.GetHabbo().Credits -= 5000;
Session.GetHabbo().UpdateCreditsBalance();
}
String Name = LanguageLocale.FilterSwearwords(Request.PopFixedString());
String Description = LanguageLocale.FilterSwearwords(Request.PopFixedString());
uint RoomId = Request.PopWiredUInt();
Room kamer = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(RoomId);
if(kamer == null || kamer.Group != null || RoomId == 0 || kamer.OwnerId != Session.GetHabbo().Id)//does the room exist and does it already have a group and is the owner of the room the group purcher????? If not return
{
Session.SendWhisper("There is already a group in this room");
return;
}
int Colour1 = Request.PopWiredInt32();
int Colour2 = Request.PopWiredInt32();
int groupID3 = Request.PopWiredInt32();
int groupID4 = Request.PopWiredInt32();
int groupID5 = Request.PopWiredInt32();
int groupID6 = Request.PopWiredInt32();
int groupID7 = Request.PopWiredInt32();
int groupID8 = Request.PopWiredInt32();
int groupID9 = Request.PopWiredInt32();
int groupID10 = Request.PopWiredInt32();
int groupID11 = Request.PopWiredInt32();
int groupID12 = Request.PopWiredInt32();
int groupID13 = Request.PopWiredInt32();
int groupID14 = Request.PopWiredInt32();
int groupID15 = Request.PopWiredInt32();
int groupID16 = Request.PopWiredInt32();
int groupID17 = Request.PopWiredInt32();
int groupID18 = Request.PopWiredInt32();
string Base = "b" + ((groupID4 < 10) ? "0" + groupID4.ToString() : groupID4.ToString()) + ((groupID5 < 10) ? "0" + groupID5.ToString() : groupID5.ToString()) + groupID6;
string Symbol1 = "s" + ((groupID7 < 10) ? "0" + groupID7.ToString() : groupID7.ToString()) + ((groupID8 < 10) ? "0" + groupID8.ToString() : groupID8.ToString()) + groupID9;
string Symbol2 = "s" + ((groupID10 < 10) ? "0" + groupID10.ToString() : groupID10.ToString()) + ((groupID11 < 10) ? "0" + groupID11.ToString() : groupID11.ToString()) + groupID12;
string Symbol3 = "s" + ((groupID13 < 10) ? "0" + groupID13.ToString() : groupID13.ToString()) + ((groupID14 < 10) ? "0" + groupID14.ToString() : groupID14.ToString()) + groupID15;
string Symbol4 = "s" + ((groupID16 < 10) ? "0" + groupID16.ToString() : groupID16.ToString()) + ((groupID17 < 10) ? "0" + groupID17.ToString() : groupID17.ToString()) + groupID18;
Symbol1 = SilverwaveEnvironment.GetGame().GetGroupManager().CheckActiveSymbol(Symbol1);
Symbol2 = SilverwaveEnvironment.GetGame().GetGroupManager().CheckActiveSymbol(Symbol2);
Symbol3 = SilverwaveEnvironment.GetGame().GetGroupManager().CheckActiveSymbol(Symbol3);
Symbol4 = SilverwaveEnvironment.GetGame().GetGroupManager().CheckActiveSymbol(Symbol4);
string Badge = Base + Symbol1 + Symbol2 + Symbol3 + Symbol4;
Group Group;
SilverwaveEnvironment.GetGame().GetGroupManager().CreateGroup(Name, Description, RoomId, Badge, Session, (!SilverwaveEnvironment.GetGame().GetGroupManager().SymbolColours.ContainsKey(Colour1)) ? 1 : Colour1, (!SilverwaveEnvironment.GetGame().GetGroupManager().BackGroundColours.ContainsKey(Colour2)) ? 1 : Colour2, out Group);
Session.SendMessage(new PurchaseOKComposer());
Room mRoom = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(RoomId);
if(mRoom != null){
Response.Init(Outgoing.SerializeGroupRoom);
Response.AppendInt32(Group.RoomId);
Response.AppendInt32(Group.Id);
mRoom.SendMessage(Response);// newfix
}
RoomData Room = SilverwaveEnvironment.GetGame().GetRoomManager().GenerateRoomData(RoomId);
Room.Group = Group;
Room.GroupId = Group.Id;
Room.SerializeRoomData(Response, true, Session);
if (Room.Owner != Session.GetHabbo().Username)
return;
if (this.Session.GetHabbo().CurrentRoom.RoomId != Room.Id)
{
Session.SendMessage(new RoomForwardComposer(false, Room.Id));
}
if (this.Session.GetHabbo().CurrentRoom != null)
{
if (!this.Session.GetHabbo().CurrentRoom.LoadedGroups.ContainsKey(Group.Id))
{
this.Session.GetHabbo().CurrentRoom.LoadedGroups.Add(Group.Id, Group.Badge);
}
}
if (CurrentLoadingRoom != null)
{
if (!this.CurrentLoadingRoom.LoadedGroups.ContainsKey(Group.Id))
{
CurrentLoadingRoom.LoadedGroups.Add(Group.Id, Group.Badge);
}
}
}
@VabboWorld
Can you do it in the code tags please its much easyer to check the code :P
and btw theres nothing wrong with plus i use it for my hotel and doesnt have any bug lol i also edited butterfly r105 once but thats worse too lol!!
Someone release a stable edit with all fixes.
anybody have the code for add the command :transform in plusemu ?
Is it normal to get unhandled header alerts? :/
Does anyone have a working database for this server?
Standard plus r2 from akllx topic
You're dead? :lol:
- - - Updated - - -
UPDATE_BOTS MUS:
Sorry for my bad english, i'm french
Go to MusSocket.cs and add:
after (not important) :Quote:
case "update_bots":
{
SilverwaveEnvironment.GetGame().GetBotManager().LoadBots();
break;
}
and go to BotManager.cs and add:Quote:
case "reloadbans":
{
using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
{
SilverwaveEnvironment.GetGame().GetBanManager().LoadBans(dbClient);
}
beforeQuote:
//loadbots
public void LoadBots()
{
Bots = new List<RoomBot>();
DataTable table;
DataTable Data = null;
using (IQueryAdapter adapter = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
{
adapter.setQuery("SELECT * FROM bots");
table = adapter.getTable();
}
if (Data == null)
{
return;
}
foreach (DataRow Row in Data.Rows)
{
Bots.Add(new RoomBot((uint)Row["id"], (uint)Row["room_id"], (uint)Row["user_id"], (string)Row["ai_type"],
(String)Row["name"], (string)Row["motto"], (String)Row["look"], (int)Row["x"], (int)Row["y"], (int)Row["z"],
(int)Row["rotation"], (string)Row["walk_mode"], (int)Row["min_x"], (int)Row["min_y"], (int)Row["max_x"], (int)Row["max_y"], (int)Row["effect"], (String)Row["gender"], (String)Row["dance"], (string)Row["automatic_chat"], (String)Row["speaking_interval"]));
}
}
- - - Updated - - -Quote:
internal List<RoomBot> GetBotsForRoom(UInt32 RoomId)
{
If an error occurs on new RoomBot, you'll have to do to resolve it with Visual Basic xD
Ehm, visual basic? Like wtf
I've tried using MUS but the data I recieved was always 0.
I blamed it on the system but I guess it works fine.
- - - Updated - - -
I've tried using MUS but the data I recieved was always 0.
I blamed it on the system but I guess it works fine.
Mr 'I'm not a newbie in programming C#',
This forum has a special section for all your question, so please don't come her with your 'irritating' questions. To make it easy for you you can click and visit it on here:
http://forum.ragezone.com/f333/
Yours sincerely
Fix for Ecotron/Furnimatic.
I tried to base me on this: http://forum.ragezone.com/f353/bcsto...cotron-929211/
Didn't work.
Hi, I've been able to apply that fix, you have to fix some emulator posts, I'm pretty bad to apply fixs thanks ;)