[SERVICE] Custom Commands Database - Request/Post Here

Status
Not open for further replies.
?????
Seriously?
Just edit the damn Hit Command -_-

---------- Post added at 07:52 PM ---------- Previous post was at 07:50 PM ----------

Here's a command that I wrote yesterday for someone that allows an administrator on the RP source that I released to hire anyone to a specific job.
PHP:
                    #region :superhire <user> <corpid> <rank>
                    case "superhire":
                        {
                            if (_Rank > 6)
                            {
                                virtualUser User = userManager.getUser(args[1]);
                                int corpID = int.Parse(args[2]);
                                int rank = int.Parse(args[3]);
                                using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                {
                                    int secureID = dbClient.getInt("SELECT id FROM jobs_ranks WHERE corp_id = '" + corpID + "' && job_rank = '" + rank + "'");
                                    string jobTitle = dbClient.getString("SELECT motto FROM jobs_ranks WHERE corp_id = '" + corpID + "' && job_rank = '" + rank + "'");
                                    dbClient.runQuery("UPDATE users SET corp_id = '" + corpID + "', job_rank = '" + rank + "', secure_id = '" + secureID + "' WHERE name = '" + User._Username + "'");
                                    Room.sendSaying(roomUser, "*hires " + User._Username + " as " + jobTitle + "*");
                                }
                            }
                            break;
                        }
                    #endregion

Why not just make a command that hires managers?
 
Ok here a command I made :discharge user . which sets u free from being dead.

Code:
 #region :discharge <user>
                    case "discharge":
                        {
                            virtualUser User = userManager.getUser(args[1]);
                            if (User._roomID == _roomID)
                            {
                                int getJob;
                                int isWorking;
                                int getAuth;
                                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 + "'");
                                    getAuth = dbClient.getInt("SELECT deaths FROM jobs_ranks WHERE id = '" + getJob + "'");
                                }
                                if (getAuth > 0 && isWorking > 0)
                                {
                                    using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                    {
                                        dbClient.runQuery("UPDATE users SET dead = '0' WHERE name = '" + User._Username + "'");
                                    }

                                    Room.sendSaying(roomUser, "*discharge " + User._Username + " from hospital*");

                                    User.refreshAppearance(true, true, true);
                                    User.deadLooper.Abort();
                                    User.deadLooper = null;
                                }
                            }
                            break;
                        }
                    #endregion
 
Ok here a command I made :discharge user . which sets u free from being dead.

Code:
 #region :discharge <user>
                    case "discharge":
                        {
                            virtualUser User = userManager.getUser(args[1]);
                            if (User._roomID == _roomID)
                            {
                                int getJob;
                                int isWorking;
                                int getAuth;
                                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 + "'");
                                    getAuth = dbClient.getInt("SELECT deaths FROM jobs_ranks WHERE id = '" + getJob + "'");
                                }
                                if (getAuth > 0 && isWorking > 0)
                                {
                                    using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                    {
                                        dbClient.runQuery("UPDATE users SET dead = '0' WHERE name = '" + User._Username + "'");
                                    }

                                    Room.sendSaying(roomUser, "*discharge " + User._Username + " from hospital*");

                                    User.refreshAppearance(true, true, true);
                                    User.deadLooper.Abort();
                                    User.deadLooper = null;
                                }
                            }
                            break;
                        }
                    #endregion

Well what i think about this is that..
Well this should be a Admin Command only
And If you Agree take out all the Job Corp **** x]
 
:war
My own Server(private.Havent yet released until i fully make it)
Furniture start to move and explosion will appear

Please help me make this too.I know they already exist.But i want to use them.

:dog <name>
Makes other <name> act like dogs(can control them for 20 seconds)

Please help me make them.
 
:war
My own Server(private.Havent yet released until i fully make it)
Furniture start to move and explosion will appear

Please help me make this too.I know they already exist.But i want to use them.

:dog <name>
Makes other <name> act like dogs(can control them for 20 seconds)

Please help me make them.
LOL At Number 1 Dont think i can Need Custom Furni For That :P And I Have a :PET_USER command Turn User Into Dog Croc Etc Works Only With Handyandy Well u Need to code more stuff for Dissi's Version And iNVISBLE FOR hANDYANDYS

