Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 22

Thread: iKevin's Script

  1. #1
    Veteran KevinBlue's Avatar
    Join Date
    Dec 2014
    Location
    Australia
    Posts
    335

    iKevin's Script

    PHP Code:
    // Coded by KevinBlue

    function fridge () { 
      
    banana;
      
    grape;
      
    beef;
      
    murderer;
      
    apple;
    }

    //iKevin's Script
      
    function onCreated () {
        
    player.chat = ("Crunchy, Munchy for my Lunchy!!");
        
    sleep (3);
        
    player.chat = ("I'd eat the banana");
        
    sleep (1);
        
    player.chat = ("Then the grape!");
        
    sleep (1);
        
    player.chat = ("Then the beef and...");
        
    sleep(1);
        
    player.chat = ("Ah... a murderer run!!");
        
    sleep (7);
        
    player.chat = ("Lucky last the, apple! Hurray!");

    Last edited by KevinBlue; 03-10-2015 at 06:57 AM.
    My Levels Thread


  2. #2
    Street Boss John's Avatar
    Join Date
    Jun 2013
    Location
    Lebanon
    Posts
    825
    Nice code, also you may only have only one "onCreated()" function, not 6 :P

    You need PHP tags not QUOTE so they get colorful.
    -Johnaudi

  3. #3
    Big Cheese Captain
    Join Date
    Jun 2013
    Posts
    1,029
    Fixing up your script a bit:

    1. In the function fridge () { you need semi colons on each item.

    2. The RC would return an error, something like "function onCreated () { redefined on line 11". Look at what John said

    3. When making comments, use "//"

    4. Would be nice if you used the sleep (); function. Just imagine the sleep function as a waiting time. It waits whatever number of seconds before moving on with the script.

    PHP Code:
    // Coded by KevinBlue
    // Corrected by iMask
    function fridge () { 
      
    banana;
      
    grape;
      
    beef;
      
    murderer;
      
    apple;
    }

    //iKevin's Script
      
    function onCreated () {
        echo (
    "Crunchy, Munchy for my Lunchy!!");
        
    sleep (3);
        echo (
    "I'd eat the banana");
        
    sleep (1);
        echo (
    "Then the grape!");
        
    sleep (1);
        echo(
    "Then the beef and...");
        
    sleep(1);
        echo(
    "Ah... a murderer run!!");
        
    sleep (7);
        echo (
    "Lucky last the, apple! Hurray!");

    iEra Developer / SFX Admin

    Need help? Contact me:
    Email: [email protected]

  4. #4
    Veteran KevinBlue's Avatar
    Join Date
    Dec 2014
    Location
    Australia
    Posts
    335
    Ok I get it?

    - - - Updated - - -

    I am so confused?

    - - - Updated - - -

    Quote Originally Posted by John View Post
    Nice code, also you may only have only one "onCreated()" function, not 6 :P

    You need PHP tags not QUOTE so they get colorful.
    Oh!

    - - - Updated - - -

    // Coded by KevinBlue
    function fridge () {
    banana;
    grape;
    beef;
    murderer;
    apple;

    }

    function onCreated () {
    echo ("Crunchy, Munchy for my Lunchy!!");
    sleep (3);
    echo ("I'd eat the banana");
    sleep (1);
    echo ("Then the grape!");
    sleep (1);
    echo("Then the beef and...");
    sleep(1);
    echo("Ah... a murderer run!!");
    sleep (7);
    echo ("Lucky last the, apple! Hurray!");
    }

    WTF!
    My Levels Thread


  5. #5
    Player Relations Toshihiro Kijima's Avatar
    Join Date
    Jul 2013
    Location
    Japan
    Posts
    1,132
    What happened?

  6. #6
    Veteran KevinBlue's Avatar
    Join Date
    Dec 2014
    Location
    Australia
    Posts
    335
    PHP Code:
    // Coded by KevinBlue
    function fridge () {
    banana;
    grape;
    beef;
    murderer;
    apple;
    }

    //iKevin's Script
    function onCreated () {
    echo ("Crunchy, Munchy for my Lunchy!!");
    sleep (3);
    echo ("I'd eat the banana");
    sleep (1);
    echo ("Then the grape!");
    sleep (1);
    echo("Then the beef and...");
    sleep(1);
    echo("Ah... a murderer run!!");
    sleep (7);
    echo ("Lucky last the, apple! Hurray!");
    }


    Its not working?
    My Levels Thread


  7. #7
    Player Relations Toshihiro Kijima's Avatar
    Join Date
    Jul 2013
    Location
    Japan
    Posts
    1,132
    Put
    PHP Code:
     at the top of your script code and 
    at the end

    - - - Updated - - -

    [/PHP] at the end of your code and [PHP] at the beginning of your code

  8. #8
    Veteran KevinBlue's Avatar
    Join Date
    Dec 2014
    Location
    Australia
    Posts
    335
    It works yay

    PHP Code:
     // Coded by KevinBlue
    function fridge () { 
    banana;
    grape;
    beef;
    murderer;
    apple;
    }

    //iKevin's Script
    function onCreated () {
    echo (
    "Crunchy, Munchy for my Lunchy!!");
    sleep (3);
    echo (
    "I'd eat the banana");
    sleep (1);
    echo (
    "Then the grape!");
    sleep (1);
    echo(
    "Then the beef and...");
    sleep(1);
    echo(
    "Ah... a murderer run!!");
    sleep (7);
    echo (
    "Lucky last the, apple! Hurray!");

    My Levels Thread


  9. #9
    Player Relations Toshihiro Kijima's Avatar
    Join Date
    Jul 2013
    Location
    Japan
    Posts
    1,132
    What does this script code do anyways?

  10. #10
    Veteran KevinBlue's Avatar
    Join Date
    Dec 2014
    Location
    Australia
    Posts
    335
    Well, its kinda for my house!
    My Levels Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •