- Joined
- Apr 30, 2007
- Messages
- 2,339
- Reaction score
- 1,547
Butterfly RP is a roleplay emulator based on Butterfly r96c.
I have already coded a lot of stuff for this emulator and have it running on my public hotel for testing. It is far from finished.
Here are the current features and related poop, there are a lot so sorry if I forget any:
Screenshots
Code snippets
Basically every emulator out there for roleplay hotels suck, and the ones that are decent are buggy as hell. (anyone remember uber v1? lol)
This emulator is stable and doesn't have cpu spikes, or spikes of any kind for that matter.
I have been developing this for the last 5 or 6 months, hell, maybe even longer. My code might not be on-par, i have no clue. This was my first proper c# project and its the only one i'm interested in continuing, habbo-wise anyway.
I want to make this open source once I am finished, so any ideas you have for features will be appreciated. Things on the emu run fine right now so im not looking for any advice on making things run smoother.
Mostly everything is threaded, but not everything, some stuff still runs in the room user cycle but I've moved a lot of poop out of there 'cause it was crashing rooms. Issue is still there, but will continue moving stuff from there to the dedicated rp thread i got going on. As you can see in the last snippet, im still working on moving things to timers and threads.
This emu is super Ducking noob friendly, everything is modifiable via db or config file and requires no reboot to change values from the database, only from the config file.
My code is probably quite primitive to some of the better developers out there, but please do remember im a php developer by trade and im only really just starting to pick up c# properly.
I think thats everything.... rate... dont slate. Even though half of you are only here to be dicks (like myself 95% of the time - this is a serious thread so please stay serious)
Thanks for your time.
I have already coded a lot of stuff for this emulator and have it running on my public hotel for testing. It is far from finished.
Here are the current features and related poop, there are a lot so sorry if I forget any:
- Saving user room on log out
- Saving user coordinates on log out
- Placing user in the same square and room they logged off on and in, when logging on again
- Pathfinder issues addressed and fixed
- Hitting system
- Dynamic weaponry system, with both melee and ranged weapon support and ability to add/remove weapons in seconds
- Dynamic job system
- Timer tracking
- Arrest warrant system
- Prison system
- Taxi system
- Hospital system
- Police system
- Drugs system (drugs act as powerups, eg. heal user, give advantages in battle)
- MDMA, Cocaine, Marijuana & Heroin (see 14.)
- Hiring, Promoting, Demoting & Firing for corporation managers/owners
- 911 system
- Banking system (withdrawals and deposits)
- ATM money machine withdrawals
- Pay money to other players
- Ammo for weapons, not unlimited ammo like other rp emulators
- Reloading for weapons, unlike other emulators
- Fully dynamic gang system, with in-game badge display linked up to CMS via mus also
- Marriage system
- Sex (satire mainly, but also heals you to maximum health)
- Strength levels (higher the str, higher you hit when you're using fists)
- Defence levels (higher the def, the higher your max hit points)
- Agility levels (higher the agil, the more chance you have to dodge attacks)
- Dynamic property system, users can buy from the government then sell and buy from each other
- Bank robbery system
- Ability to pay bail whilst in prison
- Bounty system
- UNIQUE: Zombie infection mode
- Ability to gamble at slot machines
- Weapon attachments (Red dot increases range, FMJ increases damage, Fast mags reduces reload time)
Screenshots
- Statistics (1):
You must be registered to see links
- Statistics (2):
You must be registered to see links
- Statistics (3):
You must be registered to see links
- Slot machines:
You must be registered to see links
- ask for more or play to see for yourself
Code snippets
Code:
internal void SetBounty()
{
if (Params.Length >= 1)
{
int Amount;
string User = Params[1].ToString();
if (Session.GetHabbo().PlacedBountyTrigger)
{
TimeSpan SinceLastBounty = DateTime.Now - Session.GetHabbo().LastPlacedBountyAt;
if (SinceLastBounty.Minutes < 30)
{
Session.SendNotif("You can only place 1 bounty every 30 minutes.");
return;
}
}
if (Int32.TryParse(Params[2], out Amount))
{
if (Amount < 250)
{
Session.SendNotif("You must place a bounty of at least $250.");
return;
}
GameClient Player = ButterflyEnvironment.GetGame().GetClientManager().GetClientByUsername(User);
if (Player != null && !ButterflyEnvironment.Bounties.ContainsKey(Player))
{
if (Session.GetHabbo().Credits >= Amount)
{
Session.GetHabbo().Credits -= Amount;
Session.GetHabbo().UpdateCreditsBalance();
ButterflyEnvironment.Bounties.Add(Player, Amount);
ServerMessage HotelAlert = new ServerMessage(808);
HotelAlert.AppendStringWithBreak("Message from the Agency");
HotelAlert.AppendStringWithBreak("A bounty of $" + Amount.ToString() + " has been placed on " + Player.GetHabbo().Username + "!");
ButterflyEnvironment.GetGame().GetClientManager().QueueBroadcaseMessage(HotelAlert);
Session.GetHabbo().PlacedBountyTrigger = true;
Session.GetHabbo().LastPlacedBountyAt = DateTime.Now;
}
}
}
}
}
Code:
internal void Taze()
{
bool IsPolice = (ButterflyEnvironment.PoliceCorporations.Contains(Session.GetHabbo().JobId)) ? true : false;
if (IsPolice && Session.GetHabbo().JobRank > 0 && Session.GetHabbo().IsWorking || Session.GetHabbo().Rank >= 10)
{
string TargetUser = MergeParams(Params, 1);
if (TargetUser == null)
{
return;
}
Room TargetRoom = ButterflyEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
GameClient Criminal = ButterflyEnvironment.GetGame().GetClientManager().GetClientByUsername(TargetUser);
if (TargetRoom == null || Criminal == null)
{
return;
}
if (ButterflyEnvironment.Warrants.ContainsKey(Criminal.GetHabbo().Id))
{
RoomUser Rival = TargetRoom.GetRoomUserManager().GetRoomUserByHabbo(Criminal.GetHabbo().Id);
RoomUser Me = TargetRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
if (Rival != null && Me != null)
{
if (Rival.GetClient().GetHabbo().CurrentRoomId == Session.GetHabbo().CurrentRoomId &&
(Rival.X == Me.X - 3) || (Rival.X == Me.X + 3) || (Rival.Y == Me.Y - 3) || (Rival.Y == Me.Y + 3)
|| (Rival.X == Me.X - 2) || (Rival.X == Me.X + 2) || (Rival.Y == Me.Y - 2) || (Rival.Y == Me.Y + 2)
|| (Rival.X == Me.X - 1) || (Rival.X == Me.X + 1) || (Rival.Y == Me.Y - 1) || (Rival.Y == Me.Y + 1))
{
Rival.CanWalk = false;
Rival.TazedAt = DateTime.Now;
Rival.IsTazed = true;
Me.Chat(Session, "*Shoots a tazer at " + Criminal.GetHabbo().Username + ", stunning them*", true);
Criminal.GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(53);
}
else
{
Me.Chat(Session, "*Shoots a tazer at " + Criminal.GetHabbo().Username + ", but misses them*", true);
}
}
}
else
{
Session.SendNotif("You cannot taze users without an arrest warrant!");
}
}
}
Code:
internal void Use()
{
string WhatToUse = MergeParams(Params, 1);
if (WhatToUse != null)
{
switch (WhatToUse.ToLower())
{
case "cocaine":
{
if (Session.GetHabbo().CocaineEffects || Session.GetHabbo().CocaineInventory < 1)
break;
Session.GetHabbo().CocaineInventory -= 1;
Session.GetHabbo().StartCocaineTimer();
break;
}
case "weed":
{
if (Session.GetHabbo().IsSmokingWeed || Session.GetHabbo().WeedInventory < 1)
{
break;
}
Session.GetHabbo().StartedSmokingAt = DateTime.Now;
Session.GetHabbo().IsSmokingWeed = true;
Session.GetHabbo().WeedInventory = Session.GetHabbo().WeedInventory - 1;
Session.GetHabbo().SmokingStage = 1;
Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username).Chat(Session, "*Lights up a blunt and starts smoking*", true);
break;
}
case "heroin":
{
if (Session.GetHabbo().HeroinInventory < 1 || Session.GetHabbo().HasHeroinEffects)
{
break;
}
RoomUser Me = Session.GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username);
if (Me == null)
break;
Session.GetHabbo().HasHeroinEffects = true;
Session.GetHabbo().InjectedHeroinAt = DateTime.Now;
Session.GetHabbo().HitPoints += 75;
Session.GetHabbo().HeroinInventory -= 1;
Me.Chat(Session, "*Injects a dose of heroin*", true);
Me.ForceWhisper(Session, "You have injected heroin and your health has been boosted by 75 for 30 seconds.");
break;
}
default:
{
break;
}
}
return;
}
}
Basically every emulator out there for roleplay hotels suck, and the ones that are decent are buggy as hell. (anyone remember uber v1? lol)
This emulator is stable and doesn't have cpu spikes, or spikes of any kind for that matter.
I have been developing this for the last 5 or 6 months, hell, maybe even longer. My code might not be on-par, i have no clue. This was my first proper c# project and its the only one i'm interested in continuing, habbo-wise anyway.
I want to make this open source once I am finished, so any ideas you have for features will be appreciated. Things on the emu run fine right now so im not looking for any advice on making things run smoother.
Mostly everything is threaded, but not everything, some stuff still runs in the room user cycle but I've moved a lot of poop out of there 'cause it was crashing rooms. Issue is still there, but will continue moving stuff from there to the dedicated rp thread i got going on. As you can see in the last snippet, im still working on moving things to timers and threads.
This emu is super Ducking noob friendly, everything is modifiable via db or config file and requires no reboot to change values from the database, only from the config file.
My code is probably quite primitive to some of the better developers out there, but please do remember im a php developer by trade and im only really just starting to pick up c# properly.
I think thats everything.... rate... dont slate. Even though half of you are only here to be dicks (like myself 95% of the time - this is a serious thread so please stay serious)
Thanks for your time.
Last edited: