Autorank

Autorank

380k Downloads

JS Requirements

CaszGamerMD opened this issue ยท 2 comments

commented

one of the things i wanted to do was make it so cave/spiders counted as one. i just learned enough .JS so i can make a js script to do just that, would be nice if AR could allow JS to be a req:

var spiderCount = Number("%statz_mobs_killed_SPIDER%");
var spiderCaveCount = Number("%statz_mobs_killed_CAVE_SPIDER%");
var spiderTotalCount =  (spiderCount + spiderCaveCount);

function getSpiderProgress() {

return spiderTotalCount

};

getSpiderProgress();

then in AR it would be like:

  requirements:
    javascript: spider.js
      expression: ==
      value: 1000

then if between the 2 spider types if it totals 1000 req is met.

:D im proud i learned a thing . :D

commented

NOTE
this was made for a stat in Deluxe Menu using papi, so i guess if something like this would work you would have to allow AR to pull from papi, idk if it already does.
further note, i guess its already listening for statz placeholders right?

commented

function spiderTotalCount() {

var spiderCount = parseInt("%statz_mobs_killed_SPIDER%");
var spiderCaveCount = parseInt("%statz_mobs_killed_CAVE_SPIDER%");
spiderTotalCount = Math.abs(spiderCount + spiderCaveCount);
return spiderTotalCount;
};

spiderTotalCount();