[Dev] PlusRP [Plus Based] [Dev]

Status
Not open for further replies.

TheRealMoonman

I eat babies
Sep 30, 2014
360
74
Developments been slow due to other crap, still working on SQL and cleaning emulator up i will post what ive been doing in a week or so
 

lepos

thinking about you. yes you
Dec 11, 2011
2,022
685
/closed

There seems to have been no updates within the last 14 days, feel free to PM me to have it re-opened.
 
Reopened on request.
 

TheRealMoonman

I eat babies
Sep 30, 2014
360
74
Restarted development, lost files so ive started again, will post repost snippets, screenshots etc.
 

TheRealMoonman

I eat babies
Sep 30, 2014
360
74
UPDATE:
coding status.
Coded Transport Commands (e.g :buycar, buyjetpack, :drive, :stopdrive, :jetpack, :stopjetpack)
Coded Text Command
Coding Banking Commands (e.g :deposit, :withdraw)
Coding Police, Ambulance & SWAT Commands (e.g :stun, :unstun, :arrest, :heal and police guns)
Current Status on Commands: 15% complete due to it being coded from the original hotel base :'(

You must be registered for see images attach

You must be registered for see images attach

You must be registered for see images attach
 

LeChris

github.com/habbo-hotel
Sep 30, 2013
2,744
1,326
Wow, judging by your code above I may end up getting into C# programming. Anyways, Sorry for getting off topic. I like your programming style (Not sure if it's perfect or not considering my lack of experience with programming.) Mind starting a conversation with me, and I could possibly develop a CMS alongside your emulator?
 

Jaden

not so active
Aug 24, 2014
886
263
UPDATE:
coding status.
Coded Transport Commands (e.g :buycar, buyjetpack, :drive, :stopdrive, :jetpack, :stopjetpack)
Coded Text Command
Coding Banking Commands (e.g :deposit, :withdraw)
Coding Police, Ambulance & SWAT Commands (e.g :stun, :unstun, :arrest, :heal and police guns)
Current Status on Commands: 15% complete due to it being coded from the original hotel base :'(

You must be registered for see images attach

You must be registered for see images attach

You must be registered for see images attach
You could improve by defining in another class file, that's just for cleanliness, If you need any reference you can look at my RP Base i released.
 

TheRealMoonman

I eat babies
Sep 30, 2014
360
74
Wow, judging by your code above I may end up getting into C# programming. Anyways, Sorry for getting off topic. I like your programming style (Not sure if it's perfect or not considering my lack of experience with programming.) Mind starting a conversation with me, and I could possibly develop a CMS alongside your emulator?
I feel my code is unclean at most times but sure if you want :)
 
