-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
tweeney
That command gives me 200+ errors later in the codes
Oops!
Fixed:
Code:
case "cancellsell":
{
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 cancel the sale of someone elses property.");
else
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("UPDATE rooms SET price = '0', sale = '0' WHERE id = '" + _roomID + "'");
}
sendData("BK" + "You have cancelled sale of this property!");
}
break;
}
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
???????????????????????
Hey, i would like a couple of commands coding if possible
server : HoloGraph v23 (Nillus's last release)
commands :
:pet <pet> <colour>
:rigg <rigg's holodice/holo db admin only>
:invisible <makes uses invisible>
:arrest <user> <10 mins>
:naked/unnaked <username> <makes user naked, admin command only
i will add some more later :D
thanks for doing thease
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
richie4394
Hey, i would like a couple of commands coding if possible
server : HoloGraph v23 (Nillus's last release)
commands :
:pet <pet> <colour>
:rigg <rigg's holodice/holo db admin only>
:invisible <makes uses invisible>
:arrest <user> <10 mins>
:naked/unnaked <username> <makes user naked, admin command only
i will add some more later :D
thanks for doing thease
I have the pet code but not releasing. 2 other hotels have them cause i was coding on my friends comp so i copyed it and put it in his emu thne gave it to another friend.
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
cummon dude, i need it for my hotel, and is it for nillis v23 server?
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
321olos
I have the pet code but not releasing. 2 other hotels have them cause i was coding on my friends comp so i copyed it and put it in his emu thne gave it to another friend.
If you're not going to release something, then don't bother making a post. All you're doing is showing off, and ultimately spamming this thread as you're not contributing to the topic of the thread. :closedeyes:
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Can somebody make an command to give all Online Users a furni:
Like :massfurni that would be so great..
im searching for it pls :(
Read my post xd
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Is it me or does the sell command work for any user!
e.g I own a room another user can put it for sale!:?S!
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
RastaLulz
Sorry, I totally forgot about it.
Here's the code for Dissi's source:
PHP Code:
#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
Here's the site code (just edit a page on your CMS, and add this code):
PHP Code:
<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>
Also, you'll have to add two columns on to the
rooms table:
price, and
sale.
EDIT:
Also, put
these images in
web-gallery/properties/ on your site.
Any idea why it writes this line out when the property is purchased?
Code:
[11:16:27 PM] There is already an open DataReader associated with this Connection which must be closed first.
(^^SELECT SUM(visitors_now),SUM(visitors_max),category FROM rooms WHERE category = '16' OR category = '18' OR category = '19' OR category = '40' OR c
tegory = '41' OR category = '42' OR category = '43' GROUP BY category^^)
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
How about :hit
and for the arrest can you make it where it says * arrested username*
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
settaz
How about :hit
and for the arrest can you make it where it says * arrested username*
User.sendData("BK" + _Username + " has been arrested");
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Ok im bored so im gonna code commands. So ask for a command and i will probs code in 10-30 mins depending if its big.
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
321olos
Ok im bored so im gonna code commands. So ask for a command and i will probs code in 10-30 mins depending if its big.
Sell Property, Buy Property for v35+, is that feasible haha? The one released above doesn't work right with anything other than v26.
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
clorence
Sell Property, Buy Property for v35+, is that feasible haha? The one released above doesn't work right with anything other than v26.
Im not used to r36 so il give it a go.
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
321olos
Im not used to r36 so il give it a go.
Alrighty, Add me on MSN, Aaronsimbeck@aarononcall.com
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
:pull
v26
:hirecop
v26
This makes their rank 3
:firecop
v26
This makes their rank back 2
:stun
v26
Stuns and says *Stuns [username]*
:unstun
v26
Stuns and says *Stuns [username]*
Note: :stun last for 10 seconds
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
I finished coding but it through me heaps of errors. So im only doing r26.
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Oh, just thought of this. :promote
:demote
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
settaz
:pull
v26
:hirecop
v26
This makes their rank 3
:firecop
v26
This makes their rank back 2
:stun
v26
Stuns and says *Stuns [username]*
:unstun
v26
Stuns and says *Stuns [username]*
Note: :stun last for 10 seconds
What does :pull do?
:stun/:unstun
PHP Code:
#region :stun
case "stun":
{
if (rankManager.containsRight(_Rank, "fuse_administrator_access") == false)
return false;
else
{
virtualUser _User = userManager.getUser(args[1]);
if (_User.roomUser.walkLock == false)
{
_User.roomUser.walkLock = true; // Freeze the user
Room.sendSaying(roomUser, "*Stunned " + _User._Username + "*");
sendData("BK" + _User._Username + " is now stunned!");
}
else
{
sendData("BK" + _User._Username + " is already stunned!");
}
}
break;
}
#endregion
#region :unstun
case "unstun":
{
if (rankManager.containsRight(_Rank, "fuse_administrator_access") == false)
return false;
else
{
virtualUser _User = userManager.getUser(args[1]);
if (_User.roomUser.walkLock == true)
{
_User.roomUser.walkLock = false; // unfreeze the user
Room.sendSaying(roomUser, "*Unstunned " + _User._Username + "*");
sendData("BK" + _User._Username + " is now unstunned!");
}
else
{
sendData("BK" + _User._Username + " is not stunned!");
}
}
break;
}
#endregion
:hirecop/:firecop
PHP Code:
#region :hirecop
case "hirecop":
{
virtualUser Target = userManager.getUser(DB.Stripslash(args[1]));
{
DB.runQuery("UPDATE users SET rank = '3' WHERE username = '" + Target._Username + "'");
Target.sendData("BK" + "You have just been hired as a cop.");
sendData("BK" + "You have just made " + Target._Username + " a cop.");
}
break;
}
#endregion
#region :firecop
case "firecop":
{
virtualUser Target = userManager.getUser(DB.Stripslash(args[1]));
{
DB.runQuery("UPDATE users SET rank = '2' WHERE username = '" + Target._Username + "'");
Target.sendData("BK" + "You have just been fired from being a cop.");
sendData("BK" + "You have just fired " + Target._Username + " from being a cop.");
}
break;
}
#endregion
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
They seem not to work...When I use:stun it says :stun [username]
For :hirecop it says DB does not exist in context,
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
settaz
They seem not to work...When I use:stun it says :stun [username]
What ones dont work. Does the cop ones work. I know the stun commands do cause i use them on my hotel.
---------- Post added at 02:24 PM ---------- Previous post was at 02:16 PM ----------
Quote:
Originally Posted by
settaz
They seem not to work...When I use:stun it says :stun [username]
For :hirecop it says DB does not exist in context,
So ur emu uses dbClient. Here they are.
PHP Code:
#region :hirecop
case "hirecop":
{
virtualUser Target = userManager.getUser(args[1]);
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("UPDATE users SET rank = '3' WHERE username = '" + Target._Username + "'");
Target.sendData("BK" + "You have just been hired as a cop.");
sendData("BK" + "You have just made " + Target._Username + " a cop.");
}
break;
}
#endregion
#region :firecop
case "firecop":
{
virtualUser Target = userManager.getUser(args[1]);
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
dbClient.runQuery("UPDATE users SET rank = '2' WHERE username = '" + Target._Username + "'");
Target.sendData("BK" + "You have just been fired from being a cop.");
sendData("BK" + "You have just fired " + Target._Username + " from being a cop.");
}
break;
}
#endregion
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Thanks.
Can you do:
:promote
v26
It promotes cops from cadet to Officer to Commisioner
:demote
v26
It demotes from officer to cadet
:fire
v26
It fires a cop
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
settaz
Thanks.
Can you do:
:promote
v26
It promotes cops from cadet to Officer to Commisioner
:demote
v26
It demotes from officer to cadet
:fire
v26
It fires a cop
Sorry for being late.
:promote
PHP Code:
#region :promote
case "promote":
{
using (DatabseClient dbClient = Eucalypt.dbManager.GetClient())
virtualUser Target = userManager.getUser(args[1]);
if (rankManager.containsRight(_Rank, "fuse_administrator_access", userID) == false)
return false;
else
{
int Rank = dbClient.getInt("SELECT rank FROM users WHERE name = '" + Target._Username + "'", null);
{
if (Rank == 3)
{
dbClient.runQuery("UPDATE users SET rank = '4' WHERE name = '" + Target._Username + "'");
Target.sendData("BK" + "You have just been upgraded to a Officer.");
sendData("BK" + "You have just upgaded " + Target._Username + " to a Officer.");
}
else if (Rank == 4)
{
dbClient.runQuery("UPDATE users SET rank = '5' WHERE name = '" + Target._Username + "'");
Target.sendData("BK" + "You have just been upgraded to a Commisioner.");
sendData("BK" + "You have just upgaded " + Target._Username + " to a Commisioner.");
}
}
}
break;
}
#endregion
The fire command is :firecop i posted before.
And im working on demote.
---------- Post added at 08:44 PM ---------- Previous post was at 08:37 PM ----------
Heres Demote.
PHP Code:
#region :demote
case "demote":
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
virtualUser Target = userManager.getUser(args[1]);
if (rankManager.containsRight(_Rank, "fuse_administrator_access", userID) == false)
return false;
else
{
int Rank = dbClient.getInt("SELECT rank FROM users WHERE name = '" + Target._Username + "'", null);
{
if (Rank == 3)
{
dbClient.runQuery("UPDATE users SET rank = '2' WHERE name = '" + Target._Username + "'");
Target.sendData("BK" + "You have just been demoted to a user.");
sendData("BK" + "You have just demoted " + Target._Username + " to a user.");
}
else if (Rank == 4)
{
dbClient.runQuery("UPDATE users SET rank = '3' WHERE name = '" + Target._Username + "'");
Target.sendData("BK" + "You have just been demoted to a Officer.");
sendData("BK" + "You have just demoted " + Target._Username + " to a Officer.");
}
}
}
break;
}
#endregion
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
For both it says dbClient does not exist in the context.
Also, for :startwork can you make it where if rank 3 motto is cadet, rank 4 officer, rank 5 chief, and rank 6 and 7 commisioners
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
I get the following error when recompiling the source after adding the :getfurni (pickall) command:
"'Holo.Virtual.Rooms.virtualRoom.FloorItemManager._Items' is inaccessible due to its protection level"
How do I fix this?
-
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]
Quote:
Originally Posted by
321olos
Ok im bored so im gonna code commands. So ask for a command and i will probs code in 10-30 mins depending if its big.
Can u code a command to give every users registered furnis like
:massfurni
And
Users who are Online like :globalfurni
That would be cool.
Im asked for it 3x xd