Jump to content
  • 0

GM EVENT ANNOUNCER


celeron0134

Question


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  194
  • Reputation:   1
  • Joined:  12/13/16
  • Last Seen:  

i need a NPC script that

*Only GMs can access the NPC*

*Menu (Announce,Nothing)

*onAnnounce = Broadcast the typed Message every 30 mins*(configurable)

*onAnnounce(Again) = removed previous Annouce and Broadcast the new announced message

thanks thats it for now..

 

 

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

25 minutes ago, celeron0134 said:

i need a NPC script that

*Only GMs can access the NPC*

*Menu (Announce,Nothing)

*onAnnounce = Broadcast the typed Message every 30 mins*(configurable)

*onAnnounce(Again) = removed previous Annouce and Broadcast the new announced message

thanks thats it for now..

 

 

 

I don't know why you want to make a script instead of manually doing /lb command.

but try this: (Not tested)

https://github.com/pajodex/ScriptCollections/blob/master/gmannouncer.txt

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  194
  • Reputation:   1
  • Joined:  12/13/16
  • Last Seen:  

22 hours ago, pajodex said:

I don't know why you want to make a script instead of manually doing /lb command.

but try this: (Not tested)

https://github.com/pajodex/ScriptCollections/blob/master/gmannouncer.txt

// GM Announcer
// By pajodex
-	script	GMAnnouncer	-1,{
OnResetAnnounce:
OnAtCmd:
	if(select("Announce:Nothing") == 2 ) close;
		mes "What messaage to announce?";
		input .@announce$;
		next;
		mes "Announce: "+.@announce$+" ?";
		if(select("Yes:No") == 2) callsub OnResetAnnounce;
			.announce$ = .@announce$;
			mes "Announce Interval? (in minutes)";
			mes "- How many times will the broadcast be repeated?";
			input .@interval;
			next;
			mes "Are you sure broadcast interval will be every "+.@interval+" mins?";
			if(select("Yes:No") == 2) callsub OnResetAnnounce;
				.interval = .@interval;
				donpcevent strnpcinfo(3)+"::OnAnnounce";
				mes "Done!";
				close;
			
OnAnnounce:
	announce .announce$, 0;
	initnpctimer;
	end;
	
OnTimer60000:
	.timer++;
	if(.interval == .timer) {
		announce .announce$, 0;
		.timer = 0;
		end;
	}
	setnpctimer 0;
	end;
	
OnInit:
	.interval = 0;
	.announce$ = "";
	.timer = 0;
	bindatcmd "gmbroadcast",strnpcinfo(3)+"::OnAtCmd",0,60;
	end;
}

i think its working.. i fixed some typos tho.. "+.@interval+" and the OnTimer60000:

thank you again pajodex for the fast replies and for helping us newbies thanks alot more power

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