Jump to content
  • 0
Sign in to follow this  
Kong

Random Broadcaster for GM/Admin

Question

Hello if there's anyone here who could be generous enough to provide an NPC like this that would be greatly appreciated.

 

So we have a random news broadcaster that looks like this:

-	script	News	-1,{OnInit:set .Time,60;		// Announce every x Minute.setarray .News$[0],	// Random Message to be Announced		"Blablablablah",		"Jeeejejejejejeeeh";		while( 1 ){	announce .News$[ rand( getarraysize( .News$ ) ) ],bc_all,0x99CC00;	sleep ( .Time * 60000 );	}end;}

However the problem is that when we have new things to announce to the server (ex. Modified EXP rates event / drop rate / an event to happen in an hour) we'll have to do @reloadscript just to reload this file again everytime you have an update. And we all know the CONS of using @reloadscript in-game..

 

I have come up with an idea where there would be an NPC (only accessible by admins/gms) where you could store "News / Announcements" and configure the X number of minutes it will randomly show up all the news stored in the NPC. This way we can dynamically manage to 'Add, Edit, Delete' current news/announcement without having to reload the server. 

 

So if we have to announce something, we just have to access that NPC maybe through an "@" command and add new announcement. And maybe configure the number of minutes it will randomly show all stored announcements. If possible, there's also a way to show the number of news currently being rolled.

 

For future developments:

  • Maybe we can allow "active/inactive" state of news so GMs/Admins can simply deactivate that announcement (without removing it in the list)

 

 

Huhuhuu... paging @@AnnieRuru

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

@@Kong

 

there's @unloadnpc and @loadnpc ☺

 

use those commands to reload that specific script

 

example:

@unloadnpc npc/custom/broadcaster.txt

@loadnpc npc/custom/broadcaster.txt

Share this post


Link to post
Share on other sites
  • 0

@@Kong

 

there's @unloadnpc and @loadnpc ☺

 

use those commands to reload that specific script

 

example:

@unloadnpc npc/custom/broadcaster.txt

@loadnpc npc/custom/broadcaster.txt

 

Unfortunately there's a bug with @loadnpc, when you use it to load the broadcaster, 2 broadcaster will simultaneously broadcast news. lol

Share this post


Link to post
Share on other sites
  • 0

 

@@Kong

 

there's @unloadnpc and @loadnpc ☺

 

use those commands to reload that specific script

 

example:

@unloadnpc npc/custom/broadcaster.txt

@loadnpc npc/custom/broadcaster.txt

 

Unfortunately there's a bug with @loadnpc, when you use it to load the broadcaster, 2 broadcaster will simultaneously broadcast news. lol

 

This means you failed to unload the first one. :)

 

You can see your map server that the npc was duplicated

Share this post


Link to post
Share on other sites
  • 0

www.eathena.ws/board/index.php?s=&showtopic=272409&view=findpost&p=1492359

yeah ... stupid eathena forum down

luckily I always reupload everything stuffs on since rathena times

 

https://rathena.org/board/pastebin/21hkxkuvt6dl

Share this post


Link to post
Share on other sites
  • 0

eathena forum up

https://www.eathena.ws/board/index.php?s=&showtopic=272409&view=findpost&p=1492115

 

check the link again, that was a script request,

which the one who request it wants the announcement to be done without login the game

so just login to your Sql query browser and edit the announcement in that `hourly_announcer` table

its fine for not arrange the announcement in order, the script already order by ID

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.