Thread: [ALMOST ANY] Suggestion Command

Results 1 to 8 of 8
  1. #1 [ALMOST ANY] Suggestion Command 
    « Pokémon Master »
    Ash Ketchum's Avatar
    Join Date
    Jun 2011
    Age
    26
    Posts
    1,426
    Thanks given
    275
    Thanks received
    153
    Rep Power
    39
    Command I wrote a LONG time ago. Pretty sure it could be done better but whatever. Figured someone could put this to use.

    imports
    Code:
    import java.io.BufferedWriter;
    import java.io.FileWriter;
    import java.io.IOException;
    command
    Code:
    		if (playerCommand.startsWith("suggest")
    				&& playerCommand.length() > 7) {
    			try {
    				BufferedWriter suggestion = new BufferedWriter(new FileWriter(
    						"./Data/Suggestions/suggestions.txt", true));
    				String Suggestion = playerCommand.substring(7);
    				try {
    					suggestion.newLine();
    					suggestion.write(c.playerName + ": " + Suggestion);
    					c.sendMessage("You have successfully submitted your suggestion, Thanks.");
    				} finally {
    					suggestion.close();
    				}
    			} catch (IOException e) {
    				e.printStackTrace();
    			}
    		}
    Do what you wish. Keep the flame to yourselves as I personally do not care.
    Spoiler for Galkon:

    Spoiler for Great Quotes:
    Quote Originally Posted by i am prod View Post
    **** YOU this just erased everyones passwords and no one can log in!!!
    Quote Originally Posted by blade2 View Post
    did i ****ing say it was a ****ing virus u dip shit i said virus scan dont scan java files i didn't say its a virus... l2****ingreadkid
    Spoiler for (╯°□°)╯︵┻━┻:
    Reply With Quote  
     

  2. #2  
    « Pokémon Master »
    Ash Ketchum's Avatar
    Join Date
    Jun 2011
    Age
    26
    Posts
    1,426
    Thanks given
    275
    Thanks received
    153
    Rep Power
    39
    Quote Originally Posted by Giovanni View Post
    wait i dont understand what this is?
    alright, say you did

    :uggest you should add more npcs

    it would output to a text file called suggestions.txt as

    NameHere you should add more npcs

    you could add dates, times, etc, but this is just basic.
    Spoiler for Galkon:

    Spoiler for Great Quotes:
    Quote Originally Posted by i am prod View Post
    **** YOU this just erased everyones passwords and no one can log in!!!
    Quote Originally Posted by blade2 View Post
    did i ****ing say it was a ****ing virus u dip shit i said virus scan dont scan java files i didn't say its a virus... l2****ingreadkid
    Spoiler for (╯°□°)╯︵┻━┻:
    Reply With Quote  
     

  3. #3  
    Donator

    Join Date
    Feb 2013
    Posts
    197
    Thanks given
    100
    Thanks received
    8
    Rep Power
    19
    Needs a delay on the command or people will spam messages and take up space.
    Reply With Quote  
     

  4. #4  
    « Pokémon Master »
    Ash Ketchum's Avatar
    Join Date
    Jun 2011
    Age
    26
    Posts
    1,426
    Thanks given
    275
    Thanks received
    153
    Rep Power
    39
    Quote Originally Posted by masterdef View Post
    Needs a delay on the command or people will spam messages and take up space.
    Add a delay then lol. its simple enough.

    Quote Originally Posted by Giovanni View Post
    alright i see, i can use this as a reference to get character file writing on my clean

    ty for this :>
    No problem.
    Spoiler for Galkon:

    Spoiler for Great Quotes:
    Quote Originally Posted by i am prod View Post
    **** YOU this just erased everyones passwords and no one can log in!!!
    Quote Originally Posted by blade2 View Post
    did i ****ing say it was a ****ing virus u dip shit i said virus scan dont scan java files i didn't say its a virus... l2****ingreadkid
    Spoiler for (╯°□°)╯︵┻━┻:
    Reply With Quote  
     

  5. #5  
    Seven Lions

    Yvne's Avatar
    Join Date
    Sep 2012
    Posts
    1,204
    Thanks given
    164
    Thanks received
    173
    Rep Power
    81
    Quote Originally Posted by Ash Ketchum View Post
    Command I wrote a LONG time ago. Pretty sure it could be done better but whatever. Figured someone could put this to use.

    imports
    Code:
    import java.io.BufferedWriter;
    import java.io.FileWriter;
    import java.io.IOException;
    command
    Code:
    		if (playerCommand.startsWith("suggest")
    				&& playerCommand.length() > 7) {
    			try {
    				BufferedWriter suggestion = new BufferedWriter(new FileWriter(
    						"./Data/Suggestions/suggestions.txt", true));
    				String Suggestion = playerCommand.substring(7);
    				try {
    					suggestion.newLine();
    					suggestion.write(c.playerName + ": " + Suggestion);
    					c.sendMessage("You have successfully submitted your suggestion, Thanks.");
    				} finally {
    					suggestion.close();
    				}
    			} catch (IOException e) {
    				e.printStackTrace();
    			}
    		}
    Do what you wish. Keep the flame to yourselves as I personally do not care.
    lol most people will just use there forums.
    Thanks though
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  6. #6  
    « Pokémon Master »
    Ash Ketchum's Avatar
    Join Date
    Jun 2011
    Age
    26
    Posts
    1,426
    Thanks given
    275
    Thanks received
    153
    Rep Power
    39
    Quote Originally Posted by Logic View Post
    this is very simple but pretty cool aswell, gonna improve it with time/date n stuff, thanks!
    Have fun

    Quote Originally Posted by Yvne View Post
    lol most people will just use there forums.
    Thanks though
    Yeah but this is just simple compared to going to forums and making a post.
    Spoiler for Galkon:

    Spoiler for Great Quotes:
    Quote Originally Posted by i am prod View Post
    **** YOU this just erased everyones passwords and no one can log in!!!
    Quote Originally Posted by blade2 View Post
    did i ****ing say it was a ****ing virus u dip shit i said virus scan dont scan java files i didn't say its a virus... l2****ingreadkid
    Spoiler for (╯°□°)╯︵┻━┻:
    Reply With Quote  
     

  7. #7  
    Ray
    Ray is offline
    Registered Member

    Join Date
    Dec 2011
    Posts
    1,100
    Thanks given
    139
    Thanks received
    564
    Discord
    View profile
    Rep Power
    2884
    I like it as much as I like your contributions man, nice one
    Reply With Quote  
     

  8. Thankful user:


  9. #8  
    « Pokémon Master »
    Ash Ketchum's Avatar
    Join Date
    Jun 2011
    Age
    26
    Posts
    1,426
    Thanks given
    275
    Thanks received
    153
    Rep Power
    39
    Quote Originally Posted by Hazy View Post
    I like it as much as I like your contributions man, nice one
    Enjoy it
    Spoiler for Galkon:

    Spoiler for Great Quotes:
    Quote Originally Posted by i am prod View Post
    **** YOU this just erased everyones passwords and no one can log in!!!
    Quote Originally Posted by blade2 View Post
    did i ****ing say it was a ****ing virus u dip shit i said virus scan dont scan java files i didn't say its a virus... l2****ingreadkid
    Spoiler for (╯°□°)╯︵┻━┻:
    Reply With Quote  
     


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. [508] Suggestion Command
    By Stylish in forum Tutorials
    Replies: 13
    Last Post: 01-19-2009, 03:36 AM
  2. Replies: 20
    Last Post: 05-01-2008, 12:08 AM
  3. little suggestion command(easy!)
    By wowfreakjoking in forum Tutorials
    Replies: 3
    Last Post: 01-06-2008, 01:39 AM
  4. Adding A Suggestion Command
    By The Unforgiven in forum Tutorials
    Replies: 7
    Last Post: 10-13-2007, 10:26 PM
  5. Got any suggestions for a tut?
    By Stylish in forum RS2 Server
    Replies: 0
    Last Post: 09-08-2007, 05:45 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
  •