If you want some RP commands and features relating to that, add me on facebook.

 
UPDATE:
Vehicles Coded
User Misc Commands Coded
:buycar command
Code:
#region :buycar
                case "buycar":
                    {
                        if (Session.GetHabbo().car == 0 || Session.GetHabbo().Credits < 500)
                        {
                            Session.GetHabbo().Credits = Session.GetHabbo().Credits - 500;
                            Session.GetHabbo().car = 1;
                            using (IQueryAdapter adapter = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                uint id = Session.GetHabbo().Id;
                                adapter.runFastQuery("UPDATE users SET car=1 WHERE id="+id+ "");
                            }
                            Session.SendWhisper("You have succesfully purchased a car");
                            return true;
                        }
                        else if (Session.GetHabbo().car == 1 || Session.GetHabbo().Rank > 5)
                        {
                            Session.SendNotif("You already have a car");
                            return true;
                        }
                        else if (Session.GetHabbo().Credits > 499)
                        {
                            Session.SendNotif("You don't have enough money");
                            return true;
                        }
                        else if (Session.GetHabbo().CurrentRoom.Description.Contains("CARSHOP") == false)
                        {
                            Session.SendNotif("Sorry but you must be in a car shop to purchase a car.");
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion
:buyjetpack command
Code:
#region :buyjetpack
                case "buyjetpack":
                    {
                        if (Session.GetHabbo().jetpack == 0 || Session.GetHabbo().Credits < 1000)
                        {
                            Session.GetHabbo().Credits = Session.GetHabbo().Credits - 1000;
                            Session.GetHabbo().jetpack = 1;
                            using (IQueryAdapter adapter = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                uint id = Session.GetHabbo().Id;
                                adapter.runFastQuery("UPDATE users SET jetpack=1 WHERE id=" + id + "");
                            }
                            Session.SendWhisper("You have succesfully purchased a jetpack");
                            return true;
                        }
                        else if (Session.GetHabbo().jetpack == 1 || Session.GetHabbo().Rank > 5)
                        {
                            Session.SendNotif("You already have a jetpack");
                            return true;
                        }
                        else if (Session.GetHabbo().Credits > 999)
                        {
                            Session.SendNotif("You don't have enough money");
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion
:buymagic command
Code:
#region :buymagic
                case "buymagic":
                    {
                        if (Session.GetHabbo().magic == 0 || Session.GetHabbo().Credits < 50000)
                        {
                            Session.GetHabbo().Credits = Session.GetHabbo().Credits - 50000;
                            Session.GetHabbo().magic = 1;
                            using (IQueryAdapter adapter = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                uint id = Session.GetHabbo().Id;
                                adapter.runFastQuery("UPDATE users SET magic=1 WHERE id=" + id + "");
                            }
                            Session.SendWhisper("You have succesfully purchased magic");
                            return true;
                        }
                        else if (Session.GetHabbo().magic == 1 || Session.GetHabbo().Rank > 5)
                        {
                            Session.SendNotif("You already have magic");
                            return true;
                        }
                        else if (Session.GetHabbo().Credits > 49999)
                        {
                            Session.SendNotif("You don't have enough money");
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion
:drive command
Code:
#region :drive
                case "drive":
                    {
                        Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                        RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                        if (Session.GetHabbo().car == 1 || Session.GetHabbo().Rank > 5)
                        {
                            Session.GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(int.Parse(69.ToString()));
                            Session.SendMessage(new ChatComposer(User.VirtualId,"* Puts Keys Into Ignition And Starts Drving *", 0, 0, -1));
                            User.FastWalking = true;
                         
                            return true;
                        }
                        else
                        {
                            return false;
                        }

                    }
                #endregion
:jetpack command
Code:
#region :jetpack
                case "jetpack":
                    {
                        Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                        RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                        if (Session.GetHabbo().jetpack == 1 || Session.GetHabbo().Rank > 5)
                       {
                           Session.GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(int.Parse(6.ToString()));
                           Session.SendMessage(new ChatComposer(User.VirtualId, "* Presses button to turn on jetpack *", 0, 0, -1));
                           User.FastWalking = true;
                           return true;
                       }
                       else
                       {
                           return false;
                       }
                    }
                #endregion
:magic command
Code:
#region :magic
                case "magic":
                    {
                        Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                        RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                        if (Session.GetHabbo().jetpack == 1 || Session.GetHabbo().Rank > 5)
                        {
                            Session.GetHabbo().GetAvatarEffectsInventoryComponent().ApplyCustomEffect(int.Parse(23.ToString()));
                            Session.SendMessage(new ChatComposer(User.VirtualId, "* Warps green mist and feels quicker *", 0, User.LastBubble, -1));
                            User.TeleportEnabled = true;
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion
:kiss command
Code:
                #region :kiss
                case "kiss":
                    {
                            string target = Params[1];
                            Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            Session.SendMessage(new ChatComposer(User.VirtualId, "* Kisses " + target + " on the lips*", 0, 0, -1));
                            return true;
                    }
                #endregion
:sex command
Code:
#region :sex
                case "sex":
                    {
                        string target = Params[1];
                        Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                        RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                        Session.SendMessage(new ChatComposer(User.VirtualId, "*Starts fucking " + target + "*", 0, 0, -1));
                        return true;
                    }
                #endregion
:bite command
Code:
#region :bite
                case "bite":
                    {
                        string target = Params[1];
                        Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                        RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                        Session.SendMessage(new ChatComposer(User.VirtualId, "*Bites " + target + " on the neck*", 0, 0, -1));
                        return true;
                    }
                #endregion
:slap command
Code:
#region :slap
                case "slap":
                    {
                        string target = Params[1];
                        Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                        RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                        Session.SendMessage(new ChatComposer(User.VirtualId, "*Slaps " + target + " in the face*", 0, 0, -1));
                        return true;
                    }
                #endregion
:rape command
Code:
#region :rape
                case "rape":
                    {
                        string target = Params[1];
                        Room Room = SilverwaveEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                        RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                        Session.SendMessage(new ChatComposer(User.VirtualId, "*Starts fucking " + target + " by force*", 0, 0, -1));
                        return true;
                    }
                #endregion
Commands Under Development
Jobs [5% Complete]
Combat [0% Complete]

Timers Under Development [5% Complete]

You must be registered for see images attach

You must be registered for see images attach

You must be registered for see images attach

You must be registered for see images attach

You must be registered for see images attach

You must be registered for see images attach

You must be registered for see images attach

You must be registered for see images attach

You must be registered for see images attach

You must be registered for see images attach

Expected time for release of PlusRP Emulator Version 1.0.0.0 BETA: 1/06/15
 

TheRealMoonman

I eat babies
Sep 30, 2014
360
74
I expected better from this. This literally looks like you have copied AstroRP's data over to Silverwave.
Well thats where your wrong
 
for example:
PlusRPs :buycar command
Code:
case "buycar":
                    {
                        if (Session.GetHabbo().car == 0 || Session.GetHabbo().Credits < 500)
                        {
                            Session.GetHabbo().Credits = Session.GetHabbo().Credits - 500;
                            Session.GetHabbo().UpdateCreditsBalance();
                            Session.GetHabbo().car = 1;
                            using (IQueryAdapter adapter = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                uint id = Session.GetHabbo().Id;
                                adapter.runFastQuery("UPDATE users SET car=1 WHERE id="+id+ "");
                            }
                            Session.SendWhisper("You have succesfully purchased a car");
                            return true;
                        }
                        else if (Session.GetHabbo().car == 1 || Session.GetHabbo().Rank > 5)
                        {
                            Session.SendNotif("You already have a car");
                            return true;
                        }
                        else if (Session.GetHabbo().Credits > 499)
                        {
                            Session.SendNotif("You don't have enough money");
                            return true;
                        }
                        else if (Session.GetHabbo().CurrentRoom.Description.Contains("CARSHOP") == false)
                        {
                            Session.SendNotif("Sorry but you must be in a car shop to purchase a car.");
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
Astro :buycar command
Code:
 #region buycar <carname>
                case "buycar":
                    {
                        Room room = Session.GetHabbo().CurrentRoom;
                        RoomUser roomuser = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                        if (room.RoomId == 18)
                        {
                            if (Session.GetHabbo().Car == 0) {
                                if (Params.Length > 0)
                                {
                                    if (Params[1] is String)
                                    {
                                        if (Params[1].ToLower().Equals("skyblue"))
                                        {
                                            if (Session.GetHabbo().Credits < 300)
                                            {
                                                Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "You can't afford this car yet, check flarerp.com/car for a list of available models.", 0, 1));
                                                return true;
                                            }
                                            room.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "*Buys a DatCarr Skyblue [-£300]", 0, 0));
                                            Session.GetHabbo().Credits = Session.GetHabbo().Credits - 300;
                                            Session.GetHabbo().Car = 21;
                                            return true;
                                        }
                                        if (Params[1].ToLower().Equals("fireball"))
                                        {
                                            if (Session.GetHabbo().Credits < 400)
                                            {
                                                Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "You can't afford this car yet, check flarerp.com/car for a list of available models.", 0, 1));
                                                return true;
                                            }
                                            room.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "*Buys a DatCarr Fireball [-£400]", 0, 0));
                                            Session.GetHabbo().Credits = Session.GetHabbo().Credits - 400;
                                            Session.GetHabbo().Car = 22;
                                            return true;
                                        }
                                        if (Params[1].ToLower().Equals("doggi"))
                                        {
                                            if (Session.GetHabbo().Credits < 500)
                                            {
                                                Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "You can't afford this car yet, check flarerp.com/car for a list of available models.", 0, 1));
                                                return true;
                                            }
                                            room.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "*Buys a DatCarr Doggi [-£500]", 0, 0));
                                            Session.GetHabbo().Credits = Session.GetHabbo().Credits - 500;
                                            Session.GetHabbo().Car = 48;
                                            return true;
                                        }
                                        if (Params[1].ToLower().Equals("bunni"))
                                        {
                                            if (Session.GetHabbo().Credits < 500)
                                            {
                                                Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "You can't afford this car yet, check flarerp.com/car for a list of available models.", 0, 1));
                                                return true;
                                            }
                                            room.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "*Buys a DatCarr Bunni [-£500]", 0, 0));
                                            Session.GetHabbo().Credits = Session.GetHabbo().Credits - 500;
                                            Session.GetHabbo().Car = 54;
                                            return true;
                                        }
                                        if (Params[1].ToLower().Equals("beetle"))
                                        {
                                            if (Session.GetHabbo().Credits < 600)
                                            {
                                                Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "You can't afford this car yet, check flarerp.com/car for a list of available models.", 0, 1));
                                                return true;
                                            }
                                            room.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "*Buys a DatCarr Beetle [-£600]", 0, 0));
                                            Session.GetHabbo().Credits = Session.GetHabbo().Credits - 600;
                                            Session.GetHabbo().Car = 69;
                                            return true;
                                        }
                                        Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "This car is out of stock, or does not exist in the DatCarr product range, see flarerp.com/car for a list of available models.", 0, 1));
                                        return true;
                                    }
                                    else
                                    {
                                        Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "Bad syntax, please use :buycar <carname>.", 0, 1));
                                        return true;
                                    }
                                }
                            } else
                            {
                                Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "Bad syntax, please use :buycar <carname>.", 0, 1));
                                return true;
                            }
                        }
                        else
                        {
                            Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "You need to be at the Auto Shack [18] to buy a car.", 0, 1));
                        }
                        return true;
                    }
                #endregion
