Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   RC: Built-In Search Function (https://forums.graalonline.com/forums/showthread.php?t=70597)

Gambet 12-04-2006 08:19 PM

RC: Built-In Search Function
 
It would be extremely beneficial if RC contained a search function that would cycle through all files and return all files that contain the data you wish to search for.

This would aid you in finding problems across the server in which you can't trace them back to the source of the problem, and thus, you're forced to manually cycle through tons of NPCs before you find your culprit and are able to fix the problem.

It would be less of a hassle and a lot less time consuming, and can also end up with less problems arising if a corrupt staff member implements a script on the server that would cause harm to the players attributes, because then you could quickly search for any files that contain script that would do those things to the players and then you could remove it before any massive damage is caused.

Crono 12-04-2006 08:31 PM

/find *usestars*

or

/find *usestar

or

/find usestar*

Gambet 12-04-2006 08:43 PM

Quote:

Originally Posted by Gerami (Post 1250185)
/find *usestars*

or

/find *usestar

or

/find usestar*




No, that only looks for files.

I'm talking about looking for content within files :/

excaliber7388 12-04-2006 08:50 PM

I've suggested this before :D

Crono 12-04-2006 09:04 PM

Quote:

Originally Posted by Gambet (Post 1250186)
No, that only looks for files.

I'm talking about looking for content within files :/

Huh? You mean like words in .txt documents and so on?

Gambet 12-04-2006 09:05 PM

Quote:

Originally Posted by Gerami (Post 1250191)
Huh? You mean like words in .txt documents and so on?


Content inside files would have to be words x-x

excaliber7388 12-04-2006 09:07 PM

Or being able to search for a phrase in a script without opening some text editor

Crono 12-04-2006 09:22 PM

Quote:

Originally Posted by Gambet (Post 1250192)
Content inside files would have to be words x-x

it could be leet megahertz you never know :{

Loriel 12-04-2006 09:34 PM

When I suggested something similar to Stefan he was all look I can do that easily and entered a bunch of arcane commands in some sort of arcane console of doom and :(

Yen 12-04-2006 09:49 PM

Yeah, I have a script to do this on Zodiac.

Loriel 12-04-2006 09:55 PM

Quote:

Originally Posted by Yen (Post 1250207)
Yeah, I have a script to do this on Zodiac.

Eagerly awaiting link.

Chris 12-04-2006 10:43 PM

Quote:

Originally Posted by Loriel (Post 1250204)
When I suggested something similar to Stefan he was all look I can do that easily and entered a bunch of arcane commands in some sort of arcane console of doom and :(

Yea he used that on Era not that long ago.

Yen 12-04-2006 11:25 PM

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);




All times are GMT +2. The time now is 07:39 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.