[RP] Bank Robbing System! [RP]

Status
Not open for further replies.

Reasons

Member
Jul 2, 2010
29
1
[RP] Bank Robbing System! [RP]

What does this do?
Well, it allows you to rob the banks vault, and achieve 200 credits. (That is editable) And then it automatically sends an alert to the police!

Right, heres a quick tutorial to set it up!

1) Open up your virtualusers.cs and do ctrl + f and put in "private Thread workoutDosLooper;" (No quote marks).

2) Underneath that add this "private Thread bankRobLooper;" (No quote marks).

3) Do ctrl + f and put in this "private void jailBreak()" (No quote marks).

4) Underneath that add this;

Code:
private void bankRob()
        {
            int iCount = 0;
            try
            {
                while (true)
                {
                    using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                    {
                        if (_roomID != BANK VAULT ID HERE || roomUser.Y != BANK VAULT Y CORD HERE || roomUser.X != BANK VAULT X CORD HERE)
                        {
                            userManager.sendToCop(1, false, "BK" + "The bank is being robbed get there fast!");
                            Room.sendSaying(roomUser, "*stops robbing the banks vault*");
                            jailBreakLooper = null;
                            jailBreakLooper.Abort();
                        }
                        if (iCount == 60)
                        {
                            Room.sendSaying(roomUser, "*needs three more minutes to succesfully rob the banks vault*");
                        }

                        if (iCount == 120)
                        {
                            Room.sendSaying(roomUser, "*needs two more minutes to succesfully rob the banks vault*");
                        }

                        if (iCount == 180)
                        {
                            Room.sendSaying(roomUser, "*needs one more minute to succesfully rob the banks vault*");
                        }

                        iCount++;

                        if (iCount > 180)
                        {
                            Room.sendSaying(roomUser, "*successfully breaks into to the banks vault and claims 200 credits!*");
                            dbClient.runQuery("UPDATE users SET credits = credits + 200 WHERE id = '" + userID + "' LIMIT 1");
                            refreshValueables(true, true);
                            bankRobLooper = null;
                            bankRobLooper.Abort();
                        }
                        Thread.Sleep(1000);
                    }
                }
            }
            catch
            {
                Thread.CurrentThread.Abort();
                bankRobLooper = null;
            }
        }


Right, next step, in that code you can edit this line;
"if (_roomID != BANK VAULT ID HERE || roomUser.Y != BANK VAULT Y CORD HERE || roomUser.X != BANK VAULT X CORD HERE)"

Its obvious what you do, you put in the bank vault room id where it says "BANK VAULT ID HERE" and then you do the same for the "ANK VAULT Y CORD HERE" and the "BANK VAULT X CORD HERE".

WAIT!?! HOW DO I KNOW WHERE TO PUT THIS? HOW DO I FIND THE CORDS?

Simples, go above the tile you want it to go on and input this command :cords (on the client obviously)

If you do not have the ':cords' command then here you are;

Code:
#region :cords
                    case "cords": // Returns the cords of the user
                        {
                            if (rankManager.containsRight(_Rank, "fuse_administrator_access", userID) == false)
                                return false;
                            else
                                sendData("BK" + "X: " + roomUser.X + "\rY: " + roomUser.Y + "\rH: " + roomUser.H);
                            break;
                        }
                    #endregion


The bankrob command!


Code:
#region :bankrob
                    case "bankrob":
                        {
                            if (bankRobLooper == null && _roomID == YOUR BANK VAULT ID HERE && roomUser.Y == THE Y CORD OF THE TILE && roomUser.X == THE X CORD OF THE TILE)
                            {
                                userManager.sendToCop(1, false, "BK" + "The bank is being robbed get there fast!");
                                Room.sendSaying(roomUser, "*Starts to rob the banks vault*");
                                Room.sendSaying(roomUser, "*needs four more minutes to succesfully rob the banks vault*");

                                ThreadStart bankRobStarter = new ThreadStart(bankRob);
                                bankRobLooper = new Thread(bankRobStarter);
                                bankRobLooper.Priority = ThreadPriority.Lowest;
                                bankRobLooper.Start();
                            }
                            break;
                        }
                    #endregion

If you like this thread give it a Thanks!
And give thanks to;

Credits:
Sledmore - For making the command.
iTouch - For posting it.
 
Status
Not open for further replies.

Users who are viewing this thread

Top