• 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] Cobe's Release Thread! [RP]

Status
Not open for further replies.
Custom Title Activated
Loyal Member
Joined
Oct 21, 2007
Messages
2,098
Reaction score
464
try releasing a epic command or feature
 
Custom Title Activated
Loyal Member
Joined
Oct 21, 2007
Messages
2,098
Reaction score
464
for bots? sounds awesome i can use that for the bot 321olos coded
 
Joined
Apr 28, 2010
Messages
2,794
Reaction score
1,178
Double Release Day:

"SPY SYSTEM"

VirtualUser.cs
first
Find:
Code:
internal bool _isMuted;

Add this Under!
PHP:
public bool _isInvisible;

second
Add this Command
PHP:
 #region :spy
                    case "spy":
                        {
                            if (_Rank > 5)
                            {
                                if (_isInvisible == true)
                                {
                                    _isInvisible = false;
                                }
                                else if (_isInvisible == false)
                                {
                                    _isInvisible = true;
                                }
                            }
                            break;
                        }
                    #endregion

and
PHP:
                    #region :unspy
                    case "unspy":
                        {
                            if (_Rank > 5)
                            {
                                if (_isInvisible == true)
                                {
                                    _isInvisible = false;
                                }
                                else if (_isInvisible == false)
                                {
                                    sendData("BK" + "You are not in Spy Mode");
                                }
                            }
                            break;
                        }
                    #endregion

VirtualRoom.cs

first
Find
Code:
 // Set new coords for virtual room user
                                roomUser.X = nextX;
                                roomUser.Y = nextY;
                                roomUser.H = nextHeight;

Replace that w/
PHP:
// Set new coords for virtual room user
                            roomUser.X = nextX;
                            roomUser.Y = nextY;

                            if (roomUser.User._isInvisible == true)
                            {
                                roomUser.H = 100;
                            }
                            else
                            {
                                roomUser.H = nextHeight;
                            }

DONE

-----------------------------------------------------------------

Next

Find
Code:
private Thread workoutDosLooper;

Add this under
PHP:
private Thread sentHomeLooper;

Next...

Add this command in!

PHP:
                    #region :sendhome <user>
                    case "sendhome":
                        {
                            int myCorp;
                            int getCorp;
                            virtualUser User = userManager.getUser(args[1]);
                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                            {
                                myCorp = dbClient.getInt("SELECT corp_id FROM users WHERE name = '" + _Username + "'");
                                getCorp = dbClient.getInt("SELECT corp_id FROM users WHERE name = '" + User._Username + "'");
                            }
                            if (myCorp == getCorp)
                            {
                                int myRank;
                                int getRank;
                                using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                {
                                    myRank = dbClient.getInt("SELECT job_rank FROM users WHERE name = '" + _Username + "'");
                                    getRank = dbClient.getInt("SELECT job_rank FROM users WHERE name = '" + User._Username + "'");
                                }
                                if (myRank > getRank)
                                {
                                    int myJob;
                                    int myAuth;
                                    using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                    {
                                        myJob = dbClient.getInt("SELECT secure_id FROM users WHERE name = '" + _Username + "'");
                                        myAuth = dbClient.getInt("SELECT manager_rank FROM jobs_ranks WHERE id = '" + myJob + "'");
                                    }
                                    if (myAuth > 0)
                                    {
                                        int isWorking;
                                        using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                        {
                                            isWorking = dbClient.getInt("SELECT working FROM users WHERE name = '" + User._Username + "'");
                                            dbClient.runQuery("UPDATE users SET working = '0', senthome = '1' WHERE name = '" + User._Username + "'");
                                        }
                                        Room.sendSaying(roomUser, "*sends " + User._Username + " home*");
                                        User.refreshAppearance(true, true, true);
                                        if (isWorking == 1)
                                        {
                                            User.workLooper.Abort();
                                            User.workLooper = null;

                                            ThreadStart workStarter = new ThreadStart(sentHome);
                                            User.sentHomeLooper = new Thread(sentHome);
                                            User.sentHomeLooper.Priority = ThreadPriority.Lowest;
                                            User.sentHomeLooper.Start();
                                        }
                                    }
                                }
                            }
                            break;
                        }
                    #endregion

Last

Add in this looper

