Okay I try to edit the Arrow Command's in XoaEMU. But it always Duplicating the ID's Why?
a Little Video to show
a Little Video to show
You must be registered for see links
PHP:
#region Old Arrow Link
case "arrowone":
{
if (_Rank >= 6)
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("INSERT INTO arrows (x, y, roomid, arrow2) VALUES ('" + roomUser.X + "', '" + roomUser.Y + "', '" + _roomID + "', '2')");
int id = dbClient.getInt("SELECT id FROM arrows WHERE roomid = '" + _roomID + "' AND x = '" + roomUser.X + "' AND y = '" + roomUser.Y + "'");
dbClient.runQuery("UPDATE users SET linkarrow = '" + id + "' WHERE name = '" + _Username + "'");
Room.sendSaying(roomUser, "*Begins to add an arrow link*");
}
}
else
{
sendData("BK" + "You cant link arrows fucker?!");
}
break;
}
case "arrowtwo":
{
if (_Rank >= 6)
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
int linkarrow = dbClient.getInt("SELECT linkarrow FROM users WHERE name = '" + _Username + "'");
if (linkarrow != 1)
{
dbClient.runQuery("INSERT INTO arrows (x, y, roomid, arrow2) VALUES ('" + roomUser.X + "', '" + roomUser.Y + "', '" + _roomID + "', '" + linkarrow + "')");
int id = dbClient.getInt("SELECT id FROM arrows WHERE roomid = '" + _roomID + "' AND x = '" + roomUser.X + "' AND y = '" + roomUser.Y + "'");
dbClient.runQuery("UPDATE arrows SET arrow2 = '" + id + "' WHERE id = '" + linkarrow + "'");
dbClient.runQuery("UPDATE users SET linkarrow = '1' WHERE name = '" + _Username + "'");
sendData("BK" + "You have sucessfully linked arrows id (" + linkarrow + ") and id (" + id + ")");
Room.sendSaying(roomUser, "*Sucessfully linked arrows*");
arrowManager.Init();
}
else
{
Room.sendSaying(roomUser, "*Failed to link arrow 2*");
}
}
}
else
{
sendData("BK" + "You cant link arrows fucker?!");
}
break;
}
#endregion