mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 3 1 2 3
Re: Adding,removing and Editing commands then using em [Re: blessing] #245282 15/04/14 10:16 AM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
It is still not writing the command in commands.ini

Re: Adding,removing and Editing commands then using em [Re: AllDayGrinding] #245283 15/04/14 12:35 PM
Joined: Apr 2014
Posts: 33
B
bl968 Offline
Ameglian cow
Offline
Ameglian cow
B
Joined: Apr 2014
Posts: 33
This script relies on a ops hash table to verify if someone is a channel moderator or not.

Example usage

set trigger popcorn Pull up a chair and grab some popcorn
Remove trigger popcorn

To call the trigger you use !popcorn

The Trigger supports 4 responses for one !command you do that by setting trigger..4

set trigger popcorn This is line 1
set trigger popcorn2 This is line 2
set trigger popcorn3 This is line 3
set trigger popcorn4 This is line 4

!popcorn would then show "This is Line 1" etc

;===========================================================
; Dynamic triggers - newtriggers.mrc
;===========================================================
; Author : Bill Larson (blarson@compu.net)
; Revision: 1.0
; FileName: newtriggers.mrc
;===========================================================

on 1:TEXT:set trigger*:#:{
if !$hget(ops,$nick) { /halt }

if !$3 || !$4 {
/notice $nick Format: set trigger <triggername> <info>
/halt
}
/hadd triggers $$3 $4-
/msg $chan trigger for $3 set to
/msg $chan $4-

/hsave -o triggers triggers.hsh
/halt
}

on 1:TEXT:remove trigger*:#:{
if !$hget(ops,$nick) { /halt }

if $3 {
if !$hget(triggers, $3) {
/msg $chan no trigger info is set for $3 sorry.
/msg $chan Try using set trigger first.
/halt
} else {
/hdel triggers $$3
/msg $chan Trigger info was removed for $3
/hsave -o triggers triggers.hsh
/halt
}
} else {
/msg $chan Format: remove trigger Triggername
}
}

on 1:TEXT:!*:#:{
/var %command $remove($1,!)
if $hget(triggers, %command) {
/msg $chan $hget(triggers, %command)
}
if $hget(triggers, %command $+ 2) {
/msg $chan $hget(triggers, %command $+ 2)
}
if $hget(triggers, %command $+ 3) {
/msg $chan $hget(triggers, %command $+ 3)
}
if $hget(triggers, %command $+ 4) {
/msg $chan $hget(triggers, %command $+ 4)
}
/halt
}

alias dumptrigs {
/var %t 1
/var %ttotal $hget(triggers,0).item
while (%t <= %ttotal) {
/echo -s set trigger $hget(triggers,%t).item $hget(triggers,$hget(triggers,%t).item)
/inc %t
}
}

on 1:disconnect:{
/hsave -o triggers triggers.hsh
}

on 1:connect:{
/hmake triggers 100
/hload -o triggers triggers.hsh
}

Re: Adding,removing and Editing commands then using em [Re: AllDayGrinding] #245290 15/04/14 03:23 PM
Joined: Apr 2014
Posts: 191
B
blessing Offline
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
Originally Posted By: AllDayGrinding
It is still not writing the command in commands.ini


What did you type?
How did you know that is not writing?
Is your commands.ini file empty?

Re: Adding,removing and Editing commands then using em [Re: blessing] #245294 15/04/14 04:42 PM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
I Typed !commandadd !hello Welcome to the stream! Then I looked in the commands.ini file and nothing is in there

Re: Adding,removing and Editing commands then using em [Re: AllDayGrinding] #245299 15/04/14 07:59 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
What did you put your #channel as?
And what is your registered twitch name?


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Adding,removing and Editing commands then using em [Re: Nillen] #245300 15/04/14 08:15 PM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
I put it as #alldaygrinding and my Twitch username Is AllDayGrinding

Re: Adding,removing and Editing commands then using em [Re: AllDayGrinding] #245301 15/04/14 08:38 PM
Joined: Mar 2014
Posts: 215
J
judge2020 Offline
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
i think the bot name matters more than your name...


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
Re: Adding,removing and Editing commands then using em [Re: judge2020] #245320 16/04/14 09:13 AM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
Oh OK I'll Try it