PHP:
rivate void sentHome()
        {
            int iCount = 0;
            try
            {
                while (true)
                {
                    using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                    {
                        iCount++;
                        if (iCount > 150000)
                        {
                            dbClient.runQuery("UPDATE users SET senthome = '0' WHERE name = '" + _Username + "'");

                            sentHomeLooper = null;
                            sentHomeLooper.Abort();
                        }
                        Thread.Sleep(1000);
                    }
                }
            }
            catch
            {
                Thread.CurrentThread.Abort();
                sentHomeLooper = null;
            }
        }

Add a column to the User's Table
PHP:
"sendhome" with INT 1

Thanks!
 
Junior Spellweaver
Joined
Jan 8, 2010
Messages
119
Reaction score
3
True

Well Cobe all i can say is great releases!
 
Custom Title Activated
Loyal Member
Joined
Oct 21, 2007
Messages
2,098
Reaction score
464
Weapon system please :p
 
Joined
Apr 28, 2010
Messages
2,794
Reaction score
1,178
OK, Triple RELEASE

First: Super Push!

PHP:
                    #region :push <user>
                    case "push":
                        {
                            virtualUser User = userManager.getUser(args[1]);
                            if (User.roomUser != roomUser && (roomUser.X + 1 == User.roomUser.X || roomUser.X - 1 == User.roomUser.X || roomUser.Y + 1 == User.roomUser.Y || roomUser.Y - 1 == User.roomUser.Y))
                            {
                                switch (roomUser.Z2)
                                {
                                    case 0:
                                        {
                                            User.roomUser.goalX = User.roomUser.X;
                                            User.roomUser.goalY = User.roomUser.Y - 1;
                                            break;
                                        }
                                    case 2:
                                        {
                                            User.roomUser.goalX = User.roomUser.X + 1;
                                            User.roomUser.goalY = User.roomUser.Y;
                                            break;
                                        }
                                    case 4:
                                        {
                                            User.roomUser.goalX = User.roomUser.X;
                                            User.roomUser.goalY = User.roomUser.Y + 1;
                                            break;
                                        }
                                    case 6:
                                        {
                                            User.roomUser.goalX = User.roomUser.X - 1;
                                            User.roomUser.goalY = User.roomUser.Y;
                                            break;
                                        }
                                }
                                Room.sendSaying(roomUser, "*Pushes " + User._Username + "*");
                            }
                            if (_Rank > 4)
                            {
                                if (User.roomUser != roomUser && (roomUser.X + 1 == User.roomUser.X || roomUser.X - 1 == User.roomUser.X || roomUser.Y + 1 == User.roomUser.Y || roomUser.Y - 1 == User.roomUser.Y))
                                {
                                    switch (roomUser.Z2)
                                    {
                                        case 0:
                                            {
                                                User.roomUser.goalX = User.roomUser.X;
                                                User.roomUser.goalY = User.roomUser.Y - 3;
                                                break;
                                            }
                                        case 2:
                                            {
                                                User.roomUser.goalX = User.roomUser.X + 3;
                                                User.roomUser.goalY = User.roomUser.Y;
                                                break;
                                            }
                                        case 4:
                                            {
                                                User.roomUser.goalX = User.roomUser.X;
                                                User.roomUser.goalY = User.roomUser.Y + 3;
                                                break;
                                            }
                                        case 6:
                                            {
                                                User.roomUser.goalX = User.roomUser.X - 3;
                                                User.roomUser.goalY = User.roomUser.Y;
                                                break;
                                            }
                                            Room.sendSaying(roomUser, "* Super Pushes " + User._Username + "*");
                                    }
                                }
                            }                                   
                                    break;
                        }
                    #endregion
Next is Super Pull