---------- Post added at 11:02 PM ---------- Previous post was at 11:01 PM ----------

Code a :sex x Command or :kiss x or a :givitem For Bubble Juice

ALL FOR RASTA'S EMU
Ill Make A Nice One with a Timer:lol:

AND MAKES U NAKED :ott:

---------- Post added at 11:03 PM ---------- Previous post was at 11:02 PM ----------

Ok how?, im a noob at C# :P
go to error Highlight the error and right click > go to definition <-- Might Spelled Wrong And Edit the Private To Public :)
 
[RP] [ZAK] Sex Command With Timer [ZAK] [RP]

Ok Simple Just Press CTRL F And Find private Thread workoutLooper;
And Add this

Code:
private Thread sexLooper;
Then Add This to Were Your Timers Are

Code:
private void sex()
        {
            int iCount = 0;
            try
            {
                while (true)
                {
                    using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                    {

                        if (iCount == 60)
                        {
                            Room.sendSaying(roomUser, "*Needs Three More Minutes To Complete Sex*");
                        }

                        if (iCount == 120)
                        {
                            Room.sendSaying(roomUser, "**Needs Two More Minutes To Complete Sex*");
                        }

                        if (iCount == 180)
                        {
                            Room.sendSaying(roomUser, "*(Needs One More Minute To Complete Sex!)*");
                        }

                        iCount++;

                        if (iCount > 180)
                        {
                            Room.sendSaying(roomUser, "*Has Sex With " + _Username + "  *");
                            dbClient.runQuery("UPDATE users SET health = health - 20 WHERE id = '" + userID + "' LIMIT 1");

                            refreshValueables(true, true);
                            sexLooper = null;
                            sexLooper.Abort();
                        }
                        Thread.Sleep(1000);
                    }
                }
            }
            catch
            {
                Thread.CurrentThread.Abort();
                sexLooper = null;
            }
        }
And Removes 20 Hp For Unprotected Sex :P
Code:
                    #region :sex // Coded By Zak Have A Nice Time :P
                    case "sex":
                        {
                            {
                                Room.sendSaying(roomUser, "*Starts to Have Sex*");
                                Room.sendSaying(roomUser, "*Needs Four More Minutes Till Sex Finish's*");
                                ThreadStart sexStarter = new ThreadStart(sex);
                                sexLooper = new Thread(sexStarter);
                                sexLooper.Priority = ThreadPriority.Lowest;
                                sexLooper.Start();
                            }
                            break;
                        }
                    #endregion
Quick Coding But Should Be Working Sorry Since Im On Locahost I Cant Test WIth One User

My Project Will Be Released Soon R35 RP No Base Satrted On My Own Based Of Holograph :)
 
I was Bored
So i made this up x]

Code:
                    #region :fly <roomid>
                    case "fly":
                        {
                            virtualUser User = userManager.getUser(args[1]);
                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                            {
                                int isworking = dbClient.getInt("SELECT working FROM users WHERE name = '" + _Username + "'");
                                if (isworking == 1)
                                {
                                    {
                                        int me_secure_id = dbClient.getInt("SELECT secure_id FROM users WHERE name = '" + _Username + "'");
                                        int fly = dbClient.getInt("SELECT fly FROM jobs_ranks WHERE id = '" + me_secure_id + "'");
                                        if (fly == 1)
                                        {
                                            int roomid = int.Parse(args[1]);
                                            Room.sendData("D^" + "H" + Encoding.encodeVL64(roomid));
                                            Room.sendSaying(roomUser, "*Starts Engine and Takes Off*");
                                        }
                                        break;
                                    }
                                }
                            }
                        }
                    #endregion


---------- Post added at 01:52 AM ---------- Previous post was at 01:30 AM ----------

Ok here a command I made :discharge user . which sets u free from being dead.

Code:
 #region :discharge <user>
                    case "discharge":
                        {
                            virtualUser User = userManager.getUser(args[1]);
                            if (User._roomID == _roomID)
                            {
                                int getJob;
                                int isWorking;
                                int getAuth;
                                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 + "'");
                                    getAuth = dbClient.getInt("SELECT deaths FROM jobs_ranks WHERE id = '" + getJob + "'");
                                }
                                if (getAuth > 0 && isWorking > 0)
                                {
                                    using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                    {
                                        dbClient.runQuery("UPDATE users SET dead = '0' WHERE name = '" + User._Username + "'");
                                    }

                                    Room.sendSaying(roomUser, "*discharge " + User._Username + " from hospital*");

                                    User.refreshAppearance(true, true, true);
                                    User.deadLooper.Abort();
                                    User.deadLooper = null;
                                }
                            }
                            break;
                        }
                    #endregion

