Thats Dcrs Like Interface etc
Printable View
Shortened Version of it:
PHP Code:#region :stats
case "stats":
string health;
string str;
string kills;
string deaths;
string hits;
string arrests;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
health = dbClient.getString("SELECT health FROM users WHERE name = '" + _Username + "'");
str = dbClient.getString("SELECT str FROM users WHERE name = '" + _Username + "'");
kills = dbClient.getString("SELECT kills FROM users WHERE name = '" + _Username + "'");
deaths = dbClient.getString("SELECT deaths FROM users WHERE name = '" + _Username + "'");
hits = dbClient.getString("SELECT hits FROM users WHERE name = '" + _Username + "'");
arrests = dbClient.getString("SELECT arrests FROM users WHERE name = '" + _Username + "'");
}
sendData("BK" +
"Stats\r" +
"Health: " + health + "\r" +
"Strength: " + str + "\r" +
"Kils: " + kills + "\r" +
"Deaths: " + deaths + "\r" +
"Hits: " + hits + "\r" +
"Arrests: " + arrests + "\r" +
"\r" +
"End of Stats!");
break;
#endregion
Okay, I'm working on a rocket command and it's coming on okay. But then when I can't get the person to stay in the air when he rockets forward. If you need a sample of the code I'll be more than happy to post.
Anyways Post it :) Plus... Is it v26 or v35 .. Amd if youre using v35 are you just using the effect? Or if youre using v26 did you just edit the teleport code?
yeah try that
Ok so I got pretty bored and this discharge command I can release because as I have heard alot of people have them and they have already been released else where on the forum so here you are.
#region Discharge
case "discharge":
{
virtualUser User = userManager.getUser(args[1]);
if (User._roomID == _roomID)
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
int getJob;
int isWorking;
int getAuth;
getJob = int.Parse(dbClient.getString("SELECT secure_id FROM users WHERE name = '" + _Username + "'"));
isWorking = int.Parse(dbClient.getString("SELECT working FROM users WHERE name = '" + _Username + "'"));
getAuth = int.Parse(dbClient.getString("SELECT arrest FROM jobs_ranks WHERE id = '" + getJob + "'"));
if (getAuth > 0 && isWorking > 0)
{
dbClient.runQuery("UPDATE users SET arrested = '0', time_jail = '0' WHERE name = '" + User._Username + "'");
Room.sendSaying(roomUser, "*Discharges " + User._Username + " from the hospital*");
User.TestRefresh(User._Username);
User.deadLooper.Abort();
User.deadLooper = null;
}
}
}
break;
}
#endregion
Please if you release this somewhere else tell where you got it from thanks. (:
uhh srry im to late to this post but i made a commands for roleplay ya will like it ;)
GunShot:
#region :gunshot <user>
case "gunshot":
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
virtualUser User = userManager.getUser(args[1]);
if (roomUser.walkLock == true)
{
sendData("BK" + "Nice try, but you are either stunned or cuffed.");
}
else
{
if (punchCdLooper != null)
{
Room.sendWhisper(roomUser, _Username, "*attempts to Shoot At " + User._Username + ", but is too exhausted*");
}
else
{
int isArrested = dbClient.getInt("SELECT arrested FROM users WHERE name = '" + _Username + "'");
int canHit = dbClient.getInt("SELECT violence FROM rooms WHERE id = '" + _roomID + "'");
int isAfk = dbClient.getInt("SELECT afk FROM users WHERE name = '" + User._Username + "'");
if (isAfk == 1)
{
sendData("BK" + "Sorry, but this user is AFK.");
}
else
{
if (isArrested < 1)
{
if (canHit == 1)
{
sendData("BK" + "Sorry, but this room has been declared a no fighting zone.");
}
else
{
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))
{
//db queries
int myHealth = dbClient.getInt("SELECT health FROM users WHERE name = '" + User._Username + "'");
int str_mod = dbClient.getInt("SELECT bitchslap FROM users WHERE name = '" + _Username + "'");
//generates a random number
Random randNum = new Random();
int hit_dif_0 = randNum.Next(1, 3);
int hit_dif_1 = randNum.Next(1, 13);
//what a user hits
int hit = str_mod * hit_dif_0 + hit_dif_1;
int getHit = myHealth - hit;
if (getHit < 1 && _Username == User._Username)
{
sendData("BK" + "Sorry, but you can not knock yourself out.");
}
else
{
dbClient.runQuery("UPDATE users SET health = health - '" + hit + "' WHERE name = '" + User._Username + "'");
dbClient.runQuery("UPDATE users SET hits = hits + 1 WHERE name = '" + _Username + "'");
int health_db_ko = dbClient.getInt("SELECT health FROM users WHERE name = '" + User._Username + "'");
Room.sendShout(roomUser, "*Gun Shot at " + args[1] + ", causing " + hit + " damage*");
ThreadStart punchCdStarter = new ThreadStart(punchCoolDown);
punchCdLooper = new Thread(punchCdStarter);
punchCdLooper.Priority = ThreadPriority.Lowest;
punchCdLooper.Start();
//if the user has 0 or less helth left
if (health_db_ko < 1)
{
if (User._Mission == "[Game] Deathmatch" || User._Mission == "[Game] Brawl")
{
Room.sendShout(roomUser, "*Knocks out " + args[1] + ", sending them to the lobby*");
if (User._Mission == "[Game] Deathmatch")
{
if (_Mission == "[Game] Deathmatch")
{
dbClient.runQuery("UPDATE users SET game_dm = game_dm + '10' WHERE name = '" + _Username + "'");
}
User.sendData("D^" + "H" + Encoding.encodeVL64(272));
User.sendData("BK" + "Thank you for playing deathmatch.");
}
if (User._Mission == "[Game] Brawl")
{
if (_Mission == "[Game] Brawl")
{
dbClient.runQuery("UPDATE users SET game_brawl = game_brawl + '10' WHERE name = '" + _Username + "'");
}
User.sendData("D^" + "H" + Encoding.encodeVL64(181));
User.sendData("BK" + "Thank you for playing brawl.");
}
User.refreshAppearance(true, true, true);
dbClient.runQuery("UPDATE users SET health = '100' WHERE name = '" + User._Username + "'");
}
else
{
User.sendData("D^" + "H" + Encoding.encodeVL64(153));
User.sendData("BK" + "You have been knocked out by another user and sent to the hospital.");
Room.sendShout(roomUser, "*Knocks out " + args[1] + ", sending them to the hospital*");
dbClient.runQuery("UPDATE users SET kills = kills + 1 WHERE name = '" + _Username + "'");
dbClient.runQuery("UPDATE users SET deaths = deaths + 1, dead = '1', time_dead = '10' WHERE name = '" + User._Username + "'");
_Figure = "hd-209-2.ch-0-.lg-0-.sh-0-";
_Mission = "Ghost";
refreshAppearance(false, false, true);
ThreadStart koStarter = new ThreadStart(User.knockOut);
User.deadLooper = new Thread(koStarter);
User.deadLooper.Priority = ThreadPriority.Lowest;
User.deadLooper.Start();
User.roomUser.walkLock = true;
}
}
}
}
else
{
if (User._roomID == _roomID && (roomUser.Y + 1 == User.roomUser.Y && roomUser.X + 1 == User.roomUser.X) || (roomUser.Y - 1 == User.roomUser.Y && roomUser.X - 1 == User.roomUser.X) || (roomUser.Y - 1 == User.roomUser.Y && roomUser.X + 1 == User.roomUser.X) || (roomUser.Y + 1 == User.roomUser.Y && roomUser.X - 1 == User.roomUser.X))
{
Room.sendShout(roomUser, "*Gun Shot at " + args[1] + ", but misses*");
}
}
}
}
}
}
}
}
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
health = dbClient.getString("UPDATE users SET gun = gun + -1 WHERE id = '" + userID + "' LIMIT 1");
}
break;
}
#endregion
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GunRob:
#region :gunrob
case "gunrob":
{
if (bankRobLooper == null && _roomID == 401 && roomUser.Y == 13 && roomUser.X == 11)
{
userManager.sendToCop(1, false, "BK" + "The Gun Shop is being robbed get there fast!");
Room.sendSaying(roomUser, "*Starts to rob the Gun Shop*");
Room.sendSaying(roomUser, "*needs 1 more minutes to succesfully rob the Gun Shop*");
ThreadStart gunrobStarter = new ThreadStart(gunrob);
gunrobLooper = new Thread(gunrobStarter);
gunrobLooper.Priority = ThreadPriority.Lowest;
gunrobLooper.Start();
_Figure = "hd-209-2.ch-886-110.lg-270-110.sh-906-110.hr-831-61.ha-1021-110.he-1607-.ea-1404-110.fa-1201-";
_Mission = "Gun Robbery";
refreshAppearance(false, false, true);
}
break;
}
#endregion
private void:
private void gunrob()
{
int iCount = 0;
try
{
while (true)
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
if (_roomID != 401 || roomUser.Y != 13 || roomUser.X != 11)
{
userManager.sendToCop(1, false, "BK" + "They Stealing Guns Get Here Fast! get there fast!");
Room.sendSaying(roomUser, "*stops Stealing Guns*");
jailBreakLooper = null;
jailBreakLooper.Abort();
}
if (iCount == 5)
{
Room.sendSaying(roomUser, "*needs one 10 second to succesfully Steal Guns*");
}
iCount++;
if (iCount > 5)
{
Room.sendSaying(roomUser, "*successfully breaks into to Gun Safe and claims 1 Pistal Gun 15 Bullits*");
dbClient.runQuery("UPDATE users SET gun = gun + 15 WHERE id = '" + userID + "' LIMIT 1");
refreshValueables(true, true);
gunrobLooper = null;
gunrobLooper.Abort();
}
Thread.Sleep(1000);
}
}
}
catch
{
Thread.CurrentThread.Abort();
gunrobLooper = null;
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
private thread:
private Thread gunrobLooper;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Upload gun at >user>create a column> Field: gun>Type: INT>Value: 1>Default: 0> Now Save it there the commands should work if it doesn't
u prbly didn't set the command right our others.lol add me at msn titarry2@live.com ;)
Cobe Read The Db Query Easy Fix but Since Its aLREADY Released No Point
<Function/Command>
3hoursystem? i dun care
<Server>
Dissi's edit r26
<What it does>
every 3 hours you will receive 500 credits
:toll (sets toll price!)
:massbuy (sets how much furni, when you buy something. Like 10 and it will give you 10 items of the same thing your going to buy!)
:Drop (drops all your furni in your hand!)