Instructions on how to host your own duel lobby and join other duel lobbies at the same time to find matches faster

If you have a suggestion for the site, create a topic here and telll us about it
Christen57
User avatar
Posts: 2033
Joined: Sun May 07, 2017 10:37 pm
Reputation: 182
Location: New York, United States of America

Instructions on how to host your own duel lobby and join other duel lobbies at the same time to find matches faster

Post #1 by Christen57 » Sat May 22, 2021 4:43 am

Currently, in the duel room, when you want to find an unrated duel/match with someone, you have to either host your own duel and wait for a player to join you, or wait for someone else to host a duel so you can join them.

The problem with this is, let's say there are multiple lobbies you can join, but you don't care which one you join, as long as you get an opponent to duel with. You could try joining one of the lobbies and waiting for that player to accept you, but what if that player is Away From their Keyboard (AFK) or something? Now you're just stuck in that player's lobby when there are probably other players hosting their own lobbies, who aren't AFK, that are actively waiting for someone to join them.

This happens to me a lot. I see like 5 or so lobbies, I pick one of them, I wait 10 seconds, they still don't accept/reject me so they must be AFK, so I try again with a different lobby, and it turns out this other player is also AFK, so I have to join another one, wait more and more, and so on, until I finally get into the lobby of a player who isn't AFK.

Fortunately, with the power of javascript, I am now able to make it so that if there are, for example, 6 lobbies, and I don't care which of those I join as long as I get an opponent, I can join all of them simultaneously, and then whichever player accepts me first is the one I duel. On top of that, while I wait for any one of those players to accept me, I can also make it so that I'm hosting a lobby of my own at the same time that I'm in those other 6 lobbies, so that if any player wants to join me, I can accept them, or any one of the players from any of those other 6 lobbies can accept me, whichever comes first, as long as I get an opponent in the end, and in a timely manner.

To do this, you need to make sure javascript is enabled and allowed on your browser and on duelingbook, and refresh/reload your page if you're asked to do so, though I think most browsers nowadays like Google Chrome and Firefox should have javascript allowed by default.

Create a new bookmark and name it whatever you want.

In the URL, Address, or Location box, whatever your browser calls it, copy and paste this code, then save your bookmark.

Code: Select all

javascript:function disablePools() {};function joinDuel() {Send({"action":"Join duel", "username":clickedHoster, "deck":deck.id, "password":$('#input .input_txt').val(), "skill":skill, "conceal":conceal});}


Go to duelingbook and click your bookmark. If you did everything correctly, this is what your screen should look like once you host/join a lobby.

Image

None of the buttons to join any of the other hosted lobbies should be dimmed or greyed out, and you should still be able to click them to add yourself to other people's lobbies while still keeping your own lobby hosted for anyone that joins you. When any one of them accepts you, your lobby disappears from the duel room, and when you accept anyone who joins your lobby, you disappear from anyone else's lobby that you joined.

Keep in mind that while this javascript code is active (it stays active until you refresh/close the duelingbook page), you can manually remove yourself from any lobby that you join only by exiting the duel room going back to the main menu (the menu with all the "Duel Room," "Deck Constructor," "Profile Viewer," and "My Profile" buttons). When you exit the duel room, you are automatically removed from the lobbies of any and all players that you joined.

Lil Oldman
User avatar
Posts: 1733
Joined: Sun Mar 04, 2018 11:23 pm
Reputation: 178
Location: Toontown
Mood:

Post #2 by Lil Oldman » Sat May 22, 2021 5:03 am

0o 0
"Complacency? How rude. I live the stifling life of a high school student in our problematic modern society."
Help I cannot remove this music from my head
https://youtu.be/ZuXI7qcNsHQ
Will try reviewing custom cards if they look interesting.

Christen57
User avatar
Posts: 2033
Joined: Sun May 07, 2017 10:37 pm
Reputation: 182
Location: New York, United States of America

Post #3 by Christen57 » Sun May 23, 2021 9:07 pm

I just realized that this code has some kind of problem that causes you to appear to others as if your lobby requires a password to join, even if it doesn't. Because of this, I no longer recommend that anybody tries to run this code. Sorry to those who were hoping they could host their own lobbies and join other people's lobbies at the same time to try and find matches faster.


Return to “Suggestions”

Who is online

Users browsing this forum: No registered users and 136 guests