PlusRPs :buyphone command
Code:
 #region :buyphone
                case "buyphone":
                    {
                        if (Session.GetHabbo().CurrentRoom.Description.Contains("TECHSTORE") || Session.GetHabbo().Credits < 150)
                        {
                            Session.GetHabbo().Credits = Session.GetHabbo().Credits - 150;
                            Session.GetHabbo().UpdateCreditsBalance();
                            Session.GetHabbo().phone = 1;
                            using (IQueryAdapter adapter = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                uint id = Session.GetHabbo().Id;
                                adapter.runFastQuery("UPDATE users SET phone=1 WHERE id=" + id + "");
                            }
                            Session.SendWhisper("You have succesfully purchased a phone");
                            return true;
                        }
                        else if (Session.GetHabbo().phone == 1)
                        {
                            Session.SendNotif("You already have a phone");
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion
AstroRPs :buyphone command
Code:
               case "buyphone":
                    {
                        Room room = Session.GetHabbo().CurrentRoom;
                        RoomUser roomuser = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                        Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "Please ask Sally to sell you a phone by saying 'iPhone'.", 0, 1));
                        return true;
                      
                    }
Astro's Habbo.cs
Code:
public static Thread Workoutlooper;
        private Thread TaxiThread;
        internal bool AlreadyTaxi;
        internal int mHealth;
        internal DateTime Cooldown;
        internal int mWorking;
        internal int mLearning;
        internal int mGathering;
        internal int mOfferPhone;
        internal int mStunned;
        internal int mTimer;
        public static Thread WorkLooper;
        public static Thread JailLooper;
        public static Thread HospitalLooper;
        public static Thread LearnLooper;
        public static Thread WantedLooper;
        public static Thread WorkouttLooper;
        public bool isWorking = false;
        public bool isJailed = false;
        public bool isDead = false;
        public bool isLearning = false;
        public bool isWanted = false;
        public bool isWorkingOut = false;
        internal bool FastWalking = false;
        internal uint CorpID;
        internal int CorpRank;
        internal int CorpRoom;
        internal string oLook = "";
        internal int mDead;
        internal int mWanted;
        internal int mWantedLVL;
        internal int mJailed;
        internal int mPhone;
        internal int mRPTimer;
        internal int mEnergy;
        internal int mStrength;
        internal int mBank;
        internal int mIntel;
        internal int mCar;
        internal int mShotgun;
