Conza
Elite Subscriber
- Oct 26, 2011
- 126
- 1
Where do i add this code to? Im in the virtualrooms.cs in the emu but i dont know where to past this code?
Code:
} using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("UPDATE users SET x = '" + nextX + "', y = '" + nextY + "' WHERE name = '" + roomUser.User._Username + "'");
int action = dbClient.getInt("SELECT id FROM action_spots WHERE rid = '" + roomUser.User._roomID + "' AND x = '" + nextX + "' AND y = '" + nextY + "'");
if (action == null)
{
break;
}
else
if (action > 0)
{
string action2;
action2 = dbClient.getString("SELECT actiontwo FROM action_spots WHERE rid = '" + roomUser.User._roomID + "' AND x = '" + nextX + "' AND y = '" + nextY + "'");
int actiontwox;
actiontwox = dbClient.getInt("SELECT x FROM action_spots WHERE id = '" + action2 + "'");
int actiontwoy;
actiontwoy = dbClient.getInt("SELECT y FROM action_spots WHERE id = '" + action2 + "'");
int actiontworoomid;
actiontworoomid = dbClient.getInt("SELECT rid FROM action_spots WHERE id = '" + action2 + "'");
if (actiontworoomid == roomUser.User._roomID)
{
roomUser.X = actiontwox;
roomUser.Y = actiontwoy;
roomUser.User.refreshAppearance(false, false, true);
dbClient.runQuery("UPDATE users SET x = '" + actiontwox + "', y = '" + actiontwoy + "', avoid = '1' WHERE name = '" + roomUser.User._Username + "'");
}
else
{
dbClient.runQuery("UPDATE users SET x = '" + actiontwox + "', y = '" + actiontwoy + "', avoid = '0' WHERE name = '" + roomUser.User._Username + "'");
roomUser.User.sendData("D^" + "H" + Encoding.encodeVL64(actiontworoomid));
}
}
else
{
}
}
Code:
} using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("UPDATE users SET x = '" + nextX + "', y = '" + nextY + "' WHERE name = '" + roomUser.User._Username + "'");
int action = dbClient.getInt("SELECT id FROM action_spots WHERE rid = '" + roomUser.User._roomID + "' AND x = '" + nextX + "' AND y = '" + nextY + "'");
if (action == null)
{
break;
}
else
if (action > 0)
{
string action2;
action2 = dbClient.getString("SELECT actiontwo FROM action_spots WHERE rid = '" + roomUser.User._roomID + "' AND x = '" + nextX + "' AND y = '" + nextY + "'");
int actiontwox;
actiontwox = dbClient.getInt("SELECT x FROM action_spots WHERE id = '" + action2 + "'");
int actiontwoy;
actiontwoy = dbClient.getInt("SELECT y FROM action_spots WHERE id = '" + action2 + "'");
int actiontworoomid;
actiontworoomid = dbClient.getInt("SELECT rid FROM action_spots WHERE id = '" + action2 + "'");
if (actiontworoomid == roomUser.User._roomID)
{
roomUser.X = actiontwox;
roomUser.Y = actiontwoy;
roomUser.User.refreshAppearance(false, false, true);
dbClient.runQuery("UPDATE users SET x = '" + actiontwox + "', y = '" + actiontwoy + "', avoid = '1' WHERE name = '" + roomUser.User._Username + "'");
}
else
{
dbClient.runQuery("UPDATE users SET x = '" + actiontwox + "', y = '" + actiontwoy + "', avoid = '0' WHERE name = '" + roomUser.User._Username + "'");
roomUser.User.sendData("D^" + "H" + Encoding.encodeVL64(actiontworoomid));
}
}
else
{
}
}