Thread: Timed Pop-Ups on Your Server

Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31
  1. #1 Timed Pop-Ups on Your Server 
    Member #35, most veteran member left? :D


    Join Date
    Jul 2006
    Age
    27
    Posts
    2,663
    Thanks given
    53
    Thanks received
    331
    Rep Power
    925
    This is something random I made to warn people on my server to relog every once and a while to save their stats. I think it might be useful to you guys as well. Please post your comments here. Rep is appreciated if you use this!

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

    First off, declare this int with the rest of them in your client.java:
    Code:
    public int popTimer = 1000;
    *Note: Divide the number in the above piece of code by 2 to get the amount of seconds it will take for the pop-up to pop up! You can change the number to anything.

    Add this with your other menus, which is pretty much with all of your other public voids.
    Code:
    public void popUp()
    {
    	sendQuest("@[email protected] Pop-Up!", 8144);  //Title
    	clearQuestInterface();
    	sendQuest("@[email protected] is a Pop-Up!", 8145);
    	sendQuest("@[email protected], everyone! This is a server [email protected]@", 8147);
    	sendQuest("@[email protected] can change the text to whatever you want. [email protected]@", 8148);
    	sendQuest("@[email protected] is is just making a menu. Use one of the [email protected]@", 8149);
    	sendQuest("@[email protected] tutorials you can find if you don't know [email protected]@", 8150);
    	showInterface(8134);
    	flushOutStream();
    }
    *Note: The above is a menu. If you don't know how to edit/make one, please use one of the menu making tutorials you can find around here.

    Then, add this entire thing in your public boolean process():
    Code:
    popTimer -= 1;
    	if (popTimer <= 0)
    	{
    		popUp();
    		popTimer = 1000; //Change this to what the int that you declared is.
    		System.out.println("Pop up sent successfully to players!");
    	}
    *Note: In the above code, make sure to change the number in popTimer = 1000; to what the number is in the first piece of code (the declared int popTimer).

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

    There you go! You've now successfully added a server pop-up! Please post any errors you get here, or just comments! Remember, like I said before, help is always appreciated! Don't be a leecher! Have fun!
    [Only registered and activated users can see links. ]

    `Ex-global moderator x3 (resigned)
     

  2. #2  
    Member
    Boomer's Avatar
    Join Date
    Sep 2006
    Posts
    1,282
    Thanks given
    309
    Thanks received
    795
    Rep Power
    1111
    "Pop up sent successfully to players!" - That is going to appear for players individually


    [Only registered and activated users can see links. ] ||| FightScape | InnerFantasy | PkIsle | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ]
     

  3. #3  
    x19
    Guest
    Great work runeite... I love it

    Ell390
     

  4. #4  
    GUI_Jay17
    Guest
    Quote Originally Posted by Boomer View Post
    "Pop up sent successfully to players!" - That is going to appear for players individually
    Yeah, use a for loop
     

  5. #5  
    Member #35, most veteran member left? :D


    Join Date
    Jul 2006
    Age
    27
    Posts
    2,663
    Thanks given
    53
    Thanks received
    331
    Rep Power
    925
    You guys aren't reading it... It's sent to the CMD for your server. That's why it says this:
    Code:
    System.out.println("...");
    INSTEAD OF:
    Code:
    sendMessage("...");
    I'm glad you like it, by the way

    - Next time, please read the code better lol.
    [Only registered and activated users can see links. ]

    `Ex-global moderator x3 (resigned)
     

  6. #6  
    Member Market Banned Market Banned

    xasterisk's Avatar
    Join Date
    Dec 2006
    Posts
    2,477
    Thanks given
    2,573
    Thanks received
    3,042
    Rep Power
    5000
    Quote Originally Posted by I AM BYRON HEAR ME ROAR View Post
    wow great way to make servers more annoying then they already are....now little kids are gonna be putting **** ads and **** on their server
    dont flame in every damn post you make.

    [Only registered and activated users can see links. ]
     

  7. #7  
    ZeroFreeze
    Guest
    popTimer -= 1;
    Easier:
    popTimer--;
     

  8. #8  
    FullMetal Alchemist
    Guest
    Awesome code Runite
     

  9. #9  
    GUI_Jay17
    Guest
    Quote Originally Posted by Runite View Post
    You guys aren't reading it... It's sent to the CMD for your server. That's why it says this:
    Code:
    System.out.println("...");
    INSTEAD OF:
    Code:
    sendMessage("...");
    I'm glad you like it, by the way

    - Next time, please read the code better lol.
    Yes but what he was saying is that it said "Pop up sent successfully to players!". He was just saying that it doesn't send it to all the players at the same time.

    EDIT: Never mind, my bad
     

  10. #10  
    Member #35, most veteran member left? :D


    Join Date
    Jul 2006
    Age
    27
    Posts
    2,663
    Thanks given
    53
    Thanks received
    331
    Rep Power
    925
    Lol, yes Jkz, but thanks everyone! I'm glad you like the code!

    Oh, and Byron; I remember you I think/Thanks for your input lol.
    [Only registered and activated users can see links. ]

    `Ex-global moderator x3 (resigned)
     

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)


User Tag List

Similar Threads

  1. [REP++] Timed Messages ffs -.-
    By C4llum in forum Help
    Replies: 1
    Last Post: 10-17-2010, 11:07 PM
  2. Timed Server Announcements [EVENTS]
    By Flux in forum Tutorials
    Replies: 17
    Last Post: 07-11-2010, 02:25 PM
  3. Timed silences
    By Zahhak in forum Suggestions
    Replies: 13
    Last Post: 05-24-2010, 09:07 PM
  4. Emulous - Timed Out
    By philby93 in forum Help
    Replies: 6
    Last Post: 01-11-2010, 10:18 AM
  5. Conneciton Timed out? [525]
    By Kduffy45 in forum Help
    Replies: 2
    Last Post: 07-24-2009, 07:51 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
  •