Jump to content
  • 0

Question

Posted

Where have i to include those script? I only know how to use npc scripts.

-    script    News    -1,{
OnInit:
set .Time,60;        // Announce every x Minute.

setarray .News$[0],    // Random Message to be Announced
        "Updated News 1 every X Minute",
        "Updated News 2 every X Minute",
        "Updated News 3 every X Minute",
        "Updated News 4 every X Minute",
        "Updated News 5 every X Minute",
        "Updated News 6 every X Minute",
        "Updated News 7 every X Minute";
        
while( 1 ){
    announce .News$[ rand( getarraysize( .News$ ) ) ],0;
    sleep ( .Time * 60000 );
    }
end;
}
 

 

3 answers to this question

Recommended Posts

Posted

Supposing it doesn't have any errors, it should work exactly as a normal NPC. But it just works without anyone seeing it. I reccomend to load it as in the NPC configurations then restarting the server to make sure that OnInit event is run.

 

Or well, you can simply add an OnWhisperGlobal label and then whisper to the NPC to make it run for the first time.

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...