Reward collector?

Posts 1–15 of 29 · Page 1 of 2
Reward collector?
Hey, I found this https://www.mpgh.net/forum/showthread.php?t=1329167, it's a mass reward collector. It's too slow though, it can be faster with delays between each account instead of 10 minutes between groups of 5. Is there any other reward collector version available?
https://www.mpgh.net/forum/showthread.php?t=1383733

If you do use the script above, note that it will log your accounts in with a one second delay per account - I added more delay by modifying the proceed() function in the cli.ts file located in /src:


Code:
setTimeout(() => {
        this.addClient(acc).then(() => {
            Log('NRelay', `Authorized ${acc.alias}`, LogLevel.Success);
        }).catch((error: Error) => {
            Log('NRelay', `${acc.alias}: ${error.message}`, LogLevel.Error);
        });
     }, (i * 45000));
}
Quote Originally Posted by headlesspiranha View Post
https://www.mpgh.net/forum/showthread.php?t=1383733

If you do use this, note that it will log your accounts in with a one second delay per account - I added more delay by modifying the proceed() function in the cli.ts file located in /src:


Code:
setTimeout(() => {
        this.addClient(acc).then(() => {
            Log('NRelay', `Authorized ${acc.alias}`, LogLevel.Success);
        }).catch((error: Error) => {
            Log('NRelay', `${acc.alias}: ${error.message}`, LogLevel.Error);
        });
     }, (i * 45000));
}
thanks a ton bro for the code
Quote Originally Posted by headlesspiranha View Post
https://www.mpgh.net/forum/showthread.php?t=1383733

If you do use the script above, note that it will log your accounts in with a one second delay per account - I added more delay by modifying the proceed() function in the cli.ts file located in /src:


Code:
setTimeout(() => {
        this.addClient(acc).then(() => {
            Log('NRelay', `Authorized ${acc.alias}`, LogLevel.Success);
        }).catch((error: Error) => {
            Log('NRelay', `${acc.alias}: ${error.message}`, LogLevel.Error);
        });
     }, (i * 45000));
}
Thanks, but I have no idea how to compile / run the script. Can anybody help ?
Quote Originally Posted by Plus22 View Post
Thanks, but I have no idea how to compile / run the script. Can anybody help ?
Download and follow the setup guide for Nrelay from hereⓘ.
your best choice would be making a fame daily login bot which is not that easy
Quote Originally Posted by X54 View Post
your best choice would be making a fame daily login bot which is not that easy
Fame daily login?
Quote Originally Posted by SeXZeFPS View Post
Fame daily login?
Man, I think he has the downs. Don't mention it.
How to make account logout after finished collect reward?
Quote Originally Posted by hokko View Post
How to make account logout after finished collect reward?
I just use client.destroy, gets the job done:
Code:
 constructor() {
        Client.on('ready', (pd, client: Client) => {
            console.log(client.mapInfo.name);
            if (client.mapInfo.name === 'Nexus') {
                Log('Collector', `Sending ${client.alias} to quest room`);
                const gotoQuestRoom = new GoToQuestRoomPacket();
                client.packetio.sendPacket(gotoQuestRoom);
            } else {
                Log('Collector', `Fetching calendar for ${client.alias}`);
                Http.get('http://realmofthemadgodhrd.appspot.com/dailyLogin/fetchCalendar', {
                    guid: client.guid,
                    password: client.password
                }).then((response) => {
                    Log('Collector', `Received calendar for ${client.alias}`, LogLevel.Message);
                    const items = this.getKeys(response);
                    if (items.length === 0) {
                        Log('Collector', `Nothing to collect for ${client.alias}!`, LogLevel.Warning);
                        client.destroy();
                        Log('Client', `Destroyed ${client.alias}!`, LogLevel.Error);
                    } else {
                        Log('Collector', `Collecting ${items.length} item${items.length === 1 ? '' : 's'} for ${client.alias}`);
                        this.collect(items, client)
                            .then(() => Log('Collector', `Finished collecting items for ${client.alias}!`, LogLevel.Success));
                            client.destroy();
                    }
                }).catch((error) => {
                    Log('Collector', `Error fetching calendar for ${client.alias}`);
                    Log('Collector', error.message, LogLevel.Warning);
                    client.destroy();
                });
            }
        });
    }
this reward collector not working well.
It shows it collect more than one reward
but actually it only collect one reward each time you run it.

Edited:
I know the reason.
If account logout immediately after claiming all rewards, it failed to get the rewards.

@headlesspiranha
How to make account stay login a few seconds after claiming rewards before logout?
Thanks
Quote Originally Posted by hokko View Post
this reward collector not working well.
It shows it collect more than one reward
but actually it only collect one reward each time you run it.

