help regarding player tracking

Posts 1630 of 41 · Page 2 of 3
Quote Originally Posted by ArkMods View Post
Post got deleted due to it having ******* support
Is there any chance you can PM me it? I really want to study how you did it
Quote Originally Posted by ArkMods View Post
Post got deleted due to it having ******* support
Put it up on git hub?
Quote Originally Posted by flaffel View Post
Put it up on git hub?
this.this.this
Quote Originally Posted by infern000 View Post
this.this.this
I already asked for it on his original post
Github links are not usually allowed (usullay the endpoints are used) here is the main class
Code:
//Core plugin module
import { NrPlugin, HookPacket, Client, Log, LogLevel, PacketType } from './../core/plugin-module';
//Portal management
import { UpdatePacket } from './../networking/packets/incoming/update-packet';
import { ObjectStatusData } from './../networking/data/object-status-data';
import { IPlayerData, getDefaultPlayerData } from './../models/playerdata';
import { ResourceManager } from './../core/resource-manager';

var fs = require("fs");
const jsonContent = fs.readFileSync("./../nrelay/player-sniper-config.json");
const config = JSON.parse(jsonContent);
/*
* v0.1.3
* Removed ******* support from the plugin
*/ @NRPlugin({
    name: 'Player Sniper',
    author: 'Ark' // <-- Wow what a cool cunt!
})
export default class PlayerSniper {
	private lastKey: {
		[guid: string]: number
	}
	constructor () {
		this.lastKey = {};
	}
  @hookPacket(PacketType.UPDATE)
  onUpdate(client: Client, update: UpdatePacket): void{
    // Looping thru names and new objects to find the names
    for (let i = 0; i < config.list.length; i++){
      for (let k = 0; k < update.newObjects.length; k++){
        var player = ObjectStatusData.processObjectStatus(update.newObjects[k].status);
        if (player.name != '' && player.name.toLowerCase() == config.list[i].name.toLowerCase()){
          console.log(client.alias + ' ' ,'Found: '+ player.name + ' : ' + config.list[i].type);
        }
      }
    }
	// Looping thru and looking for new portals
    for (let i = 0; i < config.portals.length; i++){
      for (let k = 0; k < update.newObjects.length; k++){
        if (update.newObjects[k].objectType == config.portals[i].id && update.newObjects[k].status.objectId != this.lastKey[client.alias]){
          this.lastKey[client.alias] = update.newObjects[k].status.objectId;
          console.log(client.alias + ' Found: ' + config.portals[i].name);
        }
      }
    }
  }
}
Quote Originally Posted by ArkMods View Post
Github links are not usually allowed (usullay the endpoints are used) here is the main class
Code:
//Core plugin module
import { NrPlugin, HookPacket, Client, Log, LogLevel, PacketType } from './../core/plugin-module';
//Portal management
import { UpdatePacket } from './../networking/packets/incoming/update-packet';
import { ObjectStatusData } from './../networking/data/object-status-data';
import { IPlayerData, getDefaultPlayerData } from './../models/playerdata';
import { ResourceManager } from './../core/resource-manager';

var fs = require("fs");
const jsonContent = fs.readFileSync("./../nrelay/player-sniper-config.json");
const config = JSON.parse(jsonContent);
/*
* v0.1.3
* Removed ******* support from the plugin
*/    @NRPlugin({
    name: 'Player Sniper',
    author: 'Ark' // <-- Wow what a cool cunt!
})
export default class PlayerSniper {
	private lastKey: {
		[guid: string]: number
	}
	constructor () {
		this.lastKey = {};
	}
     @hookPacket(PacketType.UPDATE)
  onUpdate(client: Client, update: UpdatePacket): void{
    // Looping thru names and new objects to find the names
    for (let i = 0; i < config.list.length; i++){
      for (let k = 0; k < update.newObjects.length; k++){
        var player = ObjectStatusData.processObjectStatus(update.newObjects[k].status);
        if (player.name != '' && player.name.toLowerCase() == config.list[i].name.toLowerCase()){
          console.log(client.alias + ' ' ,'Found: '+ player.name + ' : ' + config.list[i].type);
        }
      }
    }
	// Looping thru and looking for new portals
    for (let i = 0; i < config.portals.length; i++){
      for (let k = 0; k < update.newObjects.length; k++){
        if (update.newObjects[k].objectType == config.portals[i].id && update.newObjects[k].status.objectId != this.lastKey[client.alias]){
          this.lastKey[client.alias] = update.newObjects[k].status.objectId;
          console.log(client.alias + ' Found: ' + config.portals[i].name);
        }
      }
    }
  }
}
can you show what you had in the palyer-sniper-config file?

EDIT: ok after trying to run it i found 2 typos in your code

