Jump to content
  • 0
Sign in to follow this  
mrlongshen

@reloadtimer + broadcast

Question

I want to request a broadcast announcement that will broadcast entire server that gm will reloadscript.

The broadcast will announce on Minute 1, 45 second, 30 and 15 second and when reach 1 minute, Its will automatically @reloadscript.

That all.

how to make its have a broadcast and a timer ?

 

 

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

This will reload one npc at a time and will not affect other npc or monster spawn.

 

Try this:

 

 

-    script    oninitreload    -1,{OnAtcommand:    dispbottom .@atcmd_parameters$[1];    if ( .@atcmd_parameters$[0] == "" || .@atcmd_parameters$[0] == " " ) {        dispbottom "Please enter an npc's unique name.";        end;    }    donpcevent implode(.@atcmd_parameters$," ")+ "::OnInit";    dispbottom "OnInit for "+ implode(.@atcmd_parameters$," ")+ " has been reloaded.";    end;OnInit:    bindatcmd("reload", strnpcinfo(3)+"::OnAtcommand", 99, 99, 1); // Only gm 99 and above can use this command, 1 to log command else 0.    end;}

 

Usage: @loadnpc < path >

then

@reload < npc's unique name >

 

eg:

 

-    script    monstertry#4444    -1,{ // monstertry#4444 is the npc's unique name.OnLabel:    announce "???",0;    end;OnInit:    monster "prontera", 150, 150, "Poring", 1002, 1, strnpcinfo(3)+"::OnLabel";    end;}

 

will print:

 

[Debug]: NPCEvent 'monstertry::OnInit' not found! (source: oninitreload)

if npc is not found.

 

@edit

may test server crashes whenever I use atcommand "@reloadscript". so I made this. ;)

Edited by quesoph

Share this post


Link to post
Share on other sites
  • 0

Not on my pc so I can't script that at the moment but... Why you want that to be scripted? reloadscript isn't supposed to be used on production servers since it may start unexpected behavior issues on the server. 

Share this post


Link to post
Share on other sites
  • 0

manually?

 

Yup manually..

 

 

Not on my pc so I can't script that at the moment but... Why you want that to be scripted? reloadscript isn't supposed to be used on production servers since it may start unexpected behavior issues on the server. 

 

sometimes i need to reloadscript, because to load the oninit.

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.