| Econamy Reset | |
|
+9Agility I r d0nt cry dont fall Ac Jinrake Dark Pk secret s0z 0wned Create Noob 13 posters |
Author | Message |
---|
Create Noob
Posts : 11 Points : 0 Reputation : 0 Join date : 2009-01-21
| Subject: Econamy Reset Thu Jan 22, 2009 11:40 pm | |
| Ok so your players have a bunch of items you don't want them to have and don't want to look through all files for them or belive they telling truth well heres how you can reset all characters Banks, Equiped Items, And Inventorys Ok well first in your main server folder where client.java and all those other good files are make a new one called - Code:
-
EconomyReset.java After that your going to want to add this intire code to it. - 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 EconomyReset {
private static File charDir = new File("./characters/");
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(); } } } Ok after that make a new file and name it - Code:
-
Run EconomyReset.bat Inside of this bat file add this - Code:
-
@echo off Title Economy Reseter "C:\Program Files\Java\jdk1.6.0_##\bin\javac.exe" EconomyReset.java java EconomyReset pause Replace the ## With the version of jdk and save it this will compile the Reseter for you Ok now save those and use Run EconomyReset.bat and it will get to work if you want it to actually delete them all turn your server off before running it | |
|
| |
s0z 0wned
Posts : 49 Points : -3 Reputation : 0 Join date : 2009-01-21 Age : 30 Location : Australia, Victoria
| Subject: Re: Econamy Reset Thu Jan 22, 2009 11:56 pm | |
| thank you i really needed one of these for my server thank you. | |
|
| |
Create Noob
Posts : 11 Points : 0 Reputation : 0 Join date : 2009-01-21
| Subject: Re: Econamy Reset Fri Jan 23, 2009 12:11 am | |
| | |
|
| |
secret
Posts : 235 Points : 0 Reputation : 0 Join date : 2009-01-15 Age : 28 Location : in your computer
| Subject: Re: Econamy Reset Sat Jan 24, 2009 4:07 am | |
| i guesse thats leeched too | |
|
| |
Dark Pk
Posts : 559 Points : -11 Reputation : -1 Join date : 2009-01-22 Age : 115 Location : Behind you! :P
| Subject: Re: Econamy Reset Sat Jan 24, 2009 5:22 am | |
| Lmao leeched from mopar forum or rune server, saw it but cant find link through.. | |
|
| |
Jinrake Owner
Posts : 255 Points : 66 Reputation : 4 Join date : 2008-12-25 Age : 27 Location : UK
| Subject: Re: Econamy Reset Sat Jan 24, 2009 6:07 am | |
| leeched from rune-server gothik kid. | |
|
| |
Ac Co-Owner
Posts : 839 Points : 78 Reputation : 5 Join date : 2009-01-18 Age : 114 Location : WEST LONDON
| Subject: Re: Econamy Reset Sat Jan 24, 2009 6:56 am | |
| Yep its leeched although somepeople wont find, So its ok.. rite? | |
|
| |
Dark Pk
Posts : 559 Points : -11 Reputation : -1 Join date : 2009-01-22 Age : 115 Location : Behind you! :P
| Subject: Re: Econamy Reset Sat Jan 24, 2009 7:42 am | |
| No, leeching is not right, Jinrake make a rule like: Only post your work and if you post someones work do it with permission. | |
|
| |
Jinrake Owner
Posts : 255 Points : 66 Reputation : 4 Join date : 2008-12-25 Age : 27 Location : UK
| Subject: Re: Econamy Reset Sat Jan 24, 2009 8:05 am | |
| | |
|
| |
dont fall
Posts : 180 Points : 0 Reputation : 0 Join date : 2009-01-27 Age : 30 Location : In Your Mother
| Subject: Re: Econamy Reset Thu Jan 29, 2009 5:41 pm | |
| why would he want to reset economy? mental pointless? | |
|
| |
I r d0nt cry
Posts : 515 Points : -7 Reputation : 0 Join date : 2009-01-25 Age : 30 Location : U.S.A
| Subject: Re: Econamy Reset Thu Jan 29, 2009 6:48 pm | |
| | |
|
| |
Ac Co-Owner
Posts : 839 Points : 78 Reputation : 5 Join date : 2009-01-18 Age : 114 Location : WEST LONDON
| Subject: Re: Econamy Reset Fri Jan 30, 2009 7:53 am | |
| Hmmm... didnt know leeching isnt rite. Soz. And jai didnt u leech on the server making thing? U just added pics. So credits to you aswell. This guy didnt add nothing, just copy and paste. | |
|
| |
Agility
Posts : 126 Points : -7 Reputation : -1 Join date : 2009-01-28
| Subject: Re: Econamy Reset Fri Jan 30, 2009 11:57 pm | |
| fail fking leach alot? >.> | |
|
| |
d a r c y
Posts : 149 Points : -3 Reputation : 0 Join date : 2009-01-23
| Subject: Re: Econamy Reset Sat Feb 07, 2009 11:16 pm | |
| | |
|
| |
attack def5
Posts : 11 Points : 10 Reputation : 0 Join date : 2009-05-13 Age : 114 Location : PvP Planet (:
| Subject: Re: Econamy Reset Mon May 18, 2009 1:24 pm | |
| ban d a r c y ffs he spams for posts -.- | |
|
| |
rob n big
Posts : 377 Points : 397 Reputation : 0 Join date : 2009-05-04 Age : 29 Location : my mom
| Subject: Re: Econamy Reset Mon May 18, 2009 1:28 pm | |
| this is fail. | |
|
| |
y hide yaw y
Posts : 130 Points : 135 Reputation : 0 Join date : 2009-05-02 Age : 31 Location : Swagg island (:
| Subject: Re: Econamy Reset Mon May 18, 2009 11:31 pm | |
| | |
|
| |
Sponsored content
| Subject: Re: Econamy Reset | |
| |
|
| |
| Econamy Reset | |
|