Thread: 718 showing object clicked

Results 1 to 2 of 2
  1. #1 718 showing object clicked 
    WebDeveloper
    Charlie''s Avatar
    Join Date
    Sep 2011
    Age
    27
    Posts
    577
    Thanks given
    37
    Thanks received
    27
    Rep Power
    10
    So basicly I want to know how to make it show what object I clicked via the CMD prompt or in the chat box like it does when I click an interface (ex. InterfaceId 506, componentId 4, blah blah)<--(shows that in my chatbox)

    But yeah would like it to show like "Clicked object #### at coords, #### ##### #" or just "Clicked object ####"

    Thanks guys!

    Reply With Quote  
     

  2. #2  
    Registered Member
    Sirloin's Avatar
    Join Date
    Feb 2012
    Age
    27
    Posts
    782
    Thanks given
    186
    Thanks received
    175
    Rep Power
    105
    Locate your ObjectHandler.java and find this:
    Code:
    public static void handleOption(final Player player, InputStream stream, int option) {
    And under that, add something like this...
    Code:
    player.getPackets().sendGameMessage(player.getDisplayName() + " clicked object id " + object.getId() + " at " + object.getX() + ", " + object.getY());
    You can also send the message in the console like this...
    Code:
    System.out.println(player.getDisplayName() + " clicked object id " + object.getId() + " at " + object.getX() + ", " + object.getY());
    If you're using the in-game message, you might want to make it check if the player is an administrator.
    Reply With Quote  
     

  3. Thankful user:



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: 2
    Last Post: 03-16-2013, 01:55 AM
  2. Replies: 0
    Last Post: 08-20-2009, 08:54 AM
  3. [474] Object Click 1
    By Encouragin in forum Tutorials
    Replies: 5
    Last Post: 02-24-2009, 06:39 PM
  4. Object click one??
    By Profile in forum Tutorials
    Replies: 8
    Last Post: 07-10-2008, 08:25 AM
  5. object click one handler
    By hoodlom in forum Tutorials
    Replies: 17
    Last Post: 04-25-2008, 07:37 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
  •