Jump to content

Genesis

Member
  • Content count

    282
  • Joined

  • Last visited

About Genesis

  • Rank
    Mithril Member

Recent Profile Visitors

1,025 profile views
  1. Here is an example of a non-working page. http://www.runelocus.com/top-rsps-list/vote-45035/?id2=dT5Y3nt2mz__AAtIADxGhFzs7BDwWBSx45R8b1JsEjWgypMPRvdrGKCwreEjd9uXoo4rGST_yG7P8dxsSfMJhChoue_aaaz2cdMAPRaaazSJrYL0JYahOAorUVfRBKYEgo4Lz219oFoSWaaazxCE
  2. Getting this error everytime for voting. Could this have something to do with long characters for the id2 parameter?
  3. EverythingRS - Realtime Heatmaps Tutorial EverythingRS is a free API system. Here's a quick tutorial on how to get started with adding Heatmaps. Getting started First off download our everythingrs-api.jar from here and include it into your project. Registration and secret key After adding the everything-rs.jar into your project create an account at https://everythingrs.com, 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 What you are adding Heatmaps can be used to view hotspots in the game, you can view where the wilderness hotspots are, alternatively you can view non-wilderness hotspots. Either can be disabled, so if you only want to show the wilderness hotspot you can do this. Red = Wilderness Hotspots Blue = Non Wilderness Hotspots Making the Heatmaps 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. In your server startup (Server.java) under public static void main( Add this and change your secret key to the one on your account com.everythingrs.service.Service.scheduledService.scheduleAtFixedRate(new Runnable() { @Override public void run() { com.everythingrs.heatmaps.Heatmap.getMap().clear(); for (Player player : PlayerHandler.players) { if (player != null) { com.everythingrs.heatmaps.Heatmap.getMap().put(player.getUsername(), new com.everythingrs.heatmaps.Heatmap(player.getUsername(), player.absX, player.absY, player.height)); } } com.everythingrs.heatmaps.Heatmap.update("secret_key"); } }, 0, 5, java.util.concurrent.TimeUnit.SECONDS); Fin You are finished with the tutorial and can now view your heatmaps on your subdomain page ^^
  4. How does the Bitcoin system work? Do you mine Bitcoin on a users computer? Or is it just giving away existing Bitcoin that you already own based on playtime? This is important to know since mining on their computer is a huge violation of trust, couldn't find anything about it.
  5. EverythingRS - Free Market/Trade API 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 here and include it into your project. Registration and secret key After adding the everything-rs.jar into your project create an account at https://everythingrs.com, 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 Your market subdomain! Go to your main panel at https://everythingrs.com/account . You should now see your market URL in the "Your API Pages" section (OPTIONAL) If you wish to embed the script on your website you can add the code below directly onto your website. Change "yoursubdomain" to the one that was provided to you Making the Market/Trade api work with your server This part is for PI but can easily be changed to work with any server. If you have a request for a specific server let me know and I can add it to the tutorial. In TradeAndDuel.java under public void giveItems() { Look for for (GameItem item : o.getTradeAndDuel().offeredItems) { Above that put this and remember to also edit the secret_key to your API secret key. com.everythingrs.marketplace.Trade trade = new com.everythingrs.marketplace.Trade(); trade.setUsername(o.getUsername()); trade.setTradeWith(c.getUsername()); for (GameItem item : o.getTradeAndDuel().offeredItems) { if (item.id > 0) { String itemName = ItemDefinitions.getDefinitions()[item.id].getitemName(); trade.push(new com.everythingrs.marketplace.Item(item.id, item.amount, itemName)); } } trade.update("secret_key"); For Other Servers The script is compatible with any base, if you however need help adding it to a specific one, leave a link to the base and I'll add it to the tutorial. Fin You are now finished adding the market onto your server. ^^ . This will be extremely useful for players that are looking for price guides and want to check what items are currently going for, etc.
  6. EverythingRS - Commands Installation EverythingRS is a free API system. Here's a quick tutorial on how to get started with commands. Things Included with the Commands API At the moment we provide 5 different commands related to search which give you quicker access to our Tools page. :: sitem which is short for "searchitem" will give you results for RS2 items. :: ositem short for "Old School Item" will give you results for OSRS items. :: snpc short for "Search NPC" will give you results for RS2 NPCs. :: osnpc short for "Old School NPC" will give you results for OSRS NPCs :: osobject short for "Old School Object" will give you results for OSRS Objects Getting started First off download our everythingrs-api.jar from here and include it into your project. Also register an account at EverythingRS Remember your secret key as you will be using it in the next section Making the commands 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. For PI Add the code below into Commands.java and you're all done! if (playerCommand.startsWith("sitem") || playerCommand.startsWith("snpc") || playerCommand.startsWith("ositem") || playerCommand.startsWith("osnpc") || playerCommand.startsWith("osobject")) { String[] args = playerCommand.split(" "); final String command = playerCommand; new Thread() { public void run() { synchronized (c) { try { String query = args[1]; com.everythingrs.commands.Search[] searchResults = com.everythingrs.commands.Search .searches("secret_key", command, query); if (searchResults.length > 0) if (searchResults[0].message != null) { c.sendMessage(searchResults[0].message); return; } c.sendMessage("-------------------"); for (com.everythingrs.commands.Search search : searchResults) { c.sendMessage(search.name + ":" + search.id); } c.sendMessage("Finished search with " + searchResults.length + " results"); c.sendMessage("-------------------"); } catch (Exception e) { c.sendMessage("Api Services are currently offline. Please check back shortly"); e.printStackTrace(); } } } }.start(); } For RUSE In CommandPacketListener under public static void playerCommands( Add if (command[0].equalsIgnoreCase("sitem") || command[0].equalsIgnoreCase("snpc") || command[0].equalsIgnoreCase("ositem") || command[0].equalsIgnoreCase("osnpc") || command[0].equalsIgnoreCase("osobject")) { new Thread() { public void run() { synchronized (c) { try { String query = command[1]; com.everythingrs.commands.Search[] searchResults = com.everythingrs.commands.Search .searches("secret_key", command[0], query); if (searchResults.length > 0) if (searchResults[0].message != null) { player.getPacketSender().sendMessage(searchResults[0].message); return; } player.getPacketSender().sendMessage("-------------------"); for (com.everythingrs.commands.Search search : searchResults) { player.getPacketSender().sendMessage(search.name + ":" + search.id); } player.getPacketSender() .sendMessage("Finished search with " + searchResults.length + " results"); player.getPacketSender().sendMessage("-------------------"); } catch (Exception e) { player.getPacketSender() .sendMessage("Api Services are currently offline. Please check back shortly"); e.printStackTrace(); } } } }.start(); } Fin You are finished with the tutorial and can now search for any osrs item, rs2 item, osrs npc, rs2 npcs, or osrs object quickly. If you have any suggestions for more commands be sure to let me know ^^
  7. EverythingRS - Players Online Tutorial EverythingRS is a free API system. Here's a quick tutorial on how to get started with adding Players Online. Getting started First off download our everythingrs-api.jar from here and include it into your project. Also register an account at EverythingRS Remember your secret key as you will be using it in the next section Making the Players Online 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. In your server startup (Server.java) under public static void main( Add this and change your secret key to the one on your account com.everythingrs.playersonline.PlayersOnline.service.scheduleAtFixedRate(new Runnable() { @Override public void run() { int online = 0; for (Player player : PlayerHandler.players) { if (player != null) { online += 1; } } com.everythingrs.playersonline.PlayersOnline.insert("secret_key", online, false); } }, 0, 30, TimeUnit.SECONDS); Displaying your player count on your website In your index.php place this where ever you wish to display your player count. Remember to change the secret key. <?php $secret = "change_this_to_your_secret_key"; $playersOnline = @file_get_contents("https://everythingrs.com/api/playersonline/get/".$secret); echo "There are currently ".$playersOnline." players online"; ?> Fin You are finished with the tutorial and can now view your player count on your site ^^ Info and some documentation Player count will update every 30 seconds. If you wish to make calls every 30 minutes just change the 5 to 30 (or to whichever number you wish) and TimeUnit.SECONDS to TimeUnit.MINUTES in the startup code. If you wish to make direct changes to the way the code works, this section will help out. To fetch the current players online you can use this code com.everythingrs.playersonline.PlayersOnline.get(); To set the count to whatever you wish use this code com.everythingrs.playersonline.PlayersOnline.set(value); To add to the playercount use this com.everythingrs.playersonline.PlayersOnline.increment(value); To subtract from the playercount use this com.everythingrs.playersonline.PlayersOnline.decrement(value);
×