[Request] Help With Command.[RP] [Request]

Al-Santoro

New Member
Jan 20, 2011
29
5
Well, I'm making an armor command, where users will be able to wear an armor, but I need to make sure that this command is working fully. Plus, not only that, but I'll need it to make it so that they can't wear another armor until the next hour has passed by. Here's the command so far:

Code:
#region ArmorSystem                    
case "wear armor": // Coded by James. [Al-Santoro].
                        {
                            int armor;
                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                            {
                                armor = dbClient.getInt("SELECT armor FROM users WHERE name = '" + _Username + "'");
                                if (armor == 1)
                                {


        using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                            {
dbClient.runQuery("UPDATE users SET health = health + '20' WHERE name = '" + _Username + "'");
dbClient.runQuery("UPDATE users SET armor = armor - '1' WHERE name = '" + _Username + "'");
        {
                                    sendData("BK" + "You've gained + 20HP. You'll be able to put on a new set after 15 minutes.");
                                }
                                else
                                {
                                    Room.sendSaying(roomUser, "*Puts on their armor and gained some defensive protection.");
        ThreadSleep(1000);
                                  _Mission = "[Protected] This Monster is wearing an armor.";
        refreshAppearance(false, true, true);
                            break;
        }
                        }
                    #endregion

Thanks.

- James ,
 

Users who are viewing this thread

Top