you have to fix NRPlugin to NrPlugin in
Code:
    @NRPlugin({
    name: 'Player Sniper',
    author: 'Ark' // <-- Wow what a cool cunt!
and same for hookPacket to HookPacket in
Code:
 
   @hookPacket(PacketType.UPDATE)
- - - Updated - - -

I'm still getting Error while loading player-sniper.js

any idea how to fix it?
Quote Originally Posted by ArkMods View Post
Github links are not usually allowed (usullay the endpoints are used) here is the main class
Code:
//Core plugin module
import { NrPlugin, HookPacket, Client, Log, LogLevel, PacketType } from './../core/plugin-module';
//Portal management
import { UpdatePacket } from './../networking/packets/incoming/update-packet';
import { ObjectStatusData } from './../networking/data/object-status-data';
import { IPlayerData, getDefaultPlayerData } from './../models/playerdata';
import { ResourceManager } from './../core/resource-manager';

var fs = require("fs");
const jsonContent = fs.readFileSync("./../nrelay/player-sniper-config.json");
const config = JSON.parse(jsonContent);
/*
* v0.1.3
* Removed ******* support from the plugin
*/ @NRPlugin({
    name: 'Player Sniper',
    author: 'Ark' // <-- Wow what a cool cunt!
})
export default class PlayerSniper {
	private lastKey: {
		[guid: string]: number
	}
	constructor () {
		this.lastKey = {};
	}
  @hookPacket(PacketType.UPDATE)
  onUpdate(client: Client, update: UpdatePacket): void{
    // Looping thru names and new objects to find the names
    for (let i = 0; i < config.list.length; i++){
      for (let k = 0; k < update.newObjects.length; k++){
        var player = ObjectStatusData.processObjectStatus(update.newObjects[k].status);
        if (player.name != '' && player.name.toLowerCase() == config.list[i].name.toLowerCase()){
          console.log(client.alias + ' ' ,'Found: '+ player.name + ' : ' + config.list[i].type);
        }
      }
    }
	// Looping thru and looking for new portals
    for (let i = 0; i < config.portals.length; i++){
      for (let k = 0; k < update.newObjects.length; k++){
        if (update.newObjects[k].objectType == config.portals[i].id && update.newObjects[k].status.objectId != this.lastKey[client.alias]){
          this.lastKey[client.alias] = update.newObjects[k].status.objectId;
          console.log(client.alias + ' Found: ' + config.portals[i].name);
        }
      }
    }
  }
}
what is the name of the file that uses this code? also, how is acc-config.json modified for player sniper
Quote Originally Posted by iNutsack View Post
what is the name of the file that uses this code? also, how is acc-config.json modified for player sniper
the name of the file that he used was player-sniper.ts, but since this is the mainclass you can rename to whatever you want

as for the acc-config.json it is modified like this:

Code:
{
    "buildVersion": "X23.1.0",
    "accounts": [
        {
            "alias": "EUSW",
            "guid": "yourmule1",
            "password": "superpassword",
            "serverPref": "EuropeSouthWest"
        }
    ]
}
and you repeat that with different account emails/passwords and servers for every server you want a mule in. It's important to make the ALIAS something like the server name because in the console you will get alias found: player

so if you have 20 clients running it's good to have each identified for whenever it finds who you want it will say "eusw found: player"
thank you. I already have my acc-config.json set up just like u said with all my accounts. I thought it needed additional changes specific to player sniper

i guess all we need now is player-sniper-config.json :P

EDIT: will pasting Ark's code into regular notepad and saving it with a .ts file extension work, or do i need notepad++ or something
Quote Originally Posted by iNutsack View Post
thank you. I already have my acc-config.json set up just like u said with all my accounts. I thought it needed additional changes specific to player sniper

i guess all we need now is player-sniper-config.json :P
i actually modified it so it doesn't need the extra file, just created a var inside the file with all the player names i want to track (its stupid because i will have to compile it again everytime i want to add someone) and the tracker was working, but cmd is giving me Error while calling UPDATE hook on PlayerSniper

but the tracker is working, so idk whats wrong now. im trying to figure it out lol
sweet. if you get it working, could you post the new code?

ive just been following instructions this whole time, i have no idea how this works, if that wasnt already obvious
Run nrelay with the --debug flag for more detailed info. It is prob because you are missing the json file that contains the names look at the code and you will see references to `config` so things like `config.players[i].name` is an array names of tracked players, the version you have also has portal types ids and names in the same file allong with the asset location I used at the top of the embeds in my *******, I'm just gonna make a sight for it.
Quote Originally Posted by ArkMods View Post
Run nrelay with the --debug flag for more detailed info. It is prob because you are missing the json file that contains the names look at the code and you will see references to `config` so things like `config.players[i].name` is an array names of tracked players, the version you have also has portal types ids and names in the same file allong with the asset location I used at the top of the embeds in my *******, I'm just gonna make a sight for it.
exactly, the error its because of the player names, can you show me how was the player-sniper-config.json file?
i don't think it's ok for me to post something that's not created by me, lets wait for ArkMods to answer us
because if he didn't post it by now it's probably because he doesn't want to or else he would've just posted the account configs along with main class
Quote Originally Posted by Fabi0wZ1 View Post
i don't think it's ok for me to post something that's not created by me, lets wait for ArkMods to answer us
because if he didn't post it by now it's probably because he doesn't want to or else he would've just posted the account configs along with main class
fair enough
Posts 1630 of 41 · Page 2 of 3

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?