No I will explain
first you shoot and will steal some credits(500 credits)
ps. and a code if you have 0 hp you'll be redirected to our hospital where you must stay for 5 mins.
So basically, you want the command and a timer? And i don't know what lost_memorys addition is, is it non tdbp? post a random snippet and il work it out.
Back to the command, the command will take 10hp off them and 500 credits? and they goto the hospital for 5 mins? Also how far do you want it able to shoot from?
I Get A Working Drink Command For Emu35 :) And That Shoot One Err Well If Cobe Or Sledy Wanna Do It Then Let Me Know if Not Ill Make It like
:shoot x
*Shoots [Username] Causing 10 Damage Gets 500 Credits*
*Trys To Shoot [username] But Misses*
Then A BK You Were Shot By [username] And Lost 500 Credits
Better if u have dissii Rastalulz Edit Becuase If U Die u Get Send To Hospital Plus You dont gotta Make Db Colums Etc
Plus Is that how u want the command like
V26 Dissi's
:invisible on
:invisible off
OK so when Cobe,Sledmore,and Dom started coding all these wonderful things for you guys aka. the three RP GODS. So i was interested why shudn't i give it a shot so me darwin-swagg made/edit a commans for you guys. ok Ps. for the command your gonna need to edit it a little so it goes to all other gangs instead of NYPD. Make sure you got all the gang commands and sledmore's gang create page would be useful. A mostly edit from sleddeh!!
SO basicly Follow sledmore's steps -- with a few edits
1) Open up your virtualusers.cs and do ctrl + f and put in "private Thread workoutDosLooper;" (No quote marks).
2) Underneath that add this "private Thread gangclaimLooper;" (No quote marks).
3) Do ctrl + f and put in this "private void jailBreak()" (No quote marks).
4) Underneath that add this;
Php :
private void gangclaim()
{
int iCount = 0;
try
{
while (true)
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
if (_roomID !=Turf ID HERE || roomUser.Y != Turf Y CORD HERE || roomUser.X != BANK VAULT X CORD HERE)
{
userManager.sendToCop(1, false, "BK" + "The Gang Turf is being took get there fast!");
Room.sendSaying(roomUser, "*stops taking of the Turf*");
jailBreakLooper = null;
jailBreakLooper.Abort();
}
if (iCount == 60)
{
Room.sendSaying(roomUser, "*needs three more minutes to succesfully take over the Turf*");
}
if (iCount == 120)
{
Room.sendSaying(roomUser, "*needs two more minutes to succesfully take over the Turf*");
}
if (iCount == 180)
{
Room.sendSaying(roomUser, "*needs one more minute to succesfully take over the Turf*");
}
iCount++;
if (iCount > 180)
{
Room.sendSaying(roomUser, "*successfully Takes over the Turf and is gang Turf Owner!*");
dbClient.runQuery("UPDATE users SET credits = credits + 200 WHERE id = '" + userID + "' LIMIT 1");
refreshValueables(true, true);
bankRobLooper = null;
bankRobLooper.Abort();
}
Thread.Sleep(1000);
}
}
}
catch
{
Thread.CurrentThread.Abort();
bankRobLooper = null;
}
}
Next------
Simples, go above the tile you want it to go on and input this command :cords (on the client obviously)
If you do not have the ':cords' command then here you are;
PHP Code:
#region :cords
case "cords": // Returns the cords of the user
{
if (rankManager.containsRight(_Rank, "fuse_administrator_access", userID) == false)
return false;
else
sendData("BK" + "X: " + roomUser.X + "\rY: " + roomUser.Y + "\rH: " + roomUser.H);
break;
}
#endregion
Whooop the actuall Command---
#region :gangclaim
case "gangclaim":
{
if (bankRobLooper == null && _roomID == YOUR Turf ID HERE && roomUser.Y == THE Y CORD OF THE TILE && roomUser.X == THE X CORD OF THE TILE)
{
userManager.sendToCop(1, false, "BK" + "The Gang Turf is being took get there fast");
Room.sendSaying(roomUser, "*Starts to take over the Turf*");
Room.sendSaying(roomUser, "*needs four more minutes to succesfully take over the Turf*");
ThreadStart bankRobStarter = new ThreadStart(gangclaim);
bankRobLooper = new Thread(gangclaimStarter);
bankRobLooper.Priority = ThreadPriority.Lowest;
bankRobLooper.Start();
}
break;
}
#endregion
Last edited by mango2735; 11-07-10 at 07:43 AM.
Last edited by Daim; 10-07-10 at 08:49 PM.
Here it is Not Tested
For Dissi since im working on Dissi Source Use Rasta EditionCode:#region :shoot <user> case "shoot": { using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) { virtualUser User = userManager.getUser(args[1]); if (roomUser.walkLock == true) { sendData("BK" + "Nice try, But You Cant Shoot While Stunned."); } else { { int isArrested = dbClient.getInt("SELECT arrested FROM users WHERE name = '" + _Username + "'"); int canShoot = dbClient.getInt("SELECT shoot FROM rooms WHERE id = '" + _roomID + "'"); int isAfk = dbClient.getInt("SELECT afk FROM users WHERE name = '" + User._Username + "'"); if (isAfk == 1) { sendData("BK" + "Nice Try Cant Shoot If There AFK."); } else { if (isArrested < 1) { if (canShoot == 1) { sendData("BK" + "Sorry But You Cant Shoot In This Room"); } 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)) { int myHealth = dbClient.getInt("SELECT health FROM users WHERE name = '" + User._Username + "'"); Random randNum = new Random(); int shoot_dif_0 = 10; //what a user shoots int shoot = shoot_dif_0; int getshoot = myHealth - shoot; if (getshoot< 1 && _Username == User._Username) { sendData("BK" + "You Cant Kill Yourself."); } else { dbClient.runQuery("UPDATE users SET health = health - '" + shoot + "' WHERE name = '" + User._Username + "'");; int health_db_ko = dbClient.getInt("SELECT health FROM users WHERE name = '" + User._Username + "'"); Room.sendShout(roomUser, "*Shoots at " + args[1] + ", causing " + shoot + " damage and gets 100 credits*"); //if the user has 0 health left if (health_db_ko < 1) { if (User._Mission == "[Game] Deathmatch" || User._Mission == "[Game] Brawl") { Room.sendShout(roomUser, "*Shoots " + 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] Shoot match") { if (_Mission == "[Game] Shoot Match") { dbClient.runQuery("UPDATE users SET game = game_dm + '1' WHERE name = '" + _Username + "'"); } User.sendData("D^" + "H" + Encoding.encodeVL64(181)); User.sendData("BK" + "Thank you for playing Shoot Match."); } 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" + "Shot Dead By " + _Username + " "); Room.sendShout(roomUser, "*Shoots " + args[1] + ", Killing them*"); 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 + "'"); User._Mission = "Dead"; int user; user = dbClient.getInt("SELECT name FROM users WHERE id = '" + _roomID + "'"); dbClient.runQuery("UPDATE users SET credits = credits + '100' WHERE name = '" + _Username + "'"); dbClient.runQuery("UPDATE users SET credits = credits - '100' WHERE name = '" + User._Username + "'"); refreshAppearance(true, true, 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, "*Shoots at " + args[1] + ", but misses*"); } } } } } } } } break; } #endregion
Last edited by PEjump2; 10-07-10 at 08:53 PM.
For the shank user cmmd
#region :shank <user>
case "shank":
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
virtualUser User = userManager.getUser(args[1]);
if (roomUser.walkLock == true)
{
sendData("BK" + "Nice try, But You Cant Shank While Stunned.");
}
else
{
{
int isArrested = dbClient.getInt("SELECT arrested FROM users WHERE name = '" + _Username + "'");
int canShoot = dbClient.getInt("SELECT shoot FROM rooms WHERE id = '" + _roomID + "'");
int isAfk = dbClient.getInt("SELECT afk FROM users WHERE name = '" + User._Username + "'");
if (isAfk == 1)
{
sendData("BK" + "Nice Try Cant Shank If There AFK.");
}
else
{
if (isArrested < 1)
{
if (canShank == 1)
{
sendData("BK" + "Sorry But You Cant Shoot In This Room");
}
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))
{
int myHealth = dbClient.getInt("SELECT health FROM users WHERE name = '" + User._Username + "'");
Random randNum = new Random();
int shoot_dif_0 = 10;
//what a user shanks
int shoot = shoot_dif_0;
int getshoot = myHealth - shank;
if (getshoot< 1 && _Username == User._Username)
{
sendData("BK" + "You Cant Kill Yourself.");
}
else
{
dbClient.runQuery("UPDATE users SET health = health - '" + shoot + "' WHERE name = '" + User._Username + "'");;
int health_db_ko = dbClient.getInt("SELECT health FROM users WHERE name = '" + User._Username + "'");
Room.sendShout(roomUser, "*Shoots at " + args[1] + ", causing " + shank + " damage and gets 50 credits*");
//if the user has 0 health left
if (health_db_ko < 1)
{
if (User._Mission == "[Game] Deathmatch" || User._Mission == "[Game] Brawl")
{
Room.sendShout(roomUser, "*Shoots " + 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] Shank match")
{
if (_Mission == "[Game] Shank Match")
{
dbClient.runQuery("UPDATE users SET game = game_dm + '1' WHERE name = '" + _Username + "'");
}
User.sendData("D^" + "H" + Encoding.encodeVL64(181));
User.sendData("BK" + "Thank you for playing Shank Match.");
}
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" + "Shot Dead By " + _Username + " ");
Room.sendShout(roomUser, "*Shank " + args[1] + ", Killing them*");
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 + "'");
User._Mission = "Dead";
int user;
user = dbClient.getInt("SELECT name FROM users WHERE id = '" + _roomID + "'");
dbClient.runQuery("UPDATE users SET credits = credits + '100' WHERE name = '" + _Username + "'");
dbClient.runQuery("UPDATE users SET credits = credits - '100' WHERE name = '" + User._Username + "'");
refreshAppearance(true, true, 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, "*Shanks at " + args[1] + ", but misses*");
}
}
}
}
}
}
}
}
break;
}
#endregion
Nice Victor Dont Mind If You Used My Base Plus I Love Words like SHANK LOL
Lol ty :P
Only donateur can enter room (get it out db)
Like:
V26 dissis x]PHP Code:using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
_Donateur = dbClient.getInt("SELECT * FROM users_don WHERE userid = '" + userID + "'");
}
if (_Donateur > 0) // User is donateur
{
No i was making it clear that the commands are all from the other timers, idk if it could mess up i'd change it, i'd search for;
private Thread workoutDosLooper;
and under it add;
private Thread GangClaimLooper;
Then the command change it abit like this, i cba to do it all..Code:private void GangClaim() { int iCount = 0; try { while (true) { using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) { if (_roomID !=Turf ID HERE || roomUser.Y != Turf Y CORD HERE || roomUser.X != BANK VAULT X CORD HERE) { userManager.sendToCop(1, false, "BK" + "The Gang Turf is being took get there fast!"); Room.sendSaying(roomUser, "*stops taking of the Turf*"); jailBreakLooper = null; jailBreakLooper.Abort(); } if (iCount == 60) { Room.sendSaying(roomUser, "*needs three more minutes to succesfully take over the Turf*"); } if (iCount == 120) { Room.sendSaying(roomUser, "*needs two more minutes to succesfully take over the Turf*"); } if (iCount == 180) { Room.sendSaying(roomUser, "*needs one more minute to succesfully take over the Turf*"); } iCount++; if (iCount > 180) { Room.sendSaying(roomUser, "*successfully Takes over the Turf and is gang Turf Owner!*"); dbClient.runQuery("UPDATE users SET credits = credits + 200 WHERE id = '" + userID + "' LIMIT 1"); refreshValueables(true, true); bankRobLooper = null; bankRobLooper.Abort(); } Thread.Sleep(1000); } } } catch { Thread.CurrentThread.Abort(); bankRobLooper = null; } }
You may remember that in your next release :').Code:#region :gangclaim case "gangclaim": { if (bankRobLooper == null && _roomID == YOUR Turf ID HERE && roomUser.Y == THE Y CORD OF THE TILE && roomUser.X == THE X CORD OF THE TILE) { userManager.sendToCop(1, false, "BK" + "The Gang Turf is being took get there fast"); Room.sendSaying(roomUser, "*Starts to take over the Turf*"); Room.sendSaying(roomUser, "*needs four more minutes to succesfully take over the Turf*"); ThreadStart GangClaimStarter = new ThreadStart(GangClaim); GangClaimLooper = new Thread(gangclaimStarter); GangClaimLooper.Priority = ThreadPriority.Lowest; GangClaimbLooper.Start(); } break; } #endregion