@reloadtimer + broadcast

mrlongshen

Noobies
Messages
1,126
Points
0
Age
36
Location
localhost 127.0.0.1
Emulator
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 ?

 
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. 

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


 
Last edited by a moderator:
Back
Top