0% found this document useful (0 votes)
434 views4 pages

Discord Quest Automation Script

Uploaded by

jimmyjam2341
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
434 views4 pages

Discord Quest Automation Script

Uploaded by

jimmyjam2341
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

let wpRequire;

window.webpackChunkdiscord_app.push([[ [Link]() ], {}, (req) => { wpRequire =


req; }]);

let ApplicationStreamingStore = [Link](wpRequire.c).find(x =>


x?.exports?.Z?.getStreamerActiveStreamMetadata).exports.Z;
let RunningGameStore = [Link](wpRequire.c).find(x =>
x?.exports?.ZP?.getRunningGames).[Link];
let QuestsStore = [Link](wpRequire.c).find(x =>
x?.exports?.Z?.getQuest).exports.Z;
let ChannelStore = [Link](wpRequire.c).find(x =>
x?.exports?.Z?.getAllThreadsForParent).exports.Z;
let GuildChannelStore = [Link](wpRequire.c).find(x =>
x?.exports?.ZP?.getSFWDefaultChannel).[Link];
let FluxDispatcher = [Link](wpRequire.c).find(x =>
x?.exports?.Z?.flushWaitQueue).exports.Z;
let api = [Link](wpRequire.c).find(x => x?.exports?.tn?.get).[Link];

