Jump to content

Supah Fly

Member
  • Content count

    10
  • Joined

  • Last visited

About Supah Fly

  • Rank
    Bronze Member
  • Birthday 03/27/1995

Profile Information

  • Gender
    Male

Recent Profile Visitors

742 profile views
  1. The GTLVote project has been discontinued, and this project is the recommended replacement. Motivote Installation Tutorial In order to install Motivote, you must download it and include it in your classpath. Click here if you use Eclipse otherwise, click here. Motivote requires logging into to manage services, so you must set that up before continuing. Project Insanity Bases Browse to "./src/server/model/players/packets/Commands.java". Add the following to the very top of that file. import com.motivoters.motivote.service.MotivoteRS; Inside of the class, add this next variable! In order for Motivote to function, it needs to know who you are and it needs to know a secret about you to know you are who you are. Replace the things that are in quotes with what they should be. Replace example with your Motivote service's subdomain, and api_key with your API key. private final MotivoteRS motivote = new MotivoteRS("example", "api_key"); Now we search for the "playerCommands" method. Below is an example of checking an auth. if (playerCommand.startswith("redeem")) { String auth = playerCommand.replace("redeem ", ""); try { boolean success = motivote.redeemVote(auth); if (success) { c.getItems().addItem(995, 10000); c.sendMessage("Auth redeemed, thanks for voting!"); } else { c.sendMessage("Invalid auth supplied, please try again later."); } } catch (Exception ex) { ex.printStackTrace(); c.sendMessage("Unable to check auth, please try again later."); } }That's it. Let me know if you have any questions.
  2. I understand you can't go tthrough all those posts but maybe somehow promote quality content and clean up the first page or so until it's relevant content. The "looking for staff/dev/sugar daddy" posts detract from the quality of the sections when they're all over the place. Not only that, but they are time sensitive. If reporting the threads will help the cause, I wouldn't mind doing that.
  3. I see it now, not the mod list, but the users online. Maybe just not the first place I'd personally look, but the online list is there. Staff list under "More"... not really intuitive.
  4. I apologize in advanced for how blunt and/or rambly this may come across. So for the longest time, I've been registered on this community (since 2011). My post count is extremely low. Why is that? Well I'll tell you what I think, and maybe you can see where I'm coming from and either disagree or agree. So my first impression, upon seeing the forum be completely different from the last time I saw it. It's distracting. I feel like the default style is just so dull nothing is directing me to do anything... and that pretty much describes the issue. There's no direction. There needs to be traffic direction in terms of new users, and regular posters to the best sections for content people actually want to see. People want to see RSPS DEVELOPMENT CONTENT so put it at the top. A healthy community in general, put that next. The moderation is lacking at best and forums aren't cleaned and kept on topic. There's nowhere for serious developers to discuss topics (similar to an Informative section on other sites). I am the kind of person that likes to take RSPS as a chance to practice learning about different design principles and problem solving skills. Where's the content that is an "interesting read" or at the very least, mentally stimulating? It just looks like the staff team is comprised of one administrator who actually posts and seems to care and the rest of the forum is kind of controlled with a lassez-faire attitude. How do you even figure out who is a mod?? There's no list that I can easily access. Where's the users online? http://runelocus.com/forum/forum/18-general-rsps/ then read the rules at http://runelocus.com/forum/topic/52-rsps-general-discussion-sectional-rules/ I mean, really? Most of the threads there are against the section rules... It's such a simple thing that takes a few minutes to correct. http://runelocus.com/forum/topic/99800-ikov-hacking-players/#comment-776175 this topic doesn't belong in general discussion... it's what it says in the forum description... I mean, I don't have all the answers. I just know what my gut tells me. Maybe, there could be a few changes. You guys clearly have some sort of a user base, so why not differentiate from the rest of the sites? Moderate the content a little more, pick quality content. Quality content is what matters... quantity and retards posting help threads in the wrong sections makes it look like quality content will go unnoticed. Driving people into being part of the community and posting is what will bring more people in, and it will just keep growing that way. Utilize your user base and use it to create and stimulate better discussions, and therefore better content. inb4 attitudes like "yeah it's a shithole get over it" - I've seen it before, I've been part of it. Only, I realized the hard way (as a large forum owner in my teens) that if some people don't give a damn to say or do something then it will end quicker than you think. Passion is what drives people. If you don't have passion for what you're doing, then aren't you just wasting your time? Maybe I got some points right, maybe some wrong. I figure the impression perspective is what really matters, because people who've been here are used to the way things are.
  5. [IMG]http://rspserver.com/images/motivote.png[/IMG] Download at [URL="http://www.runelocus.com/forums/showthread.php?102928-Ultimate-Vote-Script-Motivote-(SERVER-amp-WEBSITE)"]http://www.runelocus.com/forums/showthread.php?102928-Ultimate-Vote-Script-Motivote-(SERVER-amp-WEBSITE)[/URL] [SIZE=1]Note: This can be applied to any server, RL just forced me to use a thread prefix.[/SIZE] So I made [URL="http://www.runelocus.com/forums/showthread.php?102928-Ultimate-Vote-Script-Motivote-(SERVER-amp-WEBSITE)"]Motivote[/URL] pretty easy to install, right off the bat. The only real tricky part is going to be writing the code that gives the user the reward, but I've made that as simple as I can make it. [url]https://www.youtube.com/watch?v=GhOyPmwqw1s[/url] [LIST=1] [*]Create a MySQL database, user, and give the user as many privileges as you can. [*]Extract Motivote-(WHATEVER CURRENT VERSION IS)-web.rar and upload the contents into a directory on your website. I'd use /vote/. [*]Set permissions on config.php to 0777. If you don't, the script will tell you what to put in config.php by yourself. [*]Visit [url]http://yoursite.com/vote/[/url] and enter the installation information and just follow the steps. [*]MAKE SURE YOU SAVE YOUR [B]SERVER DATA CALLBACK KEY[/B] AND YOUR [B]ADMIN CONTROL PASSWORD[/B]! [/LIST] [IMG]http://i.imgur.com/pQSpAJP.png[/IMG] [I][COLOR="#FF0000"][B]Then, for the server installation, include Motivote-(current version).jar in your build path.[/B][/COLOR][/I] [SIZE=1]For PI, here's the method I added in PlayerHandler.java: [url=http://pastebin.com/T6Vvcvvd]Add to PlayerHandler.java - Pastebin.com[/url][/SIZE] Create RewardHandler.java: [CODE]import server.model.players.Client; import server.model.players.Player; import server.model.players.PlayerHandler; import com.rspserver.motivote.MotivoteHandler; import com.rspserver.motivote.Reward; public class RewardHandler extends MotivoteHandler<Reward> { [MENTION=15855]Over[/MENTION]ride public void onCompletion(Reward reward) { int itemID = -1; if (reward.rewardName().equalsIgnoreCase("gold")) { itemID = 995; } // SOME OF THIS CODE WILL BE DIFFERENT FOR YOUR SERVER, CHANGE IT ACCORDINGLY. everything to do with motivote will stay the same! if (PlayerHandler.isPlayerOn(reward.username())) { Player p = PlayerHandler.getPlayer(reward.username()); if (p != null && p.isActive == true) // check isActive to make sure player is active. some servers, like project insanity, need extra checks. { synchronized(p) { Client c = (Client)p; if (c.getItems().addItem(995, reward.amount())) { c.sendMessage("You've received your vote reward! Congratulations!"); reward.complete(); } else { c.sendMessage("Could not give you your reward item, try creating space."); } } } } } }[/CODE] Add where you initialize/start everything else: [CODE]new Motivote(new RewardHandler(), "http://yoursite.com/vote/", "server data callback key").start();[/CODE] [IMG]http://i.imgur.com/nB5EdTn.png[/IMG] Really, it's that easy. If you have any issues, just post a reply and I'll try and sort them out to the best of my ability. Thanks!
  6. [quote name='Hope']You should look into prepared SQL statements. Escaping your queries shows that you intend so secure the results, in which case it's not ever 100% secure with escaping alone.[/QUOTE] It is secure. Prepared statements accomplish (in the case of my supplied class) the same exact thing. Not allowing SQL injection. I do input validation and sanitization on top of escaping. I appreciate your response and I am already aware and planning to move over to prepared statements due to the fact they are much safer, but let's not forget that you can have a secure script without them. I have tested everything for security. That being said, if there's an actual, provable issue, I'll fix it.
  7. [quote name='officiallulzs3c']inb4 c99/remote sql query[/QUOTE] did you actually test that and those are the results you got, or was it just something you wanted to say because of your username?
  8. [CENTER][img]http://rspserver.com/images/motivote.png[/img] Current web version: [B]1.2[/B] - [url=http://rspserver.com/motivote]DOWNLOAD[/url] Current server version: [B]1.1[/B] - [url=http://rspserver.com/motivote]DOWNLOAD[/url][/CENTER] Motivote is the ultimate vote script. It has the features of every other vote script plus more. It works well on any sized device, so getting players to vote on their phones or tablets will be hassle-free. Any site will work with no special configuration besides supplying the vote URL and your site ID. The callback URL you tell toplists will never change, so no more confusion. This is accomplished by searching each GET and POST parameter for our callback. [CENTER][img]http://i.imgur.com/yvGrXLM.png[/img] [img]http://i.imgur.com/pQSpAJP.png[/img] Note: gray-green colored buttons means that they have already voted previously and have not received a reward for their vote, so they don't have to vote to get to step 3. [img]http://i.imgur.com/nB5EdTn.png[/img][/CENTER] When your incentive tactic is set to "reward," you need to submit all the votes before you can claim your reward. Otherwise, each vote needs to be fulfilled individually. When it's set to "reward" and you vote for a site without redeeming a reward, it's saved for the user so that every vote receives a reward. In the final version, you'll be able to toggle this functionality on or off. For now, you can only toggle between the two tactics (each vote = reward or all votes = reward). [CENTER][img]http://i.imgur.com/xpgrigp.png[/img][/CENTER] You can customize basically anything. Each installation will have a randomly generated security hash, so vote counterfeiting via fake callbacks won't be possible. Starting vote checker server-sided: [code]new Motivote<Reward>(new RewardHandler(), "http://localhost/motivote/", "secret key given during installation").start();[/code] Receiving rewards: [code]public class RewardHandler extends MotivoteHandler<Reward> { [MENTION=15855]Over[/MENTION]ride public void onCompletion(Reward reward) { if (reward.rewardName().equalsIgnoreCase("gold")) { //addItem(reward.username(), 995, reward.amount()); // note that amount is determined by the web server. you change all those settings in the admin cp. reward.finalize(); } System.out.println(reward.internalID() + " | Reward received for " + reward.username() + " (" + reward.rewardName() + ", " + reward.amount() + ")"); } }[/code] To upgrade: Just copy the new files over, [SIZE=3][B]excluding config.php![/B][/SIZE] [I]If you are creating/modifying themes, please make sure to put them in a unique directory. The default theme shouldn't be modified where it sits, the whole folder should be copied and you should work out of the new folder to avoid updates overwriting your customization.[/I] Your server-sided key can be found in the preferences under "datakey." If you lose your password, you can go into phpMyAdmin and run this query (change "!!your password here!!" to the password you want): [code]UPDATE `mv_preferences` SET `value` = MD5('!!your password here!!') WHERE `name` = 'admin_pass'[/code] Callback can be given to each toplist easily. It's always the same no matter what. The extra GET parameter is for compatibility with sites that append the incentive directly to the end of the URL without adding additional parameters. You can name it whatever you want, as long as the path is correct. [code]http://example.com/vote/callback.php?i=[/code] [I][SIZE=1]This is Supah Fly from r-s if you're unsure of who I am and want to check![/SIZE][/I]
  9. The thing is, not many people find servers through something as tailored and specific as instagram or twitter. I'd say twitter is a news service for the people already playing than anything.
×