help regarding player tracking
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
and same for hookPacket to HookPacket in
- - - Updated - - -
I'm still getting Error while loading player-sniper.js
any idea how to fix it?
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!
Code:
@hookPacket(PacketType.UPDATE)
I'm still getting Error while loading player-sniper.js
any idea how to fix it?
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:
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"
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"
}
]
}
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
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
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
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
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.
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
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
Similar Threads
Counter-Strike 2 HelpHelp regarding macros
0 Minecraft HelpPlayer Tracking mod?BA 2 Grand Theft Auto 5 (GTA V) HelpHelp Regarding Rich Peds And Spawn Rich Peds Options - NEED AN EXPERT
0 Combat Arms Mod HelpHelp regarding Photoshop CS4 + DTXFormat
0 Suggestions, Requests & General Helpneed help regarding downloading bf3 to origin
8

