• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[RP] Skin and Sex Change

Status
Not open for further replies.
Newbie Spellweaver
Joined
Aug 19, 2008
Messages
98
Reaction score
11
Hey guys!

Because of Sledmore, I have decided to release a couple of snippets, and then do an early release of LegendRP (Should be done by sunday!).

Anyhow let me start off with the skin and sex change!

Code:
                    #region :skin <name> <colour>
                    case "skin":
                        {
                            if (_roomID != 47)
                            {
                                sendData("BK" + "You must be in the Surgery Ward.");
                            }
                            else
                            {
                                virtualUser Target = userManager.getUser(args[1]);
                                string skincolour = stringManager.wrapParameters(args, 2);

                                if ((roomUser.Y == Target.roomUser.Y && roomUser.X == Target.roomUser.X) || (roomUser.Y + 1 == Target.roomUser.Y && roomUser.X == Target.roomUser.X) || (roomUser.Y - 1 == Target.roomUser.Y && roomUser.X == Target.roomUser.X) || (roomUser.Y == Target.roomUser.Y && roomUser.X + 1 == Target.roomUser.X) || (roomUser.Y == Target.roomUser.Y && roomUser.X - 1 == Target.roomUser.X))
                                {
                                    int canSurgery;
                                    int getJob;
                                    int isworking;
                                    using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                    {
                                        getJob = dbClient.getInt("SELECT secure_id FROM users WHERE name = '" + _Username + "'");
                                        isworking = dbClient.getInt("SELECT working FROM users WHERE name = '" + _Username + "'");
                                        canSurgery = dbClient.getInt("SELECT surgery FROM jobs_ranks WHERE id = '" + getJob + "'");
                                    }
                                    if (canSurgery == 1 & isworking == 1)
                                    {

                                        if (skincolour == "white") // 1
                                        {

                                            string thefigure = Target._Figure;

                                            string[] result = thefigure.Split(new Char[] { '.' });
                                            Room.sendSaying(roomUser, "*Updates skin colour for " + Target._Username + "*");
                                            Target.Room.sendSaying(roomUser, "*Recieves a new skin colour!*");
                                            Target._Figure = "hd-180-1" + "." + result[1] + "." + result[2] + "." + result[3] + "." + result[4];
                                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                            {
                                                dbClient.runQuery("UPDATE users SET figure = 'hd-180-1." + result[1] + "." + result[2] + "." + result[3] + "." + result[4] + "' WHERE name = '" + Target._Username + "'");
                                            }
                                            Target.refreshAppearance(false, true, true);

                                        }
                                        else if (skincolour == "brown") // 3
                                        {

                                            string thefigure = Target._Figure;

                                            string[] result = thefigure.Split(new Char[] { '.' });
                                            Room.sendSaying(roomUser, "*Updates skin colour for " + Target._Username + "*");
                                            Target.Room.sendSaying(roomUser, "*Recieves a new skin colour!*");
                                            Target._Figure = "hd-180-3" + "." + result[1] + "." + result[2] + "." + result[3] + "." + result[4];
                                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                            {
                                                dbClient.runQuery("UPDATE users SET figure = 'hd-180-3." + result[1] + "." + result[2] + "." + result[3] + "." + result[4] + "' WHERE name = '" + Target._Username + "'");
                                            }
                                            Target.refreshAppearance(false, true, true);

                                        }
                                        else if (skincolour == "black") // 6
                                        {

                                            string thefigure = Target._Figure;

                                            string[] result = thefigure.Split(new Char[] { '.' });
                                            Room.sendSaying(roomUser, "*Updates skin colour for " + Target._Username + "*");
                                            Target.Room.sendSaying(roomUser, "*Recieves a new skin colour!*");
                                            Target._Figure = "hd-180-6" + "." + result[1] + "." + result[2] + "." + result[3] + "." + result[4];
                                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                            {
                                                dbClient.runQuery("UPDATE users SET figure = 'hd-180-6." + result[1] + "." + result[2] + "." + result[3] + "." + result[4] + "' WHERE name = '" + Target._Username + "'");
                                            }
                                            Target.refreshAppearance(false, true, true);

                                        }
                                        else
                                        {
                                            sendData("BK" + "You must use a valid colour - :skin <name> <white/brown/black>");
                                        }
                                    }
                                }

                            }
                            break;
                        }
                    #endregion

                    #region :sexchange <name> <M/F>
                    case "sexchange":
                        {
                            if (_roomID != 47)
                            {
                                sendData("BK" + "You must be in the Surgery Ward.");
                            }
                            else
                            {
                                virtualUser Target = userManager.getUser(args[1]);
                                string sextype = stringManager.wrapParameters(args, 2);

                                if ((roomUser.Y == Target.roomUser.Y && roomUser.X == Target.roomUser.X) || (roomUser.Y + 1 == Target.roomUser.Y && roomUser.X == Target.roomUser.X) || (roomUser.Y - 1 == Target.roomUser.Y && roomUser.X == Target.roomUser.X) || (roomUser.Y == Target.roomUser.Y && roomUser.X + 1 == Target.roomUser.X) || (roomUser.Y == Target.roomUser.Y && roomUser.X - 1 == Target.roomUser.X))
                                {
                                    int canSurgery;
                                    int getJob;
                                    int isworking;
                                    using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                    {
                                        getJob = dbClient.getInt("SELECT secure_id FROM users WHERE name = '" + _Username + "'");
                                        isworking = dbClient.getInt("SELECT working FROM users WHERE name = '" + _Username + "'");
                                        canSurgery = dbClient.getInt("SELECT surgery FROM jobs_ranks WHERE id = '" + getJob + "'");
                                    }
                                    if (canSurgery == 1 & isworking == 1)
                                    {

                                        if (sextype == "M") // 1
                                        {
                                            Room.sendSaying(roomUser, "*Updates sex for " + Target._Username + "*");
                                            Target.Room.sendSaying(Target.roomUser, "*Recieves a sex change to male!*");
                                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                            {
                                                dbClient.runQuery("UPDATE users SET sex = '" + sextype + "' WHERE name = '" + Target._Username + "'");
                                            }
                                            refreshAppearance(false, true, true);

                                        }
                                        else if (sextype == "F") // 1
                                        {
                                            Room.sendSaying(roomUser, "*Updates sex for " + Target._Username + "*");
                                            Target.Room.sendSaying(Target.roomUser, "*Recieves a sex change to female!*");
                                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                            {
                                                dbClient.runQuery("UPDATE users SET sex = '" + sextype + "' WHERE name = '" + Target._Username + "'");
                                            }
                                            refreshAppearance(false, true, true);

                                        }
                                        else
                                        {
                                            sendData("BK" + "You must use a valid sex - :sexchange <name> <M/F>");
                                        }
                                    }
                                }

                            }
                            break;
                        }
                    #endregion

