Post by tripi on Mar 15, 2022 8:02:11 GMT
Hello, Im trying to make a script that collects all the damage that I do inside a text file, and next sum all and divide by time u know, to see the average DPS, but i need help to make it work, or only know if this is possible to do xd
VV persistent
auto 1 dontlist | foreach 'newmessages' $p if [$p.content == 'startdps' && $p.sender == $name]{set $fname '$name DPS.txt' | filedelete $fname | set $dpsstatus 1 | set $min 15 | set $line 1 | set $num 0 | set $newdmg 0 | set $ADPS 0}
auto 200 dontlist | foreach 'newmessages' $p if [$min > 00 && $p.content ? 'You Deal'] {filewriteline '$fname' $token.'$p.content'.3' | inc $num}
auto 1 | setpos [$screenleft -100] [$screentop -190] | displaytext 'TIME DPS $formattime.$min' | if [$min >0] {dec $min | wait 1000}
and then after that 15 seconds of test, i press a hotkey with the next action
while [$line <= $num] {set $olddmg '$fileline.$fname.$line' | set $newdmg ($newdmg+$olddmg) | inc $file} | set $ADPS ($newdmg/15) | say 'AVERAGE DPS: $ADPS'
but what returns me is an empty string xd
I already tried to use things like $token.$newdmg or $formatnum.$newdmg and some more combinations, but none worked for me xD
Currently what i do is with the generated txt send it to an excell and do the manual operations xd
I came to the conclusion that there is nothing to tell the bot that it is an integral and not a string and do the operations, but I still make the post to remove the doubt, I hope you can help me
VV persistent
auto 1 dontlist | foreach 'newmessages' $p if [$p.content == 'startdps' && $p.sender == $name]{set $fname '$name DPS.txt' | filedelete $fname | set $dpsstatus 1 | set $min 15 | set $line 1 | set $num 0 | set $newdmg 0 | set $ADPS 0}
auto 200 dontlist | foreach 'newmessages' $p if [$min > 00 && $p.content ? 'You Deal'] {filewriteline '$fname' $token.'$p.content'.3' | inc $num}
auto 1 | setpos [$screenleft -100] [$screentop -190] | displaytext 'TIME DPS $formattime.$min' | if [$min >0] {dec $min | wait 1000}
and then after that 15 seconds of test, i press a hotkey with the next action
while [$line <= $num] {set $olddmg '$fileline.$fname.$line' | set $newdmg ($newdmg+$olddmg) | inc $file} | set $ADPS ($newdmg/15) | say 'AVERAGE DPS: $ADPS'
but what returns me is an empty string xd
I already tried to use things like $token.$newdmg or $formatnum.$newdmg and some more combinations, but none worked for me xD
Currently what i do is with the generated txt send it to an excell and do the manual operations xd
I came to the conclusion that there is nothing to tell the bot that it is an integral and not a string and do the operations, but I still make the post to remove the doubt, I hope you can help me