update/destination presentation
This commit is contained in:
5 files changed
+12
-12
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dayzr-bot",
|
||||
"version": "10.3.3",
|
||||
"version": "10.3.4",
|
||||
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
|
||||
"main": "index.js",
|
||||
"nodemonConfig": {
|
||||
|
||||
@@ -62,11 +62,11 @@ module.exports = {
|
||||
destination_dir = dir;
|
||||
}
|
||||
}
|
||||
const destination = lastDist > 500 ? `${destination_dir} of ${tempDest}` : tempDest;
|
||||
const destination = lastDist > 500 ? `${destination_dir} of ${tempDest}` : `Near ${tempDest}`;
|
||||
|
||||
let combatLog = new EmbedBuilder()
|
||||
.setColor(client.config.Colors.Red)
|
||||
.setDescription(`**NOTICE:**\n**${data.player}** has combat logged at <t:${unixTime}> when fighting **${data.lastHitBy}\nLocation [${data.pos[0]}, ${data.pos[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${data.pos[0]};${data.pos[1]})**\nNear ${destination}`);
|
||||
.setDescription(`**NOTICE:**\n**${data.player}** has combat logged at <t:${unixTime}> when fighting **${data.lastHitBy}\nLocation [${data.pos[0]}, ${data.pos[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${data.pos[0]};${data.pos[1]})**\n${destination}`);
|
||||
|
||||
if (client.exists(guild.adminRole)) channel.send({ content: `<@&${guild.adminRole}>` });
|
||||
|
||||
|
||||
@@ -36,11 +36,11 @@ const HandlePlayerTrackEvent = async (client, guild, e) => {
|
||||
destination_dir = dir;
|
||||
}
|
||||
}
|
||||
const destination = lastDist > 500 ? `${destination_dir} of ${tempDest}` : tempDest;
|
||||
const destination = lastDist > 500 ? `${destination_dir} of ${tempDest}` : `Near ${tempDest}`;
|
||||
|
||||
const trackEvent = new EmbedBuilder()
|
||||
.setColor(client.config.Colors.Default)
|
||||
.setDescription(`**${e.name} Event**\n${e.gamertag} was located at **[${player.pos[0]}, ${player.pos[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${player.pos[0]};${player.pos[1]})** at <t:${unixTime}>\nNear ${destination}`);
|
||||
.setDescription(`**${e.name} Event**\n${e.gamertag} was located at **[${player.pos[0]}, ${player.pos[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${player.pos[0]};${player.pos[1]})** at <t:${unixTime}>\n${destination}`);
|
||||
|
||||
if (!client.exists(e.channel)) return ExpireEvent(client, guild, e); // Expire event since it has invalid channel.
|
||||
const channel = client.GetChannel(e.channel);
|
||||
@@ -123,11 +123,11 @@ module.exports = {
|
||||
destination_dir = dir;
|
||||
}
|
||||
}
|
||||
const destination = lastDist > 500 ? `${destination_dir} of ${tempDest}` : tempDest;
|
||||
const destination = lastDist > 500 ? `${destination_dir} of ${tempDest}` : `Near ${tempDest}`;
|
||||
|
||||
let uavEmbed = new EmbedBuilder()
|
||||
.setColor(client.config.Colors.Default)
|
||||
.setDescription(`**UAV Detection - <t:${unixTime}>**\n**${data.player}** was spotted in the UAV zone at **[${data.pos[0]}, ${data.pos[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${data.pos[0]};${data.pos[1]})\nNear ${destination}**`)
|
||||
.setDescription(`**UAV Detection - <t:${unixTime}>**\n**${data.player}** was spotted in the UAV zone at **[${data.pos[0]}, ${data.pos[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${data.pos[0]};${data.pos[1]})\n${destination}**`)
|
||||
|
||||
client.users.fetch(uav.owner, false).then((user) => {
|
||||
user.send({ embeds: [uavEmbed] });
|
||||
|
||||
@@ -90,11 +90,11 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
|
||||
const destination = lastDist > 500 ? `${destination_dir} of ${tempDest}` : tempDest;
|
||||
const destination = lastDist > 500 ? `${destination_dir} of ${tempDest}` : `Near ${tempDest}`;
|
||||
|
||||
if (killedBy == Templates.LandMine || killedBy == Templates.Explosion || killedBy == Templates.Vehicle) {
|
||||
const cod = killedBy == Templates.LandMine ? `Land Mine Trap` : info.causeOfDeath;
|
||||
const coord = showCoords ? `\n***Location [${info.victimPOS[0]}, ${info.victimPOS[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${info.victimPOS[0]};${info.victimPOS[1]})***\nNear ${destination}` : '';
|
||||
const coord = showCoords ? `\n***Location [${info.victimPOS[0]}, ${info.victimPOS[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${info.victimPOS[0]};${info.victimPOS[1]})***\n${destination}` : '';
|
||||
const killMessage = killedBy == Templates.Vehicle ? 'run over by' : 'blew up from';
|
||||
|
||||
const killEvent = new EmbedBuilder()
|
||||
@@ -184,7 +184,7 @@ module.exports = {
|
||||
if (victimStatIndex == -1) stats.push(victimStat);
|
||||
else stats[victimStatIndex] = victimStat;
|
||||
|
||||
const coord = showCoords ? `\n***Location [${info.victimPOS[0]}, ${info.victimPOS[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${info.victimPOS[0]};${info.victimPOS[1]})***\nNear ${destination}` : '';
|
||||
const coord = showCoords ? `\n***Location [${info.victimPOS[0]}, ${info.victimPOS[1]}](https://www.izurvive.com/chernarusplussatmap/#location=${info.victimPOS[0]};${info.victimPOS[1]})***\n${destination}` : '';
|
||||
|
||||
const killEvent = new EmbedBuilder()
|
||||
.setColor(client.config.Colors.Default)
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@ module.exports = {
|
||||
let distance = parseFloat(Math.sqrt(Math.pow(delta[0], 2) + Math.pow(delta[1], 2)).toFixed(0));
|
||||
let thetat = Math.round(Math.atan2(delta[0], delta[1]) / Math.PI * 180);
|
||||
let theta = (thetat < 0) ? (360 + thetat) : thetat;
|
||||
let compass = ["S", "S.SW", "SW", "W.SW", "W", "W.NW", "NW", "N.NW", "N", "N.NE", "NE", "E.NE", "E", "E.SE", "SE", "S.SE", "S"];
|
||||
let dir = compass[Math.round(theta / 22.5)];
|
||||
let compass = ["S", "SW", "W", "NW", "N", "N by NE", "NE", "E", "SE", "S"];
|
||||
let dir = compass[Math.round(theta / 45)];
|
||||
|
||||
return {distance, theta, dir}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user