|
Intro:
Description: How to add RTL’s Voting Script V3 to your server.
Difficulty: 2/10
What you should know: How to read, Copy+Paste
Quick note: I am the owner of RuneTopList and this is the Voting Script which we provide for free to our users.
Website side:
1. Register on RSPS TopList - RuneScape Private Servers
2. Go on your profile and a add server.
3. Go to the control panel of the server you just added. Then edit the vote for rewards.
4. The approved sites are the sites which offer a callback feature. To get the server id on RuneLocus, go on your servers page and get the 5 digit number after “details” on the URL. On top100arena the id is the number at the end of the URL in your servers detail page.
5. Once you add an approved site, you are given a URL in red which is the callback URL. This link is to be pasted in the callback field in the control panel of the site you just added (Not on RuneTopList’s control panel!).
6. Add whichever other sites you want on your voting script as a non-approved.
7. Add your rewards and optional custom message.
8. You now have a subdomain with your voting script. If your server name was “example” your voting script would be at example.runetoplist.com/vote.
9. Download the jar file and add to the server project. RuneTopListSDK_3.2 and Gson. If you run the server from bat file you may need to include these in the bat file.
10. Follow the spoiler below. Also add correct imports in the different files you edit.
11. If you want to embed it into an iframe on your website we have different themes for that. The URL would be example.runetoplist.com/vote?theme=greenfox. You can check out the different themes which are redfox, bluefox, brightbluefox, orangefox, goldfox. We can custom build you a theme that matches your website for a price. Contact us on the website if you are interested.
imports
Code:import com.runetoplist.*; import com.runetoplist.callbacks.*; import com.runetoplist.model.*;
Add this in your Server file at the within the main method.
Code:RuneTopList.init("YOUR_SERVER_USERNAME", "PRIVATE_KEY");
Add this in your commands class
Code:if (playerCommand.equals("check")) { RuneTopList.checkRewards(c.playerName, new VoteRewardCallback() { @Override public void callback(Object obj) { Client c = (Client)obj; if(getVoteRewards().size() == 0){ c.sendMessage("You haven't voted! Do ::vote to vote."); } else { //TODO: Should check if there is enough space to add items in inventory, if not then bank for(VoteReward reward : getVoteRewards()){ switch (reward.getRewardid()) {//find reward id in the vote4reward control panel at runtoplist.com/YOUR_SERVERUSERNAME/cp case 401: c.sendMessage("Add potions here"); break; case 7332: c.sendMessage("Add new battle staff"); break; default: System.out.println("Missing reward id: " + reward.getRewardid()); break; } } } } }); }
Add this in your Client class within the process method
Code:RuneTopList.runPendingCallbacks(playerName, this);
12. In the sub-domain you will find a video gallery that you can use on your website. The videos uploaded here by your users will also appear on RuneTopList’s root domain, making it a very good tool to advertise your server.
Spoiler for Vote Script:
Thanks
Thanks once again!
Nice tutorial .
Nice to see you updated the script.
I read your email, this seems pretty awesome.
Lonely souls are you on this website?
My guess is that the DNS still hasn't propagated on your IP so you are still seeing the old website. If that's the case give it a few more hours. It has been 24 hours since the release and I know some people can only still see the old website.
Looks great! Nice work.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |