celeron0134 Posted March 28, 2018 Group: Members Topic Count: 66 Topics Per Day: 0.02 Content Count: 194 Reputation: 1 Joined: 12/13/16 Last Seen: February 14, 2023 Share Posted March 28, 2018 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.. Quote Link to comment Share on other sites More sharing options...
0 pajodex Posted March 28, 2018 Group: Members Topic Count: 79 Topics Per Day: 0.03 Content Count: 439 Reputation: 173 Joined: 12/12/17 Last Seen: April 14 Share Posted March 28, 2018 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 Quote Link to comment Share on other sites More sharing options...
0 celeron0134 Posted March 29, 2018 Group: Members Topic Count: 66 Topics Per Day: 0.02 Content Count: 194 Reputation: 1 Joined: 12/13/16 Last Seen: February 14, 2023 Author Share Posted March 29, 2018 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 Quote Link to comment Share on other sites More sharing options...
Question
celeron0134
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.