Ok Here it goes:
1. Open usermanager.cs in Source>Managers>usermanager.cs
2. Search 'SendToCop' (with no quotes)
3. Underneath that add:
4. Now open up virtualuser.cs,and search :911.
5. Underneath :911 add:
6. If You want to replace your heal command with this, all this does is if you create a corp and a rank to work in any room for the :411 help, this will allow it.
Enjoy, Feel free to press the Thanks button
1. Open usermanager.cs in Source>Managers>usermanager.cs
2. Search 'SendToCop' (with no quotes)
3. Underneath that add:
Code:
public static void sendToDoc(int getCorp, bool includeHigher, string Data)
{
try
{
{
foreach (virtualUser User in _Users.Values)
{
int getWorking;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
getCorp = dbClient.getInt("SELECT corp_id FROM users WHERE name = '" + User._Username + "'");
getWorking = dbClient.getInt("SELECT working FROM users WHERE name = '" + User._Username + "'");
}
if (getCorp == 2 && getWorking == 1)
{
User.sendData(Data);
}
}
}
}
catch { }
}
4. Now open up virtualuser.cs,and search :911.
5. Underneath :911 add:
Code:
#region :411 <message>
case "411":
{
if (copCdLooper != null)
{
sendData("BK" + "Sorry, but you have to wait to send another 911 call.");
}
else
{
int isArrested;
int copID;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
isArrested = dbClient.getInt("SELECT arrested FROM users WHERE name = '" + _Username + "'");
copID = dbClient.getInt("SELECT id FROM police_call");
}
if (isArrested == 0)
{
string cfhMessage = Text.Substring(3);
Room.sendSaying(roomUser, "*calls the hospital for help*");
userManager.sendToDoc(1, false, "BK" + "Caller: " + _Username + "\rMessage: " + cfhMessage + "\rRoom ID: " + _roomID);
}
}
break;
}
#endregion
6. If You want to replace your heal command with this, all this does is if you create a corp and a rank to work in any room for the :411 help, this will allow it.
Code:
#region :heal <user>
case "heal":
{
if(cdLooper != null)
{
Room.sendWhisper(roomUser, _Username, "(cooldown)");
{
virtualUser User = userManager.getUser(args[1]);
if ((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))
{
int getHealth;
int canHeal;
int getJob;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
getJob = dbClient.getInt("SELECT secure_id FROM users WHERE name = '" + _Username + "'");
canHeal = dbClient.getInt("SELECT heal FROM jobs_ranks WHERE id = '" + getJob + "'");
getHealth = dbClient.getInt("SELECT health FROM users WHERE name = '" + args[1] + "'");
}
if (canHeal == 1)
{
ThreadStart cdStarter = new ThreadStart(coolDown);
cdLooper = new Thread(cdStarter);
cdLooper.Priority = ThreadPriority.Lowest;
cdLooper.Start();
if (getHealth > 50)
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("UPDATE users SET health = '100' WHERE name = '" + args[1] + "'");
Room.sendSaying(roomUser, "*heals " + args[1] + "*");
}
}
else
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("UPDATE users SET health = health + 50 WHERE name = '" + args[1] + "'");
}
Room.sendSaying(roomUser, "*heals " + args[1] + "*");
}
}
}
}
}
break;
}
#endregion
Enjoy, Feel free to press the Thanks button