PlusRPs habbo.cs
Code:
        internal int health;
        internal int phone;
        internal int wanted;
        internal int jobid;
        internal int jobrank;
        internal int work;
        internal int xp;
        internal int passport;
        internal int jailed;
        internal int car;
        internal int jetpack;
        internal int bank;
        internal int magic;
        internal int hover;
        internal int smokes;
You must be registered for see images attach

You must be registered for see images attach
@Deus
 

Jaden

not so active
Aug 24, 2014
886
263
Well thats where your wrong
 
for example:
PlusRPs :buycar command
Code:
case "buycar":
                    {
                        if (Session.GetHabbo().car == 0 || Session.GetHabbo().Credits < 500)
                        {
                            Session.GetHabbo().Credits = Session.GetHabbo().Credits - 500;
                            Session.GetHabbo().UpdateCreditsBalance();
                            Session.GetHabbo().car = 1;
                            using (IQueryAdapter adapter = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                uint id = Session.GetHabbo().Id;
                                adapter.runFastQuery("UPDATE users SET car=1 WHERE id="+id+ "");
                            }
                            Session.SendWhisper("You have succesfully purchased a car");
                            return true;
                        }
                        else if (Session.GetHabbo().car == 1 || Session.GetHabbo().Rank > 5)
                        {
                            Session.SendNotif("You already have a car");
                            return true;
                        }
                        else if (Session.GetHabbo().Credits > 499)
                        {
                            Session.SendNotif("You don't have enough money");
                            return true;
                        }
                        else if (Session.GetHabbo().CurrentRoom.Description.Contains("CARSHOP") == false)
                        {
                            Session.SendNotif("Sorry but you must be in a car shop to purchase a car.");
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
Astro :buycar command
Code:
 #region buycar <carname>
                case "buycar":
                    {
                        Room room = Session.GetHabbo().CurrentRoom;
                        RoomUser roomuser = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                        if (room.RoomId == 18)
                        {
                            if (Session.GetHabbo().Car == 0) {
                                if (Params.Length > 0)
                                {
                                    if (Params[1] is String)
                                    {
                                        if (Params[1].ToLower().Equals("skyblue"))
                                        {
                                            if (Session.GetHabbo().Credits < 300)
                                            {
                                                Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "You can't afford this car yet, check flarerp.com/car for a list of available models.", 0, 1));
                                                return true;
                                            }
                                            room.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "*Buys a DatCarr Skyblue [-£300]", 0, 0));
                                            Session.GetHabbo().Credits = Session.GetHabbo().Credits - 300;
                                            Session.GetHabbo().Car = 21;
                                            return true;
                                        }
                                        if (Params[1].ToLower().Equals("fireball"))
                                        {
                                            if (Session.GetHabbo().Credits < 400)
                                            {
                                                Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "You can't afford this car yet, check flarerp.com/car for a list of available models.", 0, 1));
                                                return true;
                                            }
                                            room.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "*Buys a DatCarr Fireball [-£400]", 0, 0));
                                            Session.GetHabbo().Credits = Session.GetHabbo().Credits - 400;
                                            Session.GetHabbo().Car = 22;
                                            return true;
                                        }
                                        if (Params[1].ToLower().Equals("doggi"))
                                        {
                                            if (Session.GetHabbo().Credits < 500)
                                            {
                                                Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "You can't afford this car yet, check flarerp.com/car for a list of available models.", 0, 1));
                                                return true;
                                            }
                                            room.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "*Buys a DatCarr Doggi [-£500]", 0, 0));
                                            Session.GetHabbo().Credits = Session.GetHabbo().Credits - 500;
                                            Session.GetHabbo().Car = 48;
                                            return true;
                                        }
                                        if (Params[1].ToLower().Equals("bunni"))
                                        {
                                            if (Session.GetHabbo().Credits < 500)
                                            {
                                                Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "You can't afford this car yet, check flarerp.com/car for a list of available models.", 0, 1));
                                                return true;
                                            }
                                            room.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "*Buys a DatCarr Bunni [-£500]", 0, 0));
                                            Session.GetHabbo().Credits = Session.GetHabbo().Credits - 500;
                                            Session.GetHabbo().Car = 54;
                                            return true;
                                        }
                                        if (Params[1].ToLower().Equals("beetle"))
                                        {
                                            if (Session.GetHabbo().Credits < 600)
                                            {
                                                Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "You can't afford this car yet, check flarerp.com/car for a list of available models.", 0, 1));
                                                return true;
                                            }
                                            room.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "*Buys a DatCarr Beetle [-£600]", 0, 0));
                                            Session.GetHabbo().Credits = Session.GetHabbo().Credits - 600;
                                            Session.GetHabbo().Car = 69;
                                            return true;
                                        }
                                        Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "This car is out of stock, or does not exist in the DatCarr product range, see flarerp.com/car for a list of available models.", 0, 1));
                                        return true;
                                    }
                                    else
                                    {
                                        Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "Bad syntax, please use :buycar <carname>.", 0, 1));
                                        return true;
                                    }
                                }
                            } else
                            {
                                Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "Bad syntax, please use :buycar <carname>.", 0, 1));
                                return true;
                            }
                        }
                        else
                        {
                            Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "You need to be at the Auto Shack [18] to buy a car.", 0, 1));
                        }
                        return true;
                    }
                #endregion
