Jump to content
  • 0

need explanation of this script


miczster

Question


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  275
  • Reputation:   7
  • Joined:  10/08/12
  • Last Seen:  

I found this script in some part here in the forum

 

{},{ set eff877,1; while(eff877==1){specialeffect2 877; sleep2 6000;} },{set eff877,0;}

 

Can anyone pls explain this? I'm not familiar with it...THX!!!

Edited by miczster
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   36
  • Joined:  01/21/13
  • Last Seen:  

Original script:

{},{ set eff877,1; while(eff877==1){specialeffect2 877; sleep2 6000;} },{set eff877,0;}

.
This appears to be a part of an item script. If so, then when the item is equipped, this will run:

set eff877,1; while(eff877==1){specialeffect2 877; sleep2 6000;}

.

When the item is unequipped, this will run:

set eff877,0;

.

Let's break it down:

    set eff877,1;                  // This defines the permanent player variable 'eff877' as 1.
    while(eff877 == 1){            // This runs a loop, which checks if the attached player's eff877 variable is 1.
        specialeffect2 877;        // This runs the special effect 877 (@effect 877) on the attached player.
        sleep2 6000;               // This pauses the script for 6 seconds, adding a delay when it loops.
    }

.
 
Since the variable eff877 is set to 0 when the player unequips the item, the loop will no longer run; thus, the contained script will not be invoked either.

Edited by Via
  • Upvote 3
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  275
  • Reputation:   7
  • Joined:  10/08/12
  • Last Seen:  

THX so much for explaining...+1 to you

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...