1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, If you'd like to instant message with many other users, then join our
    Official Rune-Status Discord Server!
    Dismiss Notice
  3. Got your own Server? Looking for a Server to play right now??
    Make sure you check out the Public Server Directory!
    Dismiss Notice
  4. If you're new to the Rsps Scene and want to jump straight into learning how to Set-up and Customise your own RuneScape Private Sever then check out the Guides and Tutorials for RS2 here.
    Dismiss Notice
Dismiss Notice
Hey Guest,
Are you sure your posting in the Right Sections?
If your unsure which RuneTek version you are working with visit this page to find out.

EverythingRS Auto Donation Installation [ANY BASE]

Discussion in 'Guides & Tutorials' started by Genesis, Feb 11, 2018.

  1. EverythingRS - Free Donation Installation

    EverythingRS is a free API system. Here's a quick tutorial on how to get started with donations.

    Getting started

    • First off download our everythingrs-api.jar from Sorry you must be logged in to read this.
      Click here to log in.
      and include it into your project.

    Registration and secret key

    • After adding the everything-rs.jar into your project the next step is to Sorry you must be logged in to read this.
      Click here to log in.
      , once the account is created you must register onto the toplist as we use the toplist data in many of our api's.
    • Now go to your dashboard and you should see your secret key [​IMG]

    Setting up your donation with Paypal

    In order for the donation script to work, you must set it up with your Paypal.

    • To set up your donation script to receive Paypal payments, go to your settings Sorry you must be logged in to read this.
      Click here to log in.
    • Input your Paypal email and hit submit

    [​IMG]

    Adding and removing items

    Adding and removing items from your Auto Donate is simple.

    • Go to your Auto Donate dashboard Sorry you must be logged in to read this.
      Click here to log in.
    • Under "Add new product", fill out the form information, then hit submit
    • To remove an item just click "Remove" next to the item that you are trying to remove

    [​IMG]

    (Optional) Creating a Sale

    We promote sales on our front page. This is a good way for new players to find deals on servers before joining, and for servers to earn new customers.

    • To create a sale go to your Sales dashboard Sorry you must be logged in to read this.
      Click here to log in.
    • Choose the item that you want to put on sale
    • Set the expiration date, and what % off you want to make the item
    • Read our notification and confirm that you commit to the sale.

    [​IMG]

    Lets take a look at your new donation page

    You can find your donation script at: yoursubdomain.everythingrs.com/services/store
    [​IMG]

    Making the auto donate work with your server

    This part of the tutorial is for PI & Ruse, but can easily be changed to work with any server. If you want me to add a snippet on the thread so it can work with your framework leave a comment with the server base you want the snippet for.

    • Add the code below into Commands.java and you're all done!

    For PI

    
    			if (playerCommand.equalsIgnoreCase("claim")) {
    				new Thread() {
    					public void run() {
    						try {
    							com.everythingrs.donate.Donation[] donations = com.everythingrs.donate.Donation.donations("secret_key", 
    									c.playerName);
    							if (donations.length == 0) {
    								c.sendMessage("You currently don't have any items waiting. You must donate first!");
    								return;
    							}
    							if (donations[0].message != null) {
    								c.sendMessage(donations[0].message);
    								return;
    							}
    							for (com.everythingrs.donate.Donation donate : donations) {
    								c.getItems().addItem(donate.product_id, donate.product_amount);
    							}
    							c.sendMessage("Thank you for donating!");
    						} catch (Exception e) {
    							c.sendMessage("Api Services are currently offline. Please check back shortly");
    							e.printStackTrace();
    						}	
    					}
    				}.start();
    			}
    
    


    For Vencillio

    In PlayerCommand.java under

    switch (parser.getCommand()) {

    Add

    
    case "claim":
    			new Thread() {
    				public void run() {
    					try {
    						com.everythingrs.donate.Donation[] donations = com.everythingrs.donate.Donation.donations("secret_key", 
    								player.getUsername());
    						if (donations.length == 0) {
    							player.send(new SendMessage("You currently don't have any items waiting. You must donate first!"));
    							return;
    						}
    						if (donations[0].message != null) {
    							player.send(new SendMessage(donations[0].message));
    							return;
    						}
    						for (com.everythingrs.donate.Donation donate : donations) {
    							player.getInventory().add(new Item(donate.product_id, donate.product_amount));
    						}
    						player.send(new SendMessage("Thank you for donating!"));
    					} catch (Exception e) {
    						player.send(new SendMessage("Api Services are currently offline. Please check back shortly"));
    						e.printStackTrace();
    					}	
    				}
    			}.start();
    			return true;

    For Ruse

    
    if (command[0].equalsIgnoreCase("claim")) {
    			new Thread() {
    				public void run() {
    					try {
    						com.everythingrs.donate.Donation[] donations = com.everythingrs.donate.Donation.donations("secret_key", 
    								player.getUsername());
    						if (donations.length == 0) {
    							player.getPacketSender().sendMessage("You currently don't have any items waiting. You must donate first!");
    							return;
    						}
    						if (donations[0].message != null) {
    							player.getPacketSender().sendMessage(donations[0].message);
    							return;
    						}
    						for (com.everythingrs.donate.Donation donate : donations) {
    							player.getInventory().add(new Item(donate.product_id, donate.product_amount));
    						}
    						player.getPacketSender().sendMessage("Thank you for donating!");
    					} catch (Exception e) {
    						player.getPacketSender().sendMessage("Api Services are currently offline. Please check back shortly");
    						e.printStackTrace();
    					}	
    				}
    			}.start();
    		}
    [/spoiler]

    Fin

    You are now finished adding the auto donation script to your website and server. If you have any suggestions for features, leave a comment and let me know.

    For non subdomain version

    This tutorial was for the subdomain version, if you're not using the subdomain version of our scripts then you must enable ipn and link the url to your ipn.php here: Sorry you must be logged in to read this.
    Click here to log in.
     
    Tags:
Loading...
Loading...