mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 3 1 2 3
Adding,removing and Editing commands then using em #245171 12/04/14 05:57 PM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
Hello laugh I am making a Twitch chat bot for Myself and maybe someone else. I Need something that you can add,remove and edit commands as I can seem to get any of the ones on the Forum to work smirk If you could post a working script and teach me how to use it I will make a command for you and stuff. Thanks laugh

Last edited by AllDayGrinding; 12/04/14 07:05 PM.
Re: Adding,removing and Editing commands then using em [Re: AllDayGrinding] #245172 12/04/14 06:51 PM
Joined: Jan 2004
Posts: 1,282
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,282
How rude

Re: Adding,removing and Editing commands then using em [Re: Loki12583] #245173 12/04/14 07:02 PM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
How May I ask?

Re: Adding,removing and Editing commands then using em [Re: AllDayGrinding] #245174 12/04/14 07:06 PM
Joined: Jan 2004
Posts: 1,282
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,282
This is a help forum, not a forum to place orders. You need to put some work in. You already saw this script: http://forums.mirc.com/ubbthreads.php/topics/244453/Re:_Command_that_adds/removes_#Post244453, it works perfectly. The usage was given in the original post. If you can't get it working you need to figure out why, or provide reproducible steps to show that it isn't working.

Re: Adding,removing and Editing commands then using em [Re: Loki12583] #245175 12/04/14 08:33 PM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
I did ask how I used it like What did I have to Type to add a command or delete a command? Please help

Re: Adding,removing and Editing commands then using em [Re: AllDayGrinding] #245179 12/04/14 09:44 PM
Joined: Mar 2014
Posts: 52
P
patrickplays Offline
Babel fish
Offline
Babel fish
P
Joined: Mar 2014
Posts: 52
Code:
on $*:text:/^!commandadd !?(\S+)/iS:#test:{


!commandadd ..

Re: Adding,removing and Editing commands then using em [Re: patrickplays] #245180 12/04/14 10:01 PM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
Then what do I need to type and what would I need to type to the command and delete it. Also is there a way to make only Op use it?

Re: Adding,removing and Editing commands then using em [Re: AllDayGrinding] #245183 12/04/14 10:42 PM
Joined: Mar 2014
Posts: 52
P
patrickplays Offline
Babel fish
Offline
Babel fish
P
Joined: Mar 2014
Posts: 52
you have to type in your command lol
!commandadd !hello /me welcomes you to the stream

!commandremove !hello

it is already for op only
if you didnt change anything
Code:
on $*:text:/^!commandadd !?(\S+)/iS:#test:{
  if ($nick !isop #) return
  writeini commands.ini commands $regml(1) $$3-
}

on $*:text:/^!commandremove !?(\S+)/iS:#test:{
  if ($nick !isop #) return
  remini commands.ini commands $regml(1)
}

on $*:text:/^!repeat !?(\S+) (off|\d+)/iS:#test:{
  if ($nick !isop #) return
  
  var %command = $regml(1), %interval = $regml(2)
  
  if ($timer(command. $+ %command)) {
    if (%interval == off) .timercommand. $+ %command off
    else msg # ! $+ %command is already repeating
  }
  elseif ($readini(commands.ini,n,commands,%command)) {
    var %response = $v1
    .timercommand. $+ %command 0 $iif(%interval < 5,5,%interval) msg # $safe(%response)
    msg # %response
  }
}

on $*:text:/^!(\S+)/:#test:{
  if ($nick !isop #) return
  if ($readini(commands.ini,n,commands,$regml(1))) msg # $v1
}

alias safe return $!decode( $encode($1,m) ,m)


Code:
if ($nick !isop #) return

if nick who is executing the command not an op then return, else add command.

everything i told you is already specified in this thread
http://forums.mirc.com/ubbthreads.php/topics/244453/Re:_Command_that_adds/removes_#Post244453

Re: Adding,removing and Editing commands then using em [Re: patrickplays] #245186 12/04/14 11:32 PM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
Thank you. I will see if I can get it to work in the morning

Re: Adding,removing and Editing commands then using em [Re: patrickplays] #245196 13/04/14 08:50 AM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
I cant get that to work... http://gyazo.com/e10f0f4cc1a0565c1148f7c844e524cb Please help

Re: Adding,removing and Editing commands then using em [Re: AllDayGrinding] #245200 13/04/14 02:35 PM
Joined: Jan 2004
Posts: 1,282
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,282
Are you running the bot under a different name? Are you an op? Have you placed this script in its own file?

There is no response from the bot when you add or delete commands.

Re: Adding,removing and Editing commands then using em [Re: Loki12583] #245204 13/04/14 03:16 PM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
What do you mean by all that?

Re: Adding,removing and Editing commands then using em [Re: AllDayGrinding] #245206 13/04/14 03:39 PM
Joined: Jan 2004
Posts: 1,282
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,282
I can't be any more clear. You need to take some initiative and read through the help files.

Re: Adding,removing and Editing commands then using em [Re: Loki12583] #245208 13/04/14 03:51 PM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
That doesnt say any code though. I am Only `13

Re: Adding,removing and Editing commands then using em [Re: Loki12583] #245214 13/04/14 05:50 PM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
I am running the script in the bit called remote. I dont understand by what you mean Different name and yes I am the owner of the channel

Re: Adding,removing and Editing commands then using em [Re: AllDayGrinding] #245235 14/04/14 03:40 AM
Joined: Apr 2014
Posts: 191
B
blessing Offline
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
Originally Posted By: AllDayGrinding
I cant get that to work... http://gyazo.com/e10f0f4cc1a0565c1148f7c844e524cb Please help

Very basic question smile

What did you type?
And what did you expect after you typed that?


Re: Adding,removing and Editing commands then using em [Re: blessing] #245253 14/04/14 12:30 PM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
I do not think that code is writing the command into commands.ini as after I type what I typed there is still no commands in there. Does anyone know?

Re: Adding,removing and Editing commands then using em [Re: AllDayGrinding] #245254 14/04/14 01:03 PM
Joined: Apr 2014
Posts: 191
B
blessing Offline
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
Did you just copy the code and paste into remote right away?
Did you realize that you need to edit the code?
Did you realize that the code is work on channel #test?
Had you edit #test to #yourchannelname to make it working on your channel?


Re: Adding,removing and Editing commands then using em [Re: blessing] #245262 14/04/14 04:21 PM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
I just copied and pasted in into the remote.. Should I change #Test to My channel whenever it says #test. Didnt realise I had to edit it

Re: Adding,removing and Editing commands then using em [Re: AllDayGrinding] #245274 15/04/14 02:47 AM
Joined: Apr 2014
Posts: 191
B
blessing Offline
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
Yes. You have to change #test to #yourchannelname otherwise the code will not work. Actually it works, but on the channel #test.

Page 1 of 3 1 2 3