Thread: Advertisement Message

Results 1 to 6 of 6
  1. #1 Advertisement Message 
    Banned
    Join Date
    Jul 2006
    Age
    33
    Posts
    281
    Thanks given
    2
    Thanks received
    2
    Rep Power
    0
    Purpose: To add in a Advertisement Message

    (Yes i know Gander posted one on Runesoft, But i see that one is gone, And so now i thought i would post a new one.)

    Step 1:
    Search for this in client.java:

    Code:
    public class client extends Player implements Runnable {
    Step 2:
    Underneath that, add this:

    Code:
    public void advertise(){ //This is the advertising method
    if (misc.random(1500) == 1){ //Edit the (1500) to change the time of the message
    PlayerHandler.messageToAll = ("PUT YOUR MESSAGE HERE");  //This yells the message out
    }
    }
    Step 3:
    Search for:

    Code:
    public boolean process()
    Or

    Code:
    public void process()
    Step 4:
    Underneath that add this:

    Code:
    advertise(); //This calls the advertising method
    And your done.
     

  2. #2  
    lol i own u f00l
    Guest
    HI MR DUNE







    PUSSY!
     

  3. #3  
    Member Advertisement Message Market Banned

    Zee Best's Avatar
    Join Date
    Feb 2007
    Age
    32
    Posts
    3,036
    Thanks given
    24
    Thanks received
    210
    Rep Power
    1171
    You can do it a more simple way with a better outcome

    Code:
    public void advertise(){ //This is the advertising method
    if (misc.random(1500) == 1){ //Edit the (1500) to change the time of the message
    PlayerHandler.messageToAll = ("PUT YOUR MESSAGE HERE");  //This yells the message out
    }
    }
    to

    Code:
    public void advertise(){ //This is the advertising method
    if (actionTimer <= 0) {
    actionTimer = 100;{ //Edit the (1500) to change the time of the message
    PlayerHandler.messageToAll = ("PUT YOUR MESSAGE HERE");  //This yells the message out
    }
    }
    }
    But a better way is to do your way but use more than one thing

    Like

    Code:
    public void advertise(){ //This is the advertising method
    if (actionTimer <= 0) {
    if (misc.random(2) == 1){ //Edit the (1500) to change the time of the message
    PlayerHandler.messageToAll = ("FIRST MESSAGE");  //This yells the message out
    } else {
    if (misc.random(2) == 2){
    actionTimer = 100;
    PlayerHandler.messageToAll = ("SECOND MESSAGE");
    }
    }
    }
    Also there is a better place to put it than boolean process because process will lag it, but ill let you figure that out

    Nice tut anywayz


     

  4. #4  
    Banned
    Join Date
    Jul 2006
    Age
    33
    Posts
    281
    Thanks given
    2
    Thanks received
    2
    Rep Power
    0
    Also there is a better place to put it than boolean process because process will lag it, but ill let you figure that out

    Nice tut anywayz
    I know you can add it to another method if you wanted to, so the method only gets called once.

    Although i was teaching people how to make a method, and call it at the same time.

    And i like my way better, because its a random.
     

  5. #5  
    Community Veteran


    Join Date
    Jul 2006
    Posts
    789
    Thanks given
    31
    Thanks received
    80
    Rep Power
    177
    Quote Originally Posted by zee_best View Post
    You can do it a more simple way with a better outcome

    Code:
    public void advertise(){ //This is the advertising method
    if (misc.random(1500) == 1){ //Edit the (1500) to change the time of the message
    PlayerHandler.messageToAll = ("PUT YOUR MESSAGE HERE");  //This yells the message out
    }
    }
    to

    Code:
    public void advertise(){ //This is the advertising method
    if (actionTimer <= 0) {
    actionTimer = 100;{ //Edit the (1500) to change the time of the message
    PlayerHandler.messageToAll = ("PUT YOUR MESSAGE HERE");  //This yells the message out
    }
    }
    }
    But a better way is to do your way but use more than one thing

    Like

    Code:
    public void advertise(){ //This is the advertising method
    if (actionTimer <= 0) {
    if (misc.random(2) == 1){ //Edit the (1500) to change the time of the message
    PlayerHandler.messageToAll = ("FIRST MESSAGE");  //This yells the message out
    } else {
    if (misc.random(2) == 2){
    actionTimer = 100;
    PlayerHandler.messageToAll = ("SECOND MESSAGE");
    }
    }
    }
    Also there is a better place to put it than boolean process because process will lag it, but ill let you figure that out

    Nice tut anywayz
    His way is random which makes it better.
     

  6. #6  
    Member Advertisement Message Market Banned

    Zee Best's Avatar
    Join Date
    Feb 2007
    Age
    32
    Posts
    3,036
    Thanks given
    24
    Thanks received
    210
    Rep Power
    1171
    Quote Originally Posted by Stone Warior View Post
    His way is random which makes it better.
    But my one chooses one of the announcements and sends it at a fixed time but random annouce =)


     


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. Advertisement
    By Nathan in forum Forum Related Help
    Replies: 4
    Last Post: 06-03-2009, 09:43 PM
  2. Advertisement
    By Nathan in forum Complaints
    Replies: 6
    Last Post: 05-19-2009, 09:23 PM
  3. Advertisement
    By Numbers in forum Announcements
    Replies: 18
    Last Post: 11-15-2008, 08:10 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •