Something like this would work. You'd just need to change the folder/strings.
PHP Code:
function onCreated() {
this.searchlist.loadfolder("weapons/*.txt",0);
this.searchid = 0;
this.searchstrings = {"serverwarp","rupees","AddItem"};
scheduleevent(.25,"SearchFiles",NULL,NULL);
}
function onSearchFiles() {
if ((this.searchid*50) >= this.searchlist.size()) {
echo("Search completed.");
return;
}
for (temp.s = this.searchid*50; temp.s < (this.searchid+1)*50; temp.s++) {
temp.line.loadstring("weapons/" @ this.searchlist[temp.s]);
for (temp.n: this.searchstrings) {
if (temp.line.pos(temp.n) >= 0) {
echo("Found" SPC temp.n SPC "in file" SPC this.searchlist[temp.s]);
}
}
}
this.searchid++;
scheduleevent(.25,"SearchFiles",NULL,NULL);
}