Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[CLOSED] [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]

Status
Not open for further replies.
Newbie Spellweaver
Joined
Aug 19, 2008
Messages
98
Reaction score
11
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]

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;
                        }
 
Newbie Spellweaver
Joined
Apr 3, 2009
Messages
87
Reaction score
3
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
 
Junior Spellweaver
Joined
Mar 4, 2009
Messages
165
Reaction score
5
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

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.
 
Newbie Spellweaver
Joined
Apr 3, 2009
Messages
87
Reaction score
3
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]

cummon dude, i need it for my hotel, and is it for nillis v23 server?
 
Custom Title Activated
Loyal Member
Joined
Dec 10, 2007
Messages
2,179
Reaction score
263
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]

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:
 
Experienced Elementalist
Joined
Aug 15, 2008
Messages
298
Reaction score
15
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
 
Junior Spellweaver
Joined
Aug 15, 2009
Messages
129
Reaction score
16
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!
 
Newbie Spellweaver
Joined
Jun 30, 2008
Messages
8
Reaction score
0
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]

Sorry, I totally forgot about it.

Here's the code for Dissi's source:
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
Here's the site code (just edit a page on your CMS, and add this code):
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>
Also, you'll have to add two columns on to the rooms table: price, and sale.

EDIT:
Also, put 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^^)
 
Newbie Spellweaver
Joined
May 3, 2009
Messages
48
Reaction score
0
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]

How about :hit

and for the arrest can you make it where it says * arrested username*
 
Newbie Spellweaver
Joined
Jun 30, 2008
Messages
8
Reaction score
0
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]

How about :hit

and for the arrest can you make it where it says * arrested username*

User.sendData("BK" + _Username + " has been arrested");
 
Junior Spellweaver
Joined
Mar 4, 2009
Messages
165
Reaction score
5
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.
 
Newbie Spellweaver
Joined
Jun 30, 2008
Messages
8
Reaction score
0
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.

Sell Property, Buy Property for v35+, is that feasible haha? The one released above doesn't work right with anything other than v26.
 
Junior Spellweaver
Joined
Mar 4, 2009
Messages
165
Reaction score
5
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]

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.
 
Newbie Spellweaver
Joined
May 3, 2009
Messages
48
Reaction score
0
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
 
Junior Spellweaver
Joined
Mar 4, 2009
Messages
165
Reaction score
5
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]

I finished coding but it through me heaps of errors. So im only doing r26.
 
Newbie Spellweaver
Joined
May 3, 2009
Messages
48
Reaction score
0
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]

Oh, just thought of this. :promote

:demote
 
Junior Spellweaver
Joined
Mar 4, 2009
Messages
165
Reaction score
5
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

What does :pull do?


:stun/:unstun
PHP:
                    #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:
                    #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
 
Last edited:
Newbie Spellweaver
Joined
May 3, 2009
Messages
48
Reaction score
0
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,
 
Last edited:
Junior Spellweaver
Joined
Mar 4, 2009
Messages
165
Reaction score
5
Re: [REL][SERVICE] Making Holograph Commands! [SERVICE][REL]

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 ----------

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:
                    #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
 
Status
Not open for further replies.
Back
Top