Thread: EverythingRS Auto Donation Installation [ANY BASE]

Page 1 of 24 12311 ... LastLast
Results 1 to 10 of 238
  1. #1 EverythingRS Auto Donation Installation [ANY BASE] 
    Extreme Donator

    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    3,633
    Thanks given
    1,472
    Thanks received
    1,899
    Rep Power
    4724
    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 [Only registered and activated users can see links. ] and include it into your project.


    Registration and secret key

    • After adding the everything-rs.jar into your project the next step is to [Only registered and activated users can see links. ], 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


    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 [Only registered and activated users can see links. ]
    • Input your Paypal email and hit submit




    Adding and removing items

    Adding and removing items from your Auto Donate is simple.

    • Go to your Auto Donate dashboard [Only registered and activated users can see links. ]
    • 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




    (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 [Only registered and activated users can see links. ]
    • 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.




    Lets take a look at your new donation page

    You can find your donation script at: yoursubdomain.everythingrs.com/services/store


    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

    Spoiler for :
    Code:
    			if (playerCommand.equalsIgnoreCase("claim")) {
    				new java.lang.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

    Spoiler for :


    In PlayerCommand.java under

    Code:
    switch (parser.getCommand()) {
    Add

    Code:
    case "claim":
    			new java.lang.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 Ethos / Exotic


    Spoiler for :

    In ethos/model/players/packets/commands/all

    Open or create (if it does not exist) Claim.java

    and replace the entire file with this

    Code:
    package ethos.model.players.packets.commands.all;
    
    import ethos.model.players.Player;
    import ethos.model.players.packets.commands.Command;
    
    /**
     * Auto Donation System / https://EverythingRS.com
     * @author Genesis
     *
     */
    
    public class Claim extends Command {
    
    	@Override
    	public void execute(Player player, String input) {
    		new java.lang.Thread() {
    			public void run() {
    				try {
    					com.everythingrs.donate.Donation[] donations = com.everythingrs.donate.Donation
    							.donations("secret_key", player.playerName);
    					if (donations.length == 0) {
    						player.sendMessage("You currently don't have any items waiting. You must donate first!");
    						return;
    					}
    					if (donations[0].message != null) {
    						player.sendMessage(donations[0].message);
    						return;
    					}
    					for (com.everythingrs.donate.Donation donate : donations) {
    						player.getItems().addItem(donate.product_id, donate.product_amount);
    					}
    					player.sendMessage("Thank you for donating!");
    				} catch (Exception e) {
    					player.sendMessage("Api Services are currently offline. Please check back shortly");
    					e.printStackTrace();
    				}
    			}
    		}.start();
    	}
    
    }


    For Ruse

    Spoiler for :
    Code:
    if (command[0].equalsIgnoreCase("claim")) {
    			new java.lang.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();
    		}
    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: [Only registered and activated users can see links. ]
    Reply With Quote  
     


  2. #2  
    Registered Member
    Join Date
    May 2016
    Posts
    612
    Thanks given
    249
    Thanks received
    58
    Rep Power
    42
    will be using thanks.
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Extreme Donator

    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    3,633
    Thanks given
    1,472
    Thanks received
    1,899
    Rep Power
    4724
    Quote Originally Posted by TheAmerican View Post
    will be using thanks.
    If you have any suggestions be sure to let me know
    • [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. ]
    • [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. ]


    1. [Only registered and activated users can see links. ]


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

  5. #4  
    Registered Member
    Join Date
    May 2016
    Posts
    612
    Thanks given
    249
    Thanks received
    58
    Rep Power
    42
    Quote Originally Posted by Genesis View Post
    If you have any suggestions be sure to let me know
    i will if i see anything.

    Quote Originally Posted by Genesis View Post
    If you have any suggestions be sure to let me know
    hmu on skype i got a few questions i sent u a pm
    Reply With Quote  
     

  6. Thankful user:


  7. #5  
    Aganoth Developer

    Aust1n's Avatar
    Join Date
    Aug 2012
    Posts
    1,858
    Thanks given
    274
    Thanks received
    407
    Rep Power
    60
    Looks great, nice release!



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

  8. Thankful user:


  9. #6  
    Registered Member
    Join Date
    May 2017
    Posts
    91
    Thanks given
    36
    Thanks received
    4
    Rep Power
    33
    o.O
    thanks a lot, will use most likely :P
    Reply With Quote  
     

  10. Thankful user:


  11. #7  
    Banned

    Join Date
    Nov 2013
    Age
    19
    Posts
    772
    Thanks given
    286
    Thanks received
    270
    Rep Power
    0
    Good stuff, Genesis. This is a great feature to offer to many rsps owners.
    Reply With Quote  
     

  12. Thankful user:


  13. #8  
    Extreme Donator

    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    3,633
    Thanks given
    1,472
    Thanks received
    1,899
    Rep Power
    4724
    Quote Originally Posted by Aust1n View Post
    Looks great, nice release!
    Quote Originally Posted by Setup View Post
    Good stuff, Genesis. This is a great feature to offer to many rsps owners.
    Thanks guys!

    Quote Originally Posted by welpp View Post
    o.O
    thanks a lot, will use most likely :P
    If you need help with setup let me know
    • [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. ]
    • [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. ]


    1. [Only registered and activated users can see links. ]


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

  14. Thankful users:


  15. #9  
    GravityScape & SimpliCity Developer.

    RSWSkiller's Avatar
    Join Date
    Dec 2013
    Age
    22
    Posts
    753
    Thanks given
    174
    Thanks received
    61
    Rep Power
    97
    will use all 3 u released, will thanks and rep all 3 topics :3
    thanks
    Reply With Quote  
     

  16. Thankful user:


  17. #10  
    Registered Member
    SanDol's Avatar
    Join Date
    May 2017
    Posts
    1,460
    Thanks given
    22
    Thanks received
    242
    Rep Power
    175
    Quote Originally Posted by Genesis View Post
    EverythingRS - Free Donation Installation

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

    Getting started

    • First off download our everythingrs-api.jar from [Only registered and activated users can see links. ] and include it into your project.
    • You will also need our website script which you can find [Only registered and activated users can see links. ]. Unzip it and drag + drop the "services" folder onto your website.


    Registration and secret key

    • After adding the everything-rs.jar into your project and dragging the services folder onto your website [Only registered and activated users can see links. ], 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


    Activating your website script

    • Go into the services folder that is on your website. And copy and paste the secret key into services/donate/secretKey.php , Replace the "change_me" with the secret key you now have.
    • If you registered onto the toplist and placed your secret key, you should now see that the page looks entirely different if you refresh.


    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 Auto Donate dashboard [Only registered and activated users can see links. ]
    • Input your Paypal email, location of your donation script, the location of your ipn.php, and then hit submit
    • Your ipn.php should be at [Only registered and activated users can see links. ]




    Adding and removing items

    Adding and removing items from your Auto Donate is simple.

    • Go to your Auto Donate dashboard [Only registered and activated users can see links. ]
    • 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




    (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 [Only registered and activated users can see links. ]
    • 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.




    Lets take a look at your new donation page

    You can find your donation script at: your_website/services/donate/



    Making the auto donate work with your server

    This part of the tutorial is for PI, 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!


    Code:
    			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();
    			}
    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.
    Thankkss
    Reply With Quote  
     

  18. Thankful user:


Page 1 of 24 12311 ... LastLast

Thread Information
Users Browsing this Thread

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

Similar Threads

  1. EverythingRS Voting Installation [ANY BASE]
    By Genesis in forum Tutorials
    Replies: 221
    Last Post: 08-18-2018, 08:32 AM
  2. MotivoteRS Installation Tutorial [ANY BASE]
    By funkE in forum Tutorials
    Replies: 146
    Last Post: 08-18-2018, 07:29 AM
  3. EverythingRS Hiscores Installation [ANY BASE]
    By Genesis in forum Tutorials
    Replies: 131
    Last Post: 07-29-2018, 09:36 AM
  4. Replies: 58
    Last Post: 12-25-2011, 12:16 AM
  5. Replies: 13
    Last Post: 12-25-2008, 09:54 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
  •