Edited:
I know the reason.
If account logout immediately after claiming all rewards, it failed to get the rewards.

@headlesspiranha
How to make account stay login a few seconds after claiming rewards before logout?
Thanks

didn't know that actually, probably why i'm missing a few days on my mules. i'll post a fix in a bit

edit:
this should work:
Code:
see my post below
Quote Originally Posted by headlesspiranha View Post
didn't know that actually, probably why i'm missing a few days on my mules. i'll post a fix in a bit

edit:
this should work:
Code:
import { ClaimDailyRewardMessage } from '../networking/packets/outgoing/claim-daily-reward-message';
import { EscapePacket } from '../networking/packets/outgoing/escape-packet';
import { GoToQuestRoomPacket } from '../networking/packets/outgoing/go-to-quest-room-packet';
import { Http } from '../services/http';
import { Client, Log, LogLevel, NrPlugin } from './../core/plugin-module';

const KEY_REGEX = /<key>(\w+)<\/key>/g;
 @NRPlugin({
    name: 'Collector',
    author: 'tcrane+kiwi5',
    enabled: true
})
class CollectorPlugin {

    constructor() {
		var collectingCompleted = false;
		
        Client.on('ready', (pd, client: Client) => {
            console.log(client.mapInfo.name);
            if (client.mapInfo.name === 'Nexus' && collectingCompleted != true) {
                Log('Collector', `Sending ${client.alias} to quest room`);
                const gotoQuestRoom = new GoToQuestRoomPacket();
                client.packetio.sendPacket(gotoQuestRoom);
            } else {
	        if (collectingCompleted != true) {
                Log('Collector', `Fetching calendar for ${client.alias}`);
                Http.get('https://realmofthemadgodhrd.appspot.com/dailyLogin/fetchCalendar', {
                    guid: client.guid,
                    password: client.password
                }).then((response) => {
                    Log('Collector', `Received calendar for ${client.alias}`, LogLevel.Message);
                    const items = this.getKeys(response);
                    if (items.length === 0) {
                        Log('Collector', `Nothing to collect for ${client.alias}!`, LogLevel.Warning);
                        setTimeout(() => {
							client.destroy();
						}, 1500);
                        Log('Client', `Destroyed ${client.alias}!`, LogLevel.Error);
                    } else {
                        Log('Collector', `Collecting ${items.length} item${items.length === 1 ? '' : 's'} for ${client.alias}`);
                        this.collect(items, client)
                            .then(() => Log('Collector', `Finished collecting items for ${client.alias}!`, LogLevel.Success));
							
							setTimeout(() => {
								collectingCompleted = true;
								
								const gotoNexus = new EscapePacket();
								
								client.packetio.sendPacket(gotoNexus);
								
							}, 1500);
                         
                    }
                }).catch((error) => {
                    Log('Collector', `Error fetching calendar for ${client.alias}`);
                    Log('Collector', error.message, LogLevel.Warning);
                    setTimeout(() => {
						client.destroy();
					}, 1500);
                });
            } else {
	          setTimeout(() => {
	              client.destroy();
                  }, 1500);
	      }
        });
    }

    private getKeys(xml: string): string[] {
        const items: string[] = [];
        let match = KEY_REGEX.exec(xml);
        while (match !== null) {
            items.push(match[1]);
            match = KEY_REGEX.exec(xml);
        }
        return items;
    }

    private collect(collectables: string[], client: Client): Promise<void> {
        return new Promise((resolve, reject) => {
            const collect = (item: string) => {
                Log('Collector', `Collecting item(s) for ${client.alias}`, LogLevel.Info);
                const claim = new ClaimDailyRewardMessage();
                claim.claimKey = item;
                claim.claimType = 'nonconsecutive';
                client.packetio.sendPacket(claim);
                if (collectables.length > 0) {
                    setTimeout(() => {
                        collect(collectables.shift());
                    }, 1500);
                } else {
                    resolve();
                }
            };
            collect(collectables.shift());
        });
    }
}
thanks

I got:
Starting 'ts'... src\plugins\daily-collector.ts(66,10): error TS1128: Declaration or statement expected.
TypeScript: 1 syntax error
TypeScript: emit succeeded (with errors)
when use gulp to compile source code
Quote Originally Posted by hokko View Post
thanks

I got:
Starting 'ts'... src\plugins\daily-collector.ts(66,10): error TS1128: Declaration or statement expected.
TypeScript: 1 syntax error
TypeScript: emit succeeded (with errors)
when use gulp to compile source code
i edited my post above, was missing some closing brackets ;P
Quote Originally Posted by headlesspiranha View Post
i edited my post above, was missing some closing brackets ;P
thanks
but the updated script seem only first allow account to go to daily reward room.
Other accounts don't try to go to daily reward room at all.
Posts 1–15 of 29 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?