Prevent false starts for kill detection

main
sigonasr2 3 years ago
parent ba193096c7
commit 32054492a2
  1. BIN
      FFXIVLogs - Shortcut.lnk
  2. 5
      run.sh.bak
  3. 4
      src/App.css
  4. 6
      src/App.css.bak
  5. 2
      src/App.js
  6. 4
      src/App.js.bak
  7. 183
      src/backend/data - Copy.json
  8. 113
      src/backend/data.json
  9. 134
      src/backend/data.json.bak
  10. 16
      src/backend/logreader.js
  11. 10
      src/backend/logreader.js.bak

Binary file not shown.

@ -1,5 +1,6 @@
npm start &
cd src/backend
for fname in "$@"; do
node logreader.js $fname
read -e -p "Provide Log file: " log
for fname in "$log"; do
node logreader.js "$fname"
done

@ -40,6 +40,10 @@
width:48px;
height:52px;
}
.score{
color:#fff !important;
text-shadow: 0 0 4px #c971a4,0 0 8px #c971a4,0 0 12px #c971a4, 0 0 16px #fff,0 0 20px #c971a4;
}
.right{
margin: auto;

@ -15,7 +15,7 @@
.dotused {
background-color:rgba(0,0,0,0.0);
border:4px solid rgba(255,255,150,0.6);
border:4px solid rgba(255,255,150,0.9);
border-radius:50%;
-moz-border-radius:50%;
-webkit-border-radius:50%;
@ -40,6 +40,10 @@
width:48px;
height:52px;
}
.score{
color:#000 !important;
text-shadow: 0 0 4px #c971a4,0 0 8px #c971a4,0 0 12px #c971a4, 0 0 16px #fff,0 0 20px #c971a4;
}
.right{
margin: auto;

@ -65,6 +65,8 @@ function App() {
<img src="./layout.png"/>
{data&&<>
<div className="floating score" style={{left:190-CenterAlignAdjust(data.points,42),top:40,fontSize:42,color:"rgb(219,209,200)"}}>
{data.points}</div>
<div className="floating" style={{left:403,top:40,fontSize:42,color:"rgb(219,209,200)"}}>
{FormatFloor(data.floor)}</div>

@ -65,13 +65,15 @@ function App() {
<img src="./layout.png"/>
{data&&<>
<div className="floating" style={{left:190-CenterAlignAdjust(data.points,42),top:40,fontSize:42,color:"rgb(219,209,200)"}}>
{data.points}</div>
<div className="floating" style={{left:403,top:40,fontSize:42,color:"rgb(219,209,200)"}}>
{FormatFloor(data.floor)}</div>
{
data.pomander.map((pom,i)=>{
return <>
{NameMatches(i)==2?<div className="floating dot" style={{left:50+(i%6)*64,top:88+Math.floor(i/6)*64,fontSize:24}}/>:NameMatches(i)==1&&<div className="floating dotused" style={{left:50+(i%6)*64,top:88+Math.floor(i/6)*64,fontSize:24}}/>}
{NameMatches(i)==1?<div className="floating dot" style={{left:50+(i%6)*64,top:88+Math.floor(i/6)*64,fontSize:24}}/>:NameMatches(i)==2&&<div className="floating dotused" style={{left:50+(i%6)*64,top:88+Math.floor(i/6)*64,fontSize:24}}/>}
<div className="floating current" style={{left:48+(i%6)*64,top:80+Math.floor(i/6)*64,fontSize:24}}>
{pom[1]}</div>
<div className="floating alltime" style={{left:48+(i%6)*64,top:104+Math.floor(i/6)*64,fontSize:24}}>

@ -1,183 +0,0 @@
{
"pomander": [
[
0,
0,
93
],
[
0,
0,
130
],
[
0,
0,
188
],
[
0,
0,
175
],
[
0,
0,
60
],
[
0,
0,
75
],
[
0,
0,
84
],
[
0,
0,
84
],
[
0,
0,
119
],
[
0,
0,
115
],
[
0,
0,
90
],
[
0,
0,
95
],
[
0,
0,
108
],
[
0,
0,
117
],
[
0,
0,
34
],
[
0,
0,
45
]
],
"accursed_hoard": [
[
0,
19
],
[
0,
35
],
[
0,
16
],
[
0,
8
]
],
"mimics": [
0,
0
],
"traps": [
[
0,
26
],
[
0,
19
],
[
0,
43
],
[
0,
36
],
[
0,
20
]
],
"floor_effects": [
[
0,
23
],
[
0,
29
],
[
0,
21
],
[
0,
26
],
[
0,
14
],
[
0,
9
],
[
0,
22
],
[
0,
16
],
[
0,
17
],
[
0,
12
],
[
0,
17
]
],
"death_count": [
1,
10
],
"floor": 0,
"accursed_hoard_detected": false,
"previous_pomander": "",
"floor_storage": {},
"floor_buff_storage": {}
}

@ -1,193 +1,192 @@
{
"pomander": [
[
1,
1,
3
0,
0,
95
],
[
0,
1,
4
0,
132
],
[
1,
1,
3
0,
0,
191
],
[
1,
1,
1
0,
0,
176
],
[
0,
1,
2
0,
61
],
[
0,
0,
0
75
],
[
0,
0,
0
84
],
[
0,
0,
0
84
],
[
0,
0,
0
121
],
[
0,
0,
0
116
],
[
0,
0,
0
90
],
[
0,
0,
0
95
],
[
0,
0,
1
110
],
[
0,
1,
1
0,
117
],
[
0,
0,
0
34
],
[
0,
0,
0
45
]
],
"accursed_hoard": [
[
1,
1
0,
19
],
[
0,
0
35
],
[
0,
0
16
],
[
0,
0
8
]
],
"mimics": [
6,
0,
0
],
"traps": [
[
0,
0
26
],
[
0,
1
19
],
[
0,
0
43
],
[
0,
0
37
],
[
0,
0
20
]
],
"floor_effects": [
[
0,
0
24
],
[
0,
1
30
],
[
0,
0
21
],
[
0,
0
26
],
[
0,
0
14
],
[
0,
0
9
],
[
0,
0
23
],
[
0,
0
16
],
[
0,
0
17
],
[
0,
0
12
],
[
0,
0
17
]
],
"death_count": [
0,
1
1,
10
],
"floor": 2,
"floor": 0,
"accursed_hoard_detected": false,
"previous_pomander": "",
"floor_storage": {
"sight": 0,
"intuition": 0
},
"floor_storage": {},
"floor_buff_storage": {},
"kills": 54,
"kills": 0,
"rare_kills": 0,
"mimic": 0,
"mandragora": 0,
"currentLevel": 7,
"currentLevel": 1,
"startLevel": 1,
"points": 10838
"points": 0,
"fully_explored": true,
"time_bonus": true
}

@ -1,98 +1,98 @@
{
"pomander": [
[
3,
1,
6
0,
0,
95
],
[
3,
0,
9
0,
132
],
[
3,
0,
23
0,
191
],
[
3,
0,
16
0,
176
],
[
3,
0,
7
0,
61
],
[
3,
0,
4
0,
75
],
[
3,
0,
14
0,
84
],
[
3,
0,
8
0,
84
],
[
3,
0,
11
0,
121
],
[
3,
1,
20
0,
0,
116
],
[
3,
0,
13
0,
90
],
[
2,
0,
12
0,
95
],
[
3,
0,
8
0,
110
],
[
3,
0,
12
0,
117
],
[
0,
0,
4
34
],
[
0,
0,
7
45
]
],
"accursed_hoard": [
[
0,
0
19
],
[
0,
0
35
],
[
0,
3
16
],
[
0,
@ -100,87 +100,93 @@
]
],
"mimics": [
2,
0,
0
],
"traps": [
[
0,
1
26
],
[
0,
2
19
],
[
0,
1
43
],
[
0,
4
1,
37
],
[
0,
1
20
]
],
"floor_effects": [
[
0,
0
1,
24
],
[
0,
2
1,
30
],
[
0,
4
21
],
[
0,
4
26
],
[
0,
1
14
],
[
0,
0
9
],
[
0,
1
1,
23
],
[
0,
1
16
],
[
0,
1
17
],
[
0,
0
12
],
[
0,
3
17
]
],
"death_count": [
0,
3
1,
10
],
"floor": 0,
"accursed_hoard_detected": false,
"previous_pomander": "safety",
"floor_storage": {
"witching": 1,
"safety": 0
},
"floor_buff_storage": {}
"previous_pomander": "",
"floor_storage": {},
"floor_buff_storage": {},
"kills": 0,
"rare_kills": 0,
"mimic": 0,
"mandragora": 0,
"currentLevel": 1,
"startLevel": 1,
"points": 0,
"fully_explored": true,
"time_bonus": true
}

@ -70,6 +70,7 @@ var startLevel=1;
var points=0;
var fully_explored=true;
var time_bonus=true;
var started=false;
const POMANDER_NAMES = [
"safety",
@ -131,6 +132,7 @@ if (fs.existsSync('./data.json')) {
points=master_obj.points??0
fully_explored=master_obj.fully_explored??true
time_bonus=master_obj.time_bonus??true
started=master_obj.started??false
}
@ -166,6 +168,7 @@ function CreateMasterObj() {
points:Math.max(points,0),
fully_explored:fully_explored,
time_bonus:time_bonus,
started:started,
}
}
@ -241,9 +244,9 @@ function ParseString(str) {
points+=15150
}
if (floor===51||floor===101) {
points+=750
points+=75750
} else {
points+=300*101
points+=30300
}
}
previous_pomander=""
@ -252,6 +255,7 @@ function ParseString(str) {
fully_explored=true;
accursed_hoard_detected=false
time_bonus=true
started=true
update_file=true
} else
if (split[4].includes("0) has ended.")) {
@ -285,6 +289,7 @@ function ParseString(str) {
points=0;
fully_explored=true;
time_bonus=true;
started=false
update_file=true
} else
if (split[4].includes("The enfeebling trap is triggered...")) {
@ -454,13 +459,16 @@ function ParseString(str) {
} else
if (split[4].includes("30 minutes remaining")) {
time_bonus=false;
} else
if (split[4].includes("You obtain ")&&split[4].includes(" gil.")) {
started=false;
}
} else
if (split.length==9 && split[0]==="33"&&split[3]==="10000007"&&split[6]==="FF") {
if (split.length==9 && split[0]==="33"&&split[3]==="10000007"&&split[6]==="FF"&&started) {
points+=101
//console.log("Treasure coffer: "+points)
} else
if (split.length==22) {
if (split.length==22&&started) {
if (split[0]==="04") {
const RareMonsterNames=[
"bloated conjurer", "bloated archer", "bloated pugilist", "sword-swinging adventurer", "staff-spinning adventurer", "spear-shaking adventurer",

@ -70,6 +70,7 @@ var startLevel=1;
var points=0;
var fully_explored=true;
var time_bonus=true;
var started=false;
const POMANDER_NAMES = [
"safety",
@ -241,9 +242,9 @@ function ParseString(str) {
points+=15150
}
if (floor===51||floor===101) {
points+=750
points+=75750
} else {
points+=300*101
points+=30300
}
}
previous_pomander=""
@ -252,6 +253,7 @@ function ParseString(str) {
fully_explored=true;
accursed_hoard_detected=false
time_bonus=true
started=true
update_file=true
} else
if (split[4].includes("0) has ended.")) {
@ -285,6 +287,7 @@ function ParseString(str) {
points=0;
fully_explored=true;
time_bonus=true;
started=false
update_file=true
} else
if (split[4].includes("The enfeebling trap is triggered...")) {
@ -460,7 +463,7 @@ function ParseString(str) {
points+=101
//console.log("Treasure coffer: "+points)
} else
if (split.length==22) {
if (split.length==22&&started) {
if (split[0]==="04") {
const RareMonsterNames=[
"bloated conjurer", "bloated archer", "bloated pugilist", "sword-swinging adventurer", "staff-spinning adventurer", "spear-shaking adventurer",
@ -485,6 +488,7 @@ function ParseString(str) {
mandragora++;
points+=505
} else {
points+=100+Math.floor(floor/2)+(floor>=101?101:0)
kills++;
}
update_file=true;

Loading…
Cancel
Save