mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 3 1 2 3
Joined: Mar 2014
Posts: 72
A
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.
Joined: Jan 2004
Posts: 1,352
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,352
How rude

Joined: Mar 2014
Posts: 72
A
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
How May I ask?

Joined: Jan 2004
Posts: 1,352
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,352
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.

Joined: Mar 2014
Posts: 72
A
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

Joined: Mar 2014
Posts: 52
P
Babel fish
Offline
Babel fish
P
Joined: Mar 2014
Posts: 52
Code:
on $*:text:/^!commandadd !?(\S+)/iS:#test:{


!commandadd ..

Joined: Mar 2014
Posts: 72
A
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?

Joined: Mar 2014
Posts: 52
P
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

Joined: Mar 2014
Posts: 72
A
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

Joined: Mar 2014
Posts: 72
A
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
I cant get that to work... http://gyazo.com/e10f0f4cc1a0565c1148f7c844e524cb Please help

Joined: Jan 2004
Posts: 1,352
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,352
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.

Joined: Mar 2014
Posts: 72
A
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
What do you mean by all that?

Joined: Jan 2004
Posts: 1,352
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,352
I can't be any more clear. You need to take some initiative and read through the help files.

Joined: Mar 2014
Posts: 72
A
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
That doesnt say any code though. I am Only `13

Joined: Mar 2014
Posts: 72
A
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

Joined: Apr 2014
Posts: 191
B
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?


Joined: Mar 2014
Posts: 72
A
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?

Joined: Apr 2014
Posts: 191
B
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?


Joined: Mar 2014
Posts: 72
A
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

Joined: Apr 2014
Posts: 191
B
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

Link Copied to Clipboard