[SERVICE] Custom Commands Database - Request/Post Here

Status
Not open for further replies.
Re: [SERVICE] Making Holograph Emulator commands [SERVICE]

Should work! Just add a toll field to the end of the rooms table.

Only one toll per room atm, ill fix to work via itemid soon.

Code:
                        case "Ch": // Ch + ONE-WAY-DOOR-FURNI-ID (answer: Dx + WIRE(FURNI-ID) + I + WIRE(ROOM-UID-OF-CLICKER)) (sprite: 'one_way_door*#)
                            {
                                if (Room == null || roomUser == null || _inPublicroom)
                                    return;

                                int itemID = Encoding.decodeVL64(currentPacket.Substring(2));
                                Rooms.Items.floorItem Item = Room.floorItemManager.getItem(itemID); // Find the item.
                                try
                                {
                                    if (Room.floorItemManager.containsItem(itemID) && stringManager.getStringPart(Item.Sprite, 0, 12) == "one_way_door")
                                    {

string toll;
toll = DB.runRead("SELECT toll FROM rooms WHERE id = '" + _roomID + "'");
string owner;
owner = DB.runRead("SELECT owner FROM rooms WHERE id = '" + _roomID + "'");

                                        Room.sendData("Dx" + Encoding.encodeVL64(itemID) + "I" + Encoding.encodeVL64(Room.roomID)); // Opens the gate, with green light
                                        Room.setSquareState(Item.X, Item.Y, 1, 1, virtualRoom.squareState.Open);

                                        roomUser.walkLock = true;
                                        switch (Item.Z) // Walk into the item
                                        {
                                            case 0: roomUser.goalY = Room.sqSTATE[Item.X, Item.Y + 1] == virtualRoom.squareState.Blocked ? Item.Y : Item.Y + 1; roomUser.goalX = Item.X; break;
                                            case 2: roomUser.goalX = Room.sqSTATE[Item.X - 1, Item.Y] == virtualRoom.squareState.Blocked ? Item.X : Item.X - 1; roomUser.goalY = Item.Y; break;
                                            case 4: roomUser.goalY = Room.sqSTATE[Item.X, Item.Y - 1] == virtualRoom.squareState.Blocked ? Item.Y : Item.Y - 1; roomUser.goalX = Item.X; break;
                                            case 6: roomUser.goalX = Room.sqSTATE[Item.X + 1, Item.Y] == virtualRoom.squareState.Blocked ? Item.X : Item.X + 1; roomUser.goalY = Item.Y; break;
                                        }
                                        roomUser.walkLock = false;

                                        while (true)
                                            if (roomUser.statusManager.containsStatus("mv"))
                                                break;

                                        Room.sendData("Dx" + Encoding.encodeVL64(itemID) + "H" + Encoding.encodeVL64(Room.roomID), 1000);
                                        Room.setSquareState(Item.X, Item.Y, 1, 1, virtualRoom.squareState.Blocked);
                                        DB.runQuery("UPDATE users SET credits = credits - '" + toll + "' WHERE id = '" + userID + "'");
                                        DB.runQuery("UPDATE users SET credits = credits + '" + toll + "' WHERE name = '" + owner + "'");
_User.refreshValueables;

                                        break;
                                    }
                                }
                                catch { }
                                break;
                            }

COMMAND:

                    case "toll":
                        {
string rowner;
rowner = DB.runRead("SELECT owner FROM rooms WHERE id = '" + _roomID + "'");
                            if (rowner == _Username)
                            {
                                string amount = Text.Substring(args[0].Length + 1);
                                    DB.runQuery("UPDATE rooms SET toll = '" + amount + "' WHERE id = '" + _roomID + "'");
                            }
                            break;
                        }
 
Last edited:
Voice command

What is voice command?
This command is for Holograph and it uses Shockwave Director function voiceSpeak("..") that makes possible kinda to talk in habbo retros. Command causes the specified string to be spoken by the text-to-speech engine.

How to use it?
In hotel type :voice "what-you-want-to-say" . You have to put the quotes and use - instead of space.

Code:
                    #region :voice <"text"> You need to put the quotes, Example: :voice "Welcome-everyone"
                    case "voice":
                    {
                            string text = args[1];
                            statusManager.carryItem("voiceSpeak(" + text + ")");
                            Thread.Sleep(1000);
                            {
                                statusManager.carryItem("voiceStop");
                            }
                    }
                    break;
                    #endregion

Credits for:
- LolleroRP Coders (Daim, Fetariina)
 
Last edited:
Re: [SERVICE] Making Holograph Emulator commands [SERVICE]

Should work! Just add a toll field to the end of the rooms table.

Only one toll per room atm, ill fix to work via itemid soon.

