EverythingRS - Free Donation Installation
EverythingRS is a free API system. Here's a quick tutorial on how to get started with voting.
Getting started
Registration and 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.
Adding and removing items
Adding and removing items from your Auto Donate is simple.
(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.
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.