A Tampermonkey userscript that enhances the Torn.com gaming experience by connecting to the TuRzAm WarRoom service for real-time coordinated faction attacks.
This userscript integrates seamlessly with Torn.com to provide faction members with real-time attack coordination capabilities. It displays coordinated attack notifications directly within Torn's interface, allowing faction members to participate in synchronized attacks against targets.
- Live Attack Feed: Displays toast notifications for coordinated attacks on the factions page and optionally on attack pages
- Attack Card Display: Shows detailed information for each coordinated attack including:
- Target name and ID
- Attack status (Active/Full)
- Countdown timer with urgent warnings (under 1 minute)
- Participant slots (filled/total)
- List of participating members
- Attack creator information
- Join Attacks: One-click join functionality for available coordinated attacks
- Create Coordinated Attacks: Create new coordinated attacks when viewing a target from your faction's war room list
- Mark as Done: Mark attacks as complete when finished
- Direct Attack Links: Quick access to attack pages for joined attacks
- Auto-Hide Full Attacks: Automatically removes full attacks from the feed (configurable)
When viewing a target's attack page (via https://www.torn.com/loader.php), if the target is in your faction's war room target list, you can create a coordinated attack with:
- Custom number of participants (1-30)
- Expiration time (1-15 minutes)
- Option to wait until full before showing attack link
- Creator automatically joins the attack
- Visual Countdown Timer: Real-time countdown for each attack with urgent highlighting when time is running low
- Sound Alerts: Optional audio notification when new attacks are created (configurable)
- Status Badges: Visual indicators for attack status (Active/Full)
- Automatic Expiration: Attacks are automatically removed when expired
Access the settings panel to configure:
- API Key: Your WarRoom authentication key
- Attack Feed Toggle: Enable/disable attack notifications on faction page
- Attack Page Feed: Show/hide notifications on attack pages (loader.php)
- Auto-Hide Full Attacks: Automatically hide attacks when they reach capacity
- Sound Notifications: Enable/disable audio alerts for new attacks
- Target Cache Management: Clear cached war room target data
- Token Management: Clear authentication tokens when needed
- Non-Intrusive Toast Notifications: Stylish, glassmorphic toast cards that appear in the bottom-left corner
- Floating Action Buttons: Quick access buttons for:
- Attack feed toggle (enable/disable notifications)
- Settings configuration
- Create coordinated attack (on attack pages with valid targets)
- Modern Design: Purple-themed UI with smooth animations and transitions
- Responsive Elements: Click outside modals to close, keyboard shortcuts supported
- SignalR Long Polling: Real-time connection to WarRoom service using SignalR
- Automatic Reconnection: Handles connection drops with exponential backoff retry logic
- JWT Authentication: Secure token-based authentication with automatic renewal
- Target Caching: Caches war room targets for 1 hour to reduce API calls
- XSS Protection: All user content is properly sanitized to prevent security vulnerabilities
- CSP Bypass: Uses GM_xmlhttpRequest to work around Content Security Policy restrictions
- Parallel Requests: Enhanced parallel request handling for better performance
- Memory Management: Proper cleanup of timers and intervals to prevent memory leaks
- Tampermonkey browser extension (or compatible userscript manager)
- Active account on Torn.com
- TuRzAm WarRoom API key (obtainable from torn.zzcraft.net)
- Faction membership with access to war rooms
- Install Tampermonkey for your browser
- Click on the Tampermonkey icon and select "Create a new script"
- Copy the contents of
warroom-userscript.jsand paste it into the editor - Save the script (Ctrl+S or Cmd+S)
- The script will automatically activate on Torn.com
- Navigate to any Torn.com page where the script is active
- Click the settings button (gear icon) in the bottom-left corner
- Enter your WarRoom API key in the API Key field
- Configure your preferences:
- Enable/disable attack feed on faction page
- Enable/disable attack feed on attack pages
- Toggle auto-hide for full attacks
- Enable/disable sound notifications
- Click "Save" to apply your settings
- Refresh the page for changes to take full effect
- Navigate to the Factions page (
https://www.torn.com/factions.php) - Active coordinated attacks will appear as toast notifications in the bottom-left corner
- Each attack card shows:
- Target information
- Time remaining
- Current participants
- Available slots
- Click the "Join" button on any available attack notification
- You'll receive a confirmation message
- The attack card will update to show you as a participant
- Once joined, you'll see the "Attack" button to access the target
- Navigate to attack a target via the attack interface (which uses loader.php)
- If the target is in your faction's war room list, a green plus button appears in the bottom-left
- Click the button to open the attack creation dialog
- Configure the attack parameters:
- Number of participants needed
- Expiration time in minutes
- Whether to wait until full before showing the link
- Click "Create Attack" to broadcast to your faction
- Click the "Done" button on any attack you're participating in
- The attack will be removed from all participants' feeds
- Click the bell icon in the bottom-left corner to enable/disable notifications
- When enabled, the bell is purple
- When disabled, the bell is red with a line through it
GM_xmlhttpRequest/GM.xmlHttpRequest: For API communication bypassing CSPGM_addStyle: Inject custom CSS for the user interfaceGM_getValue/GM_setValue: Store settings and authentication tokens- Connection to
api.torn.zzcraft.net: WarRoom service API
The script automatically runs on:
https://www.torn.com/loader.php*- Attack pages for target detection and coordinated attack creationhttps://www.torn.com/factions.php*- Faction pages where the attack feed is displayed
- SignalR Long Polling: Custom implementation for real-time communication
- JWT Token Management: Automatic token storage, validation, and renewal
- Event-Driven Updates: Listens for attack events (Added, Updated, Done, Removed)
- Timer Management: Individual countdown timers for each active attack
- Cache Layer: 1-hour TTL cache for war room targets
- All user input is sanitized using HTML escaping to prevent XSS attacks
- JWT tokens are stored securely using Tampermonkey's GM_getValue/GM_setValue
- Token expiration is checked before each request with 5-minute buffer
- Failed authentication attempts clear stored tokens
- API communication uses HTTPS only
The userscript features a modern, dark-themed interface with:
- Glassmorphic Design: Semi-transparent cards with backdrop blur
- Purple Accent Color: Consistent branding with #9b59b6 primary color
- Smooth Animations: Slide-in/slide-out transitions for notifications
- Responsive Layout: Adapts to different screen sizes
- Accessibility: High contrast text and clear visual indicators
- Check that attack feed is enabled (bell icon should be purple)
- Verify your API key is configured in settings
- Ensure you're a member of a faction with active war rooms
- Check browser console for error messages
- Verify your API key is correct
- Clear the authentication token in settings
- Reload the page to re-authenticate
- Check your internet connection
- The script will attempt automatic reconnection
- If persistent, clear token and reload the page
- Use the "Clear Cache" button in settings to reset target cache
- This forces a fresh fetch of war room targets
This project is licensed under the MIT License - see the LICENSE file for details.
TuRzAm (GitHub: @TuRz4m)
- Website: torn.zzcraft.net
- Torn.com - The browser-based crime game
- Tampermonkey - Userscript manager
- WarRoom Service - Get your API key
Current Version: 1.0
This is a third-party userscript and is not officially affiliated with or endorsed by Torn.com