let quest = [...[Link]()].find(x => [Link] !==


"1248385850622869556" && [Link]?.enrolledAt && ![Link]?.completedAt &&
new Date([Link]).getTime() > [Link]())
let isApp = [Link]("Electron/")
if(!quest) {
[Link]("You don't have any uncompleted quests u dummy!")
} else {
const pid = [Link]([Link]() * 30000) + 1000

const applicationId = [Link]


const applicationName = [Link]
const taskName = ["WATCH_VIDEO", "PLAY_ON_DESKTOP", "STREAM_ON_DESKTOP",
"PLAY_ACTIVITY"].find(x => [Link][x] != null)
const secondsNeeded = [Link][taskName].target
const secondsDone = [Link]?.progress?.[taskName]?.value ?? 0

if(taskName === "WATCH_VIDEO") {


const tolerance = 2, speed = 10
const diff = [Link](([Link]() - new
Date([Link]).getTime())/1000)
const startingPoint = [Link]([Link]([Link](secondsDone), diff),
secondsNeeded)
let fn = async () => {
for(let i=startingPoint;i<=secondsNeeded;i+=speed) {
try {
await [Link]({url: `/quests/${[Link]}/video-
progress`, body: {timestamp: [Link](secondsNeeded, i + [Link]())}})
} catch(ex) {
[Link]("Failed to send increment of", i,
[Link])
}
await new Promise(resolve => setTimeout(resolve, tolerance
* 1000))
}
if((secondsNeeded-secondsDone)%speed !== 0) {
await [Link]({url: `/quests/${[Link]}/video-progress`,
body: {timestamp: secondsNeeded}})
}
[Link]("Cookie completed [Link]!")
}
fn()
[Link](`Spoofing video for ${applicationName}. Wait for $
{[Link]((secondsNeeded - startingPoint)/speed*tolerance)} more seconds.`)
} else if(taskName === "PLAY_ON_DESKTOP") {
if(!isApp) {
[Link]("This no longer works in browser for non-video
quests. Use the desktop app to complete the", applicationName, "quest!")
}

[Link]({url: `/applications/public?application_ids=$
{applicationId}`}).then(res => {
const appData = [Link][0]
const exeName = [Link](x => [Link] ===
"win32").[Link](">","")

const games = [Link]()


const fakeGame = {
cmdLine: `C:\\Program Files\\${[Link]}\\${exeName}`,
exeName,
exePath: `c:/program files/${[Link]()}/$
{exeName}`,
hidden: false,
isLauncher: false,
id: applicationId,
name: [Link],
pid: pid,
pidPath: [pid],
processName: [Link],
start: [Link](),
}
[Link](fakeGame)
[Link]({type: "RUNNING_GAMES_CHANGE", removed:
[], added: [fakeGame], games: games})

let fn = data => {


let progress = [Link] === 1 ?
[Link] :
[Link]([Link].PLAY_ON_DESKTOP.value)
[Link](`Quest progress: ${progress}/${secondsNeeded}`)

if(progress >= secondsNeeded) {


[Link]("Cookie completed [Link]!")

const idx = [Link](fakeGame)


if(idx > -1) {
[Link](idx, 1)
[Link]({type:
"RUNNING_GAMES_CHANGE", removed: [fakeGame], added: [], games: []})
}

[Link]("QUESTS_SEND_HEARTBEAT_SUCCESS", fn)
}
}
[Link]("QUESTS_SEND_HEARTBEAT_SUCCESS", fn)

[Link](`Spoofed your game to ${applicationName}. Wait for $


{[Link]((secondsNeeded - secondsDone) / 60)} more minutes.`)
})
} else if(taskName === "STREAM_ON_DESKTOP") {
if(!isApp) {
[Link]("This no longer works in browser for non-video
quests. Use the desktop app to complete the", applicationName, "quest!")
}

let realFunc =
[Link]
[Link] = () => ({
id: applicationId,
pid,
sourceName: null
})

let fn = data => {


let progress = [Link] === 1 ?
[Link] :
[Link]([Link].STREAM_ON_DESKTOP.value)
[Link](`Cookie progress: ${progress}/${secondsNeeded}`)

if(progress >= secondsNeeded) {


[Link]("Cookie completed [Link]")

[Link] =
realFunc
[Link]("QUESTS_SEND_HEARTBEAT_SUCCESS",
fn)
}
}
[Link]("QUESTS_SEND_HEARTBEAT_SUCCESS", fn)

[Link](`Spoofed your stream to ${applicationName}. Stream any


window in vc for ${[Link]((secondsNeeded - secondsDone) / 60)} more minutes.`)
[Link]("Remember that you need at least 1 other person to be in
the vc!")
} else if(taskName === "PLAY_ACTIVITY") {
const channelId = [Link]()[0]?.id ??
[Link]([Link]()).find(x => x != null &&
[Link] > 0).VOCAL[0].[Link]
const streamKey = `call:${channelId}:1`

let fn = async () => {


[Link]("Completing Cookie", applicationName, "-",
[Link])

while(true) {
const res = await [Link]({url:
`/quests/${[Link]}/heartbeat`, body: {stream_key: streamKey, terminal: false}})
const progress = [Link].PLAY_ACTIVITY.value
[Link](`Cookie progress: ${progress}/$
{secondsNeeded}`)

await new Promise(resolve => setTimeout(resolve, 20 *


1000))

if(progress >= secondsNeeded) {


await [Link]({url: `/quests/${[Link]}/heartbeat`,
body: {stream_key: streamKey, terminal: true}})
break
}
}
[Link]("Cookie completed [Link]!")
}
fn()
}
}

Common questions

Powered by AI

The 'PLAY_ON_DESKTOP' tasks require the desktop application because this task involves simulating a game instance with specific parameters, such as executable paths, which cannot be replicated in a browser environment. The quest system is designed to detect these parameters to validate task completion .

The 'WATCH_VIDEO' task uses periodic incremental updates simulating video view progress, while 'PLAY_ON_DESKTOP' involves creating and managing a fake running game process. 'STREAM_ON_DESKTOP' entails modifying streaming metadata to denote activity. Each approach leverages specific system permissions and APIs to mimic legitimate task fulfillment .

The system uses a timestamp-based progress update method with specific intervals (speed and tolerance) to incrementally complete the 'WATCH_VIDEO' task, thus preventing rapid and unrealistic cheat attempts .

FluxDispatcher's unsubscribe feature stops listening to further updates once a quest is completed. This prevents unnecessary processing and system load by disengaging from 'QUESTS_SEND_HEARTBEAT_SUCCESS' events, thus ensuring efficient resource management after task completion .

The call streamKey is employed to simulate ongoing activity within a voice channel, ensuring the system recognizes user participation needed for the 'PLAY_ACTIVITY' quest task. This key is integral in sending heartbeats during API calls to verify continued presence, mimicking genuine interaction without active user involvement .

The ApplicationStreamingStore uses a spoofing mechanism to simulate stream activity by overriding the getStreamerActiveStreamMetadata function to return a metadata object with task-specific identifiers, like id and pid. This allows the stream to appear active for completing desktop streaming quests .

FluxDispatcher subscribes to heartbeat events for tracking task progress and facilitates real-time updates by subscribing to 'QUESTS_SEND_HEARTBEAT_SUCCESS' events. These subscriptions enable dynamic task progress monitoring, allowing the system to respond once the task's progress meets the required completion threshold .

The streamKey represents the unique identifier for a specific voice channel stream, which is critical for simulating the 'PLAY_ACTIVITY' during a quest. It is used in API requests to send heartbeats that update and validate the quest's progress as part of the task completion simulation .

The QuestsStore checks if the quest has a non-null userStatus.enrolledAt, no userStatus.completedAt, and an expiration time later than the current time to determine if a quest is active and requires completion .

The RunningGameStore manages game instances by holding a list of currently running games. It interacts with fake game processes by adding them for quest completion purposes and utilizes FluxDispatcher to simulate changes in running game states, thus tricking the system into believing a required game is being played .

You might also like