Thread: EverythingRS Commands Installation [ANY BASE]

Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 37
  1. #21  
    I need some more coffee

    Jason's Avatar
    Join Date
    Aug 2009
    Age
    26
    Posts
    6,108
    Thanks given
    2,395
    Thanks received
    2,812
    Rep Power
    4491
    Is the result of Search#searches instant? Does it block? Are the results generated during runtime on start up once?

    It looks like you make a HTTP POST request on the game thread using HttpUrlConnection, definitely not a great idea. All I have to do is hop on a game with support for this, or any of your systems, and spam a couple commands to interrupt the entire game. Your searches function will block the game thread.
    Reply With Quote  
     

  2. #22  
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    3,967
    Thanks given
    1,496
    Thanks received
    1,946
    Rep Power
    4878
    Quote Originally Posted by Jason View Post
    Is the result of Search#searches instant? Does it block? Are the results generated during runtime on start up once?

    It looks like you make a HTTP POST request on the game thread using HttpUrlConnection, definitely not a great idea. All I have to do is hop on a game with support for this, or any of your systems, and spam a couple commands to interrupt the entire game. Your searches function will block the game thread.
    We use Redis rate limiting, so you can't spam requests and expect to get back anything other than a 200 OK status code with an empty JSON. As for the thread, this API was the only one that wasn't running on a separate thread. That's been fixed now, thanks.
    • [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  
     

  3. Thankful user:


  4. #23  
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    3,967
    Thanks given
    1,496
    Thanks received
    1,946
    Rep Power
    4878
    Need feedback!
    • [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  
     

  5. #24  
    Wut can u say when theres nothin to tell

    Tyrant's Avatar
    Join Date
    Jul 2013
    Age
    20
    Posts
    1,528
    Thanks given
    641
    Thanks received
    385
    Rep Power
    950
    I personally don't like the habit of doing
    Code:
     new Thread(() -> ...)
    but maybe, rather, since you quite often create a thread (assuming multiple people call that command), have an executor (which you probably have. a worker service) that will do these operations
    synchronously. also, ya should only use
    Code:
    synchronize(c)
    when required and not for the whole method.


    All honestly tho, I feel like this is unnecessary. Why'd you wanna grab the data every time from the database than just storing them somewhere?
    Will be much more efficient!




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

  6. #25  
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    3,967
    Thanks given
    1,496
    Thanks received
    1,946
    Rep Power
    4878
    Quote Originally Posted by Tyrant View Post
    I personally don't like the habit of doing
    Code:
     new Thread(() -> ...)
    but maybe, rather, since you quite often create a thread (assuming multiple people call that command), have an executor (which you probably have. a worker service) that will do these operations
    synchronously. also, ya should only use
    Code:
    synchronize(c)
    when required and not for the whole method.


    All honestly tho, I feel like this is unnecessary. Why'd you wanna grab the data every time from the database than just storing them somewhere?
    Will be much more efficient!
    Already being done on the new APIs, will be updating this soon!

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

    I like the idea of storing it through memory instead of making calls to the server, thank you
    • [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  
     

  7. Thankful user:


  8. #26  
    Registered Member
    Join Date
    Sep 2017
    Posts
    63
    Thanks given
    22
    Thanks received
    0
    Rep Power
    10
    getting the services are unavialible ingame and it throws this error in the console

    i added the api to the lib folder what am i doing wrong?

    Code:
    java.lang.ArrayIndexOutOfBoundsException: 1
    	at com.ruseps.net.packet.impl.CommandPacketListener$1.run(CommandPacketListener.java:1238)

    using RageFire source / client
    Reply With Quote  
     

  9. #27  
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    3,967
    Thanks given
    1,496
    Thanks received
    1,946
    Rep Power
    4878
    Bump!
    • [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  
     

  10. #28  
    Registered Member
    Join Date
    Mar 2013
    Posts
    293
    Thanks given
    224
    Thanks received
    49
    Discord
    T!K!O]MrGodSlayer#5656
    Rep Power
    49
    code for Valius base
    Reply With Quote  
     

  11. #29  
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    3,967
    Thanks given
    1,496
    Thanks received
    1,946
    Rep Power
    4878
    Bump!
    • [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  
     

  12. #30  
    Rune-Server Affiliate
    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    3,967
    Thanks given
    1,496
    Thanks received
    1,946
    Rep Power
    4878
    Bump!
    • [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  
     

Page 3 of 4 FirstFirst 1234 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. Replies: 376
    Last Post: Yesterday, 09:13 PM
  2. EverythingRS Hiscores Installation [ANY BASE]
    By Genesis in forum Tutorials
    Replies: 224
    Last Post: 02-18-2020, 10:03 PM
  3. EverythingRS Voting Installation [ANY BASE]
    By Genesis in forum Tutorials
    Replies: 345
    Last Post: 02-12-2020, 10:56 PM
  4. [PI/Any base]Clean command system
    By Haskell Curry in forum Tutorials
    Replies: 21
    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
  •