Ok this script is very simple all you do is type
!post {newshere}
And it'll set what you replace {newshere} with as %news
Then when someone types !news
It'll say what you set for %news :D
Also only you can do it :D
on *:text:!news:#: {
msg $chan News: %news
}
on *:text:!post*:#: {
if ( $nick == YOURNICKNAMEHERE ) {
set %news $2- < Posted by $nick >
}
N1nja, I hope my example will serve you good for a reference:> *on $:text:/^!(news|post)\b/iS:#:{
; the above line is regex, which will match both the commands !news and !post respectively. The caret sign (^) will make sure the commands start with an exclamation mark, and the \b character will make sure the commands end with !news and !post; no more or less.
if (!%p) {
inc -u3 %p
; this is a trigger protection that will initiate the command every 3 seconds.
[b]if ($regml(1) == news) {
.msg # $iif(%news,News: $v1,No News is available yet!)
}[/b]
; if the command is !new, it'll message every one the latest news to the current channel; if not, it'll say otherwise.
[b]elseif (!$2) && ($nick == YourNickHere) {
.msg # $nick $+ , incorrect syntax: !post YourNewsHere
}[/b]
; if the allowed person enters the command !post without the news, it'll tell him or her how to enter it correctly.
[b]elseif ($nick == YourNickHere) {
set %news $2- < Posted by $nick >)
.msg # $nick $+ , the news has been set successfully!
}[/b]
; if the parameter has been set correctly, the command was a success.
[b]elseif ($nick != YourNickHere) {
.msg # $nick Access denied!
}[/b]
; If other disallowed users attempt to post a news, he or she will get told access denied.
}
}**
That will only hold one News:
And you can make it to hold more.
Also:Your Trigger Command !News Members Will Be Able To Flood You With That Command So Why Not Make A Halting On It So $nick will only be able to hit once. And....The !Post For if ( $nick == YOURNICKNAMEHERE ) { Will Not Work Properly Being A ! Command Start So Why Not Make It /Post So It Will Read Correctly And Also Be Able To Pick Up $nick In The Message.
But Its not bad...Just Work On It Some.