Credits:
Swimo [me] - Coderl.
Aaron - Inspiration.
RastaLulz - Base codes.
 
Last edited:
Newbie Spellweaver
Joined
Jul 6, 2010
Messages
25
Reaction score
4
Epic, Also do Clothing?
I'm so using your server once you release that LegendRP, Will so go back to Retro's and set up a RP :D
 
Junior Spellweaver
Joined
Jan 8, 2010
Messages
119
Reaction score
3
-releases HabboRP & wins

YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSno :(

YES YES YES YES YES dangit he said no

Lol aaron, I think You'd be the most loved if you released Any old versions of HabboRP :p Or Your r52 Version LOL But that aint gna happen
 
Joined
Nov 29, 2006
Messages
559
Reaction score
530
YES YES YES YES YES dangit he said no

Lol aaron, I think You'd be the most loved if you released Any old versions of HabboRP :p Or Your r52 Version LOL But that aint gna happen

Maybe if I knew my source was safe, but since the later version of Phoenix started getting cracked I stopped releasing anything.
 
Junior Spellweaver
Joined
Jan 8, 2010
Messages
119
Reaction score
3
Maybe if I knew my source was safe, but since the later version of Phoenix started getting cracked I stopped releasing anything.

Well maybe you should release to trusted yet dumb ( That dont know howto crack/decode) It so therefor it wouldnt be as thingy.



I would love An old RP Source and i wouldnt realease but like you said, If anything did happen then yano.
 
Junior Spellweaver
Joined
Aug 4, 2010
Messages
117
Reaction score
3
LOL Aaron has never shown any sign of releasing anything I barely even see him on the forum maybe you should sell your Role-Play emulator like licenses because the other Phoenix license is crappy not even role-play
 
Status
Not open for further replies.
Back
Top