I Cleaned Up Your Code and Made it Moderator and Up
Code:
                    #region :discharge <user>
                    case "discharge":
                        {
                            if (_Rank > 5)
                            {
                                virtualUser User = userManager.getUser(args[1]);
                                using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                {
                                    dbClient.runQuery("UPDATE users SET time_death = '0' WHERE name = '" + User._Username + "'");
                                    dbClient.runQuery("UPDATE users SET dead = '0' WHERE name = '" + User._Username + "'");
                                }
                                Room.sendSaying(roomUser, "*uses their god-like powers to discharge " + User._Username + "*");
                                User.refreshAppearance(true, true, true);
                                User.deadLooper.Abort();
                                User.deadLooper = null;
                            }
                            break;
                        }
                    #endregion
I Noticed You didnt stop the Dead Timer
Anyways
I'm doing random **** x]
 
Last edited:
I was Bored
So i made this up x]

Code:
                    #region :fly <roomid>
                    case "fly":
                        {
                            virtualUser User = userManager.getUser(args[1]);
                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                            {
                                int isworking = dbClient.getInt("SELECT working FROM users WHERE name = '" + _Username + "'");
                                if (isworking == 1)
                                {
                                    {
                                        int me_secure_id = dbClient.getInt("SELECT secure_id FROM users WHERE name = '" + _Username + "'");
                                        int fly = dbClient.getInt("SELECT fly FROM jobs_ranks WHERE id = '" + me_secure_id + "'");
                                        if (fly == 1)
                                        {
                                            int roomid = int.Parse(args[1]);
                                            Room.sendData("D^" + "H" + Encoding.encodeVL64(roomid));
                                            Room.sendSaying(roomUser, "*Starts Engine and Takes Off*");
                                        }
                                        break;
                                    }
                                }
                            }
                        }
                    #endregion


---------- Post added at 01:52 AM ---------- Previous post was at 01:30 AM ----------



I Cleaned Up Your Code and Made it Moderator and Up
Code:
                    #region :discharge <user>
                    case "discharge":
                        {
                            if (_Rank > 5)
                            {
                                virtualUser User = userManager.getUser(args[1]);
                                using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                {
                                    dbClient.runQuery("UPDATE users SET time_death = '0' WHERE name = '" + User._Username + "'");
                                    dbClient.runQuery("UPDATE users SET dead = '0' WHERE name = '" + User._Username + "'");
                                }
                                Room.sendSaying(roomUser, "*uses their god-like powers to discharge " + User._Username + "*");
                                User.refreshAppearance(true, true, true);
                                User.deadLooper.Abort();
                                User.deadLooper = null;
                            }
                            break;
                        }
                    #endregion
I Noticed You didnt stop the Dead Timer
Anyways
I'm doing random **** x]


Can you code for uber??
 
Becuase its set as private try changing to public Worked for me
Ok, the command =

Code:
 #region :pickall
                    case "pickall":
                        {
                            if (_isOwner)
                            {
                                System.Collections.Hashtable Furnis_floor = (System.Collections.Hashtable)Room.floorItemManager._Items.Clone();
                                //System.Collections.Hashtable Furnis_wall = (System.Collections.Hashtable)Room.wallItemManager._Items.Clone();

                                //foreach (Holo.Virtual.Rooms.Items.wallItem Item in Furnis_wall.Values) //wallitems
                                //{
                                    //Room.wallItemManager.removeItem(Item.ID, userID);
                                //}

                                foreach (Holo.Virtual.Rooms.Items.floorItem Item in Furnis_floor.Values) // flooritems
                                {
                                    Room.floorItemManager.removeItem(Item.ID, userID);
                                }
                                refreshHand("update");
                            }
                            else
                                sendData("BK" + "You're not the owner of this room.");
                            break;
                        }
                    #endregion

So where's public or private?
 
Status
Not open for further replies.
Back