Magicalz
Member
- Aug 4, 2011
- 141
- 8
Hey guys. First code I've coded from scratch, however it is not fully completed as it poofs the user twice. (likely as it has the vars and appearance being refreshed)
Anyway, one user who is in the jail room can use :bail <user> to bail that user for 750c. You can remove the roomID & change the amount of credits if you want to. Might not fully work, but first release and that.
(FOR THE NOOBS: Go into your Emu folder -> Source -> Virtual -> Users ->VirtualUser.cs and then paste this under any command in the file. You can always search for stun at the top, then at the end of the #endregion, press an enter and then paste it in)
If it don't work, contact me. Was used especially for Xoa EMU V4 but others should work too.
Thanks alot! [Like if you used it, or liked it or whatnot xD]
Anyway, one user who is in the jail room can use :bail <user> to bail that user for 750c. You can remove the roomID & change the amount of credits if you want to. Might not fully work, but first release and that.
Code:
#region :bail
case "bail":
{
string jailed;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
jailed = dbClient.getString("SELECT arrested FROM users WHERE name = '" + _Username + "'");
int myCredits = dbClient.getInt("SELECT credits FROM users WHERE name = '" + _Username + "'");
virtualUser User = userManager.getUser(args[1]);
{
if (_roomID == 7)
{
if (_Jailed == 1)
{
sendData("BK" + "Sorry, but you are in jail. You cannot bail anyone if you are in jail..");
}
else
if (myCredits < 750)
{
sendData("BK" + "Sorry, but you need 750 credits to bail this user.");
}
else
{
dbClient.runQuery("UPDATE users SET credits = credits + '-750' WHERE name = '" + _Username + "'");
User._JailTime = 0;
User._Punch = 0;
User._HitBot = null;
User._Figure = User._Uni;
User._Mission = ("Bailed");
refreshAppearance(true, true, true);
User.refreshAppearance(true, true, true);
User.refreshValueables(true, true);
refreshValueables(true, true);
User.sendData("BK" + "You just got bailed out of jail by " + _Username + "");
Room.sendShout(roomUser, "*Bails " + User._Username + " from jail for 750 credits!*");
}
}
}
}
}
break;
#endregion
(FOR THE NOOBS: Go into your Emu folder -> Source -> Virtual -> Users ->VirtualUser.cs and then paste this under any command in the file. You can always search for stun at the top, then at the end of the #endregion, press an enter and then paste it in)
If it don't work, contact me. Was used especially for Xoa EMU V4 but others should work too.
Thanks alot! [Like if you used it, or liked it or whatnot xD]