Thread: EverythingRS Voting Donate Hiscores Heatmaps Installation & More [ANY BASE]

Page 1 of 123 1231151101 ... LastLast
Results 1 to 10 of 1225
  1. #1 EverythingRS Voting Donate Hiscores Heatmaps Installation & More [ANY BASE] 
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    4,017
    Thanks given
    1,499
    Thanks received
    1,967
    Rep Power
    4898
    For better organization all tutorials can also be found at https://everythingrs.com/tutorials


    EverythingRS Auto Vote Tutorial https://everythingrs.com/tutorials/r...-vote-tutorial
    EverythingRS Auto Donation Tutorial https://everythingrs.com/tutorials/r...ation-tutorial
    EverythingRS Hiscores Tutorial https://everythingrs.com/tutorials/r...cores-tutorial
    EverythingRS Heatmaps Tutorial https://everythingrs.com/tutorials/r...tmaps-tutorial
    EverythingRS Players Online Tutorial https://everythingrs.com/tutorials/r...nline-tutorial
    EverythingRS Marketplace Tutorial https://everythingrs.com/tutorials/r...place-tutorial
    EverythingRS Commands Tutorial https://everythingrs.com/tutorials/r...mands-tutorial

    Tutorials are at the bottom. If anyone needs help with installation be sure to let me know on this thread







    ------------------------------------------------------------------------------------------












    EverythingRS - Free Voting Installation

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

    Support Discord

    If you need more help or for some reason cannot understand the tutorial. You can post a comment on this thread or reach us at our support Discord.

    https://discord.gg/rGN8zCV

    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 voting subdomain!

    • Go to your main panel at https://everythingrs.com/account . You should now see your voting 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


    Spoiler for (optional) embed onto your website:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
        <title>Vote</title>
        <style type="text/css">
            body,
            html {
                margin: 0;
                padding: 0;
                height: 100%;
                overflow: hidden;
            }
            
            #content {
                position: absolute;
                left: 0;
                right: 0;
                bottom: 0;
                top: 0px;
            }
        </style>
    </head>
    
    <body>
        <div id="content">
            <iframe width="100%" height="100%" frameborder="0" src="https://yoursubdomain.everythingrs.com/services/vote/" />
        </div>
    </body>
    
    </html>






    Making the auto vote work with your server

    This part is for PI & Ruse 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.
    • Add the code below into Commands.java and you're all done!


    For PI

    Spoiler for PI:

    Code:
    			if (playerCommand.startsWith("reward")) {
    				String[] args = playerCommand.split(" ");
    				if (args.length == 1) {
    					c.sendMessage("Please use [::reward id], [::reward id amount], or [::reward id all].");
    					return;
    				}
    				final String playerName = c.playerName;
    				final String id = args[1];
    				final String amount = args.length == 3 ? args[2] : "1";
    
    				com.everythingrs.vote.Vote.service.execute(new Runnable() {
    					@Override
    					public void run() {
    						try {
    							com.everythingrs.vote.Vote[] reward = com.everythingrs.vote.Vote.reward("secret_key",
    									playerName, id, amount);
    							if (reward[0].message != null) {
    								c.sendMessage(reward[0].message);
    								return;
    							}
    							c.getItems().addItem(reward[0].reward_id, reward[0].give_amount);
    							c.sendMessage(
    									"Thank you for voting! You now have " + reward[0].vote_points + " vote points.");
    						} catch (Exception e) {
    							c.sendMessage("Api Services are currently offline. Please check back shortly");
    							e.printStackTrace();
    						}
    					}
    
    				});
    			}



    For Vencillio

    Spoiler for Vencillio:


    In PlayerCommand.java under

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

    Code:
    	case "reward":
    		if (!parser.hasNext(1)) {
    			player.send(new SendMessage("Please use [::reward id], [::reward id amount], or [::reward id all]."));
    			return true;
    		}
    		final String playerName = player.getUsername();
    		final String id = parser.nextString();
    		final String rewardAmount = parser.hasNext(1) ? parser.nextString() : "1";
    
    		com.everythingrs.vote.Vote.service.execute(new Runnable() {
    			@Override
    			public void run() {
    				try {
    					com.everythingrs.vote.Vote[] reward = com.everythingrs.vote.Vote.reward("secret_key", playerName, id, rewardAmount);
    					if (reward[0].message != null) {
    						player.send(new SendMessage(reward[0].message));
    						return;
    					}
    					player.getInventory().add(new Item(reward[0].reward_id, reward[0].give_amount));
    					player.send(new SendMessage("Thank you for voting! You now have " + reward[0].vote_points + " vote points."));
    				} catch (Exception e) {
    					player.send(new SendMessage("Api Services are currently offline. Please check back shortly"));
    					e.printStackTrace();
    				}
    			}
    
    		});
    		return true;


    For Ruse

    Spoiler for Ruse:


    In CommandPacketListener.java

    under

    Code:
    private static void playerCommands(final Player player, String[] command, String wholeCommand)  {
    Add

    Code for Ruse


    Code:
    		
    		if (command[0].startsWith("reward")) {
    			if (command.length == 1) {
    				player.getPacketSender().sendMessage("Please use [::reward id], [::reward id amount], or [::reward id all].");
    				return;
    			}
    			final String playerName = player.getUsername();
    			final String id = command[1];
    			final String amount = command.length == 3 ? command[2] : "1";
    
    			com.everythingrs.vote.Vote.service.execute(new Runnable() {
    				@Override
    				public void run() {
    					try {
    						com.everythingrs.vote.Vote[] reward = com.everythingrs.vote.Vote.reward("secret_key",
    								playerName, id, amount);
    						if (reward[0].message != null) {
    							player.getPacketSender().sendMessage(reward[0].message);
    							return;
    						}
    						player.getInventory().add(reward[0].reward_id, reward[0].give_amount);
    						player.getPacketSender().sendMessage("Thank you for voting! You now have " + reward[0].vote_points + " vote points.");
    					} catch (Exception e) {
    						player.getPacketSender().sendMessage("Api Services are currently offline. Please check back shortly");
    						e.printStackTrace();
    					}
    				}
    
    			});
    		}


    For Matrix

    Spoiler for Matrix:
    Code:
            case "reward":
                final String playerName = player.getUsername();
                final String id = cmd[1];
                final String rewardAmount = "1";
                com.everythingrs.vote.Vote.service.execute(new Runnable() {
                    @Override
                    public void run() {
                        try {
                            com.everythingrs.vote.Vote[] reward = com.everythingrs.vote.Vote.reward(
                                    "secret_key", playerName,
                                    id, rewardAmount);
                            if (reward[0].message != null) {
                                player.getPackets().sendGameMessage(reward[0].message);
                                return;
                            }
                            player.getInventory().addItem(new Item(reward[0].reward_id, reward[0].give_amount));
                            player.getPackets().sendGameMessage("Thank you for your support in voting! You have "
                                    + reward[0].vote_points + " vote points left.");
                            player.getCompCapeManager().increaseRequirement(Requirement.VOTES, 1);
                            player.setVoteTokens(player.getVoteTokens() + 1);
                        } catch (Exception e) {
    
                            player.getPackets().sendGameMessage("Voting services are currently offline, please check back shortly.");
                            e.printStackTrace();
                        }
                    }
    
                });
                return true;


    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 auto vote onto your server. Continue if you want to learn how to add and remove items, and adding support for several toplists.


    Adding and removing items

    • Adding and removing items is incredibly simple. Go to you voting dashboard at https://everythingrs.com/account/vote/manage
    • Once there go to the "Add new reward" section, and you can proceed to enter the reward information (item id, item name, item points, item amount)
    • To remove a reward just press the red "x" button
    • The voting script goes by a point system. So for each vote on a toplist your players will get a certain amount of points which is set by you.
    • To claim an item and use your points type ::reward x in-game






    Adding several toplists

    When registering onto a new toplist and asked for an optional callback use this exactly how it is.

    Code:
    https://callback.everythingrs.com/process.php?i=
    • Once you enter the callback, go onto EverythingRS and in your AutoVote place your toplist id
    • If you want to only show toplists that you are registered on, check the "Do not display listings as "unregistered" if I have decided not to add it"


    Reply With Quote  
     


  2. #2 EverythingRS Auto Donation Installation [ANY BASE] 
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    4,017
    Thanks given
    1,499
    Thanks received
    1,967
    Rep Power
    4898
    EverythingRS - Free Donation Installation

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

    Support Discord

    If you need more help or for some reason cannot understand the tutorial. You can post a comment on this thread or reach us at our support Discord.

    https://discord.gg/rGN8zCV

    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 the next step is to 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


    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 here
    • 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 here
    • 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 here
    • 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.
    Reply With Quote  
     


  3. #3 EverythingRS Hiscores Installation [ANY BASE] 
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    4,017
    Thanks given
    1,499
    Thanks received
    1,967
    Rep Power
    4898
    EverythingRS - Free Hiscores Installation

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

    Support Discord

    If you need more help or for some reason cannot understand the tutorial. You can post a comment on this thread or reach us at our support Discord.

    https://discord.gg/rGN8zCV

    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 Hiscores subdomain!

    • Go to your main panel at https://everythingrs.com/account . You should now see your voting 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


    Spoiler for (optional) embed onto your website:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
        <title>Hiscores</title>
        <style type="text/css">
            body,
            html {
                margin: 0;
                padding: 0;
                height: 100%;
                overflow: hidden;
            }
            
            #content {
                position: absolute;
                left: 0;
                right: 0;
                bottom: 0;
                top: 0px;
            }
        </style>
    </head>
    
    <body>
        <div id="content">
            <iframe width="100%" height="100%" frameborder="0" src="https://yoursubdomain.everythingrs.com/services/hiscores/" />
        </div>
    </body>
    
    </html>


    Making the Hiscores 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 Client.java under

    Code:
    public void destruct() {
    Add this

    Code:
    boolean debugMessage = false;
    com.everythingrs.hiscores.Hiscores.update("secret_key",  "Normal Mode", this.playerName, this.playerRights, this.playerXP, debugMessage);
    Be sure to change "secret_key" to the secret key on your ERS account.

    Fin

    You now have a working Hiscores on your server! If you have any suggestions or need help please leave a comment.

    Lets take a look at your new Hiscores





    Hiscores Dashboard

    You can remove members and add new modes from your Hiscores Dashboard

    Reply With Quote  
     


  4. #4 EverythingRS Heatmaps Realtime [OSRS] 
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    4,017
    Thanks given
    1,499
    Thanks received
    1,967
    Rep Power
    4898
    EverythingRS - Realtime Heatmaps Tutorial

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

    Support Discord

    If you need more help or for some reason cannot understand the tutorial. You can post a comment on this thread or reach us at our support Discord.

    https://discord.gg/rGN8zCV

    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 & 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.

    Spoiler for For PI:

    In your server startup (Server.java) under

    Code:
    public static void main(
    Add this and change your secret key to the one on your account

    Code:
    		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);


    Spoiler for For Ruse:

    In GameServer.java under

    Code:
    public static void main(
    Add

    Code:
    		com.everythingrs.service.Service.scheduledService.scheduleAtFixedRate(new Runnable() {
    			@Override
    			public void run() {
    				com.everythingrs.heatmaps.Heatmap.getMap().clear();
    				for (Player player : World.getPlayers()) {
    					if (player != null) {
    						com.everythingrs.heatmaps.Heatmap.getMap().put(player.getUsername(),
    								new com.everythingrs.heatmaps.Heatmap(player.getUsername(), player.getPosition().getX(),
    										player.getPosition().getY(), player.getPosition().getZ()));
    					}
    				}
    				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

    Reply With Quote  
     


  5. #5 EverythingRS Players Online [ANY BASE] 
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    4,017
    Thanks given
    1,499
    Thanks received
    1,967
    Rep Power
    4898
    EverythingRS - Players Online Tutorial

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

    Support Discord

    If you need more help or for some reason cannot understand the tutorial. You can post a comment on this thread or reach us at our support Discord.

    https://discord.gg/rGN8zCV

    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

    Code:
    public static void main(
    Add this and change your secret key to the one on your account

    Code:
    			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.

    Code:
    <?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

    Code:
    com.everythingrs.playersonline.PlayersOnline.get();
    To set the count to whatever you wish use this code

    Code:
    com.everythingrs.playersonline.PlayersOnline.set(value);
    To add to the playercount use this

    Code:
    com.everythingrs.playersonline.PlayersOnline.increment(value);
    To subtract from the playercount use this

    Code:
    com.everythingrs.playersonline.PlayersOnline.decrement(value);

    Support - Below are some snippets on how to convert the code to other bases


    Converting to Ruse

    Quote Originally Posted by Prestigious View Post
    For Ruse all you have to do is change
    Code:
    PlayerHandler.Players
    to
    Code:
    World.getPlayers()
    Reply With Quote  
     


  6. #6 EverythingRS Market / Trade API [ANY BASE] 
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    4,017
    Thanks given
    1,499
    Thanks received
    1,967
    Rep Power
    4898
    EverythingRS - Free Market/Trade API Installation

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

    Support Discord

    If you need more help or for some reason cannot understand the tutorial. You can post a comment on this thread or reach us at our support Discord.

    https://discord.gg/rGN8zCV

    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


    Spoiler for (optional) embed onto your website:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
        <title>Market</title>
        <style type="text/css">
            body,
            html {
                margin: 0;
                padding: 0;
                height: 100%;
                overflow: hidden;
            }
            
            #content {
                position: absolute;
                left: 0;
                right: 0;
                bottom: 0;
                top: 0px;
            }
        </style>
    </head>
    
    <body>
        <div id="content">
            <iframe width="100%" height="100%" frameborder="0" src="https://yoursubdomain.everythingrs.com/services/market/" />
        </div>
    </body>
    
    </html>










    Making the Market/Trade api work with your server

    This part is for PI and Ruse 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.

    Spoiler for For PI:

    In TradeAndDuel.java under

    Code:
     public void giveItems() {
    Look for

    Code:
    for (GameItem item : o.getTradeAndDuel().offeredItems) {
    Above that put this and remember to also edit the secret_key to your API secret key.

    Code:
                    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");



    Spoiler for For Ruse:

    Quote Originally Posted by Altar View Post
    For those needing help with Ruse based server:


    Go to Trading.java
    Code:
    public void giveItems() {
    Look for
    Code:
    			for (Item item : player.getTrading().offeredItems) {
    				PlayerLogs.log(player.getUsername(), "Gave item in trade to "+player2.getUsername()+". Id: "+item.getId()+", amount: "+item.getAmount());
    			}
    			for (Item item : player2.getTrading().offeredItems) {
    				PlayerLogs.log(player.getUsername(), "Receiving item from trade with "+player2.getUsername()+" Id: "+item.getId()+", amount: "+item.getAmount());
    			}
    Add this underneath it
    Code:
                com.everythingrs.marketplace.Trade trade = new com.everythingrs.marketplace.Trade();
        	trade.setUsername(player2.getUsername());
        	trade.setTradeWith(player.getUsername());
        	for (Item item : player2.getTrading().offeredItems) {
        		if (item.getId() > 0) {
        			String itemName = ItemDefinition.getDefinitions()[item.getId()].getName();
        			trade.push(new com.everythingrs.marketplace.Item(item.getId(), item.getAmount(), itemName));
        		}
        	}
        	trade.update("your_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.
    Reply With Quote  
     

  7. Thankful users:


  8. #7 EverythingRS Commands Installation [ANY BASE] 
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    4,017
    Thanks given
    1,499
    Thanks received
    1,967
    Rep Power
    4898
    EverythingRS - Commands Installation

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

    Support Discord

    If you need more help or for some reason cannot understand the tutorial. You can post a comment on this thread or reach us at our support Discord.

    https://discord.gg/rGN8zCV

    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.


    Spoiler for For PI:


    • Add the code below into Commands.java and you're all done!


    Code:
    			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();
    			}




    Spoiler for For Ruse:


    In CommandPacketListener

    under

    Code:
    public static void playerCommands(
    Add

    Code:
    			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
    Reply With Quote  
     

  9. Thankful users:


  10. #8 EverythingRS Automated Backups with optional Dropbox integration [ANY BASE] 
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    4,017
    Thanks given
    1,499
    Thanks received
    1,967
    Rep Power
    4898
    EverythingRS - Automated Backups with optional Dropbox Integration


    EverythingRS is a free API system. Here's a quick tutorial on how to get started with adding automated backups to your server.

    Getting started

    • First off download our everythingrs-api.jar from here and include it into your project.


    Adding automated backups to your server

    Once the .jar is included in your project all you have to do is add this code to your server startup. On PI it is in Server.java, look for

    Code:
    public class main(String args[]) {
    and under it add

    Code:
                    com.everythingrs.backup.EverythingRSBackups backups = new com.everythingrs.backup.EverythingRSBackups();
    		backups.setSource("C:\\Users\\YourName\\Desktop\\server");
    		backups.setOutput("C:\\Users\\YourName\\Desktop\\server\\backups");
    		//Every minute = 60
    		//Every hour = 60 * 60
    		//Every day  = 60 * 60 * 24
    		//Default backups every 3 hours
    		backups.setTime(60 * 60 * 3);
    		backups.setMaxBackups(20);
    		//backups.enableDropbox("auth_key");
    		backups.init();
    • Change the file location of backups.setSource to the folder you are trying to backup.
    • Change the file location of backups.setOutput to the folder you want your backups to be placed in. It is recommended that you create a empty folder for your backups as it will make the backups finish faster.
    • This can be used to backup anything . Server, Saved Games, Configs, etc.


    Fin

    You now have a backup system on your server, follow the next steps if you also want to add Dropbox integration to automatically upload your backups to Dropbox.

    Integrating the Backup system with Dropbox

    First you need to create a Dropbox account, if you don't already have one you can create one here.

    After creating a Dropbox account go to https://www.dropbox.com/developers/apps. Click on "Create app"



    Choose these settings, also name your app (it has to be a unique name, if you try putting something simple it might be taken already)



    The next step is to generate an access token. This token will give your server access to your Dropbox. Click "generate access token" and then copy the token.



    Paste that token into the "enableDropbox" code and also uncomment the code so it should look something like this after you're finished. (But with your access token)

    Code:
    backups.enableDropbox("0tlOkHrjmIAAAAAAAAAAJOuMwmGhDae9oqrpy0F4lum-KcLpttiMYD6ZaeHvmJyG");

    Done

    And you're done with the Dropbox integration. , after the backup is made, it will automatically upload it to your Dropbox account. By default the folder will backup every 3 hours & on server launch, the 3 hours can easily be changed to anything by editing

    Code:
    backups.setTime(60 * 60 * 3);
    By default the max backup is set to 20, this is so if you're not just backing up smaller things like saves, but bigger servers that are 100MB, you don't shrink your hard drive space by having 1,000 backups. The way it works is, once you reach 20 backups, it will start deleting the oldest backup, this way you always have recent backups.

    You can increase and decrease maxbackups by editing this code

    Code:
    backups.setMaxBackups(20);
    Reply With Quote  
     

  11. Thankful user:


  12. #9  
    Registered Member
    Join Date
    May 2017
    Posts
    145
    Thanks given
    57
    Thanks received
    47
    Rep Power
    31
    Finally!

    Thank you for the release
    Reply With Quote  
     

  13. Thankful user:


  14. #10  
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    4,017
    Thanks given
    1,499
    Thanks received
    1,967
    Rep Power
    4898
    Quote Originally Posted by _Jason View Post
    Finally!

    Thank you for the release
    Ofc if you need help setting it up let me know
    Reply With Quote  
     

  15. Thankful user:


Page 1 of 123 1231151101 ... LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. MotivoteRS Installation Tutorial [ANY BASE]
    By funkE in forum Tutorials
    Replies: 147
    Last Post: 02-19-2019, 11:40 PM
  2. Replies: 8
    Last Post: 03-05-2018, 11:06 PM
  3. Setup Ruse Vote/Donate/Hiscores
    By NoahLH in forum Buying
    Replies: 6
    Last Post: 04-07-2017, 07:47 PM
  4. Replies: 6
    Last Post: 09-15-2016, 01:24 AM
  5. [PayPal] 718 MySQL [Vote,Donations,Hiscores]
    By King Indigo in forum Buying
    Replies: 8
    Last Post: 04-01-2016, 08:49 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
  •