Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
RastaLulz
Yah, I tried that but it freezes everything, therefore I didn't add it.
doesn't freeze for me ;) it did on my :learn command, but taxi it's fine, it works, i fixed it up for r35, ut it can easily be used for v26 or w,e :P.
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Ok so i have been recodeing the :poll command to work with DB and i have gotten quiet far. But i got an error. Here they are:
PHP Code:
A local variable named 'dRow' cannot be declared in this scope because it would give a different meaning to 'dRow', which is already used in a 'child' scope to denote something else
If any one has teamviewer than they can help thru teamviewer.
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
tweeney
When ever i type in the rig command it just 'shouts or says' it :(
:rig <furniid> <number>
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
That edited :taxi command will freeze the whole user, put it in a thread instead. :P
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Can someone please make a Timer for me
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
ubercheese i have the command but it only works for holodice i belive ill send in a bit
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
This was not made by me it was made by: SinFul (old member of RZ)
PHP Code:
#region :taxi
case "taxi":
{
string taxidata;
string taxidata2;
string taxidata3;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
taxidata = dbClient.getString("SELECT taxi FROM rooms WHERE id = '" + _roomID + "'");
taxidata2 = dbClient.getString("SELECT taxi FROM rooms WHERE id = '" + args[1] + "'");
taxidata3 = dbClient.getString("SELECT name FROM rooms WHERE id = '" + _roomID + "'");
}
if (taxidata == "1" || taxidata2 == "1")
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));
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("UPDATE users SET credits = credits + '-10'");
}
refreshValueables(true, false);
sendData("BK" + "Do not leave the room, the taxi is on its way!" + Convert.ToChar(2));;
if(taxiSummon = null)
{
ThreadStart taxiBoot = new ThreadStart(revealTaxi);
taxiSummon = new Thread(taxiBoot);
taxiSummon.Priority = ThreadPriority.Lowest;
taxiSummon.Start();
}
sendData("BK" + "You have arrived at your destination, the fare was 10 credits!" + Convert.ToChar(2));
}
break;
}
#endregion
// Add this void towards the end of the virtualUser.cs so it'll correspond correctly.
private void taxiSummon()
{
Thread.Sleep(6000);
}
He said it's not tested he just coded it from his head.
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Hey nobody can help me with my :givebadge command?
It doesnt give anyone badge, but an alert comes, you got it xP
Pleaes help!
case "massbadge": // Mass a badge to all users :)
{
if (rankManager.containsRight(_Rank, "fuse_administrator_access", userID) == false)
return false;
else
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("INSERT INTO users_badges (userid,badgeid,iscurrent) VALUES('*','" + _badgeSlotIDs + "','1'");
dbClient.runQuery("UPDATE users_badges SET iscurrent = '0' WHERE userid= '*'");
sendData("BK + You have successfully sent a badge to all users!");
userManager.sendData("BK" + "You have received a badge, please check your badge list.");
}
break;
}
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
AresCJ
This was not made by me it was made by: SinFul (old member of RZ)
PHP Code:
#region :taxi
case "taxi":
{
string taxidata;
string taxidata2;
string taxidata3;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
taxidata = dbClient.getString("SELECT taxi FROM rooms WHERE id = '" + _roomID + "'");
taxidata2 = dbClient.getString("SELECT taxi FROM rooms WHERE id = '" + args[1] + "'");
taxidata3 = dbClient.getString("SELECT name FROM rooms WHERE id = '" + _roomID + "'");
}
if (taxidata == "1" || taxidata2 == "1")
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));
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("UPDATE users SET credits = credits + '-10'");
}
refreshValueables(true, false);
sendData("BK" + "Do not leave the room, the taxi is on its way!" + Convert.ToChar(2));;
if(taxiSummon = null)
{
ThreadStart taxiBoot = new ThreadStart(revealTaxi);
taxiSummon = new Thread(taxiBoot);
taxiSummon.Priority = ThreadPriority.Lowest;
taxiSummon.Start();
}
sendData("BK" + "You have arrived at your destination, the fare was 10 credits!" + Convert.ToChar(2));
}
break;
}
#endregion
// Add this void towards the end of the virtualUser.cs so it'll correspond correctly.
private void taxiSummon()
{
Thread.Sleep(6000);
}
He said it's not tested he just coded it from his head.
Thread sleep should crash the client.
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
JabboHotel
Hey nobody can help me with my :givebadge command?
It doesnt give anyone badge, but an alert comes, you got it xP
Pleaes help!
case "massbadge": // Mass a badge to all users :)
{
if (rankManager.containsRight(_Rank, "fuse_administrator_access", userID) == false)
return false;
else
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("INSERT INTO users_badges (userid,badgeid,iscurrent) VALUES('*','" + _badgeSlotIDs + "','1'");
dbClient.runQuery("UPDATE users_badges SET iscurrent = '0' WHERE userid= '*'");
sendData("BK + You have successfully sent a badge to all users!");
userManager.sendData("BK" + "You have received a badge, please check your badge list.");
}
break;
}
Code:
case "massbadge": // Mass a badge to all users :) Syntax// :massbadge <badgeid>
{
if (rankManager.containsRight(_Rank, "fuse_administrator_access", userID) == false)
return false;
else
{
string badgeId = "";
try { badgeId = args[1]; }
catch { sendData("BKYou did not set a badge code!"); return; }
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
DataColumn dColumn = dbClient.getColumn("SELECT id FROM users");
foreach (DataRow dRow in dColumn.Table.Rows)
{
if (dbClient.findsResult("SELECT badgeid FROM users_badges WHERE userid = '" + Convert.ToString(dRow["id"]) + "' AND badgeid = '" + badgeId + "'") == false)
{
dbClient.runQuery("INSERT INTO users_badges (userid,badgeid,iscurrent,slotid) VALUES('" + Convert.ToString(dRow["id"]) + "','" + badgeId + "','0','0')");
dbClient.runQuery("UPDATE users_badges SET iscurrent = '0' WHERE userid= '" + Convert.ToString(dRow["id"]) + "'");
}
}
Hashtable users = (Hashtable)userManager._Users.Clone();
foreach (virtualUser user in users.Values)
{
user.refreshBadges();
}
sendData("BKYou have successfully sent a badge to all users!");
userManager.sendData("BKYou have received a badge, please check your badge list.");
}
}
break;
}
Tested and working 100%. May take several moments, depending on how many users you have in your database.
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
Ubercheese
:rig <furniid> <number>
What do you mean by furniid?
If you use te CCT name it says unbale to process speach command
And if i use the TID it doesnt work
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
adK
Code:
case "massbadge": // Mass a badge to all users :) Syntax// :massbadge <badgeid>
{
if (rankManager.containsRight(_Rank, "fuse_administrator_access", userID) == false)
return false;
else
{
string badgeId = "";
try { badgeId = args[1]; }
catch { sendData("BKYou did not set a badge code!"); return; }
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
DataColumn dColumn = dbClient.getColumn("SELECT id FROM users");
foreach (DataRow dRow in dColumn.Table.Rows)
{
if (dbClient.findsResult("SELECT badgeid FROM users_badges WHERE userid = '" + Convert.ToString(dRow["id"]) + "' AND badgeid = '" + badgeId + "'") == false)
{
dbClient.runQuery("INSERT INTO users_badges (userid,badgeid,iscurrent,slotid) VALUES('" + Convert.ToString(dRow["id"]) + "','" + badgeId + "','0','0')");
dbClient.runQuery("UPDATE users_badges SET iscurrent = '0' WHERE userid= '" + Convert.ToString(dRow["id"]) + "'");
}
}
Hashtable users = (Hashtable)userManager._Users.Clone();
foreach (virtualUser user in users.Values)
{
user.refreshBadges();
}
sendData("BKYou have successfully sent a badge to all users!");
userManager.sendData("BKYou have received a badge, please check your badge list.");
}
}
break;
}
Tested and working 100%. May take several moments, depending on how many users you have in your database.
Great Ö.ö
It works Perfectly...
One Question i Have too...
Do U have :masscredits, too?
That would be great thanks :D
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
please use the [code] tags guys, makes life easyier for all of us
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
AresCJ
This was not made by me it was made by: SinFul (old member of RZ)
PHP Code:
#region :taxi
case "taxi":
{
string taxidata;
string taxidata2;
string taxidata3;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
taxidata = dbClient.getString("SELECT taxi FROM rooms WHERE id = '" + _roomID + "'");
taxidata2 = dbClient.getString("SELECT taxi FROM rooms WHERE id = '" + args[1] + "'");
taxidata3 = dbClient.getString("SELECT name FROM rooms WHERE id = '" + _roomID + "'");
}
if (taxidata == "1" || taxidata2 == "1")
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));
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("UPDATE users SET credits = credits + '-10'");
}
refreshValueables(true, false);
sendData("BK" + "Do not leave the room, the taxi is on its way!" + Convert.ToChar(2));;
if(taxiSummon = null)
{
ThreadStart taxiBoot = new ThreadStart(revealTaxi);
taxiSummon = new Thread(taxiBoot);
taxiSummon.Priority = ThreadPriority.Lowest;
taxiSummon.Start();
}
sendData("BK" + "You have arrived at your destination, the fare was 10 credits!" + Convert.ToChar(2));
}
break;
}
#endregion
// Add this void towards the end of the virtualUser.cs so it'll correspond correctly.
private void taxiSummon()
{
Thread.Sleep(6000);
}
He said it's not tested he just coded it from his head.
As said above it should freeze the client, but also this does not work correctly.
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
I've coded a majority of :buyproperty/:sellproperty, although I still need to clean a few things up, etc.
Teaser: http://upload.g2n.us/file_dir/1263252573.swf
Quote:
Originally Posted by
AresCJ
This was not made by me it was made by: SinFul (old member of RZ)
PHP Code:
#region :taxi
case "taxi":
{
string taxidata;
string taxidata2;
string taxidata3;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
taxidata = dbClient.getString("SELECT taxi FROM rooms WHERE id = '" + _roomID + "'");
taxidata2 = dbClient.getString("SELECT taxi FROM rooms WHERE id = '" + args[1] + "'");
taxidata3 = dbClient.getString("SELECT name FROM rooms WHERE id = '" + _roomID + "'");
}
if (taxidata == "1" || taxidata2 == "1")
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));
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("UPDATE users SET credits = credits + '-10'");
}
refreshValueables(true, false);
sendData("BK" + "Do not leave the room, the taxi is on its way!" + Convert.ToChar(2));;
if(taxiSummon = null)
{
ThreadStart taxiBoot = new ThreadStart(revealTaxi);
taxiSummon = new Thread(taxiBoot);
taxiSummon.Priority = ThreadPriority.Lowest;
taxiSummon.Start();
}
sendData("BK" + "You have arrived at your destination, the fare was 10 credits!" + Convert.ToChar(2));
}
break;
}
#endregion
// Add this void towards the end of the virtualUser.cs so it'll correspond correctly.
private void taxiSummon()
{
Thread.Sleep(6000);
}
He said it's not tested he just coded it from his head.
I hope that he's not taking credit for coding a majority of it, as I released it only a page back (here). Also, I don't get why he added the code that he did. :?: