Ok so i asked this really gr8 helper for this and he made it :]
99% to TeleNubby for making it 
1% to me for the idea (i asked if i could have 1% :])
i used it and its gr8 for resetting items incase there are dupers or its really easy to get items on your server
Note: This program will delete each characters equipped items, inventory items, and banked items. Please tell me if you need that changed or if this doesnt work. THIS IS TESTED! TESTED BY Lexi :]
Run it by creating a new batch file with:
Code:
@echo off
javac EconomyBoost.java
java EconomyBoost
pause
I Named Mine EconomyRebooter.bat
You'll have to change one line in the source code yourself. It's the first File object and it is the path of your characters folder. Also:
MAKE SURE THIS PROGRAM IS IN THE SAME DIRECTORY AS YOUR SERVER
AND
MAKE SURE TO BACKUP YOUR CHARACTER FILES BEFORE RUNNING THIS (just Incase...even tho its tested by lex)
The source code for EconomyBoost.java - make sure it is named that!
Code:
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.DataInputStream;
import java.io.BufferedWriter;
import java.io.FileWriter;
public class EconomyBoost
{
/* ONLY CHANGE THE FOLLOWING LINE IF YOUR CHARACTERS FOLDER IS DIFFERENT */
private static File charDir = new File("./characters/");
/* DO NOT EDIT THE FOLLOWING TWO METHODS */
public static void main(String[] args)
{
if(charDir.exists() && charDir.isDirectory())
{
File[] charFiles = charDir.listFiles();
for(int i = 0; i < charFiles.length; i++)
{
resetEcoChar(charFiles[i]);
System.out.println("Reset player economy levels for... "+charFiles[i].toString());
}
}
}
private static void resetEcoChar(File charFile)
{
try
{
String cheatStatus, tempData, tempAdd = ""; int curEquip = 0, curItem = 0, curBank = 0;
File tempCharFile = new File(charDir.toString()+"ECOBOOST$TEMP");
DataInputStream fileStream = new DataInputStream(new FileInputStream(charFile));
BufferedWriter tempOut = new BufferedWriter(new FileWriter(tempCharFile));
while((tempData = fileStream.readLine()) != null)
{
if((!tempData.trim().startsWith("character-item =")) && (!tempData.trim().startsWith("character-bank =")))
{
tempAdd = tempData.trim();
if(tempData.trim().startsWith("character-equip ="))
{
tempAdd = "character-equip = "+curEquip+"\t-1\t0";
curEquip++;
}
tempOut.write(tempAdd); tempOut.newLine();
}
}
fileStream.close(); tempOut.close();
charFile.delete();
tempCharFile.renameTo(charFile);
}
catch(Exception e) { e.printStackTrace(); }
}
}
99% to TeleNubby
1% to Lexi (i Also Fixed Up The Tutorial :])
*TIP*
this may take a few mins depending on how many characters u have.
it took me about 5min+ to do around 8000 members :] (i have a fairly large server)
good luck! :]
plz do not leach this
Post If You Use It :]