🌵🚂 W E L C O M E T O D T F R A N C H O ! 🐎🔫

🌄 Просторы ДТФ — словно Дикий Запад: Бескрайние, пыльные, полные тайн и неожиданностей.⚠ Осторожно, ковбой! Среди гринго на твоём пути притаились КЛОУНЫ — хитрые, яркие, но опасные.

🎭 Как распознать шутовскую натуру?👉 Ткни в аву — и клоунская личина ВЫПЛЫВЕТ, КАК КОВБОЙ ИЗ САЛУНА!

🕹 Седлай коня, хватай лукно! В игре «Ранчо ДТФ» ты:✔ Проверишь меткость глаза,✔ Разоблачишь всех клоунов-обманщиков,✔ Станешь легендой прерий!

🔫 Не тяни с револьвером — присоединяйся к перестрелке!

Скрипт игры для Tampermonkey

// ==UserScript== // @name Rancho DTF // @namespace http://tampermonkey.net/ // @version 5.2 // @description Найди клоуна // @author Tom Zeine // @match https://dtf.ru/* // @grant GM_addStyle // @grant GM_getValue // @grant GM_setValue // @grant GM_getResourceURL // @resource targ1 https://i.postimg.cc/zXvHdFZ2/targ-1.jpg // @resource targ2 https://i.postimg.cc/1XCnmf6K/targ-1.png // @resource targ3 https://i.postimg.cc/pVqnY17n/targ-10.png // @resource targ4 https://i.postimg.cc/9QqR2XfG/targ-2.jpg // @resource targ5 https://i.postimg.cc/qqM6H8tR/targ-2.png // @resource targ6 https://i.postimg.cc/QCyCLvG4/targ-3.png // @resource targ7 https://i.postimg.cc/6Qr87Hnq/targ-3.jpg // @resource targ8 https://i.postimg.cc/1tyfDprH/targ-4.jpg // @resource targ9 https://i.postimg.cc/bN5D4Sqy/targ-4.png // @resource targ10 https://i.postimg.cc/MG2cpkcg/targ-5.png // @resource targ11 https://i.postimg.cc/JnQHFTzv/targ-5.jpg // @resource targ12 https://i.postimg.cc/xCgq5csS/targ-6.png // @resource targ13 https://i.postimg.cc/hvjv5cwQ/targ-7.png // @resource targ14 https://i.postimg.cc/BZYX1PLT/targ-8.png // @resource targ15 https://i.postimg.cc/4NYnv4Vr/targ-9.png // @resource targ16 https://i.ibb.co/xSbsKc5M/granger.png // @resource targ17 https://i.postimg.cc/k5BK5KJg/target.jpg // @resource hitEffect https://i.postimg.cc/mZQMhbsC/Wx7f.gif // ==/UserScript== (function() { 'use strict'; const CONFIG = { gameTime: 30, targetSize: 80, spawnInterval: 1000, baseScore: 10, orbitRadius: 300, spiralSpeed: 10, spiralDistance: 0.5 }; const targetResources = Array.from({length: 17}, (_, i) => `targ${i+1}`); let gameContainer; let score = 0; let highScore = GM_getValue('highScore', 0); let timeLeft = CONFIG.gameTime; let isGameActive = false; let gameTimer; GM_addStyle(` .game-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle at 50% 50%, rgba(0,0,0,0.8) 20%, rgba(0,0,0,0.95) 100%); cursor: crosshair; z-index: 9998; overflow: hidden; } .target { position: absolute; width: ${CONFIG.targetSize}px; height: ${CONFIG.targetSize}px; border-radius: 50%; cursor: pointer; filter: drop-shadow(0 0 8px rgba(255,100,100,0.6)); animation: orbit 6s infinite linear; transition: all 0.3s; } @keyframes orbit { 0% { transform: rotate(0deg) translateX(200px) rotate(0deg); } 100% { transform: rotate(360deg) translateX(200px) rotate(-360deg); } } .hit-effect { animation: spiral ${CONFIG.spiralSpeed}s linear forwards !important; filter: none !important; } @keyframes spiral { 100% { transform: translate( calc(${CONFIG.spiralDistance * 100}vw * var(--spiral-x)), calc(${CONFIG.spiralDistance * 100}vh * var(--spiral-y)) ) rotate(360deg); opacity: 0; } } #gameTimer { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); color: white; font-size: 24px; text-shadow: 0 0 10px rgba(255,255,255,0.5); z-index: 9999; font-family: Arial, sans-serif; } #startButton { position: fixed !important; right: 20px !important; bottom: 20px !important; padding: 15px 30px !important; background: #4CAF50 !important; color: white !important; border: none !important; border-radius: 5px !important; cursor: pointer !important; z-index: 2147483647 !important; box-shadow: 0 4px 8px rgba(0,0,0,0.3) !important; font-size: 18px !important; font-family: Arial, sans-serif !important; } #resultsPanel { position: fixed; right: 20px; bottom: 20px; background: rgba(0,0,0,0.9); color: white; padding: 20px; border-radius: 10px; z-index: 9999; text-align: center; display: none; font-family: Arial, sans-serif; } .game-btn { margin: 10px 5px; padding: 8px 15px; background: #2196F3; border: none; border-radius: 5px; cursor: pointer; color: white; font-size: 14px; } .game-btn.exit { background: #f44336; } `); function createElement(tag, props) { const el = document.createElement(tag); Object.assign(el, props); return el; } function createTimer() { const timer = createElement('div', { id: 'gameTimer', textContent: `Время: ${timeLeft}` }); document.body.appendChild(timer); return timer; } function showResults() { const panel = createElement('div', { id: 'resultsPanel', innerHTML: ` <h3 style="margin:0 0 15px 0">Результаты</h3> <p>Счёт: ${score}</p> <p>Рекорд: ${highScore}</p> ` }); const restartBtn = createElement('button', { className: 'game-btn', textContent: 'Заново', onclick: () => location.reload() }); const exitBtn = createElement('button', { className: 'game-btn exit', textContent: 'Выход', onclick: exitGame }); panel.append(restartBtn, exitBtn); document.body.appendChild(panel); panel.style.display = 'block'; } function exitGame() { if(confirm('Выйти из игры?')) { gameContainer?.remove(); document.getElementById('resultsPanel')?.remove(); document.getElementById('startButton')?.remove(); document.getElementById('gameTimer')?.remove(); } } function createTarget() { const target = createElement('img', { className: 'target', src: GM_getResourceURL(targetResources[Math.floor(Math.random() * targetResources.length)]), onclick: function() { if(!isGameActive) return; score += CONFIG.baseScore; this.style.pointerEvents = 'none'; this.src = GM_getResourceURL('hitEffect'); this.style.width = '100px'; this.style.height = '100px'; const angle = Math.random() * Math.PI * 2; this.style.setProperty('--spiral-x', Math.cos(angle)); this.style.setProperty('--spiral-y', Math.sin(angle)); this.classList.add('hit-effect'); setTimeout(() => { this.remove(); createTarget(); }, CONFIG.spiralSpeed * 1000); } }); const angle = Math.random() * Math.PI * 2; Object.assign(target.style, { left: `${Math.cos(angle) * CONFIG.orbitRadius + window.innerWidth/2}px`, top: `${Math.sin(angle) * CONFIG.orbitRadius + window.innerHeight/2}px` }); gameContainer.appendChild(target); } function startGame() { if(isGameActive) return; document.getElementById('startButton').style.display = 'none'; document.getElementById('resultsPanel')?.remove(); isGameActive = true; score = 0; timeLeft = CONFIG.gameTime; const timer = createTimer(); gameContainer?.remove(); gameContainer = createElement('div', { className: 'game-container' }); document.body.appendChild(gameContainer); for(let i = 0; i < 5; i++) createTarget(); gameTimer = setInterval(() => { timeLeft--; timer.textContent = `Время: ${timeLeft}`; if(timeLeft <= 0) { clearInterval(gameTimer); isGameActive = false; gameContainer.remove(); timer.remove(); if(score > highScore) { highScore = score; GM_setValue('highScore', highScore); } showResults(); } }, 1000); } function init() { const startBtn = createElement('button', { id: 'startButton', textContent: 'НАЧАТЬ ИГРУ', onclick: startGame }); document.documentElement.appendChild(startBtn); } if(document.readyState === 'complete') { init(); } else { window.addEventListener('load', init); document.addEventListener('DOMContentLoaded', init); } setInterval(() => { if(!document.getElementById('startButton')) { init(); } }, 2000); })();

Играйте в удовольствие! Не судите строго это бета версия!

8
11 комментариев