PHP:
                    #region :pull <user>
                    case "pull":
                        {
                                virtualUser User = userManager.getUser(args[1]);
                                if (User.roomUser != roomUser && (roomUser.X + 2 == User.roomUser.X || roomUser.X - 2 == User.roomUser.X || roomUser.Y + 2 == User.roomUser.Y || roomUser.Y - 2 == User.roomUser.Y))
                                {
                                    switch (roomUser.Z2)
                                    {
                                        case 0:
                                            {
                                                User.roomUser.goalX = User.roomUser.X;
                                                User.roomUser.goalY = User.roomUser.Y + 1;
                                                break;
                                            }
                                        case 2:
                                            {
                                                User.roomUser.goalX = User.roomUser.X - 1;
                                                User.roomUser.goalY = User.roomUser.Y;
                                                break;
                                            }
                                        case 4:
                                            {
                                                User.roomUser.goalX = User.roomUser.X;
                                                User.roomUser.goalY = User.roomUser.Y - 1;
                                                break;
                                            }
                                        case 6:
                                            {
                                                User.roomUser.goalX = User.roomUser.X + 1;
                                                User.roomUser.goalY = User.roomUser.Y;
                                                break;
                                            }
                                    }
                                    Room.sendSaying(roomUser, "*Pulls " + User._Username + "*");
                            }
                                if (_Rank > 4)
                                {
                                    if (User.roomUser != roomUser && (roomUser.X + 2 == User.roomUser.X || roomUser.X - 2 == User.roomUser.X || roomUser.Y + 2 == User.roomUser.Y || roomUser.Y - 2 == User.roomUser.Y))
                                    {
                                        switch (roomUser.Z2)
                                        {
                                            case 0:
                                                {
                                                    User.roomUser.goalX = User.roomUser.X;
                                                    User.roomUser.goalY = User.roomUser.Y + 3;
                                                    break;
                                                }
                                            case 2:
                                                {
                                                    User.roomUser.goalX = User.roomUser.X - 3;
                                                    User.roomUser.goalY = User.roomUser.Y;
                                                    break;
                                                }
                                            case 4:
                                                {
                                                    User.roomUser.goalX = User.roomUser.X;
                                                    User.roomUser.goalY = User.roomUser.Y - 3;
                                                    break;
                                                }
                                            case 6:
                                                {
                                                    User.roomUser.goalX = User.roomUser.X + 3;
                                                    User.roomUser.goalY = User.roomUser.Y;
                                                    break;
                                                }
                                        }
                                        Room.sendSaying(roomUser, "*Super Pulls " + User._Username + "*");
                                    }
                                }
                                                                break;
                        }
                    #endregion


Last but Certainly not least!!
WEAPONS

First
The db work!
In the User Table
Make the columns

PHP:
 bullets INT 1
PHP:
 gun INT 1
PHP:
 gunn INT 1
PHP:
 bottle INT 1
PHP:
 bat INT 1

Next comes the "Obtain Command"

PHP:
#region :obtain <weapon>
                    case "obtain":
                        {
                            if (_roomID != 25)
                            {
                                sendData("BK" + "You must be at a weapon shop to obtain one!");
                            }
                            else
                            {
                                string weapon = args[1];
                                using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                {
                                    if (weapon == "bat")
                                    {
                                        string drinkid;
                                        drinkid = "21";
                                        Room.sendShout(roomUser, "*Purchases a Bat*");
                                        statusManager.carryItem(drinkid);
                                        dbClient.runQuery("UPDATE users SET credits = credits - '25' WHERE name = '" + _Username + "'");
                                        dbClient.runQuery("UPDATE users SET bat = '1' WHERE name = '" + _Username + "'");
                                    }

                                    if (weapon == "bottle")
                                    {
                                        string drinkid;
                                        drinkid = "22";
                                        Room.sendShout(roomUser, "*Purchases a Bottle*");
                                        statusManager.carryItem(drinkid);
                                        dbClient.runQuery("UPDATE users SET credits = credits - '25' WHERE name = '" + _Username + "'");
                                        dbClient.runQuery("UPDATE users SET bottle = '1' WHERE name = '" + _Username + "'");
                                    }

                                    if (weapon == "gun")
                                    {
                                        Room.sendShout(roomUser, "*Purchases a Gun*");
                                        dbClient.runQuery("UPDATE users SET credits = credits - '200' WHERE name = '" + _Username + "'");
                                        dbClient.runQuery("UPDATE users SET gun = '1' WHERE name = '" + _Username + "'");
                                    }

                                    if (weapon == "bullets")
                                    {
                                        Room.sendShout(roomUser, "*Purchases 10 bullets*");
                                        dbClient.runQuery("UPDATE users SET credits = credits - '100' WHERE name = '" + _Username + "'");
                                        dbClient.runQuery("UPDATE users SET bullets = bullets + '10' WHERE name = '" + _Username + "'");
                                    }
                                }
                            }
                            break;
                        }
                    #endregion

Now the commands to actually take them out