PlusRPs :buyphone command
Code:
 #region :buyphone
                case "buyphone":
                    {
                        if (Session.GetHabbo().CurrentRoom.Description.Contains("TECHSTORE") || Session.GetHabbo().Credits < 150)
                        {
                            Session.GetHabbo().Credits = Session.GetHabbo().Credits - 150;
                            Session.GetHabbo().UpdateCreditsBalance();
                            Session.GetHabbo().phone = 1;
                            using (IQueryAdapter adapter = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                            {
                                uint id = Session.GetHabbo().Id;
                                adapter.runFastQuery("UPDATE users SET phone=1 WHERE id=" + id + "");
                            }
                            Session.SendWhisper("You have succesfully purchased a phone");
                            return true;
                        }
                        else if (Session.GetHabbo().phone == 1)
                        {
                            Session.SendNotif("You already have a phone");
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                #endregion
AstroRPs :buyphone command
Code:
               case "buyphone":
                    {
                        Room room = Session.GetHabbo().CurrentRoom;
                        RoomUser roomuser = room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                        Session.SendMessage(new Plus.Communication.Packets.Outgoing.Rooms.Chat.ShoutComposer(roomuser.VirtualId, "Please ask Sally to sell you a phone by saying 'iPhone'.", 0, 1));
                        return true;
                    
                    }
Astro's Habbo.cs
Code:
public static Thread Workoutlooper;
        private Thread TaxiThread;
        internal bool AlreadyTaxi;
        internal int mHealth;
        internal DateTime Cooldown;
        internal int mWorking;
        internal int mLearning;
        internal int mGathering;
        internal int mOfferPhone;
        internal int mStunned;
        internal int mTimer;
        public static Thread WorkLooper;
        public static Thread JailLooper;
        public static Thread HospitalLooper;
        public static Thread LearnLooper;
        public static Thread WantedLooper;
        public static Thread WorkouttLooper;
        public bool isWorking = false;
        public bool isJailed = false;
        public bool isDead = false;
        public bool isLearning = false;
        public bool isWanted = false;
        public bool isWorkingOut = false;
        internal bool FastWalking = false;
        internal uint CorpID;
        internal int CorpRank;
        internal int CorpRoom;
        internal string oLook = "";
        internal int mDead;
        internal int mWanted;
        internal int mWantedLVL;
        internal int mJailed;
        internal int mPhone;
        internal int mRPTimer;
        internal int mEnergy;
        internal int mStrength;
        internal int mBank;
        internal int mIntel;
        internal int mCar;
        internal int mShotgun;
PlusRPs habbo.cs
Code:
        internal int health;
        internal int phone;
        internal int wanted;
        internal int jobid;
        internal int jobrank;
        internal int work;
        internal int xp;
        internal int passport;
        internal int jailed;
        internal int car;
        internal int jetpack;
        internal int bank;
        internal int magic;
        internal int hover;
        internal int smokes;
You must be registered for see images attach

You must be registered for see images attach
I know its against the rules on mentioning a rival forum but you need to look at Martin's guide on writing a good emulator on rage...
You don't follow any concept of OOP while dealing with C#.
Most new C# Developers don't understand the real focus on good applications, whats first is your performance, code quality (cleanliness counts), coding tactics, etc... and after all that then you focus on the feature and what the code actually does, and when your done with that you profile, record, improve, profile some more, and repeat in an endless loop.

@Deus if you have anything to add or improve...
 
Status
Not open for further replies.

Users who are viewing this thread

Top