View Single Post
  #13  
Old 12-04-2006, 11:25 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
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.this.searchid*50temp.< (this.searchid+1)*50temp.s++) {
    
temp.line.loadstring("weapons/" this.searchlist[temp.s]);
    for (
temp.nthis.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);

Reply With Quote