Skip to content
TORNLIFE More

[UserScript + TornPDA] Mug-B-Gone!

Started by HeyItzWerty [3626448] on in Tools & Userscripts.

12 replies · 590 views · thread synced · 15 days ago · View on torn.com
About this thread

Posts archived: 13 / 13 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
13
Discussion span
→
People posting
8
Likes on archived posts
18
Authority score
52 / 100
Historical score
34 / 100
Story score
47 / 100
Engagement score
65 / 100

Most-liked replies

HeyItzWerty [3626448]

Tired of Accidental Muggings? Meet Mug-Be-Gone! 🔪🚫

Mugging during a faction war can be considered disrespectful to some, and most in that mind set just can't seem to keep their filthy fingertips off that Mug button while swinging wildly at whoever they approach.

Fear not, my fellow butter-fingered brawlers! I present to you Mug-Be-Gone!

[image: i.imgur.com]

What's it do?

It adds a simple, beautiful, circular button to your screen.

Green Glow: You're ready to mug like it's payday.

Red Glow: The "Mug" button on the attack screen is disabled.

Best of all? It's fully movable and works on both Desktop AND TornPDA! Just drag the button wherever your heart desires. It'll even remember where you left it.
Includes a /resetmug chat command for TornPDA users. Simply type into any chat window "/resetmug" and the button will revert to default just in-case :)

How to Get It (Desktop Browser)

  1. First, you need a userscript manager. I recommend Tampermonkey for your browser. ViolentMonkey or other Userscript managers should work.
  2. Install the script from GreasyFork by clicking the image below. A new tab will open to the installation page. [image: i.imgur.com]

    https://greasyfork.org/en/scripts/538485-torn-mug-b-gone

TornPDA Installation

  1. Open TornPDA and navigate to Settings > Script Settings.
  2. Tap the plus (+) icon to add a new userscript.
  3. In the REMOTE URL field, paste the raw script link:

    https://greasyfork.org/scripts/538485-torn-mug-b-gone/code/Torn%20Mug-Be-Gone.user.js

  4. Save it. The script will now be installed!
Viciously_Grim [2752611]

Installed. Will try this in 2 days. Torn PDA attack finish window has a bad habit of jumping up after completing fast attacks, bringing the mug option up into where the leave option should be, just as I'm in the process of clicking the leave button 💀 

 

 

Edit: in true QA 4 Lyfe fashion I've managed to find an issue within 5 minutes of installing. I cannot move the button now.

 

Managed to grab it somehow and you've already fixed the bug that allowed it in the first place lol

 

 

But uh now it's doing this

 

 

After using /resetmug it didn't reset but it did do this with my chats:

 

Weav3r [1853324] Helper

Vicious always breaking things lmao

 

To OP, a good start to resolving a lot of the bus Vic pointed out would be to change the @match to whatever the URL is on the attack page since there's no reason for it to run anywhere else.

Viciously_Grim [2752611]

I've never not broken a script or app within 5 minutes of using it XD It's my super power! But HeyItzWerty is fixing the bugs as we speak!! Already fixed 2!

HeyItzWerty [3626448]

Thanks to Vicious and what she does best, I've gone up 3 versions in an hour! I set up TornPDA just to make/test this lol

V1.3 - Stable 4 real this time
Added border control so the button doesnt run off and never return
Added /resetmug command, simply type that into any chat window on TornPDA, and the script will do a quick reset to default.
Button touch interaction increased by 30%, no more accidental background clicks

Fixed the button multiplying itself

This should be a fully functioning no mug button script that works fully on both Desktop and Mobile, just in time for wars eh lads?

Happy warring!

ThunderBlitz [2684774]

Can confirm this seems to work with, admittedly, only maybe 90 seconds of testing!  😂

 

I changed the match URL to the following:

 

https://www.torn.com/loader.php?sid=attack&user2ID=*

 

Now, instead of seeing the button/switch (haven't initiated a real attack on anyone yet, so I'm unsure which it is 😅) on every single page, it only appears appears on the attack pages.  I've opened the attack page on a few different people, it appears in the same custom position on each attack page and seems active (changes colour when I tap it.)

 

To reiterate, I merely opened the attack pages, didn't initiate an attack, I'm not much of an attacker outside of chains and wars so will almost definitely need a bit more testing before it can be considered a "fix."

 

 

HeyItzWerty [3626448]

Congrats Thunder your coding! That match is exactly what you think and is what I will implement. 

I was going to push an update for this with some other fixes but TornPDA and Lions suggestion made me spiral into madness last night. I will push an update to only load on the attack page right now!

HeyItzWerty [3626448]

The button will now only show on the Attack Page! I may have borked the @namespace and auto update fields, maybe idk. Just double check you are on the latest version, GreasyFork will tell you for all that were nice to try it out if you are on the latest version.

I can add the button on the nav bar, have it behave like any other button there but the mobile layout is slightly different, and I need to get BlueStacks or whatever to run Mobile versions and debug/dump mobile version HTML. Its not hard I just have to do it. I was able to clone the Home buttons functions and have its own custom image in TornPDA on the top home row, but it was clearly conjoining their CSS and making the buttons custom icon go beneath the home button Icon. 

Ive been using this all day, wonderful. This is a pretty good spot for this. Down the road the nav bar enabled/Disabled and not a floating button will most likely be how its done. This was a random request, so until it gains more users its basically done. I gotta hone my TornPDA skillz and the mobile space in general and this is the perfect way to do that

Ven [3567664]

Loved this script. Unexpectedly stopped working some time ago; floating button missing and mug option always available (vanilla game). Just now trying to figure what's wrong