mIRC Home    About    Download    Register    News    Help

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

A
AllDayGrinding
AllDayGrinding
A
How May I ask?

Joined: Jan 2004
Posts: 1,330
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,330
This is a help forum, not a forum to place orders. You need to put some work in. You already saw this script: https://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.

A
AllDayGrinding
AllDayGrinding
A
I did ask how I used it like What did I have to Type to add a command or delete a command? Please help

P
patrickplays
patrickplays
P
Code:
on $*:text:/^!commandadd !?(\S+)/iS:#test:{


!commandadd ..

A
AllDayGrinding
AllDayGrinding
A
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?

P
patrickplays
patrickplays
P
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
https://forums.mirc.com/ubbthreads.php/topics/244453/Re:_Command_that_adds/removes_#Post244453

A
AllDayGrinding
AllDayGrinding
A
Thank you. I will see if I can get it to work in the morning

A
AllDayGrinding
AllDayGrinding
A
I cant get that to work... http://gyazo.com/e10f0f4cc1a0565c1148f7c844e524cb Please help

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

A
AllDayGrinding
AllDayGrinding
A
What do you mean by all that?

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

A
AllDayGrinding
AllDayGrinding
A
That doesnt say any code though. I am Only `13

A
AllDayGrinding
AllDayGrinding
A
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

B
blessing
blessing
B
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?


A
AllDayGrinding
AllDayGrinding
A
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?

B
blessing
blessing
B
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?


A
AllDayGrinding
AllDayGrinding
A
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

B
blessing
blessing
B
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