-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
Talax_Habbo.ca
It was originally made by Qurb, he just didn't release it because mir's a fgt lol. I'm sure if you ask Qurb politely and offer to post credit to the command somewhere on your site, he'll be glad to share it, seems like a good enough guy.
Anywho, won't all these useless commands slow down people's servers? I think it'd be more efficient if they were implemented through housekeeping.
Obviously they gonna slow things down
and i dont want it anymore was just checking for a friend.
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
I need a server with 5.2.5 connector with custom commands, if somone could uplaod i would be very happy
Thanks
Richie4394
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Can someone code a command that transform people into animal ( Cat, dog, croco )
:transform <cat,dog or croc>
For TDBP Dissi's edit
V26
Please :)
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
I need
:promote
v26
gives them the fuse_officer, and promote again will give them fuse_chief fuse rights
:demote is vice versa except it can give them fuse_cadet
:hirecop gives them fuse_cadet fuse rights
:firecop gives them fuse_civilian fuse rights
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
settaz
I need
:promote
v26
gives them the fuse_officer, and promote again will give them fuse_chief fuse rights
:demote is vice versa except it can give them fuse_cadet
:hirecop gives them fuse_cadet fuse rights
:firecop gives them fuse_civilian fuse rights
Why not code a jobs/corps system instead of using fuserights? I might share mine later.
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
swimoTheBig
Why not code a jobs/corps system instead of using fuserights? I might share mine later.
Using fuse_rights to create a job system would be very limited, and would not allow many jobs. The best way to go about creating a job system is to create it from scratch using two tables with the corporations info and a table with the ranks.
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
RastaLulz
Using fuse_rights to create a job system would be very limited, and would not allow many jobs. The best way to go about creating a job system is to create it from scratch using two tables with the corporations info and a table with the ranks.
I have mine as, a table for corps, one for ranks, and the one for staff :P
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Server : Dissi tdbp
Commands : (:naked <username> makes user naked
(:unnaked <username> puts clothes on
(:flag <username> changes users name
(:strike <username> <reason> 4 strikes = ban
(:dropall drops all furni from hand into room
(:invisible <name> Allows you not to be seen
(:Pet <type> <colour> Will turn you into a pet Type's Dog/Cat/Crocodile
(:kill <user> Will disconnect the user and a message will appear saying " An Admin has disconnected you "
Thanks For This, Will Be Very Happy If You Could Make :D
Richard
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
swimoTheBig
I have mine as, a table for corps, one for ranks, and the one for staff :P
Can you help me out with it?
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
settaz
Can you help me out with it?
Sure, PM me your MSN.
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
richie4394
Server : Dissi tdbp
Commands : (:naked <username> makes user naked
(:unnaked <username> puts clothes on
(:flag <username> changes users name
(:strike <username> <reason> 4 strikes = ban
(:dropall drops all furni from hand into room
(:invisible <name> Allows you not to be seen
(:Pet <type> <colour> Will turn you into a pet Type's Dog/Cat/Crocodile
(:kill <user> Will disconnect the user and a message will appear saying " An Admin has disconnected you "
Thanks For This, Will Be Very Happy If You Could Make :D
Richard
Can you code them commands for me please
dissi tdbp
thanks
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
anyone with a daily credits system for dissi?
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
I can't seem to pm you swimo can you just post the help here?
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
People, usuing theses comands and re-releasing with no credits, so i'ma remove.
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
can you send me the server && The db ?
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Can i have the DB files so i can import them? Or how do i use these on dissi?
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Yea, can you post db files. I need lol.
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
Sledmore
Here guys:
Have the commands i used for Obbo-Hotel.net my old RP Server..
Please note - not all made by me..
Code:
#region :pickup
case "pickupall": // picks up all furniture in room
{
string owner;
owner = DB.runRead("SELECT owner FROM rooms WHERE owner = '" + _Username + "'");
if (owner != _Username)
{
DB.runQuery("UPDATE users SET credits = credits -50 WHERE id = '" + this.userID + "'");
sendData("BK¿what are you trying? -50 credits for trying to steal furnis" + Convert.ToChar(2));
}
else // this will quit 50 credits to some user that it isn't the owner of the room
{
DB.runQuery("UPDATE furniture SET roomid = 0 WHERE roomid = '" + Room.roomID + "'");
Room.sendData("DBO" + "\r");
}
}
break;
#endregion
Code:
#region Arrest
case "arrest":
{
virtualUser _User = userManager.getUser(args[1]);
virtualUser Target = userManager.getUser(args[1]);
string corpdata;
string corpdata2;
corpdata = DB.runRead("SELECT corpid FROM jobsstaff WHERE uid = '" + userID + "'");
corpdata2 = DB.runRead("SELECT rankid FROM jobsstaff WHERE uid = '" + userID + "'");
string targetdata;
string targetdata2;
targetdata = DB.runRead("SELECT corpid FROM jobsstaff WHERE uid = '" + Target.userID + "'");
targetdata2 = DB.runRead("SELECT rankid FROM jobsstaff WHERE uid = '" + Target.userID + "'");
string arrestdata;
arrestdata = DB.runRead("SELECT arrest FROM jobsranks WHERE corpid = '" + corpdata + "' AND rankid = '" + corpdata2 + "'");
if (arrestdata == "1")
{
if (Target.roomUser != roomUser && (roomUser.X + 1 == Target.roomUser.X || roomUser.X - 1 == Target.roomUser.X || roomUser.Y + 1 == Target.roomUser.Y || roomUser.Y - 1 == Target.roomUser.Y))
{
if (Target.roomUser.walkLock == false)
{
Room.sendShout(roomUser, "*Tried to arrest " + Target._Username + " but failed as they aren't cuffed*");
}
else
{
Target.sendData("BK" + "You have been arrested and placed in a cell." + Convert.ToChar(2));
Room.sendShout(roomUser, "*Arrests " + Target._Username + " For 15 minutes*");
DB.runQuery("UPDATE users SET arrests = arrests + '+1' WHERE name = '" + Target._Username + "'");
DB.runQuery("UPDATE users SET arrested = '1' WHERE name = '" + Target._Username + "'");
Target._Figure = "hr-831-61.hd-180-1.ch-220-94.lg-280-94.sh-290-94";
Target._Mission = "Convict";
Target.refreshAppearance(false, true, true);
Target.sendData("D^" + "H" + Encoding.encodeVL64(2));
Arrest = new Thread(new ThreadStart(this.JailTime));
Arrest.Priority = ThreadPriority.BelowNormal;
Arrest.Start();
DB.runQuery("UPDATE users SET working = '0' WHERE name = '" + Target._Username + "'");
}
}
}
break;
}
#endregion
Code:
#region :stats
case "stats": // specbar command
{
// Send the spectator packet within the encoded statistics
string health;
health = DB.runRead("SELECT health FROM users WHERE name = '" + _Username + "'");
string inte;
inte = DB.runRead("SELECT inte FROM users WHERE name = '" + _Username + "'");
string stre;
stre = DB.runRead("SELECT str FROM users WHERE name = '" + _Username + "'");
string hunger;
hunger = DB.runRead("SELECT hunger FROM users WHERE name = '" + _Username + "'");
string drugs;
drugs = DB.runRead("SELECT drugs FROM users WHERE name = '" + _Username + "'");
sendData("BK" + "Health: " + health + "/100 \r Inteligence: " + inte + " \r Strength: " + stre + " \r Hunger: " + hunger +"");
break;
}
#endregion
Code:
case "leavegame": //poofs
refreshAppearance(true, true, true); // Use the poof animation
this.Room.sendShout(this.roomUser, "*Leaves Colour Wars*");
sendData("D^" + "H" + Encoding.encodeVL64(42259));
break;
case "kickfromgame": //poofs
{
if (rankManager.containsRight(_Rank, "fuse_administrator_access") == false)
return false;
else
{
virtualUser Target = userManager.getUser(args[1]);
Target.refreshAppearance(true, true, true); // Use the poof animation
this.Room.sendShout(this.roomUser, "*Kicks " + Target._Username + " From Colour Wars*");
Target.sendData("D^" + "H" + Encoding.encodeVL64(42259));
}
}
break;
Code:
#region Colour Wars Commands
case "blue":
{
if (rankManager.containsRight(_Rank, "fuse_administrator_access") == false)
return false;
else
{
virtualUser Target = userManager.getUser(args[1]);
Target._Figure = "hr-828-60.hd-180-1.ch-210-105.lg-280-105.sh-290-105";
Target._Mission = "Blue Team - Colour Wars!";
Target.refreshAppearance(false, true, true);
Room.sendShout(roomUser, "*Cures " + Target._Username + "*");
Room.sendShout(roomUser, "*" + Target._Username + " Joins Blue Team*");
break;
}
}
case "red":
{
if (rankManager.containsRight(_Rank, "fuse_administrator_access") == false)
return false;
else
{
virtualUser Target = userManager.getUser(args[1]);
Target._Figure = "hr-828-59.hd-180-1.ch-210-96.lg-280-96.sh-290-95";
Target._Mission = "Red Team - Colour Wars!";
Target.refreshAppearance(false, true, true);
Room.sendShout(roomUser, "*Cures " + Target._Username + "*");
Room.sendShout(roomUser, "*" + Target._Username + " Joins Red Team*");
break;
}
}
case "pink":
{
if (rankManager.containsRight(_Rank, "fuse_administrator_access") == false)
return false;
else
{
virtualUser Target = userManager.getUser(args[1]);
Target._Figure = "hr-828-54.hd-180-1.ch-210-97.lg-280-97.sh-290-97";
Target._Mission = "Pink Team - Colour Wars!";
Target.refreshAppearance(false, true, true);
Room.sendShout(roomUser, "*Cures " + Target._Username + "*");
Room.sendShout(roomUser, "*" + Target._Username + " Joins Pink Team*");
break;
}
}
case "green":
{
if (rankManager.containsRight(_Rank, "fuse_administrator_access") == false)
return false;
else
{
virtualUser Target = userManager.getUser(args[1]);
Target._Figure = "hr-828-51.hd-180-1.ch-210-101.lg-280-101.sh-290-101";
Target._Mission = "Green Team - Colour Wars!";
Target.refreshAppearance(false, true, true);
Room.sendShout(roomUser, "*Cures " + Target._Username + "*");
Room.sendShout(roomUser, "*" + Target._Username + " Joins Green Team*");
break;
}
}
#endregion
Code:
#region 911
case "911":
{
string Message = Text.Substring(3);
Room.sendShout(roomUser, "*Calls the Police for help!*");
userManager.sendToRank(6, false, "BK" + stringManager.getString("scommand_911") + "\r 911 call from " + _Username + " \r Message: " + Message + " \r Room ID: " + _roomID + "" + Convert.ToChar(2));
userManager.sendToRank(7, false, "BK" + stringManager.getString("scommand_911") + "\r 911 call from " + _Username + " \r Message: " + Message + " \r Room ID: " + _roomID + "" + Convert.ToChar(2));
break;
}
#endregion
Code:
#region Taxi Commands
case "taxi":
{
int roomid = int.Parse(args[1]);
string taxidata;
string taxidata2;
string taxidata3;
taxidata = DB.runRead("SELECT taxi FROM rooms WHERE id = '" + _roomID + "'");
taxidata2 = DB.runRead("SELECT taxi FROM rooms WHERE id = '" + args[1] + "'");
taxidata3 = DB.runRead("SELECT name FROM rooms WHERE id = '" + args[1] + "'");
if (roomUser.walkLock == true)
sendData("BK" + "The Taxi Driver isn't going to grab you! Try again when you are not stunned!" + Convert.ToChar(2));
else if (taxidata == "1" || taxidata2 == "1" || taxidata == "" || taxidata2 == "")
sendData("BK" + "There was an issue with your taxi:\r1. You cannot taxi outside your region.\r2. You cannot be in jail.\r3. The room does not exist!" + Convert.ToChar(2));
else
{
string credits;
credits = DB.runRead("SELECT credits FROM users WHERE id = '" + userID + "'");
if (credits == "-100")
{
}
else
{
Room.sendSaying(roomUser, "*calls a taxi to " + taxidata3 + " [" + args[1] + "]*");
sendData("BK" + "Do not leave the room, the taxi is on its way!" + Convert.ToChar(2));
DB.runQuery("UPDATE users SET taxiid = '" + roomid + "' WHERE name = '" + _Username + "'");
}
}
break;
}
#endregion
Code:
#region bot commands
case "bringbot":
{
int botid = int.Parse(args[1]);
string name;
name = DB.runRead("SELECT name FROM roombots WHERE id = '" + botid + "'");
DB.runQuery("UPDATE roombots SET roomid = '" + roomUser.roomID + "' WHERE id = '" + botid + "'");
Room.loadBots();
this.Room.sendShout(this.roomUser, "*Brings " + name + " to the room*");
break;
}
case "refreshbots":
{
Room.loadBots();
break;
}
case "setbotcords":
{
int botid = int.Parse(args[1]);
int x = int.Parse(args[2]);
int y = int.Parse(args[3]);
DB.runQuery("UPDATE roombots SET x = '" + x + "' WHERE id = '" + botid + "'");
DB.runQuery("UPDATE roombots SET y = '" + y + "' WHERE id = '" + botid + "'");
DB.runQuery("UPDATE roombots_coords SET x = '" + x + "' WHERE id = '" + botid + "'");
DB.runQuery("UPDATE roombots_coords SET y = '" + y + "' WHERE id = '" + botid + "'");
this.Room.sendShout(this.roomUser, "*Edits a bots cords*");
Room.loadBots();
break;
}
case "sendbothome":
{
int botid = int.Parse(args[1]);
string bothome;
bothome = DB.runRead("SELECT home FROM roombots WHERE id = '" + botid + "'");
string name;
name = DB.runRead("SELECT name FROM roombots WHERE id = '" + botid + "'");
DB.runQuery("UPDATE roombots SET roomid = '" + bothome + "' WHERE id = '" + botid + "'");
Room.loadBots();
this.Room.sendShout(this.roomUser, "Sends " + name + " home");
foreach (virtualRoomUser User in Room.Users)
{
User.User.sendData("D^" + "H" + Encoding.encodeVL64(User.roomID));
}
break;
}
#endregion
Code:
#region Flat/Property Commands
case "sellproperty":
{
string owner;
owner = DB.runRead("SELECT owner FROM rooms WHERE owner = '" + _Username + "'");
if (owner != _Username)
sendData("BK" + "Sorry, but you cannot sell someone elses property.");
else
{
int salepice = int.Parse(args[1]);
if (salepice < 0)
sendData("BK" + "Sorry, but you cannot sell your property for less then 0 credits.");
else
{
DB.runQuery("UPDATE rooms SET price = '" + salepice + "', sale = '1' WHERE id = '" + _roomID + "'");
sendData("BK" + "You have successfully put your property on the market for " + salepice + " credits!");
Room.sendSaying(roomUser, "*Put property on the market for " + args[1] + "*");
}
}
break;
}
case "buyproperty":
{
string forsale;
string roomprice;
string owner;
string credits;
forsale = DB.runRead("SELECT sale FROM rooms WHERE id = '" + _roomID + "'");
roomprice = DB.runRead("SELECT price FROM rooms WHERE id = '" + _roomID + "'");
owner = DB.runRead("SELECT owner FROM rooms WHERE id = '" + _roomID + "'");
credits = DB.runRead("SELECT credits FROM users WHERE name = '" + _Username + "'");
if (forsale != "1")
sendData("BK" + "Sorry, but this room is not for sale.");
else
{
int roomprice_mod = int.Parse(roomprice);
int credits_mod = int.Parse(credits);
if (roomprice_mod > credits_mod && owner != _Username)
sendData("BK" + "Sorry, but you do not have enough credits to purchase this property.");
else
{
virtualUser User = userManager.getUser(owner);
DB.runQuery("UPDATE rooms SET owner = '" + _Username + "', sale = '0' WHERE id = '" + _roomID + "'");
DB.runQuery("UPDATE users SET credits = credits + '" + roomprice + "' WHERE name = '" + owner + "'");
DB.runQuery("UPDATE users SET credits = credits - '" + roomprice + "' WHERE name = '" + _Username + "'");
refreshValueables(true, false);
User.refreshValueables(true, false);
Room.sendShout(roomUser, "*Buys this property*");
sendData("D^" + "H" + Encoding.encodeVL64(_roomID));
sendData("BK" + "You have successfully bought this property for " + roomprice + " credits.");
User.sendData("BK" + _Username + " has bought your room for " + roomprice + " credits!");
}
}
break;
}
case "roomstats":
{
string buy;
string buy1;
string buy2;
string buy3;
buy = DB.runRead("SELECT sale FROM rooms WHERE id = '" + _roomID + "'");
buy1 = DB.runRead("SELECT price FROM rooms WHERE id = '" + _roomID + "'");
buy2 = DB.runRead("SELECT owner FROM rooms WHERE id = '" + _roomID + "'");
buy3 = DB.runRead("SELECT name FROM rooms WHERE id = '" + _roomID + "'");
sendData("BK" + "Room Stats \r Is it for sale? (1 yes, 0 no): " + buy + "\r Price: " + buy1 + "\r Owner: " + buy2 + "\r Room name: " + buy3 + "\r Have fun!" + Convert.ToChar(2));
}
break;
#endregion
Code:
#region Bank Commands
case "deposit":
{
int amount = int.Parse(args[1]);
string bank;
bank = DB.runRead("SELECT deposit FROM rooms WHERE id = '" + _roomID + "'");
if (bank == "1")
sendData("BK" + "You need to be in a bank to deposit." + Convert.ToChar(2));
else
{
string credits;
credits = DB.runRead("SELECT credits FROM users WHERE id = '" + userID + "'");
int amountforcheck = int.Parse(args[1]);
int creditsforcheck = int.Parse(credits);
if (amountforcheck > creditsforcheck)
sendData("BK" + "Sorry, but you or the target does not have enough credits to do this action.");
else
{
Room.sendSaying(roomUser, "*Deposits " + amount + "*");
DB.runQuery("UPDATE users SET credits = credits + '-" + amount + "' WHERE name = '" + _Username + "'");
DB.runQuery("UPDATE users SET bank = bank + '" + amount + "' WHERE name = '" + _Username + "'");
refreshValueables(true, false);
sendData("BK" + "Deposited!" + Convert.ToChar(2));
}
}
break;
}
case "balance":
{
string balance;
balance = DB.runRead("SELECT bank FROM users WHERE id = '" + userID + "'");
Room.sendSaying(roomUser, "*Checks Bank Balance!*");
refreshValueables(true, false);
sendData("BK" + "Balance " + balance + "!" + Convert.ToChar(2));
}
break;
case "withdraw":
{
virtualUser Target = userManager.getUser(args[1]);
int amount = int.Parse(args[2]);
string corpdata;
string corpdata2;
corpdata = DB.runRead("SELECT corpid FROM jobsstaff WHERE uid = '" + userID + "'");
corpdata2 = DB.runRead("SELECT rankid FROM jobsstaff WHERE uid = '" + userID + "'");
string targetdata;
string targetdata2;
targetdata = DB.runRead("SELECT corpid FROM jobsstaff WHERE uid = '" + Target.userID + "'");
targetdata2 = DB.runRead("SELECT rankid FROM jobsstaff WHERE uid = '" + Target.userID + "'");
string withdrawdata;
withdrawdata = DB.runRead("SELECT withdraw FROM jobsranks WHERE corpid = '" + corpdata + "' AND rankid = '" + corpdata2 + "'");
string credits;
credits = DB.runRead("SELECT bank FROM users WHERE id = '" + Target.userID + "'");
string bank;
bank = DB.runRead("SELECT deposit FROM rooms WHERE id = '" + _roomID + "'");
if (bank == "1")
sendData("BK" + "You need to be in a bank to withdraw for someone." + Convert.ToChar(2));
int amountforcheck = int.Parse(args[2]);
int creditsforcheck = int.Parse(credits);
if (amountforcheck > creditsforcheck)
sendData("BK" + "Sorry, but you or the target does not have enough credits to do this action.");
else
{
if (withdrawdata == "1")
{
Room.sendSaying(roomUser, "*Withdraws " + amount + " for " + Target._Username + "*");
DB.runQuery("UPDATE users SET credits = credits + '" + amount + "' WHERE name = '" + _Username + "'");
DB.runQuery("UPDATE users SET bank = bank + '-" + amount + "' WHERE name = '" + _Username + "'");
Target.refreshValueables(true, false);
}
}
break;
}
#endregion
in this arrest it doesn't need any added tables -
Code:
#region Arrest
case "arrest":
{
string workdata;
workdata = DB.runRead("SELECT job FROM users WHERE id = '" + userID + "'");
virtualUser _User = userManager.getUser(args[1]);
virtualUser Target = userManager.getUser(args[1]);
if (workdata == "Police Cadet")
{
if (_User.roomUser.walkLock == false)
{
Room.sendSaying(roomUser, "*Tries to arrest " + Target._Username + " but failed as they aren't cuffed*");
}
else
{
string time = stringManager.wrapParameters(args, 2);
virtualUser User = userManager.getUser(args[1]);
if (Target.roomUser != roomUser && (roomUser.X + 3 == Target.roomUser.X || roomUser.X - 3 == Target.roomUser.X || roomUser.Y + 3 == Target.roomUser.Y || roomUser.Y - 3 == Target.roomUser.Y) || Target.roomUser != roomUser && (roomUser.X + 2 == Target.roomUser.X || roomUser.X - 2 == Target.roomUser.X || roomUser.Y + 2 == Target.roomUser.Y || roomUser.Y - 2 == Target.roomUser.Y) || Target.roomUser != roomUser && (roomUser.X + 1 == Target.roomUser.X || roomUser.X - 1 == Target.roomUser.X || roomUser.Y + 1 == Target.roomUser.Y || roomUser.Y - 1 == Target.roomUser.Y))
Target.sendData("BK" + "You have been arrested for " + time + " minutes and placed in a cell." + Convert.ToChar(2));
Room.sendShout(roomUser, "*Arrests " + Target._Username + " For " + time + " minutes*");
DB.runQuery("UPDATE users SET arrests = arrests + '+1' WHERE name = '" + Target._Username + "'");
DB.runQuery("UPDATE users SET arrested = arrested + '1' WHERE name = '" + Target._Username + "'");
DB.runRead("SELECT arrested FROM users WHERE id = '" + userID + "'");
Target.sendData("D^" + "H" + Encoding.encodeVL64(284));
Target._Figure = "hr-831-61.hd-180-1.ch-220-94.lg-280-94.sh-290-94";
Target._Mission = "Convict";
Target.refreshAppearance(false, true, true);
}
break;
}
else if (workdata == "Police Officer")
{
if (_User.roomUser.walkLock == false)
{
Room.sendSaying(roomUser, "*Tries to arrest " + Target._Username + " but failed as they aren't cuffed*");
}
else
{
string time = stringManager.wrapParameters(args, 2);
Target.sendData("BK" + "You have been arrested for " + time + " minutes and placed in a cell." + Convert.ToChar(2));
Room.sendShout(roomUser, "*Arrests " + Target._Username + " For " + time + " minutes*");
virtualUser User = userManager.getUser(args[1]);
if (Target.roomUser != roomUser && (roomUser.X + 3 == Target.roomUser.X || roomUser.X - 3 == Target.roomUser.X || roomUser.Y + 3 == Target.roomUser.Y || roomUser.Y - 3 == Target.roomUser.Y) || Target.roomUser != roomUser && (roomUser.X + 2 == Target.roomUser.X || roomUser.X - 2 == Target.roomUser.X || roomUser.Y + 2 == Target.roomUser.Y || roomUser.Y - 2 == Target.roomUser.Y) || Target.roomUser != roomUser && (roomUser.X + 1 == Target.roomUser.X || roomUser.X - 1 == Target.roomUser.X || roomUser.Y + 1 == Target.roomUser.Y || roomUser.Y - 1 == Target.roomUser.Y))
DB.runQuery("UPDATE users SET arrests = arrests + '+1' WHERE name = '" + Target._Username + "'");
DB.runQuery("UPDATE users SET arrested = arrested + '1' WHERE name = '" + Target._Username + "'");
DB.runRead("SELECT arrested FROM users WHERE id = '" + userID + "'");
Target.sendData("D^" + "H" + Encoding.encodeVL64(284));
Target._Figure = "hr-831-61.hd-180-1.ch-220-94.lg-280-94.sh-290-94";
Target._Mission = "Convict";
Target.refreshAppearance(false, true, true);
}
break;
}
else if (workdata == "Police Chief")
{
if (_User.roomUser.walkLock == false)
{
Room.sendSaying(roomUser, "*Tries to arrest " + Target._Username + " but failed as they aren't cuffed*");
}
else
{
string time = stringManager.wrapParameters(args, 2);
Target.sendData("BK" + "You have been arrested for " + time + " minutes and placed in a cell." + Convert.ToChar(2));
Room.sendShout(roomUser, "*Arrests " + Target._Username + " For " + time + " minutes*");
virtualUser User = userManager.getUser(args[1]);
if (Target.roomUser != roomUser && (roomUser.X + 3 == Target.roomUser.X || roomUser.X - 3 == Target.roomUser.X || roomUser.Y + 3 == Target.roomUser.Y || roomUser.Y - 3 == Target.roomUser.Y) || Target.roomUser != roomUser && (roomUser.X + 2 == Target.roomUser.X || roomUser.X - 2 == Target.roomUser.X || roomUser.Y + 2 == Target.roomUser.Y || roomUser.Y - 2 == Target.roomUser.Y) || Target.roomUser != roomUser && (roomUser.X + 1 == Target.roomUser.X || roomUser.X - 1 == Target.roomUser.X || roomUser.Y + 1 == Target.roomUser.Y || roomUser.Y - 1 == Target.roomUser.Y))
DB.runQuery("UPDATE users SET arrests = arrests + '+1' WHERE name = '" + Target._Username + "'");
DB.runQuery("UPDATE users SET arrested = arrested + '1' WHERE name = '" + Target._Username + "'");
DB.runRead("SELECT arrested FROM users WHERE id = '" + userID + "'");
Target.sendData("D^" + "H" + Encoding.encodeVL64(284));
Target._Figure = "hr-831-61.hd-180-1.ch-220-94.lg-280-94.sh-290-94";
Target._Mission = "Convict";
Target.refreshAppearance(false, true, true);
}
break;
}
else if (workdata == "Police Commissioner")
{
if (_User.roomUser.walkLock == false)
{
Room.sendSaying(roomUser, "*Tries to arrest " + Target._Username + " but failed as they aren't cuffed*");
}
else
{
string time = stringManager.wrapParameters(args, 2);
Target.sendData("BK" + "You have been arrested for " + time + " minutes and placed in a cell." + Convert.ToChar(2));
Room.sendShout(roomUser, "*Arrests " + Target._Username + " For " + time + " minutes*");
virtualUser User = userManager.getUser(args[1]);
if (Target.roomUser != roomUser && (roomUser.X + 3 == Target.roomUser.X || roomUser.X - 3 == Target.roomUser.X || roomUser.Y + 3 == Target.roomUser.Y || roomUser.Y - 3 == Target.roomUser.Y) || Target.roomUser != roomUser && (roomUser.X + 2 == Target.roomUser.X || roomUser.X - 2 == Target.roomUser.X || roomUser.Y + 2 == Target.roomUser.Y || roomUser.Y - 2 == Target.roomUser.Y) || Target.roomUser != roomUser && (roomUser.X + 1 == Target.roomUser.X || roomUser.X - 1 == Target.roomUser.X || roomUser.Y + 1 == Target.roomUser.Y || roomUser.Y - 1 == Target.roomUser.Y))
DB.runQuery("UPDATE users SET arrests = arrests + '+1' WHERE name = '" + Target._Username + "'");
DB.runQuery("UPDATE users SET arrested = arrested + '1' WHERE name = '" + Target._Username + "'");
DB.runRead("SELECT arrested FROM users WHERE id = '" + userID + "'");
Target.sendData("D^" + "H" + Encoding.encodeVL64(284));
Target._Figure = "hr-831-61.hd-180-1.ch-220-94.lg-280-94.sh-290-94";
Target._Mission = "Convict";
Target.refreshAppearance(false, true, true);
}
break;
}
else
return false;
}
#endregion
it also does timed arrests.
Code:
#region Hire/Fire/Quitjob/Demote
case "hire": // Hire
{
virtualUser Target = userManager.getUser(args[1]);
string workdata;
string workdata1;
workdata = DB.runRead("SELECT job FROM users WHERE id = '" + userID + "'");
workdata1 = DB.runRead("SELECT job FROM users WHERE id = '" + Target.userID + "'");
if (workdata1 == "Unemployed")
{
if (workdata == "Police Chief")
{
DB.runQuery("UPDATE users SET job = 'Police Cadet' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Hires " + Target._Username + " as NYPD Police Cadet*");
}
if (workdata == "Police Commissioner")
{
DB.runQuery("UPDATE users SET job = 'Police Cadet' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Hires " + Target._Username + " as NYPD Police Cadet*");
}
else if (workdata == "Obbo Hospital Manager")
{
DB.runQuery("UPDATE users SET job = 'Obbo Hospital Receptionist' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Hires " + Target._Username + " as Hospital Receptionist*");
}
else if (workdata == "Obbo Bank Manager")
{
DB.runQuery("UPDATE users SET job = 'Obbo Banker' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Hires " + Target._Username + " as a Obbo Banker*");
}
else if (workdata == "Obbo Security Manager")
{
DB.runQuery("UPDATE users SET job = 'Obbo Security' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Hires " + Target._Username + " as Security*");
}
else if (workdata == "Casino Manager")
{
DB.runQuery("UPDATE users SET job = 'Casino Security' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Hires " + Target._Username + " as Casino Security*");
}
}
}
break;
case "promote": // Fire
{
virtualUser Target = userManager.getUser(args[1]);
string workdata;
string workdata1;
workdata = DB.runRead("SELECT job FROM users WHERE id = '" + userID + "'");
workdata1 = DB.runRead("SELECT job FROM users WHERE id = '" + Target.userID + "'");
if (workdata == "Police Chief")
{
if (workdata1 == "Police Cadet")
{
DB.runQuery("UPDATE users SET job = 'Police Officer' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Promotes " + Target._Username + " to NYPD Police Officer*");
}
}
if (workdata == "Police Commissioner")
{
if (workdata1 == "Police Cadet")
{
DB.runQuery("UPDATE users SET job = 'Police Officer' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Promotes " + Target._Username + " to NYPD Police Officer*");
}
}
if (workdata == "Police Commissioner")
{
if (workdata1 == "Police Officer")
{
DB.runQuery("UPDATE users SET job = 'Police Chief' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Promotes " + Target._Username + " to NYPD Chief*");
}
}
if (workdata == "Casino Manager")
{
if (workdata1 == "Casino Security")
{
DB.runQuery("UPDATE users SET job = 'Casino Dealer' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Promotes " + Target._Username + " to Casino Dealer*");
}
}
if (workdata == "Casino Manager")
{
if (workdata1 == "Casino Dealer")
{
DB.runQuery("UPDATE users SET job = 'Casino Supervisor' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Promotes " + Target._Username + " to Casino Supervisor*");
}
}
if (workdata == "Obbo Bank Manager")
{
if (workdata1 == "Obbo Banker")
{
DB.runQuery("UPDATE users SET job = 'Obbo Bank Supervisor' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Promotes " + Target._Username + " to Obbo Bank Supervisor*");
}
}
if (workdata == "Obbo Hospital Manager")
{
if (workdata1 == "Obbo Hospital Receptionist")
{
DB.runQuery("UPDATE users SET job = 'Obbo Hospital Doctor' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Promotes " + Target._Username + " to Hospital Doctor*");
}
}
if (workdata == "Obbo Hospital Manager")
{
if (workdata1 == "Obbo Hospital Doctor")
{
DB.runQuery("UPDATE users SET job = 'Obbo Hospital Supervisor' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Promotes " + Target._Username + " to Hospital Supervisor*");
}
}
break;
}
case "demote": // demote
{
virtualUser Target = userManager.getUser(args[1]);
string workdata;
string workdata1;
workdata = DB.runRead("SELECT job FROM users WHERE id = '" + userID + "'");
workdata1 = DB.runRead("SELECT job FROM users WHERE id = '" + Target.userID + "'");
if (workdata == "Police Commissioner")
{
if (workdata1 == "Police Chief")
{
DB.runQuery("UPDATE users SET job = 'Police Officer' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Demotes " + Target._Username + " to NYPD Police Officer*");
}
}
if (workdata == "Police Commissioner")
{
if (workdata1 == "Police Officer")
{
DB.runQuery("UPDATE users SET job = 'Police Cadet' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Demotes " + Target._Username + " to NYPD Police Cadet*");
}
}
if (workdata == "Police Chief")
{
if (workdata1 == "Police Officer")
{
DB.runQuery("UPDATE users SET job = 'Police Cadet' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Demotes " + Target._Username + " to NYPD Police Cadet*");
}
}
if (workdata == "Casino Manager")
{
if (workdata1 == "Casino Dealer")
{
DB.runQuery("UPDATE users SET job = 'Casino Security' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Demotes " + Target._Username + " to Casino Security*");
}
}
if (workdata == "Casino Manager")
{
if (workdata1 == "Casino Supervisor")
{
DB.runQuery("UPDATE users SET job = 'Casino Dealer' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Demotes " + Target._Username + " to Casino Dealer*");
}
}
if (workdata == "Obbo Bank Manager")
{
if (workdata1 == "Obbo Bank Supervisor")
{
DB.runQuery("UPDATE users SET job = 'Obbo Banker' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Demotes " + Target._Username + " to Banker*");
}
}
if (workdata == "Obbo Hospital Manager")
{
if (workdata1 == "Obbo Hospital Supervisor")
{
DB.runQuery("UPDATE users SET job = 'Obbo Hospital Doctor' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Demotes " + Target._Username + " to Hospital Doctor*");
}
}
if (workdata == "Obbo Hospital Manager")
{
if (workdata1 == "Obbo Hospital Doctor")
{
DB.runQuery("UPDATE users SET job = 'Obbo Hospital Receptionist' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Demotes " + Target._Username + " to Hospital Receptionist*");
}
}
break;
}
case "quitjob": // Fire
{
DB.runQuery("UPDATE users SET job = 'Unemployed' WHERE name = '" + _Username + "'");
Room.sendSaying(roomUser, "*Resigns from their job!*");
refreshAppearance(true, true, true);
break;
}
case "dismiss": // Fire
{
virtualUser Target = userManager.getUser(args[1]);
string workdata;
string workdata1;
workdata = DB.runRead("SELECT job FROM users WHERE id = '" + userID + "'");
workdata1 = DB.runRead("SELECT job FROM users WHERE id = '" + Target.userID + "'");
if (workdata == "Police Chief")
{
if (workdata1 == "Police Cadet")
{
DB.runQuery("UPDATE users SET job = 'Unemployed' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Fires " + Target._Username + "*");
}
}
if (workdata == "Police Chief")
{
if (workdata1 == "Police Officer")
{
DB.runQuery("UPDATE users SET job = 'Unemployed' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Fires " + Target._Username + "*");
}
}
if (workdata == "Police Commissioner")
{
if (workdata1 == "Police Cadet")
{
DB.runQuery("UPDATE users SET job = 'Unemployed' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Fires " + Target._Username + "*");
}
}
if (workdata == "Police Commissioner")
{
if (workdata1 == "Police Officer")
{
DB.runQuery("UPDATE users SET job = 'Unemployed' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Fires " + Target._Username + "*");
}
}
if (workdata == "Police Commissioner")
{
if (workdata1 == "Police Chief")
{
DB.runQuery("UPDATE users SET job = 'Unemployed' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Fires " + Target._Username + "*");
}
}
if (workdata == "Obbo Security Manager")
{
if (workdata1 == "Obbo Security")
{
DB.runQuery("UPDATE users SET job = 'Unemployed' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Fires " + Target._Username + "*");
}
}
if (workdata == "Obbo Security Manager")
{
if (workdata1 == "Obbo Security Supervisor")
{
DB.runQuery("UPDATE users SET job = 'Unemployed' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Fires " + Target._Username + "*");
}
}
if (workdata == "Hospital Manager")
{
if (workdata1 == "Receptionist")
{
DB.runQuery("UPDATE users SET job = 'Unemployed' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Fires " + Target._Username + "*");
}
}
if (workdata == "Obbo Hospital Manager")
{
if (workdata1 == "Obbo Hospital Doctor")
{
DB.runQuery("UPDATE users SET job = 'Unemployed' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Fires " + Target._Username + "*");
}
}
if (workdata == "Obbo Hospital Manager")
{
if (workdata1 == "Obbo Hospital Supervisor")
{
DB.runQuery("UPDATE users SET job = 'Unemployed' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Fires " + Target._Username + "*");
}
}
if (workdata == "Casino Manager")
{
if (workdata1 == "Casino Dealer")
{
DB.runQuery("UPDATE users SET job = 'Unemployed' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Fires " + Target._Username + "*");
}
}
if (workdata == "Casino Manager")
{
if (workdata1 == "Casino Security")
{
DB.runQuery("UPDATE users SET job = 'Unemployed' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Fires " + Target._Username + "*");
}
}
if (workdata == "Casino Manager")
{
if (workdata1 == "Casino Supervisor")
{
DB.runQuery("UPDATE users SET job = 'Unemployed' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Fires " + Target._Username + "*");
}
}
if (workdata == "Obbo Bank Manager")
{
if (workdata1 == "Obbo Banker")
{
DB.runQuery("UPDATE users SET job = 'Unemployed' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Fires " + Target._Username + "*");
}
}
if (workdata == "Obbo Bank Manager")
{
if (workdata1 == "Obbo Bank Supervisor")
{
DB.runQuery("UPDATE users SET job = 'Unemployed' WHERE name = '" + Target._Username + "'");
Room.sendSaying(roomUser, "*Fires " + Target._Username + "*");
}
}
break;
}
#endregion
just make a collum of two for that, infact no just make on collum called "job" in the users table ;)
Code:
#region Stun/Cuff/Uncuff
case "stun": // Freeze the specified user
{
int _userID = userManager.getUserID(args[1]);
virtualUser Target = userManager.getUser(_userID);
string workdata;
workdata = DB.runRead("SELECT job FROM users WHERE id = '" + userID + "'");
if (Target.roomUser != roomUser && (roomUser.X + 3 == Target.roomUser.X || roomUser.X - 3 == Target.roomUser.X || roomUser.Y + 3 == Target.roomUser.Y || roomUser.Y - 3 == Target.roomUser.Y) || Target.roomUser != roomUser && (roomUser.X + 2 == Target.roomUser.X || roomUser.X - 2 == Target.roomUser.X || roomUser.Y + 2 == Target.roomUser.Y || roomUser.Y - 2 == Target.roomUser.Y) || Target.roomUser != roomUser && (roomUser.X + 1 == Target.roomUser.X || roomUser.X - 1 == Target.roomUser.X || roomUser.Y + 1 == Target.roomUser.Y || roomUser.Y - 1 == Target.roomUser.Y))
{
if (workdata == "Police Cadet")
{
Target.roomUser.walkLock = true; // Freeze the user
Room.sendShout(roomUser, "*Shoots stungun at " + Target._Username + "*");
}
else if (workdata == "Police Officer")
{
Target.roomUser.walkLock = true; // Freeze the user
Room.sendShout(roomUser, "*Shoots stungun at " + Target._Username + "*");
}
else if (workdata == "Police Chief")
{
Target.roomUser.walkLock = true; // Freeze the user
Room.sendShout(roomUser, "*Shoots stungun at " + Target._Username + "*");
}
else if (workdata == "Police Commissioner")
{
Target.roomUser.walkLock = true; // Freeze the user
Room.sendShout(roomUser, "*Shoots stungun at " + Target._Username + "*");
}
else if (workdata == "Obbo Security")
{
Target.roomUser.walkLock = true; // Freeze the user
Room.sendShout(roomUser, "*Shoots stungun at " + Target._Username + "*");
}
else if (workdata == "Obbo Security Manager")
{
Target.roomUser.walkLock = true; // Freeze the user
Room.sendShout(roomUser, "*Shoots stungun at " + Target._Username + "*");
}
else if (workdata == "Obbo Security Supervisor")
{
Target.roomUser.walkLock = true; // Freeze the user
Room.sendShout(roomUser, "*Shoots stungun at " + Target._Username + "*");
}
else if (workdata == "Casino Security")
{
Target.roomUser.walkLock = true; // Freeze the user
Room.sendShout(roomUser, "*Shoots stungun at " + Target._Username + "*");
}
}
break;
}
case "cuff": // Cuff's the specified user
{
virtualUser User = userManager.getUser(args[1]);
virtualUser Target = userManager.getUser(args[1]);
string workdata;
workdata = DB.runRead("SELECT job FROM users WHERE id = '" + userID + "'");
if (Target.roomUser != roomUser && (roomUser.X + 1 == Target.roomUser.X || roomUser.X - 1 == Target.roomUser.X || roomUser.Y + 1 == Target.roomUser.Y || roomUser.Y - 1 == Target.roomUser.Y))
{
if (Target.roomUser.walkLock == false)
{
Room.sendShout(roomUser, "*Tried to cuff " + Target._Username + " but failed as they aren't stunned*");
}
else if (Target.roomUser.walkLock == true)
{
if (workdata == "Police Cadet")
{
Target.roomUser.walkLock = true; // Freeze the user
Room.sendShout(roomUser, "*Removes cuffs from belt and places them on " + Target._Username + "*");
}
if (workdata == "Police Officer")
{
Target.roomUser.walkLock = true; // Freeze the user
Room.sendShout(roomUser, "*Removes cuffs from belt and places them on " + Target._Username + "*");
}
if (workdata == "Police Chief")
{
Target.roomUser.walkLock = true; // Freeze the user
Room.sendShout(roomUser, "*Removes cuffs from belt and places them on " + Target._Username + "*");
}
if (workdata == "Police Commissioner")
{
Target.roomUser.walkLock = true; // Freeze the user
Room.sendShout(roomUser, "*Removes cuffs from belt and places them on " + Target._Username + "*");
}
}
}
break;
}
case "uncuff": // Cuff's the specified user
{
virtualUser User = userManager.getUser(args[1]);
virtualUser Target = userManager.getUser(args[1]);
string workdata;
workdata = DB.runRead("SELECT job FROM users WHERE id = '" + userID + "'");
if (Target.roomUser != roomUser && (roomUser.X + 1 == Target.roomUser.X || roomUser.X - 1 == Target.roomUser.X || roomUser.Y + 1 == Target.roomUser.Y || roomUser.Y - 1 == Target.roomUser.Y))
{
if (workdata == "Police Cadet")
{
Target.roomUser.walkLock = false; // Freeze the user
Room.sendShout(roomUser, "*Removes cuffs from " + Target._Username + " and places them on belt*");
}
if (workdata == "Police Officer")
{
Target.roomUser.walkLock = false; // Freeze the user
Room.sendShout(roomUser, "*Removes cuffs from " + Target._Username + " and places them on belt*");
}
if (workdata == "Police Chief")
{
Target.roomUser.walkLock = false; // Freeze the user
Room.sendShout(roomUser, "*Removes cuffs from " + Target._Username + " and places them on belt*");
}
if (workdata == "Police Commissioner")
{
Target.roomUser.walkLock = false; // Freeze the user
Room.sendShout(roomUser, "*Removes cuffs from " + Target._Username + " and places them on belt*");
}
}
break;
}
#endregion
again you need the "job" collum for it to work ;)
Code:
#region :stopwork
case "stopwork": //poofs
{
string poof;
DB.runQuery("UPDATE users SET working = '0' WHERE name = '" + _Username + "'");
refreshAppearance(true, true, true); // Use the poof animation
}
break;
#endregion
Code:
#region summon
case "summon": // Teleports user to the room the sender is in
{
if (rankManager.containsRight(_Rank, "fuse_administrator_access") == false)
{
sendData("BK" + "You Cannot summon." +
"" + Convert.ToChar(2));
}
else
{
virtualUser _User = userManager.getUser(args[1]);
virtualUser Target = userManager.getUser(args[1]);
Target.sendData("BK" + "You have been summoned by an administrator.\r\r" + Convert.ToChar(2));
Room.sendShout(roomUser, "*Summons " + Target._Username + "*");
if (_User._inPublicroom)
//if (Target._inPublicroom)
{
Target.sendData("D^" + "I" + Encoding.encodeVL64(_roomID));
}
else
{
Target.sendData("D^" + "H" + Encoding.encodeVL64(_roomID));
}
}
break;
}
#endregion
Code:
#region :workout
case "workout":
string workout;
workout = DB.runRead("SELECT workout FROM rooms WHERE id = '" + _roomID + "'");
if (workout == "1")
if (((this.roomUser.X == 4) && (this.roomUser.Y == 7)) && (this.roomUser.roomID == 287))
{
}
if (((this.roomUser.X == 6) && (this.roomUser.Y == 7)) && (this.roomUser.roomID == 287))
{
}
if (((this.roomUser.X == 8) && (this.roomUser.Y == 7)) && (this.roomUser.roomID == 287))
{
}
if (((this.roomUser.X == 10) && (this.roomUser.Y == 7)) && (this.roomUser.roomID == 287))
{
Room.sendSaying(roomUser, "*Starts thier workout*");
CaptureCheck = new Thread(new ThreadStart(this.WorkoutTime));
CaptureCheck.Priority = ThreadPriority.BelowNormal;
CaptureCheck.Start();
}
break;
#endregion
never finished workout..
Code:
#region :learn
case "learn":
string learn;
learn = DB.runRead("SELECT learn FROM rooms WHERE id = '" + _roomID + "'");
if (learn == "1")
{
Room.sendSaying(roomUser, "*Picks up a book and beginss to read it*");
CaptureCheck = new Thread(new ThreadStart(this.LearnTime));
CaptureCheck.Priority = ThreadPriority.BelowNormal;
CaptureCheck.Start();
}
break;
#endregion
Code:
#region Slap
case "slap": // Rape command
{
virtualUser Target = userManager.getUser(args[1]);
string health;
health = DB.runRead("SELECT health FROM users WHERE name = '" + Target._Username + "'");
{
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))
Room.sendShout(roomUser, "*Slaps " + Target._Username + " Causing 1 damage*");
DB.runQuery("UPDATE users SET health = health + '-1' WHERE name = '" + Target._Username + "'");
DB.runQuery("UPDATE users SET slaps = slaps + '+1' WHERE name = '" + _Username + "'");
if (health == "0")
{
Room.sendShout(roomUser, "*Swings at " + Target._Username + " Knocking them out.*");
Target.sendData("BK" + "You have been knocked out, and will arrive at hospital shortly!" + Convert.ToChar(2));
DB.runQuery("UPDATE users SET health = health + '101' WHERE name = '" + Target._Username + "'");
DB.runQuery("UPDATE users SET deaths = deaths + '1' WHERE name = '" + Target._Username + "'");
Target.sendData("D^" + "H" + Encoding.encodeVL64(71));
}
}
break;
}
#endregion
#region punch
case "punch":
{
virtualUser User = userManager.getUser(args[1]);
if (User._roomID == _roomID && (roomUser.Y == User.roomUser.Y && roomUser.X == User.roomUser.X) || (roomUser.Y + 1 == User.roomUser.Y && roomUser.X == User.roomUser.X) || (roomUser.Y - 1 == User.roomUser.Y && roomUser.X == User.roomUser.X) || (roomUser.Y == User.roomUser.Y && roomUser.X + 1 == User.roomUser.X) || (roomUser.Y == User.roomUser.Y && roomUser.X - 1 == User.roomUser.X))
{
string health_db;
string str_db;
string health_db_ko;
//db queries
health_db = DB.runRead("SELECT health FROM users WHERE name = '" + User._Username + "'");
str_db = DB.runRead("SELECT str FROM users WHERE name = '" + _Username + "'");
//turns str into an int
int str_mod = int.Parse(str_db);
//generates a random number
Random randNum = new Random();
int hit_dif_0 = randNum.Next(1, 4);
int hit_dif_1 = randNum.Next(1, 4);
//what a user hits
int hit = str_mod * hit_dif_0 + hit_dif_1;
DB.runQuery("UPDATE users SET punches = punches + '+1' WHERE name = '" + _Username + "'");
DB.runQuery("UPDATE users SET health = health - '" + hit + "' WHERE name = '" + User._Username + "'");
health_db_ko = DB.runRead("SELECT health FROM users WHERE name = '" + User._Username + "'");
Room.sendShout(roomUser, "*Punches " + args[1] + ", causing " + hit + " damage*");
int health_int = int.Parse(health_db_ko);
//if the user has 0 or less helth left
if (health_int < 1)
{
User.sendData("D^" + "H" + Encoding.encodeVL64(71));
User.sendData("BK" + "You have been knocked out by another user, and will arrive at hospital shortly.");
Room.sendShout(roomUser, "*Swings at " + args[1] + ", Knocking them out*");
DB.runQuery("UPDATE users SET health = '100' WHERE name = '" + User._Username + "'");
DB.runQuery("UPDATE users SET deaths = deaths + '1' WHERE name = '" + User._Username + "'");
}
}
else
{
Room.sendShout(roomUser, "*Swings at " + args[1] + ", but misses*");
}
break;
}
#endregion
#region :hit
case "hit":
{
virtualUser User = userManager.getUser(args[1]);
if (User._roomID == _roomID && (roomUser.Y == User.roomUser.Y && roomUser.X == User.roomUser.X) || (roomUser.Y + 1 == User.roomUser.Y && roomUser.X == User.roomUser.X) || (roomUser.Y - 1 == User.roomUser.Y && roomUser.X == User.roomUser.X) || (roomUser.Y == User.roomUser.Y && roomUser.X + 1 == User.roomUser.X) || (roomUser.Y == User.roomUser.Y && roomUser.X - 1 == User.roomUser.X))
{
string health_db;
string str_db;
string health_db_ko;
//db queries
health_db = DB.runRead("SELECT health FROM users WHERE name = '" + User._Username + "'");
str_db = DB.runRead("SELECT str FROM users WHERE name = '" + _Username + "'");
//turns str into an int
int str_mod = int.Parse(str_db);
//generates a random number
Random randNum = new Random();
int hit_dif_0 = randNum.Next(1, 4);
int hit_dif_1 = randNum.Next(1, 4);
//what a user hits
int hit = str_mod * hit_dif_0 + hit_dif_1;
DB.runQuery("UPDATE users SET punches = punches + '+1' WHERE name = '" + _Username + "'");
DB.runQuery("UPDATE users SET health = health - '" + hit + "' WHERE name = '" + User._Username + "'");
health_db_ko = DB.runRead("SELECT health FROM users WHERE name = '" + User._Username + "'");
Room.sendShout(roomUser, "*Punches " + args[1] + ", causing " + hit + " damage*");
int health_int = int.Parse(health_db_ko);
//if the user has 0 or less helth left
if (health_int < 1)
{
User.sendData("D^" + "H" + Encoding.encodeVL64(71));
User.sendData("BK" + "You have been knocked out by another user, and will arrive at hospital shortly.");
Room.sendShout(roomUser, "*Swings at " + args[1] + ", Knocking them out*");
DB.runQuery("UPDATE users SET health = '100' WHERE name = '" + User._Username + "'");
DB.runQuery("UPDATE users SET deaths = deaths + '1' WHERE name = '" + User._Username + "'");
}
}
else
{
Room.sendShout(roomUser, "*Swings at " + args[1] + ", but misses*");
}
break;
}
#endregion
Code:
#region :commands
case "commands": // shows the publie commands
{
sendData("BK" + ":refresh catalogue\r" +
"Obbo Hotel Public Commands\r" +
"\r" +
":911\r" +
":poof\r" +
":sleep\r" +
":stats\r" +
":surrender\r" +
":startwork\r" +
":taxi <roomid>\r" +
":hit <username>\r" +
":push <username>\r" +
":punch <username\r" + Convert.ToChar(2));
}
break;
#endregion
#region Taxi
case "taxi":
{
string taxidata;
string taxidata2;
string taxidata3;
taxidata = DB.runRead("SELECT taxi FROM rooms WHERE id = '" + _roomID + "'");
taxidata2 = DB.runRead("SELECT taxi FROM rooms WHERE id = '" + args[1] + "'");
taxidata3 = DB.runRead("SELECT name FROM rooms WHERE id = '" + args[1] + "'");
if (roomUser.walkLock == true)
sendData("BK" + "The Taxi Driver isn't going to grab you! Try again when you are not stunned!" + Convert.ToChar(2));
else if (taxidata == "1" || taxidata2 == "1" || taxidata == "" || taxidata2 == "")
sendData("BK" + "There was an issue with your taxi:\r1. You cannot taxi outside your region.\r2. You cannot be in jail.\r3. The room does not exist!" + Convert.ToChar(2));
else
{
int roomid = int.Parse(args[1]);
Room.sendSaying(roomUser, "*calls a taxi to " + taxidata3 + " [" + args[1] + "]*");
sendData("D^" + "H" + Encoding.encodeVL64(roomid));
DB.runQuery("UPDATE users SET credits = credits + '-5' WHERE name = '" + _Username + "'");
refreshValueables(true, false);
sendData("BK" + "Do not leave the room, the taxi is on its way!" + Convert.ToChar(2));
}
break;
}
#endregion
#region :about
case "about": // Display information about the emulator
{
sendData("BK" + "about :\r" +
"Server Time: " + DateTime.Now.ToString() + " (GMT)\r\r" +
"\r" +
"Emulator: Obbo Hotel Emulator\r" +
"Build: 1.0.0 (017/01/2010)\r" +
"DCR Support: v26" + Convert.ToChar(2));
break;
}
#endregion
#region Push
case "push":
{
string str3 = "down";
virtualUser user = userManager.getUser(Text.Split(new char[] { ' ' })[1]);
virtualUser Target = userManager.getUser(args[1]);
if (Target.roomUser != roomUser && (roomUser.X + 3 == Target.roomUser.X || roomUser.X - 3 == Target.roomUser.X || roomUser.Y + 3 == Target.roomUser.Y || roomUser.Y - 3 == Target.roomUser.Y) || Target.roomUser != roomUser && (roomUser.X + 2 == Target.roomUser.X || roomUser.X - 2 == Target.roomUser.X || roomUser.Y + 2 == Target.roomUser.Y || roomUser.Y - 2 == Target.roomUser.Y) || Target.roomUser != roomUser && (roomUser.X + 1 == Target.roomUser.X || roomUser.X - 1 == Target.roomUser.X || roomUser.Y + 1 == Target.roomUser.Y || roomUser.Y - 1 == Target.roomUser.Y))
{
if (this.roomUser.Z2 == 0)
{
str3 = "up";
}
if (this.roomUser.Z2 == 2)
{
str3 = "right";
}
if (this.roomUser.Z2 == 4)
{
str3 = "down";
}
if (this.roomUser.Z2 == 6)
{
str3 = "left";
}
if (str3 == "up")
{
user.roomUser.goalX = user.roomUser.X;
user.roomUser.goalY = user.roomUser.Y - 1;
}
if (str3 == "right")
{
user.roomUser.goalX = user.roomUser.X + 1;
user.roomUser.goalY = user.roomUser.Y;
}
if (str3 == "down")
{
user.roomUser.goalX = user.roomUser.X;
user.roomUser.goalY = user.roomUser.Y + 1;
}
if (str3 == "left")
{
user.roomUser.goalX = user.roomUser.X - 1;
user.roomUser.goalY = user.roomUser.Y;
}
Room.sendShout(roomUser, "*Pushes " + user._Username + "*");
}
break;
}
#endregion
#region :poof
case "poof": //poofs
refreshAppearance(true, true, true); // Use the poof animation
refreshBadges();
break;
#endregion
#region :roomid
case "roomid":
sendData("BK" + "Room ID: " + _roomID + "" + Convert.ToChar(2));
break;
#endregion
#region :cleanhand
case "cleanhand": // Deletes everything from the senders hand
{
DB.runQuery("DELETE FROM furniture WHERE ownerid = '" + userID + "' AND roomid = '0'");
refreshHand("update");
break;
}
#endregion#region :sleep
#region :sleep
case "sleep":
if (this.statusManager.containsStatus("lay"))
{
this.Room.sendShout(this.roomUser, "Zzzzz Zzzzz Zzzzz");
}
break;
#endregion
#region Slap
case "slap": // Rape command
{
virtualUser Target = userManager.getUser(args[1]);
string health;
health = DB.runRead("SELECT health FROM users WHERE name = '" + Target._Username + "'");
{
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))
Room.sendShout(roomUser, "*Slaps " + Target._Username + " Causing 1 damage*");
DB.runQuery("UPDATE users SET health = health + '-1' WHERE name = '" + Target._Username + "'");
DB.runQuery("UPDATE users SET slaps = slaps + '+1' WHERE name = '" + _Username + "'");
if (health == "0")
{
Room.sendShout(roomUser, "*Swings at " + Target._Username + " Knocking them out.*");
Target.sendData("BK" + "You have been knocked out, and will arrive at hospital shortly!" + Convert.ToChar(2));
DB.runQuery("UPDATE users SET health = health + '101' WHERE name = '" + Target._Username + "'");
DB.runQuery("UPDATE users SET deaths = deaths + '1' WHERE name = '" + Target._Username + "'");
Target.sendData("D^" + "H" + Encoding.encodeVL64(71));
}
}
break;
}
#endregion
#region punch
case "punch":
{
virtualUser User = userManager.getUser(args[1]);
if (User._roomID == _roomID && (roomUser.Y == User.roomUser.Y && roomUser.X == User.roomUser.X) || (roomUser.Y + 1 == User.roomUser.Y && roomUser.X == User.roomUser.X) || (roomUser.Y - 1 == User.roomUser.Y && roomUser.X == User.roomUser.X) || (roomUser.Y == User.roomUser.Y && roomUser.X + 1 == User.roomUser.X) || (roomUser.Y == User.roomUser.Y && roomUser.X - 1 == User.roomUser.X))
{
string health_db;
string str_db;
string health_db_ko;
//db queries
health_db = DB.runRead("SELECT health FROM users WHERE name = '" + User._Username + "'");
str_db = DB.runRead("SELECT str FROM users WHERE name = '" + _Username + "'");
//turns str into an int
int str_mod = int.Parse(str_db);
//generates a random number
Random randNum = new Random();
int hit_dif_0 = randNum.Next(1, 4);
int hit_dif_1 = randNum.Next(1, 4);
//what a user hits
int hit = str_mod * hit_dif_0 + hit_dif_1;
DB.runQuery("UPDATE users SET punches = punches + '+1' WHERE name = '" + _Username + "'");
DB.runQuery("UPDATE users SET health = health - '" + hit + "' WHERE name = '" + User._Username + "'");
health_db_ko = DB.runRead("SELECT health FROM users WHERE name = '" + User._Username + "'");
Room.sendShout(roomUser, "*Punches " + args[1] + ", causing " + hit + " damage*");
int health_int = int.Parse(health_db_ko);
//if the user has 0 or less helth left
if (health_int < 1)
{
User.sendData("D^" + "H" + Encoding.encodeVL64(71));
User.sendData("BK" + "You have been knocked out by another user, and will arrive at hospital shortly.");
Room.sendShout(roomUser, "*Swings at " + args[1] + ", Knocking them out*");
DB.runQuery("UPDATE users SET health = '100' WHERE name = '" + User._Username + "'");
DB.runQuery("UPDATE users SET deaths = deaths + '1' WHERE name = '" + User._Username + "'");
}
}
else
{
Room.sendShout(roomUser, "*Swings at " + args[1] + ", but misses*");
}
break;
}
#endregion
#region :hit
case "hit":
{
virtualUser User = userManager.getUser(args[1]);
if (User._roomID == _roomID && (roomUser.Y == User.roomUser.Y && roomUser.X == User.roomUser.X) || (roomUser.Y + 1 == User.roomUser.Y && roomUser.X == User.roomUser.X) || (roomUser.Y - 1 == User.roomUser.Y && roomUser.X == User.roomUser.X) || (roomUser.Y == User.roomUser.Y && roomUser.X + 1 == User.roomUser.X) || (roomUser.Y == User.roomUser.Y && roomUser.X - 1 == User.roomUser.X))
{
string health_db;
string str_db;
string health_db_ko;
//db queries
health_db = DB.runRead("SELECT health FROM users WHERE name = '" + User._Username + "'");
str_db = DB.runRead("SELECT str FROM users WHERE name = '" + _Username + "'");
//turns str into an int
int str_mod = int.Parse(str_db);
//generates a random number
Random randNum = new Random();
int hit_dif_0 = randNum.Next(1, 4);
int hit_dif_1 = randNum.Next(1, 4);
//what a user hits
int hit = str_mod * hit_dif_0 + hit_dif_1;
DB.runQuery("UPDATE users SET punches = punches + '+1' WHERE name = '" + _Username + "'");
DB.runQuery("UPDATE users SET health = health - '" + hit + "' WHERE name = '" + User._Username + "'");
health_db_ko = DB.runRead("SELECT health FROM users WHERE name = '" + User._Username + "'");
Room.sendShout(roomUser, "*Punches " + args[1] + ", causing " + hit + " damage*");
int health_int = int.Parse(health_db_ko);
//if the user has 0 or less helth left
if (health_int < 1)
{
User.sendData("D^" + "H" + Encoding.encodeVL64(71));
User.sendData("BK" + "You have been knocked out by another user, and will arrive at hospital shortly.");
Room.sendShout(roomUser, "*Swings at " + args[1] + ", Knocking them out*");
DB.runQuery("UPDATE users SET health = '100' WHERE name = '" + User._Username + "'");
DB.runQuery("UPDATE users SET deaths = deaths + '1' WHERE name = '" + User._Username + "'");
}
}
else
{
Room.sendShout(roomUser, "*Swings at " + args[1] + ", but misses*");
}
break;
}
#endregion
#region :stats
case "stats": // specbar command
{
// Send the spectator packet within the encoded statistics
string health;
health = DB.runRead("SELECT health FROM users WHERE name = '" + _Username + "'");
string inte;
inte = DB.runRead("SELECT inte FROM users WHERE name = '" + _Username + "'");
string str;
str = DB.runRead("SELECT str FROM users WHERE name = '" + _Username + "'");
string hunger;
hunger = DB.runRead("SELECT hunger FROM users WHERE name = '" + _Username + "'");
sendData("BK" + "\r Your Status:\r \r Health: " + health + "/100 \r Inteligence: " + inte + " \r Strength: " + str + " \r Hunger: " + hunger + "");
break;
}
#endregion
#region :surrender
case "surrender": // Freeze the specified user
{
{
roomUser.walkLock = true; // Freeze the user
Room.sendSaying(roomUser, "*Falls to knees placing there arms above there head surrendering!*");
}
break;
}
#endregion
Enjoy guys!
if you sturggle and need the db just ask..
Are those TdBP? vista4life? shine-away? hebbo?
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
This is a real shame to see Obbo go x[.
Guys, If you do use Sled's/Swimo's Source, Please give them credit?
Sled&&Swimo are friends of mine, And They worked hard making The server better. So i just dont want people comming along and just taking it, then taking all the credit for it.
I would also like to add, that the original server coder(swimo), Has spent alot of time and effor into this, So Give him credit aswell, He's Spent alot of time and effor for the source to be released(not intentintionaly ), And If you take the credit, im sure theres some people out their that will take actions ( That may not be in the best interest for you ) So - Give Credits to:
Sledmoore - Server Coder & Developer
Swimo - Original Server coder && Developer
Dont be a retard.
A quote from swimo:
Quote:
*i started development september 09
*nearly every night since then theres been an update
*and ive been up nearly every night since then dto work on updates!
So lets give them 2 credit for this, and tbh.. Dont be a selfish little so and so, and claim all the credit for yourself, as it would just be harsh, as i would like to see ANY of you ( The ones that will probably steal this then claim it for their own ) To code a c# Server such as the one being released soon, And Then let Me/Swimo/Sledmore Play it, And then You may actualy be good enough. But till then, dont be a Effin retard and steal other peoples work...
Thats all i havto say on this subject till more comments are made - just keep in mind, you wouldnt want someone to steal your work would you?
kkfnx
Ceejay xD
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
RobTheLobster
Are those TdBP? vista4life? shine-away? hebbo?
Them codes are VERY VERY VERY VERY DIRTY, and so old!
They will deffinatly cause alot of lagg to your server.
I would not reccommend using it!
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Okay guys:
Heres the latest DB and Source that legend and Obbo used, it's got all the db collums, etc... Corps system, but the corps system, was made by swimo, credits to him, but it's really really easy to find exploits..
This isn't the broken one that we was using, it's actually alright,
Here we go:
http://lush-hosts.com/Obbo And Legend EMU.zip
Also, i'l keep it on my site, untill no one wants it.
You need mysql connector 5.2.5.
Enjoy, Also anyone who doesn't respect this, and give out credits to swimo/me when we find your hotel, it wont be nice, i know off allot of exploits thats easy to use..
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
Sledmore
Okay guys:
Heres the latest DB and Source that legend and Obbo used, it's got all the db collums, etc... Corps system, but the corps system, was made by swimo, credits to him, but it's really really easy to find exploits..
This isn't the broken one that we was using, it's actually alright,
Here we go:
http://lush-hosts.com/Obbo And Legend EMU.zip
Also, i'l keep it on my site, untill no one wants it.
You need mysql connector 5.2.5.
Enjoy, Also anyone who doesn't respect this, and give out credits to swimo/me when we find your hotel, it wont be nice, i know off allot of exploits thats easy to use..
Does the pet commad in it work?
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
tweeney
Does the pet commad in it work?
Not really tested, tbh, the bot commands do.. :)
Also, anyone who wants to mirror this can do, cause swimos, trying to get it removed :S!
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
can you tell me what mysql connectors ect you have?
like everything you downloaded for it
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
He said mysql connector above.