Code:
                        case "Ch": // Ch + ONE-WAY-DOOR-FURNI-ID (answer: Dx + WIRE(FURNI-ID) + I + WIRE(ROOM-UID-OF-CLICKER)) (sprite: 'one_way_door*#)
                            {
                                if (Room == null || roomUser == null || _inPublicroom)
                                    return;

                                int itemID = Encoding.decodeVL64(currentPacket.Substring(2));
                                Rooms.Items.floorItem Item = Room.floorItemManager.getItem(itemID); // Find the item.
                                try
                                {
                                    if (Room.floorItemManager.containsItem(itemID) && stringManager.getStringPart(Item.Sprite, 0, 12) == "one_way_door")
                                    {

string toll;
toll = DB.runRead("SELECT toll FROM rooms WHERE id = '" + _roomID + "'");
string owner;
owner = DB.runRead("SELECT owner FROM rooms WHERE id = '" + _roomID + "'");

                                        Room.sendData("Dx" + Encoding.encodeVL64(itemID) + "I" + Encoding.encodeVL64(Room.roomID)); // Opens the gate, with green light
                                        Room.setSquareState(Item.X, Item.Y, 1, 1, virtualRoom.squareState.Open);

                                        roomUser.walkLock = true;
                                        switch (Item.Z) // Walk into the item
                                        {
                                            case 0: roomUser.goalY = Room.sqSTATE[Item.X, Item.Y + 1] == virtualRoom.squareState.Blocked ? Item.Y : Item.Y + 1; roomUser.goalX = Item.X; break;
                                            case 2: roomUser.goalX = Room.sqSTATE[Item.X - 1, Item.Y] == virtualRoom.squareState.Blocked ? Item.X : Item.X - 1; roomUser.goalY = Item.Y; break;
                                            case 4: roomUser.goalY = Room.sqSTATE[Item.X, Item.Y - 1] == virtualRoom.squareState.Blocked ? Item.Y : Item.Y - 1; roomUser.goalX = Item.X; break;
                                            case 6: roomUser.goalX = Room.sqSTATE[Item.X + 1, Item.Y] == virtualRoom.squareState.Blocked ? Item.X : Item.X + 1; roomUser.goalY = Item.Y; break;
                                        }
                                        roomUser.walkLock = false;

                                        while (true)
                                            if (roomUser.statusManager.containsStatus("mv"))
                                                break;

                                        Room.sendData("Dx" + Encoding.encodeVL64(itemID) + "H" + Encoding.encodeVL64(Room.roomID), 1000);
                                        Room.setSquareState(Item.X, Item.Y, 1, 1, virtualRoom.squareState.Blocked);
                                        DB.runQuery("UPDATE users SET credits = credits - '" + toll + "' WHERE id = '" + userID + "'");
                                        DB.runQuery("UPDATE users SET credits = credits + '" + toll + "' WHERE name = '" + owner + "'");
_User.refreshValueables;

                                        break;
                                    }
                                }
                                catch { }
                                break;
                            }

COMMAND:

                    case "toll":
                        {
string rowner;
rowner = DB.runRead("SELECT owner FROM rooms WHERE id = '" + _roomID + "'");
                            if (rowner == _Username)
                            {
                                string amount = Text.Substring(args[0].Length + 1);
                                    DB.runQuery("UPDATE rooms SET toll = '" + amount + "' WHERE id = '" + _roomID + "'");
                            }
                            break;
                        }

Nice one swimo.
 
Dissi edit:

Code:
                        case "Ch": // Ch + ONE-WAY-DOOR-FURNI-ID (answer: Dx + WIRE(FURNI-ID) + I + WIRE(ROOM-UID-OF-CLICKER)) (sprite: 'one_way_door*#)
                            {
                                if (Room == null || roomUser == null || _inPublicroom)
                                    return;

                                int itemID = Encoding.decodeVL64(currentPacket.Substring(2));
                                Rooms.Items.floorItem Item = Room.floorItemManager.getItem(itemID); // Find the item.
                                try
                                {
                                    if (Room.floorItemManager.containsItem(itemID) && stringManager.getStringPart(Item.Sprite, 0, 12) == "one_way_door")
                                    {
                                using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                {
string toll;
toll = dbClient.getString("SELECT toll FROM rooms WHERE id = '" + _roomID + "'");
string owner;
owner = dbClient.getString("SELECT owner FROM rooms WHERE id = '" + _roomID + "'");
                                 }

                                        Room.sendData("Dx" + Encoding.encodeVL64(itemID) + "I" + Encoding.encodeVL64(Room.roomID)); // Opens the gate, with green light
                                        Room.setSquareState(Item.X, Item.Y, 1, 1, virtualRoom.squareState.Open);

                                        roomUser.walkLock = true;
                                        switch (Item.Z) // Walk into the item
                                        {
                                            case 0: roomUser.goalY = Room.sqSTATE[Item.X, Item.Y + 1] == virtualRoom.squareState.Blocked ? Item.Y : Item.Y + 1; roomUser.goalX = Item.X; break;
                                            case 2: roomUser.goalX = Room.sqSTATE[Item.X - 1, Item.Y] == virtualRoom.squareState.Blocked ? Item.X : Item.X - 1; roomUser.goalY = Item.Y; break;
                                            case 4: roomUser.goalY = Room.sqSTATE[Item.X, Item.Y - 1] == virtualRoom.squareState.Blocked ? Item.Y : Item.Y - 1; roomUser.goalX = Item.X; break;
                                            case 6: roomUser.goalX = Room.sqSTATE[Item.X + 1, Item.Y] == virtualRoom.squareState.Blocked ? Item.X : Item.X + 1; roomUser.goalY = Item.Y; break;
                                        }
                                        roomUser.walkLock = false;

                                        while (true)
                                            if (roomUser.statusManager.containsStatus("mv"))
                                                break;

                                        Room.sendData("Dx" + Encoding.encodeVL64(itemID) + "H" + Encoding.encodeVL64(Room.roomID), 1000);
                                        Room.setSquareState(Item.X, Item.Y, 1, 1, virtualRoom.squareState.Blocked);
                                using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                {
                                        dbClient.runQuery("UPDATE users SET credits = credits - '" + toll + "' WHERE id = '" + userID + "'");
                                        dbClient.runQuery("UPDATE users SET credits = credits + '" + toll + "' WHERE name = '" + owner + "'");
                                 }
_User.refreshValueables;

                                        break;
                                    }
                                }
                                catch { }
                                break;
                            }