Re: Adding,removing and Editing commands then using em [Re: judge2020] #245321 16/04/14 10:03 AM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
My Bot name is GrindingBot so I Typed #grindingbot wherever it has a # But yet it still does not write the command in Commands.ini Does anyone know why this is happening?

Re: Adding,removing and Editing commands then using em [Re: AllDayGrinding] #245324 16/04/14 11:10 AM
Joined: Apr 2014
Posts: 191
B
blessing Offline
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
Lets try this code. Put it into new remote file. ( Alt+R, File, New.. )

Code:
on $*:text:/^!commandadd !?(\S+)/iS:#:{
  if ($nick !isop #) { echo -ag You are not OP }
  else {
    writeini commands.ini commands $regml(1) $$3-
    echo -ag $readini(commands.ini,command,$regml(1))
  }
}

Re: Adding,removing and Editing commands then using em [Re: blessing] #245332 16/04/14 06:43 PM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
Do I need to change any of that?

Re: Adding,removing and Editing commands then using em [Re: AllDayGrinding] #245345 17/04/14 03:43 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Only thing i can see is if you want to rename the file commands.ini . If not, then no you dont need to change anything.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Adding,removing and Editing commands then using em [Re: blessing] #245347 17/04/14 10:14 AM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
I put that into a new file but still it does not write anything in commands.ini

Re: Adding,removing and Editing commands then using em [Re: AllDayGrinding] #245352 17/04/14 02:48 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
You cant type it in the same client that running the script, somone else in the channel need to type.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Adding,removing and Editing commands then using em [Re: sparta] #245367 18/04/14 05:23 AM
Joined: Apr 2014
Posts: 33
B
bl968 Offline
Ameglian cow
Offline
Ameglian cow
B
Joined: Apr 2014
Posts: 33
Well you can but you have to setup an on input...

The on INPUT event triggers when you enter text in an editbox and press enter.

Format: on <level>:INPUT:<*#?=!@>:<commands>

Example: on 1:INPUT:#mIRC:/echo You entered the text " $1- " in the #mIRC window

Examples

on 1:INPUT:#:/echo I just mumbled " $1- " in a channel

Triggers when you enter text in an editbox in a channel window and press enter. The $1- parameters refer to the text that you entered. If you /halt this event, you can prevent mIRC itself from processing your message.

on 1:INPUT:?:/echo I just mumbled " $1- " in a query window
on 1:INPUT:=:/echo I just mumbled " $1- " in a dcc chat
on 1:INPUT:!:/echo I just mumbled " $1- " in a fileserver


You can also specify a specific channel/window name instead of *#?=!@.

You can use the $ctrlenter identifier to test whether Control+Enter was pressed when the user entered the text.

Note: You can use commands such as /say with on INPUT and they will send the message to the window in which you are typing, however most commands/events do not work this way and require you to specify the actual destination of a message.

Re: Adding,removing and Editing commands then using em [Re: bl968] #245368 18/04/14 07:44 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I know he can do that on input, but since he said it dont work (The script he have), then my guess was he typed the command in him self with the same client. Easy to think you can trigger it your self.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Adding,removing and Editing commands then using em [Re: sparta] #245369 18/04/14 09:17 AM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
I don't think this is the case. From previous posts he has described that his username which he is logged in to on twitch.tv is AllDayGrinding and his mIRC application is singed as GrindingBot or something similar. The previous pictures he has sent have all been written by the user and not triggered.

There's most likely a problem with another on *:text:*:#: event in his remote.ini file.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Adding,removing and Editing commands then using em [Re: Nillen] #245399 20/04/14 01:14 PM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
So Would I need to get someone else to add a command or have to change the code?

Re: Adding,removing and Editing commands then using em [Re: AllDayGrinding] #245400 20/04/14 02:09 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Here's what you should do. Paste everything you have in your remote.ini file into a pastebin and link it here. The code we've provided several times for you that you claim do not work have never been faulty, it is entirely an user error and there's no way we can help you (this topic is the proof of that) unless you show us everything you've done so far and how messed up your file truly looks.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Adding,removing and Editing commands then using em [Re: Nillen] #245406 20/04/14 04:17 PM
Joined: Mar 2014
Posts: 72
A
AllDayGrinding Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
Here is my script. http://pastebin.com/F30c5mM7

Page 2 of 3 1 2 3