Thread: Auto donation - help

Results 1 to 5 of 5
  1. #1 Auto donation - help 
    Registered Member
    Join Date
    Aug 2016
    Age
    25
    Posts
    159
    Thanks given
    26
    Thanks received
    3
    Rep Power
    63
    So I'm using rsps-pay
    and i have done everything its told me such as putting its code into player.java and then adding there ::claim to my commands and I have no errors, but its just not working and there isn't even a message saying that the player hasn't payed or something like that, can anyone help?

    this is my commands.java part of the rsps-pay

    case "claim":
    try{
    player.rspsdata(player, player.getUsername());
    }catch(Exception e){
    player.getPackets().sendGameMessage("Thank you for donating");
    }
    break;










    AND YES I HAVE ADDED THE IMPORTS TO PLAYER.JAVA THAT THEY SAID

    then player.java
    public void rspsdata(Player player, String username){
    try{
    username = username.replaceAll(" ","_");
    String secret = "THERE IS A KEY HERE BUT I DELETED IT ON HERE"; //YOUR SECRET KEY!
    String email = "THERE AN EMAIL IM JUST NOT SHOWING IT YOU"; //This is the one you use to login into RSPS-PAY
    URL url = new URL("http://rsps-pay.com/includes/listener.php?username="+username+"&secret="+secret +"&email="+email);
    BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
    String results = reader.readLine();
    if(results.toLowerCase().contains("!error:")){
    Logger.log(this, "[RSPS-PAY]"+results);
    }else{
    String[] ary = results.split(",");
    for(int i = 0; i < ary.length; i++){
    switch(ary[i]){
    case "17532":
    player.getInventory().deleteItem(6804, 1);
    break;
    case "15830": //product ids can be found on the webstore page
    player.getInventory().deleteItem(6806, 1);
    break;
    case "15831": //product ids can be found on the webstore page
    player.getInventory().deleteItem(6805, 1);
    break;
    case "17533": //product ids can be found on the webstore page
    player.getInventory().deleteItem(6803, 1);
    break;
    case "17534": //product ids can be found on the webstore page
    player.getInventory().deleteItem(29220, 1);
    break;
    case "17558": //product ids can be found on the webstore page
    player.getInventory().deleteItem(19592, 1);
    break;
    case "17559": //product ids can be found on the webstore page
    player.getInventory().deleteItem(11882, 1);
    break;
    case "17560": //product ids can be found on the webstore page
    player.getInventory().deleteItem(11908, 1);
    break;
    }
    }
    }
    }catch(IOException e){}
    }
    Reply With Quote  
     

  2. #2  
    What is a Java?

    Leon.'s Avatar
    Join Date
    Oct 2013
    Posts
    1,919
    Thanks given
    173
    Thanks received
    802
    Rep Power
    5000
    in
    Code:
    } catch(IOException e) {
    
    }
    put

    Code:
    e.printStackTrace();
    see what that says?

    Attached image
    Attached image

    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Aug 2016
    Age
    25
    Posts
    159
    Thanks given
    26
    Thanks received
    3
    Rep Power
    63
    Quote Originally Posted by Leon X D View Post
    in
    Code:
    } catch(IOException e) {
    
    }
    put

    Code:
    e.printStackTrace();
    see what that says?
    ok ill try

    Quote Originally Posted by Leon X D View Post
    in
    Code:
    } catch(IOException e) {
    
    }
    put

    Code:
    e.printStackTrace();
    see what that says?
    wait replace it with that or add that under?

    Quote Originally Posted by Leon X D View Post
    in
    Code:
    } catch(IOException e) {
    
    }
    put

    Code:
    e.printStackTrace();

    see what that says?
    it says no items are waiting for you, I'm going to get someone donate now to test it.
    Reply With Quote  
     

  4. #4  
    Sexy User
    User's Avatar
    Join Date
    Apr 2013
    Posts
    601
    Thanks given
    97
    Thanks received
    218
    Rep Power
    346
    Quote Originally Posted by CoderRelapse View Post
    case "claim":
    try{
    player.rspsdata(player, player.getUsername());
    }catch(Exception e){
    &nbsplayer.getPackets().sendGameMessage("Thank you for donating");
    }
    break;
    Why are you sending player as an argument, then the username, if you are already processing the method in Player?
    Reply With Quote  
     

  5. #5  
    Respected Member


    Kris's Avatar
    Join Date
    Jun 2016
    Age
    26
    Posts
    3,638
    Thanks given
    820
    Thanks received
    2,642
    Rep Power
    5000
    Quote Originally Posted by shithead View Post
    Why are you sending player as an argument, then the username, if you are already processing the method in Player?
    Because why not, more is always better!!1
    Reply With Quote  
     


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. Plimus Auto Donation Help [$25]
    By Ultima X in forum Buying
    Replies: 1
    Last Post: 04-02-2013, 07:09 PM
  2. Auto donations help
    By ownerdivine in forum Help
    Replies: 8
    Last Post: 10-05-2012, 07:38 PM
  3. plimus auto donation Help
    By I try too hard in forum Help
    Replies: 11
    Last Post: 03-20-2012, 08:31 PM
  4. auto donation help;P ( not setting up )
    By Right man in forum Help
    Replies: 1
    Last Post: 07-31-2011, 10:49 PM
  5. Auto Donation Help
    By Rockstar Jax in forum Help
    Replies: 5
    Last Post: 05-08-2011, 11:37 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
  •