COMMAND:

                    case "toll":
                        {
                                using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                {
string rowner;
rowner = dbClient.getString("SELECT owner FROM rooms WHERE id = '" + _roomID + "'");
                            if (rowner == _Username)
                            {
                                string amount = Text.Substring(args[0].Length + 1);
                                    dbClient.runQuery("UPDATE rooms SET toll = '" + amount + "' WHERE id = '" + _roomID + "'");
                            }
}
                            break;
                        }

Should work, if not tell me wot error there is and ill fix it up.
 
:poof
<dissis TDP>
Refresh habbo looks.

PHP:
#region :poof
                    case "poof": // Refreshes users look
                        {
                            int isWorking;
                            int isDead;
                            int isArrested;
                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                            {
                                isWorking = dbClient.getInt("SELECT working FROM users WHERE name = '" + _Username + "'");
                                isDead = dbClient.getInt("SELECT dead FROM users WHERE name = '" + _Username + "'");
                                isArrested = dbClient.getInt("SELECT arrested FROM users WHERE name = '" + _Username + "'");
                            }
                            if (isWorking == 0 && isDead == 0 && isArrested == 0)
                            {
                                refreshAppearance(true, true, true);
                            }
                            break;
                        }
                    #endregion

Already requested.
 
Code:
                    #region :massbadge
                    case "massbadge":
                        {
                            if (rankManager.containsRight(_Rank, "fuse_administrator_access", userID) == false)
                            {
                                return false;
                            }
                            {
                                foreach (virtualUser User in userManager._Users.Values)
                                using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                                {
                                    dbClinet.runQuery("INSERT INTO users_badges(userid,badgeid) VALUES (" + User.userID + "," + args[1] + ")");
                                    User.refreshBadges();
                                }
                            }
                            break;
                        }
                    #endregion
Enjoy Swimo Leave me some fun :P
 
Last edited:
/closedeadthread.

Seriously, you look like an idiot. Close dead thread? This thread is dead? Sure, the thread starter is dead, but the thread isn't. People like Habboretromaker are still making commands, so the thread isn't dead. :glare: What went through your mind while writing this? Did you think of anything when you clicked "Submit Reply"?
 

Code:
                    #region :voice <"text"> You need to put the quotes, Example: :voice "Welcome-everyone"
                    case "voice":
                    {
                            string text = args[1];
                            statusManager.carryItem("voiceSpeak(" + text + ")");
                            Thread.Sleep(1000);
                            {
                                statusManager.carryItem("voiceStop");
                            }
                    }
                    break;
                    #endregion
Same One Released Before It Should Work With Emu35 And Thanks Idiotic for Explaining to him
 
PHP:
#region :poof
                    case "poof": // Refreshes users look
                        {
                            int isWorking;
                            int isDead;
                            int isArrested;
                            using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
                            {
                                isWorking = dbClient.getInt("SELECT working FROM users WHERE name = '" + _Username + "'");
                                isDead = dbClient.getInt("SELECT dead FROM users WHERE name = '" + _Username + "'");
                                isArrested = dbClient.getInt("SELECT arrested FROM users WHERE name = '" + _Username + "'");
                            }
                            if (isWorking == 0 && isDead == 0 && isArrested == 0)
                            {
                                refreshAppearance(true, true, true);
                            }
                            break;
                        }
                    #endregion

Already requested.

That's for RP. This will cause errors cause it's fetching data which doesn't exist (Holograph doesn't have the row "working", etc). Nice try from copying from your emulator, but next time, think. :D:

PHP:
case "poof":
{
    refreshAppearance(true, true, true);
    refreshBadges();
    break;
}

Am I correct?
 
Last edited:
Status
Not open for further replies.
Back