Thread: EverythingRS Commands Installation [ANY BASE]

Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32
  1. #1 EverythingRS Commands Installation [ANY BASE] 
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    3,807
    Thanks given
    1,483
    Thanks received
    1,932
    Rep Power
    4860
    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 [Only registered and activated users can see links. ] and include it into your project.
    • Also register an account at [Only registered and activated users can see links. ]
    • 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
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]


    1. [Only registered and activated users can see links. ]


    1. [Only registered and activated users can see links. ]
    2. [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Imagine-PS Founder
    Hank's Avatar
    Join Date
    Aug 2010
    Posts
    4,070
    Thanks given
    1,582
    Thanks received
    1,776
    Rep Power
    3132
    Interesting Concept.
    Reply With Quote  
     

  4. Thankful user:


  5. #3  
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    3,807
    Thanks given
    1,483
    Thanks received
    1,932
    Rep Power
    4860
    Quote Originally Posted by Hank View Post
    Interesting Concept.
    Thanks Hank
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]


    1. [Only registered and activated users can see links. ]


    1. [Only registered and activated users can see links. ]
    2. [Only registered and activated users can see links. ]
    Reply With Quote  
     

  6. #4  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    24
    Posts
    4,444
    Thanks given
    892
    Thanks received
    1,524
    Rep Power
    3206
    Thanks man
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. Thankful user:


  8. #5  
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    3,807
    Thanks given
    1,483
    Thanks received
    1,932
    Rep Power
    4860
    Quote Originally Posted by Zivik View Post
    Thanks man
    Np
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]


    1. [Only registered and activated users can see links. ]


    1. [Only registered and activated users can see links. ]
    2. [Only registered and activated users can see links. ]
    Reply With Quote  
     

  9. #6  
    Spread Love
    Dhruv's Avatar
    Join Date
    Feb 2012
    Age
    23
    Posts
    1,011
    Thanks given
    156
    Thanks received
    164
    Rep Power
    215
    Good shit as usual bro
    Reply With Quote  
     

  10. Thankful user:


  11. #7  
    Registered Member
    Join Date
    May 2017
    Posts
    66
    Thanks given
    1
    Thanks received
    3
    Rep Power
    0
    Nice done Elvarg base please :3
    Reply With Quote  
     

  12. Thankful user:


  13. #8  
    Registered Member
    Tommeh's Avatar
    Join Date
    Nov 2015
    Age
    20
    Posts
    1,916
    Thanks given
    300
    Thanks received
    919
    Rep Power
    5000
    good stuff
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  14. Thankful user:


  15. #9  
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    3,807
    Thanks given
    1,483
    Thanks received
    1,932
    Rep Power
    4860
    Quote Originally Posted by mbongo View Post
    Nice done Elvarg base please :3


    In CommandPacketListener.java under

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

    Code:
    if (command.startsWith("sitem") || command.startsWith("snpc") || command.startsWith("ositem") || command.startsWith("osnpc") || command.startsWith("osobject")) {
    			String[] args = command.split(" ");
    			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) {
    						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();
    			}
    		}

    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]
    • [Only registered and activated users can see links. ]


    1. [Only registered and activated users can see links. ]


    1. [Only registered and activated users can see links. ]
    2. [Only registered and activated users can see links. ]
    Reply With Quote  
     

  16. #10  
    RuneSoul Developer
    'Brad's Avatar
    Join Date
    Jun 2008
    Age
    25
    Posts
    576
    Thanks given
    17
    Thanks received
    13
    Rep Power
    0
    Good stuff dude we need more of this on the site!
    Reply With Quote  
     

Page 1 of 4 123 ... LastLast

Thread Information
Users Browsing this Thread

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

Similar Threads

  1. EverythingRS Voting Installation [ANY BASE]
    By Genesis in forum Tutorials
    Replies: 285
    Last Post: Yesterday, 10:28 PM
  2. EverythingRS Hiscores Installation [ANY BASE]
    By Genesis in forum Tutorials
    Replies: 190
    Last Post: 05-21-2019, 08:58 PM
  3. Replies: 317
    Last Post: 05-21-2019, 08:56 PM
  4. [PI/Any base]Clean command system
    By Mr. Pumpkin in forum Tutorials
    Replies: 22
    Last Post: 09-21-2013, 03:45 AM
  5. NPC Autospawn genorator command - any base
    By Wizzy G in forum Snippets
    Replies: 6
    Last Post: 11-01-2010, 12:56 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
  •