PHP:
                    #region :bat
                    case "bat":
                        {
                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                            {
                                int bat = dbClient.getInt("SELECT bat FROM users WHERE name = '" + _Username + "'");
                            }
                            if (bat == 1)
                            {
                                string drinkid;
                                drinkid = "21";
                                Room.sendShout(roomUser, "*Takes Bat Out*");
                                statusManager.carryItem(drinkid);
                            }
                            else
                            {
                                sendData("BK" + "Go to Weapon Store[25] To Buy This Item");
                            }
                            break;
                        }
                    #endregion

PHP:
#region :bottle
                    case "bottle":
                        {
                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                            {
                                int bottle = dbClient.getInt("SELECT bottle FROM users WHERE name = '" + _Username + "'");
                            }
                            if (bottle == 1)
                            {
                                string drinkid;
                                drinkid = "22";
                                Room.sendShout(roomUser, "*Takes Bottle Out*");
                                statusManager.carryItem(drinkid);
                            }
                            else
                            {
                                sendData("BK" + "Go to Weapon Store[25] To Buy This Item");
                            }
                            break;
                        }
                    #endregion

PHP:
#region :gun
                    case "gun":
                        {
                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                            {
                                int gun = dbClient.getInt("SELECT gun FROM users WHERE name = '" + _Username + "'");
                            }
                            if (gun == 1)
                            {
                                string drinkid;
                                drinkid = "3";
                                Room.sendShout(roomUser, "*Takes Gun Out*");
                                statusManager.carryItem(drinkid);
                                    dbClient.runQuery("UPDATE users SET gunn = '1' WHERE name = '" + _Username + "'");
                            }
                            else
                            {
                                sendData("BK" + "Go to Weapon Store[25] To Buy This Item");
                            }
                            break;
                        }
                    #endregion

The system was never finished ;]

Tommorow i may release
Marriage(100% Bjork)
or
Rockets (100% Sledmore)

Thanks :D
 
Joined
Apr 28, 2010
Messages
2,794
Reaction score
1,178
Thanks
Forgot the "Shoot Command"

PHP:
                    #region :shoot <user>
                    case "shoot":
                        {
                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                            {
                                if (roomUser.walkLock == true)
                                {
                                    sendData("BK" + "Nice try, but you are either stunned or cuffed.");
                                }
                                else
                                {
                                    int isArrested = dbClient.getInt("SELECT arrested FROM users WHERE name = '" + _Username + "'");
                                    int hasGun = dbClient.getInt("SELECT gun FROM users WHERE name = '" + _Username + "'");
                                    int HoldingGun = dbClient.getInt("SELECT gunn FROM users WHERE name = '" + _Username + "'");
                                    //int Bullets = dbClient.getInt("SELECT bullets FROM users WHERE name = '" + _Username + "'");
                                }
                                if (isArrested < 1)
                                {
                                    if (hasGun != 1)
                                    {
                                        sendData("BK" + "You must purchase a gun before you can shoot people!");
                                    }
                                    else
                                    {
                                        if (HoldingGun != 1)
                                        {
                                            sendData("BK" + "Activate your gun[say :gun]");
                                        }
                                        else
                                        {
                                            /*if (Bullets == 0)
                                            {
                                                Room.sendShout(roomUser, "*Tries to shoot but needs to buy more bullets*", false);
                                            }
                                            else*/
                                            {
                                                virtualUser User = userManager.getUser(args[1]);
                                                if (User._roomID == _roomID)
                                                {
                                                    string health = dbClient.getString("SELECT health FROM users WHERE name = '" + User._Username + "'");
                                                }
                                                {
                                                    dbClient.runQuery("UPDATE users SET health = health - '20' WHERE name = '" + User._Username + "'");
                                                    //dbClient.runQuery("UPDATE users SET health = bullets - '1' WHERE name = '" + _Username + "'");
                                                }
                                            }
                                            Room.sendShout(roomUser, "*Shoots " + args[1] + ", causing 20 damage*");
                                            if (health < 1)
                                            {
                                                User.statusManager.containsStatus("lay");
                                                User.roomUser.walkLock = true;
                                                Room.sendShout(roomUser, "*Kills" + args[1] + "*");
                                                {
                                                    dbClient.runQuery("UPDATE users SET health = '100' WHERE name = '" + User._Username + "'");
                                                }
                                                User.Dead();
                                            }
                                        }
                                    }
                                }
                            }                      
                                        break;
                        }
                    #endregion

OFF-TOPIC
1000 POSTS BITCHES
 
Status
Not open for further replies.
Back
Top