Jump to content
  • 0

Automated Server Announcement


Keitenai

Question


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  98
  • Reputation:   74
  • Joined:  12/04/14
  • Last Seen:  

Hello everyone,

 

Im new to this forum, and Rathena helped me learn some development stuff, so i would like to share some to show my gratitude. Though im not sure if this is the right section for this.

 

 

Here's a simple automated server announcement:

-	script	ServerAnnouncement	-1,{
OnInit:
	initnpctimer;
	end;
OnEnable:
	initnpctimer;
	end;

OnTimer1200000: //every 20mins
	stopnpctimer;
	announce "Feel free to use @request if you have any concerns regarding the game.",bc_all,"0x70dbdb";
	donpcevent "ServerAnnouncement::OnEnable";
	end;
}
Edited by Sky Cloud
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  806
  • Reputation:   220
  • Joined:  03/13/12
  • Last Seen:  

I think it should have been in Script Releases section because ... well it is a release :P

but hey close enough i guess :)

thanks for the share

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Or you can just use..

-	script	ServerAnnouncement	-1,{
OnInit:
OnTimer1200000: //every 20mins
	initnpctimer;
	announce "Feel free to use @request if you have any concerns regarding the game.",bc_all,"0x70dbdb";
	end;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  152
  • Reputation:   78
  • Joined:  06/13/15
  • Last Seen:  

Hi Sky Cloud 

 

i got a question where should i put this script ? 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1535
  • Reputation:   237
  • Joined:  08/03/12
  • Last Seen:  

in npc folder.. and load it.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  98
  • Reputation:   74
  • Joined:  12/04/14
  • Last Seen:  

 

Or you can just use..

-	script	ServerAnnouncement	-1,{
OnInit:
OnTimer1200000: //every 20mins
	initnpctimer;
	announce "Feel free to use @request if you have any concerns regarding the game.",bc_all,"0x70dbdb";
	end;
}

 

nanakiwurtz

 i test your shortened script, but doesn't loop every 20mins. it only announce 20mins after reloading NPC then it wont announce again.

 

 

Ciel Phantomhive

 

As Chaos 32 said, you just need to put this inside NPC folder then load it

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1535
  • Reputation:   237
  • Joined:  08/03/12
  • Last Seen:  

change ontimer to OnMinute20:

 

 

example :

OnMinute10:
OnMinute20:
OnMinute30:
OnMinute40:
OnMinute50:
OnMinute00:
 
thats mean every 10 minutes for each hour its gonna be announced.

if you have more than 1 announcement texts, u can use random for example :
 
switch(rand(1,2)) {
case 1: announce "Welcome to ReUnite Ragnarok Online.Majority of NPC is in Prontera as our Capital City.Use @go 0",bc_all,0xFFFF00; end;
case 2: announce "Welcome to ReUnite Ragnarok Online.Majority of NPC is in Prontera as our Capital City.Use @go 0",bc_all,0xFFFF00; end;
}
end;
Link to comment
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.   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.

×
×
  • Create New...