Page 1 of 5 1 2 3 ... LastLast
Results 1 to 10 of 45

Thread: iMask's Scripts

  1. #1
    Big Cheese Captain
    Join Date
    Jun 2013
    Posts
    1,029

    iMask's Scripts

    Hii, here's a place for me to dump all my scripts.

    Basic event /start script
    PHP Code:
    //Coded by iMask
    function onPlayerChats () {
       if (
    clientr.staff == && this.chat == "/start") {   //checks to see if the player is a staff member and sees if you said /start
          
    for (pl allplayers) {   //for all players excluding staff
             
    pl.x=30;   //x corrdinate 
             
    pl.y=30;   //y coorinate
          
    }
       }

    Last edited by iMask; 01-22-2015 at 09:43 PM.
    iEra Developer / SFX Admin

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

  2. #2
    Era Philosopher MikeyUK's Avatar
    Join Date
    Jul 2013
    Location
    United States
    Posts
    2,733
    Well then. Hope to see more stuff.






    Welp.

    Click the Spoiler to see my fan art!
     Spoiler



    - 2012 iEra Player -
    - 2013 Era-GO Member -
    - iEra Ex-Player Relations -
    - Era-GO Ex-Moderator (Twice) -


  3. #3
    Big Cheese Captain
    Join Date
    Jun 2013
    Posts
    1,029
    Make the NPC move on the x axis
    PHP Code:
    //Coded by iMask
    function onPlayerEnters () {
       for (
    this.n=5;this.n<30;this.n++) { 
          
    this.x=this.n;
          
    sleep (0.1);
          
    this.chat "I am now on "@this.n@" of the x coordinate of this level!";
       }

    I didn't test this code, so I have no idea if this actually works.
    Last edited by iMask; 01-22-2015 at 09:43 PM.
    iEra Developer / SFX Admin

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

  4. #4
    Quote Originally Posted by iMask View Post
    Make the NPC move on thw x axis

    //Coded by iMask
    function onPlayerEnters () {
    for (this.n=5;this.n<30;this.n++) {
    this.x=this.n;
    sleep (0.1);
    this.chat = "I am now on "this.n" of the x coordinate of this level!";
    }
    }

    I didn't test this code, so I have no idea if this actually works.
    It errors with missing semicolon at line 6: this.chat = "I am now on "this.n" of the x coordinate of this level!";

  5. #5
    Big Cheese Captain
    Join Date
    Jun 2013
    Posts
    1,029
    Quote Originally Posted by Greg2013 View Post
    It errors with missing semicolon at line 6: this.chat = "I am now on "this.n" of the x coordinate of this level!";
    You are correct. It should be:

    this.chat = "I am now on @this.n@ of the x coordinate of this level!";
    iEra Developer / SFX Admin

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

  6. #6
    hextraordinary Hex's Avatar
    Join Date
    Jun 2013
    Location
    Straya
    Posts
    2,906
    that is one messy script xx

    - - - Updated - - -

    http://codebeautify.org/

  7. #7
    Quote Originally Posted by Myst View Post
    http://codebeautify.org/
    http://www.fp4.ca/gs2beautifier/

  8. #8
    Raven Ventus Victor's Avatar
    Join Date
    Feb 2014
    Location
    Malaysia
    Posts
    2,977
    Scripting is confusing my mind.

  9. #9
    aaaaaaaaaaaaaaaaaaaaaaaaa Grief Hero's Avatar
    Join Date
    Jun 2013
    Location
    n/a
    Posts
    1,327
    What's the point of posting a script if you have not tested it? Also, put your code between PHP quotes so it's easier to read.


    I saw. I conquered. I came.


  10. #10
    This is a good script if you just started scripting, but It's gotta get better . Good job though despite the errors.

Posting Permissions

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