Re: [SERVICE] Custom Commands Database - Request/Post Here
Quote:
Originally Posted by
obrienray1
I took some time of coding the freeze and unfreeze command but make sure to make an extra table in users called freeze I think if anyone knows it correct then please reply anyways commands are below
Code:
#region :freeze <username>
case "freeze":
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
roomUser.walkLock = true; // Freezes the user
}
break;
}
#endregion
Code:
#region :unfreeze <username>
case "unfreeze":
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
roomUser.walkLock = false; // Freezes the user
}
break;
}
#endregion
P.S if you want it to make it for Staff ranks just add for mods and admins if(_Rank > 6) or for just admins if(_Rank > 7)
Quote:
Originally Posted by
Sledmore
Why make a table? And Why have "using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())" ?? - Also, You have no target in there?
Code:
#region :freeze <username>
case "freeze":
{
if (_Rank > 6)
{
virtualUser User = userManager.getUser(args[1]);
{
roomUser.walkLock = true; // Freezes the user
}
}
break;
}
#endregion
Uhmm thanks! but what about the :cleanhand <username> xD the cleanhand on the hotel does only clean my own hand so ill change it to :cleanmyhand and use :cleanhand when imma clean the hands on people who've gotten things they shouldn't get :p
And the freeze didnt freeze the person i wanted to freeze but it froze me-.-!
Re: [SERVICE] Custom Commands Database - Request/Post Here
Quote:
Originally Posted by
reptilon
Uhmm thanks! but what about the :cleanhand <username> xD the cleanhand on the hotel does only clean my own hand so ill change it to :cleanmyhand and use :cleanhand when imma clean the hands on people who've gotten things they shouldn't get :p
And the freeze didnt freeze the person i wanted to freeze but it froze me-.-!
My bad, It's cause I didn't add the User. Anyways here they are.
Code:
#region :freeze <user>
case "freeze": // Freeze the specified user
{
virtualUser Target = userManager.getUser(_userID);
Target.roomUser.walkLock = true; // Freeze the user
Room.sendSaying(roomUser, "*freezes " + Target._Username + "*");
Target.roomUser.goalX = -1;
break;
}
#endregion
Code:
#region :unfreeze
case "unfreeze": // Unfreeze the specified user
{
virtualUser Target = userManager.getUser(_userID);
Target.roomUser.walkLock = false; // Freeze the user
Room.sendSaying(roomUser, "*unfreezes " + Target._Username + "*");
break;
}
#endregion
-EDIT-
I have read your other request, this should work, here it is, the clean targets hand.
Code:
#region :cleanhand
case "cleanhand": // Deletes everything from the targets hand
{
virtualUser User = userManager.getUser(args[1]);
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("DELETE FROM furniture WHERE ownerid = '" + User.userID + "' AND roomid = '0'");
}
User.refreshHand("update");
}
break;
}
#endregion
Right this one below, Is for the users with the rank above 5. Which is 6 + 7, So users do not abuse it.
Code:
#region :cleanhand
case "cleanhand": // Deletes everything from the targets hand
{
if (_Rank > 5)
{
virtualUser User = userManager.getUser(args[1]);
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("DELETE FROM furniture WHERE ownerid = '" + User.userID + "' AND roomid = '0'");
}
User.refreshHand("update");
}
}
break;
}
#endregion
Re: [SERVICE] Custom Commands Database - Request/Post Here
Quote:
Originally Posted by
Sledmore
My bad, It's cause I didn't add the User. Anyways here they are.
Code:
#region :freeze <user>
case "freeze": // Freeze the specified user
{
virtualUser Target = userManager.getUser(_userID);
Target.roomUser.walkLock = true; // Freeze the user
Room.sendSaying(roomUser, "*freezes " + Target._Username + "*");
Target.roomUser.goalX = -1;
break;
}
#endregion
Code:
#region :unfreeze
case "unfreeze": // Unfreeze the specified user
{
virtualUser Target = userManager.getUser(_userID);
Target.roomUser.walkLock = false; // Freeze the user
Room.sendSaying(roomUser, "*unfreezes " + Target._Username + "*");
break;
}
#endregion
-EDIT-
I have read your other request, this should work, here it is, the clean targets hand.
Code:
#region :cleanhand
case "cleanhand": // Deletes everything from the targets hand
{
virtualUser User = userManager.getUser(args[1]);
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("DELETE FROM furniture WHERE ownerid = '" + User.userID + "' AND roomid = '0'");
}
User.refreshHand("update");
}
break;
}
#endregion
Right this one below, Is for the users with the rank above 5. Which is 6 + 7, So users do not abuse it.
Code:
#region :cleanhand
case "cleanhand": // Deletes everything from the targets hand
{
if (_Rank > 5)
{
virtualUser User = userManager.getUser(args[1]);
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("DELETE FROM furniture WHERE ownerid = '" + User.userID + "' AND roomid = '0'");
}
User.refreshHand("update");
}
}
break;
}
#endregion
You failed my friend :D i found out the thing that was wrong
by thank you i now got to finish my own command to :D
But the Clean Hand was right =)
for those who want the fixed command here it is:
Freeze:
Code:
#region :freeze <user>
case "freeze": // Freeze the specified user
{
if (_Rank > 6)
{
virtualUser Target = userManager.getUser(args[1]);
Target.roomUser.walkLock = true; // Freeze the user
Room.sendSaying(roomUser, "*freezes " + Target._Username + "*");
Target.roomUser.goalX = -1;
}
break;
}
#endregion
unfreeze:
Code:
#region :unfreeze
case "unfreeze": // Unfreeze the specified user
{
if (_Rank > 6)
{
virtualUser Target = userManager.getUser(args[1]);
Target.roomUser.walkLock = false; // Freeze the user
Room.sendSaying(roomUser, "*unfreezes " + Target._Username + "*");
}
break;
}
Re: [SERVICE] Custom Commands Database - Request/Post Here
lol so much edits but thanks Sledmore I learned something new xD
Re: [SERVICE] Custom Commands Database - Request/Post Here
:lockroom
dissi TdBp
kicks everyone in the room, set the room on doorbell and change the room name to: closed by Lubbo Staff
minimum rank: 6 please
Re: [SERVICE] Custom Commands Database - Request/Post Here
Thanks for all ur services ;) really usefull.
Re: [SERVICE] Custom Commands Database - Request/Post Here
Quote:
Originally Posted by
TakeDown
:lockroom
dissi TdBp
kicks everyone in the room, set the room on doorbell and change the room name to: closed by Lubbo Staff
minimum rank: 6 please
Got bored, So I did this for you;
Code:
#region :lockroom message
case "lockroom": // Locks the room, With a message you can set your self!
{
if (_Rank > 6)
{
string Message = Text.Substring(3);
Room.kickUsers(_Rank, Message);
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("UPDATE rooms SET name = 'Closed by Lubba Staff' WHERE id = '" + this._roomID + "'");
dbClient.runQuery("UPDATE rooms SET state = '1' WHERE id = '" + this._roomID + "'");
}
}
break;
}
#endregion
How does this work?
Simple, Goto the room, and type :lockroom Your message here! It will kick everyone in there and also send them a message, change the room name, and lock the room!
I didn't test this by the way, So if it errors, let me know, Thanks!
-EDIT-
Quote:
Originally Posted by
Kado
Thanks for all ur services ;) really usefull.
Your welcome!
Re: [SERVICE] Custom Commands Database - Request/Post Here
Quote:
Originally Posted by
Sledmore
Got bored, So I did this for you;
Code:
#region :lockroom message
case "lockroom": // Locks the room, With a message you can set your self!
{
if (_Rank > 6)
{
string Message = Text.Substring(3);
Room.kickUsers(_Rank, Message);
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("UPDATE rooms SET name = 'Closed by Lubba Staff' WHERE id = '" + this._roomID + "'");
dbClient.runQuery("UPDATE rooms SET state = '1' WHERE id = '" + this._roomID + "'");
}
}
break;
}
#endregion
How does this work?
Simple, Goto the room, and type :lockroom Your message here! It will kick everyone in there and also send them a message, change the room name, and lock the room!
I didn't test this by the way, So if it errors, let me know, Thanks!
-EDIT-
Your welcome!
tnx, it works fine
Re: [SERVICE] Custom Commands Database - Request/Post Here
Is there a way to make a long HotelAlert? like i type :ha and then comes up a textarea. If i press OK under the textarea it will alert that.
Re: [SERVICE] Custom Commands Database - Request/Post Here
Quote:
Originally Posted by
Gorver
Is there a way to make a long HotelAlert? like i type :ha and then comes up a textarea. If i press OK under the textarea it will alert that.
Uhh no that isn't possible in the Client, but it is possible through Housekeeping ( If you add an extra page ).
Re: [SERVICE] Custom Commands Database - Request/Post Here
Making a Command Better way Use Housekeeping Like PEjump said,
Re: [SERVICE] Custom Commands Database - Request/Post Here
Quote:
Originally Posted by
Habblet
Its working for me, so you got a other EMULATOR, ghehe.... Nvm and youre welcome:):
lol you should use the first one because i made it for it to :D code:
Code:
#region :straf
case "straf":
{
if (rankManager.containsRight(_Rank, "fuse_administrator_access") == false)
return false;
else
{
virtualUser User = userManager.getUser(args[1]);
{
string striking = DB.runRead("SELECT strikes FROM users WHERE name = '" + User._Username + "'");
{
if (striking == "0")
{
DB.runQuery("UPDATE users SET strike = '1' WHERE name = '" + User._Username + "'");
User.sendData("BK" +
"Dit is je eerste Waarschuwing op Habblet NL/BE\r" +
"zorg ervoor dat je je aan de regels houd./rwanneer je 4 Waarschuwingen hebt gekregen krijg je een ban van 24 uur\r" +
"Nog een prettig verblijf op Habblet NL/BE");
}
else if (striking == "1")
{
DB.runQuery("UPDATE users SET strike = '2' WHERE name = '" + User._Username + "'");
User.sendData("BK" + "Dit is je tweede Waarschuwing op Habblet NL/BE\r" +
"zorg ervoor dat je je aan de regels houd./rwanneer je 4 Waarschuwingen hebt gekregen krijg je een ban van 24 uur\r" +
"Nog een prettig verblijf op Habblet NL/BE");
}
else if (striking == "2")
{
DB.runQuery("UPDATE users SET strike = '3' WHERE name = '" + User._Username + "'");
User.sendData("BK" + "Dit is nu je derde Waarschuwing op Habblet NL/BE\r" +
"zorg ervoor dat je je aan de regels houd./rwanneer je 4 Waarschuwingen hebt gekregen krijg je een ban van 24 uur\r" +
"Nog een prettig verblijf op Habblet NL/BE");
}
else if (striking == "3")
{
DB.runQuery("UPDATE users SET strike = '4' WHERE name = '" + User._Username + "'");
User.sendData("BK" + "Je word 24 uur verbannen van Habblet NL/BE\rReden: Overtreden van de Habblet NL/BE regels!");
DB.runRead("SELECT id,rank,ipaddress_last FROM users WHERE id = " + User.userID + "");
userManager.setBan(Convert.ToString("ipaddress_last"), int.Parse("24"), "Overtreden van de Habblet NL/BE regels!");
DB.runQuery("UPDATE users_bans WHERE ipaddress = '" + Convert.ToString("ipaddress_last") + "' SET userid = '" + User.userID + "'");
}
}
}
}
}
break;
#endregion
edited by yohans1 and i remove strike to striking because strike is already on my db so ya can change it if ya want but ima test it real quick
Re: [SERVICE] Custom Commands Database - Request/Post Here
:ra
allows vip's to do a room alert but only in there own rooms
Dissi TDP
Re: [SERVICE] Custom Commands Database - Request/Post Here
Re: [SERVICE] Custom Commands Database - Request/Post Here
dont worry made it myself xD was having troublw with the (_owner) bit xD