Jump to content
  • 0

need explanation of this script


Question

Posted (edited)

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

2 answers to this question

Recommended Posts

Posted (edited)

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...