Thread: [matrix 718/742] Eco reset [ still need help, willing to pay]

Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1 [matrix 718/742] Eco reset [ still need help, willing to pay] 
    An all-around good guy
    lloydy269's Avatar
    Join Date
    May 2011
    Age
    23
    Posts
    287
    Thanks given
    5
    Thanks received
    25
    Rep Power
    26
    hello, how would i go about doing a eco reset as there was 2 duped on my server and i wanna reset it so do the players


    thanks in advance
    Last edited by lloydy269; 07-23-2013 at 12:38 AM. Reason: i put eoc instead of eco
    Reply With Quote  
     

  2. #2  
    Donator
    The Stoned's Avatar
    Join Date
    Jan 2013
    Posts
    619
    Thanks given
    56
    Thanks received
    76
    Rep Power
    58
    do you mean an eco reset?
    Reply With Quote  
     

  3. #3  
    « Detective Enrique »
    Admiral's Avatar
    Join Date
    Feb 2013
    Posts
    333
    Thanks given
    83
    Thanks received
    61
    Rep Power
    37
    Code:
    public class ItemResetter {
    
    	public static void main(String[] args) throws ClassNotFoundException,
    			IOException {		
    		File[] chars = new File("data/playersaves/characters").listFiles();
    		for (File acc : chars) {
    			try {
    				Player player = (Player) SerializableFilesManager
    						.loadSerializedFile(acc);
    				for (int i = 0; i < 25353; i++) {
    					player.getBank().removeItem(i);
    				}
    				for (int i = 0; i < 25353; i++) {
    					player.getInventory().getItems()
    							.removeAll(new Item(i, Integer.MAX_VALUE));
    				}
    				for (int i = 0; i < 25353; i++) {
    					player.getEquipment().getItems()
    							.removeAll(new Item(i, Integer.MAX_VALUE));
    				}
    				player.setCoins(0);
    				player.reseted = 1;
    				SerializableFilesManager.storeSerializableClass(player, acc);
    			} catch (Throwable e) {
    				e.printStackTrace();
    				System.out.println("failed: " + acc.getName());
    			}
    		}
    		System.out.println("Done.");
    	}
    }


    Make a .bat file with this inside:

    Code:
    @echo off
    title Eco Resetter
    java -client -Xmx512m -cp bin;lib/* com.rs.tools.ItemResetter
    pause

    Then run the .bat


    Alternatively, I found a tool here:
    [Only registered and activated users can see links. ]


    Note: It's always good practice to back up your server before doing things like this.
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. Thankful user:


  5. #4  
    An all-around good guy
    lloydy269's Avatar
    Join Date
    May 2011
    Age
    23
    Posts
    287
    Thanks given
    5
    Thanks received
    25
    Rep Power
    26
    that didnt work :/
    Reply With Quote  
     

  6. #5  
    BoomScape #1
    BoomScape's Avatar
    Join Date
    May 2013
    Posts
    2,202
    Thanks given
    254
    Thanks received
    210
    Discord
    View profile
    Rep Power
    43
    ItemReset.java

    Code:
    package com.rs.tools;
    
    import java.io.File;
    import java.io.IOException;
    
    import com.rs.utils.Utils;
    import com.rs.game.item.Item;
    import com.rs.game.player.Player;
    import com.rs.game.player.Skills;
    import com.rs.game.player.content.MoneyPouch;
    import com.rs.utils.SerializableFilesManager;
    
    public class ItemReset {
    
    	public static void main(String[] args) throws ClassNotFoundException,
    			IOException {		
    		File[] chars = new File("data/playersaves/characters").listFiles();
    		for (File acc : chars) {
    			try {
    				Player player = (Player) SerializableFilesManager
    						.loadSerializedFile(acc);
    				for (int i = 7452; i < 7463; i++) {
    					player.getBank().removeItem(i);
    				}
    				for (int i = 7452; i < 7463; i++) {
    					player.getInventory().getItems()
    							.removeAll(new Item(i, Integer.MAX_VALUE));
    				}
    				for (int i = 7452; i < 7463; i++) {
    					player.getEquipment().getItems()
    							.removeAll(new Item(i, Integer.MAX_VALUE));
    				}
    				player.reseted = 1;
    				SerializableFilesManager.storeSerializableClass(player, acc);
    			} catch (Throwable e) {
    				e.printStackTrace();
    				System.out.println("failed: " + acc.getName());
    			}
    		}
    		System.out.println("Done.");
    	}
    }
    ItemReset.bat
    Code:
    @echo off
    title ITEMPACKER
    echo Started!
    "C:/Program Files/Java/jre7/bin/java.exe" -Xmx512m -cp bin;lib/* com.rs.tools.ItemReset
    pause
    Do remember to Compile + change the ids to whatever items your reseting then works
    Reply With Quote  
     

  7. #6  
    An all-around good guy
    lloydy269's Avatar
    Join Date
    May 2011
    Age
    23
    Posts
    287
    Thanks given
    5
    Thanks received
    25
    Rep Power
    26
    Quote Originally Posted by BoomScape View Post
    ItemReset.java

    Code:
    package com.rs.tools;
    
    import java.io.File;
    import java.io.IOException;
    
    import com.rs.utils.Utils;
    import com.rs.game.item.Item;
    import com.rs.game.player.Player;
    import com.rs.game.player.Skills;
    import com.rs.game.player.content.MoneyPouch;
    import com.rs.utils.SerializableFilesManager;
    
    public class ItemReset {
    
    	public static void main(String[] args) throws ClassNotFoundException,
    			IOException {		
    		File[] chars = new File("data/playersaves/characters").listFiles();
    		for (File acc : chars) {
    			try {
    				Player player = (Player) SerializableFilesManager
    						.loadSerializedFile(acc);
    				for (int i = 7452; i < 7463; i++) {
    					player.getBank().removeItem(i);
    				}
    				for (int i = 7452; i < 7463; i++) {
    					player.getInventory().getItems()
    							.removeAll(new Item(i, Integer.MAX_VALUE));
    				}
    				for (int i = 7452; i < 7463; i++) {
    					player.getEquipment().getItems()
    							.removeAll(new Item(i, Integer.MAX_VALUE));
    				}
    				player.reseted = 1;
    				SerializableFilesManager.storeSerializableClass(player, acc);
    			} catch (Throwable e) {
    				e.printStackTrace();
    				System.out.println("failed: " + acc.getName());
    			}
    		}
    		System.out.println("Done.");
    	}
    }
    ItemReset.bat
    Code:
    @echo off
    title ITEMPACKER
    echo Started!
    "C:/Program Files/Java/jre7/bin/java.exe" -Xmx512m -cp bin;lib/* com.rs.tools.ItemReset
    pause
    Do remember to Compile + change the ids to whatever items your reseting then works

    would this remove all items?
    Reply With Quote  
     

  8. #7  
    An all-around good guy
    lloydy269's Avatar
    Join Date
    May 2011
    Age
    23
    Posts
    287
    Thanks given
    5
    Thanks received
    25
    Rep Power
    26
    right ive done that now everyone has dwarf remains how do i remove those
    Reply With Quote  
     

  9. #8  
    « Detective Enrique »
    Admiral's Avatar
    Join Date
    Feb 2013
    Posts
    333
    Thanks given
    83
    Thanks received
    61
    Rep Power
    37
    This might help:

    Quote Originally Posted by k0ed ur mom View Post
    you may also need this to get rid of dwarf remains in the player(s) bank. just tell them to collapse tabs so that all remains are in 1 pile

    under
    Code:
    	public static boolean processNormalCommand(final Player player, String[] cmd, boolean console, boolean clientCommand) {
    add

    Code:
    			if (cmd[0].equalsIgnoreCase("deletebankitem")) {
    				if (cmd.length < 2) {
    					player.getPackets().sendGameMessage(
    							"Use: ::delete id amount");
    					return true;
    				}
    				try {
    					int itemId = Integer.parseInt(cmd[1]);
    					int amount = Integer.parseInt(cmd[2]);
    					int[] BankSlot = player.getBank().getItemSlot(itemId);
    
    
    					ItemDefinitions defs = ItemDefinitions
    							.getItemDefinitions(itemId);
    					if (defs.isLended())
    						return false;
    					String itemName = defs == null ? "" : defs.getName()
    							.toLowerCase();
    					player.getBank().removeItem(BankSlot, amount, true, true);
    					player.getPackets().sendGameMessage(
    							"<col=00FF00>" + itemName
    									+ "</col> deleted from your bank.");
    
    
    				} catch (NumberFormatException e) {
    					player.getPackets().sendGameMessage(
    							"Use: ::delete id amount");
    				}
    				return true;
    			}
    use as ;;deletebankitem 0 #
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ]
    Reply With Quote  
     

  10. #9  
    An all-around good guy
    lloydy269's Avatar
    Join Date
    May 2011
    Age
    23
    Posts
    287
    Thanks given
    5
    Thanks received
    25
    Rep Power
    26
    Quote Originally Posted by Admiral View Post
    This might help:
    erm players still have money in the pouches
    Reply With Quote  
     

  11. #10  
    Aganoth Developer

    Aust1n's Avatar
    Join Date
    Aug 2012
    Posts
    1,860
    Thanks given
    280
    Thanks received
    406
    Rep Power
    60
    I can do this for you



    [Only registered and activated users can see links. ]
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 232
    Last Post: 12-03-2015, 04:45 PM
  2. Replies: 10
    Last Post: 05-01-2014, 02:25 PM
  3. How to Log the Public chat [Matrix 718/742]
    By FooBar in forum Tutorials
    Replies: 29
    Last Post: 01-30-2014, 11:15 AM
  4. Replies: 19
    Last Post: 03-17-2013, 11:01 PM
  5. Replies: 42
    Last Post: 02-09-2013, 12:42 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •