Can someone please edit this command...

Thomas

Member
Oct 25, 2010
270
5
Well, I am using Craigs EMU and I need the ':bankrob' code to work in two rooms. I need someone to edit this code so it works with:

room id: 12 & 157.

room 12 cords: X = 4 , Y = 1

room 157 cords: X = 4 , Y = 3

Here is the bankrob code.
PHP:
                    #region :bankrob
                    case "bankrob":
                    case "robbank":
                        {
                            if (BankRobCDLooper != null)
                            {
                                Room.sendWhisper(roomUser, _Username, "*You have to wait one minute before you bank rob again*");
                            }
                            else
                            {
                                string arrested;
                                using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                {
                                    arrested = dbClient.getString("SELECT arrested FROM users WHERE name = '" + _Username + "'");
                                }
                                if (arrested == "1")
                                {
                                    this.sendData("BK" + "You cannot rob the bank when arrested!");
                                }
                                else if (arrested == "0")
                                {
                                    if (bankRobLooper == null && _roomID == 12 && roomUser.Y == 1 && roomUser.X == 4 || roomUser.Y == 1 && roomUser.X == 5)
                                    {
                                        userManager.sendToCopBankRob(1, false, "" + "");
                                        Room.sendSaying(roomUser, "*Starts to rob the banks vault*");
                                        Room.sendSaying(roomUser, "*needs four more minutes to succesfully rob the banks vault*");

                                        using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                        {
                                            dbClient.runQuery("UPDATE users SET bank_robbing = '1' WHERE name = '" + _Username + "'");
                                        }

                                        ThreadStart bankRobStarter = new ThreadStart(bankRob);
                                        bankRobLooper = new Thread(bankRobStarter);
                                        bankRobLooper.Priority = ThreadPriority.Lowest;
                                        bankRobLooper.Start();

                                        ThreadStart BankRobCoolDownStarter = new ThreadStart(BankRobCoolDown);
                                        BankRobCDLooper = new Thread(BankRobCoolDownStarter);
                                        BankRobCDLooper.Priority = ThreadPriority.Lowest;
                                        BankRobCDLooper.Start();
                                    }
                                }
                            }
                            break;
                        }
                    #endregion 

                    #endregion

Kthx.
 

Kieren

The OGz
Aug 4, 2010
2,957
751
PHP:
#region :bankrob
                    case "bankrob":
                    case "robbank":
                        {
                            if (BankRobCDLooper != null)
                            {
                                Room.sendWhisper(roomUser, _Username, "*You have to wait one minute before you bank rob again*");
                            }
                            else
                            {
                                string arrested;
                                using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                {
                                    arrested = dbClient.getString("SELECT arrested FROM users WHERE name = '" + _Username + "'");
                                }
                                if (arrested == "1")
                                {
                                    this.sendData("BK" + "You cannot rob the bank when arrested!");
                                }
                                else if (arrested == "0")
                                {
if (bankRobLooper == null && _roomID == 157 && roomUser.Y == 3 && roomUser.X == 4 || roomUser.Y == 1 && roomUser.X == 5)
{
                                    if (bankRobLooper == null && _roomID == 12 && roomUser.Y == 1 && roomUser.X == 4 || roomUser.Y == 1 && roomUser.X == 5)
                                    {
                                        userManager.sendToCopBankRob(1, false, "" + "");
                                        Room.sendSaying(roomUser, "*Starts to rob the banks vault*");
                                        Room.sendSaying(roomUser, "*needs four more minutes to succesfully rob the banks vault*");

                                        using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                        {
                                            dbClient.runQuery("UPDATE users SET bank_robbing = '1' WHERE name = '" + _Username + "'");
                                        }

                                        ThreadStart bankRobStarter = new ThreadStart(bankRob);
                                        bankRobLooper = new Thread(bankRobStarter);
                                        bankRobLooper.Priority = ThreadPriority.Lowest;
                                        bankRobLooper.Start();

                                        ThreadStart BankRobCoolDownStarter = new ThreadStart(BankRobCoolDown);
                                        BankRobCDLooper = new Thread(BankRobCoolDownStarter);
                                        BankRobCDLooper.Priority = ThreadPriority.Lowest;
                                        BankRobCDLooper.Start();
                                    }
                                }
                            }
                            break;
                        }
                    #endregion 

                    #endregion

See if that works it should.
 

Users who are viewing this thread

Top