Newbie Spellweaver
- Joined
- Jan 5, 2010
- Messages
- 26
- Reaction score
- 2
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
I need a working pickall command
I need a working pickall command
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature currently requires accessing the site using the built-in Safari browser.
using (DatabaseClient dbClient = (Eucalypt.dbManager.getClient()))
dbClient.runQuery("INSERT INTO users_badges (userid, badgeid, iscurrent) VALUES ('" + Target.userID + "', '" + badge + "', '0')");
So ive put in, now it cant find .getClient ?
case "givebadge":
{
string badge = Text.Split(' ')[2];
if (_Rank > 6)
{
virtualUser Target = userManager.getUser(Text.Split(' ')[1]);
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("INSERT INTO users_badges (userid, badgeid, iscurrent) VALUES ('" + Target.userID + "', '" + badge + "', '0')");
}
Target.refreshBadges();
}
break;
}
Try this;
Code:case "givebadge": { string badge = Text.Split(' ')[2]; if (_Rank > 6) { virtualUser Target = userManager.getUser(Text.Split(' ')[1]); using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) { dbClient.runQuery("INSERT INTO users_badges (userid, badgeid, iscurrent) VALUES ('" + Target.userID + "', '" + badge + "', '0')"); } Target.refreshBadges(); } break; }
Very Nice But I Dont Need Commands Lol
Great! Now it works!
Sojobo are you so good, that you can create a :massfurni?
So it runs a query, to send all the id (Furni)
That would be great!
To everyone in the database or everyone online at the time the command is used?
case "naked":
{
if (_Rank < 3)
break;
_Figure = "hd-207-3.sh-0-.lg-0-.ch-0-.hr-115-31";
refreshAppearance(false, true, true);
break;
}
case "unnaked":
{
if (_Rank < 3)
break;
refreshAppearance(true, true, true);
break;
}
Can someone make a :Startwork command, so it puts the user in a sertion uniform.
---------- Post added at 09:43 PM ---------- Previous post was at 09:37 PM ----------
I'm 50% Done, can someone tell me what eles i need to do.
PHP:#region case "startwork": { if (_Rank > 3) this._Figure = "hd-207-3.sh-290-110.lg-285-110.wa-2005-.ch-809-110.ca-1811-.ha-1013-110.ea-1404-110.fa-1201-.hr-115-31"; this._Mission = "Police Officer"; this.refreshAppearance(false, true, true); } #endregion
#region :startwork
case "startwork":
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
if (_Rank > 3)
return false;
else
{
virtualUser Target = userManager.getUser(args[1]);
{
dbClient.runQuery("UPDATE users SET figure = 'hd-207-3.sh-290-110.lg-285-110.wa-2005-.ch-809-110.ca-1811-.ha-1013-110.ea-1404-110.fa-1201-.hr-115-31' WHERE name = '" + args[1] + "'");
dbClient.runQuery("UPDATE users SET mission = 'Police Officer' WHERE name = '" + args[1] + "'");
}
Room.Refresh(roomUser);
refreshAppearance(true, true, true);
Target.sendData("BK" + "Move Your butt" + Convert.ToChar(2));
}
break;
}
#endregion
#region :naked & :nakked NAME
case "naked":
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
if (_Rank > 3)
return false;
else
{
dbClient.runQuery("UPDATE users SET figure = 'hd-180-4.hr-831-61' WHERE id = '" + userID + "'");
refreshAppearance(true, true, true);
sendData("BK" + "¡Ahora estas desnudo!" + Convert.ToChar(2));
}
}
break;
case "nakked": // :nakked NAME nake some user >:)
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
if (_Rank > 5)
return false;
else
{
virtualUser Target = userManager.getUser(args[1]);
{
dbClient.runQuery("UPDATE users SET figure = 'hd-180-4.hr-831-61' WHERE name = '" + args[1] + "'");
}
Room.Refresh(roomUser);
Target.refreshAppearance(true, true, true);
Target.sendData("BK" + "Te ha desnudado :S un miembro del staff" + Convert.ToChar(2));
}
}
break;
#endregion
I've coded a majority of :buyproperty/:sellproperty, although I still need to clean a few things up, etc.
Teaser:You must be registered to see links
can somebody make a massfurni command for all users or online users?
THANKS;D
Sorry, I totally forgot about it.Any more progress with the buy/sell rooms rasta?
havent heard of any updates?
#region :sellproperty / :buyproperty
case "sellproperty":
{
string owner;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
owner = dbClient.getString("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
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.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!");
}
}
break;
}
case "buyproperty":
{
string forsale;
string roomprice;
string owner;
string credits;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
forsale = dbClient.getString("SELECT sale FROM rooms WHERE id = '" + _roomID + "'");
roomprice = dbClient.getString("SELECT price FROM rooms WHERE id = '" + _roomID + "'");
owner = dbClient.getString("SELECT owner FROM rooms WHERE id = '" + _roomID + "'");
credits = dbClient.getString("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);
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("UPDATE rooms SET owner = '" + _Username + "', sale = '0' WHERE id = '" + _roomID + "'");
dbClient.runQuery("UPDATE users SET credits = credits + '" + roomprice + "' WHERE name = '" + owner + "'");
dbClient.runQuery("UPDATE users SET credits = credits - '" + roomprice + "' WHERE name = '" + _Username + "'");
}
refreshValueables(true, false);
User.refreshValueables(true, false);
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;
}
#endregion
<table cellspacing="3" align="center" width="100%">
<td align="center" width="25%"><strong>Size</strong></td>
<td align="center" width="25%"><strong>Owner</strong></td>
<td align="center" width="25%"><strong>Price</strong></td>
<td align="center" width="25%"><strong>Room ID</strong></td>
<?php
$getinfo = mysql_query("SELECT * FROM rooms WHERE sale = '1'");
while($r = mysql_fetch_array($getinfo)) {
?>
<tr>
<td align="center"><img src="web-gallery/properties/model_<?php echo $r['model']; ?>.png"></td>
<td align="center"><?php echo $r['owner']; ?></td>
<td align="center"><?php echo $r['price']; ?></td>
<td align="center"><?php echo $r['id']; ?></td>
<?php
}
?>
</table>
Sorry, I totally forgot about it.
Here's the code for Dissi's source:
Here's the site code (just edit a page on your CMS, and add this code):PHP:#region :sellproperty / :buyproperty case "sellproperty": { string owner; using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) { owner = dbClient.getString("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 { using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) { dbClient.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!"); } } break; } case "buyproperty": { string forsale; string roomprice; string owner; string credits; using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) { forsale = dbClient.getString("SELECT sale FROM rooms WHERE id = '" + _roomID + "'"); roomprice = dbClient.getString("SELECT price FROM rooms WHERE id = '" + _roomID + "'"); owner = dbClient.getString("SELECT owner FROM rooms WHERE id = '" + _roomID + "'"); credits = dbClient.getString("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); using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient()) { dbClient.runQuery("UPDATE rooms SET owner = '" + _Username + "', sale = '0' WHERE id = '" + _roomID + "'"); dbClient.runQuery("UPDATE users SET credits = credits + '" + roomprice + "' WHERE name = '" + owner + "'"); dbClient.runQuery("UPDATE users SET credits = credits - '" + roomprice + "' WHERE name = '" + _Username + "'"); } refreshValueables(true, false); User.refreshValueables(true, false); 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; } #endregion
Also, you'll have to add two columns on to the rooms table: price, and owner.PHP:<table cellspacing="3" align="center" width="100%"> <td align="center" width="25%"><strong>Size</strong></td> <td align="center" width="25%"><strong>Owner</strong></td> <td align="center" width="25%"><strong>Price</strong></td> <td align="center" width="25%"><strong>Room ID</strong></td> <?php $getinfo = mysql_query("SELECT * FROM rooms WHERE sale = '1'"); while($r = mysql_fetch_array($getinfo)) { ?> <tr> <td align="center"><img src="web-gallery/properties/model_<?php echo $r['model']; ?>.png"></td> <td align="center"><?php echo $r['owner']; ?></td> <td align="center"><?php echo $r['price']; ?></td> <td align="center"><?php echo $r['id']; ?></td> <?php } ?> </table>
EDIT:
Also, putYou must be registered to see linksin web-gallery/properties/ on your site.