Thread: Can someone help me ?

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 Can someone help me ? 
    GravityScape & SimpliCity Developer.

    RSWSkiller's Avatar
    Join Date
    Dec 2013
    Age
    27
    Posts
    754
    Thanks given
    184
    Thanks received
    68
    Rep Power
    172
    Okay , well do someone know if there is way to remove items fro eco?
    Like not whole ecoreset, just one item from everyone?

    also i need help with this:
    If you trade with someone, after u have used some commands, etc ::train ::home, so its not open trade screen?
    Etc like
    Player a trading with b.
    B doing ::train and after he start teleing, then he click accept trade request.
    Is there way to block it ?
    Reply With Quote  
     

  2. #2  
    Registered Member Emre's Avatar
    Join Date
    Jan 2014
    Posts
    596
    Thanks given
    91
    Thanks received
    61
    Rep Power
    7
    Just check on log in

    Code:
    if(player.getBank().contains(item id)) {
                player.getBank().removeAll(item id);
             }
    same for inventory
    Reply With Quote  
     

  3. #3  
    GravityScape & SimpliCity Developer.

    RSWSkiller's Avatar
    Join Date
    Dec 2013
    Age
    27
    Posts
    754
    Thanks given
    184
    Thanks received
    68
    Rep Power
    172
    Quote Originally Posted by Emre View Post
    Just check on log in

    Code:
    if(player.getBank().contains(item id)) {
                player.getBank().removeAll(item id);
             }
    same for inventory
    Explain bit ?
    Reply With Quote  
     

  4. #4  
    Donator

    Join Date
    Oct 2014
    Posts
    587
    Thanks given
    29
    Thanks received
    76
    Rep Power
    26
    Do you want to remove the item completely out of the economy and that it never returns or do you want to reset the item and later on make it useable for players again?

    For the trade screen add a boolean (You might already have one, check for something like isBanking) and in the teleport command add a check if the player is trading or not.
    Reply With Quote  
     

  5. #5  
    GravityScape & SimpliCity Developer.

    RSWSkiller's Avatar
    Join Date
    Dec 2013
    Age
    27
    Posts
    754
    Thanks given
    184
    Thanks received
    68
    Rep Power
    172
    Quote Originally Posted by Excision Pk View Post
    Do you want to remove the item completely out of the economy and that it never returns or do you want to reset the item and later on make it useable for players again?

    For the trade screen add a boolean (You might already have one, check for something like isBanking) and in the teleport command add a check if the player is trading or not.
    Well i want to just reset from economy, not completely remove, just to reset it.
    about trading i mean, they don't tele while they are on trade, they are trading after teleporting, still haven't find proper fix for this, nor no help .-.
    Reply With Quote  
     

  6. #6  
    Donator

    Join Date
    Oct 2014
    Posts
    587
    Thanks given
    29
    Thanks received
    76
    Rep Power
    26
    Quote Originally Posted by -Skiller- View Post
    Well i want to just reset from economy, not completely remove, just to reset it.
    Two ways I can think off right now:

    1# Add a boolean which is saved to the player files which indicates if the player has been 'searched' or not, if not it should search its inventory/bank for the item and if the item is there delete it. Then after the search set the boolean to true so the next time the player logs in it will not search again.

    2# Create a account scanner and manual/automaticly remove it from the files by scanning for the item id. This can only be done easy if you dont have your player files crypted or compressed. Doing this manual would be easy.

    Quote Originally Posted by -Skiller- View Post
    about trading i mean, they don't tele while they are on trade, they are trading after teleporting, still haven't find proper fix for this, nor no help .-.
    Make a check if the player your about to trade with is nearby in the method that displays the trade interface. You might can leech this from other methods like the check if a object is nearby or a NPC.
    Reply With Quote  
     

  7. #7  
    Member of the Imagine Cult

    Join Date
    Feb 2013
    Posts
    519
    Thanks given
    21
    Thanks received
    7
    Rep Power
    59
    Go to Client.java and search for:

    Code:
    void initialize OR boolean initialize
    Inside of that method find a 'good' place and put the following code:

    Code:
    if(player.getBank().contains(item id))
                player.getBank().removeAll(item id);
             if(player.getInventory().contains(item id))
                player.getInventory().removeAll(item id);
    Replace ITEM_ID with the item you want removed from the player.

    What this code does is check if the player contains the item "ITEM_ID" in his/her inventory or bank and removes it.

    If you would like to remove multiple items at once, replace the code above with this:

    Code:
    int[] ecoItems = {ITEM_ID1, ITEM_ID2, ITEM_ID3, ITEMID4};
    
    for (int i = 0; i < ecoItems.length; i++) {
             if(player.getBank().contains(ecoItems[i]))
                player.getBank().removeAll(ecoItems[i]);
             if (player.getInventory().contains(ecoItems[i]))
                player.getInventory().removeAll(ecoItems[i]);
    }
    Replace ITEM_ID1 through ITEM_ID4 with actual Id's. And you can remove some if you don't need or add more if you need.

    What this code does is check for all of the id's put into "ecoItems" and if it finds those ids, it removes them from the player.

    Enjoy
    Reply With Quote  
     

  8. #8  
    GravityScape & SimpliCity Developer.

    RSWSkiller's Avatar
    Join Date
    Dec 2013
    Age
    27
    Posts
    754
    Thanks given
    184
    Thanks received
    68
    Rep Power
    172
    Quote Originally Posted by FiveRiverFlo View Post
    Go to Client.java and search for:

    Code:
    void initialize OR boolean initialize
    Inside of that method find a 'good' place and put the following code:

    Code:
    if(player.getBank().contains(item id))
                player.getBank().removeAll(item id);
             if(player.getInventory().contains(item id))
                player.getInventory().removeAll(item id);
    Replace ITEM_ID with the item you want removed from the player.

    What this code does is check if the player contains the item "ITEM_ID" in his/her inventory or bank and removes it.

    If you would like to remove multiple items at once, replace the code above with this:

    Code:
    int[] ecoItems = {ITEM_ID1, ITEM_ID2, ITEM_ID3, ITEMID4};
    
    for (int i = 0; i < ecoItems.length; i++) {
             if(player.getBank().contains(ecoItems[i]))
                player.getBank().removeAll(ecoItems[i]);
             if (player.getInventory().contains(ecoItems[i]))
                player.getInventory().removeAll(ecoItems[i]);
    }
    Replace ITEM_ID1 through ITEM_ID4 with actual Id's. And you can remove some if you don't need or add more if you need.

    What this code does is check for all of the id's put into "ecoItems" and if it finds those ids, it removes them from the player.

    Enjoy
    all good with removing item, just edited ecoreset file
    anyway still need proper fix for trade :c
    I know there should be something with distance , but not sure how to do it :/
    Reply With Quote  
     

  9. #9  
    Registered Member
    Dogreen's Avatar
    Join Date
    Jan 2014
    Posts
    600
    Thanks given
    55
    Thanks received
    142
    Rep Power
    105
    Quote Originally Posted by -Skiller- View Post
    Explain bit ?
    He pretty much gave you the code, use Eclipse IDE if you are newbie. Anyway, you got change the 'item ID" to the one you want to erase.

    Example:
    Code:
    if(player.getBank().contains(995) {
                player.getBank().removeAll(995);
             }
    So there's no money moke:
    Reply With Quote  
     

  10. #10  
    Donator

    Join Date
    Oct 2014
    Posts
    587
    Thanks given
    29
    Thanks received
    76
    Rep Power
    26
    Quote Originally Posted by -Skiller- View Post
    all good with removing item, just edited ecoreset file
    anyway still need proper fix for trade :c
    I know there should be something with distance , but not sure how to do it :/
    There should be a few methods in NpcHandler about distance checking, use it.
    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. Can someone help me with this error?
    By BloodScape in forum Projects
    Replies: 2
    Last Post: 11-27-2008, 05:27 PM
  2. Can someone help me
    By Pitbull in forum Application Development
    Replies: 7
    Last Post: 06-23-2008, 09:26 AM
  3. Can someone help me get on the server?????
    By ambushed in forum Tutorials
    Replies: 0
    Last Post: 12-03-2007, 02:55 AM
  4. can someone help me find my old server?
    By e n k i in forum Downloads
    Replies: 3
    Last Post: 10-04-2007, 04:15 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
  •