mIRC Home    About    Download    Register    News    Help

Print Thread
#247869 02/09/14 01:45 AM
Joined: Aug 2014
Posts: 26
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2014
Posts: 26
Hello, So i was looking for a full script on adding commands via chat (twitch.tv)
With the following:
!addcom !test test = adds command !test and advices
!editcom !test test test = edits the command
!delcom !test = deletes the command
!addcommod = command only for mods
!commandlist = list of commands

Thanks laugh

Joined: Feb 2014
Posts: 9
F
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
F
Joined: Feb 2014
Posts: 9
I only have !addcom and !delcom but I think you can go from this and add your extra features:
Code:
on $*:text:/^!addcom !?(\S+)/iS:#:{
  if ($nick !isop #) return
  writeini commands.ini commands $regml(1) $$3-
  msg # $2 has been added!
}

on $*:text:/^!delcom !?(\S+)/iS:#:{
  if ($nick !isop #) return
  remini commands.ini commands $regml(1)
  msg # $2 has been removed!
}

Joined: Aug 2014
Posts: 26
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2014
Posts: 26
This is pretty neat but I am still a noob at this kind of scripts So I would like some assistance to make a mod only addcom,Some way to edit the commands and also a command list... If somebody can help laugh

Joined: Feb 2014
Posts: 9
F
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
F
Joined: Feb 2014
Posts: 9
mod only addcom? it is already mod only. I think you mean so that only mods can use it. In which case, I think I would make it specific commands (because it's way easier and let's face it, how many mod only commands will you need?). It would look like:
Code:
on *:TEXT:!modonly:#: { 
if($nick isop #){
  msg # This command can only be executed by a mod. 
}
else {
  msg # You can't use this command.
}
}


To be honest, I would read the forums and see how I can do that. It really isn't that hard. I made my own bot and besides the point system that I got from youtube, everything else I got from the forums and now my bot has a point system, raid command, add commands, polls, script that choses the user with most points and gives him mod, giveaway system based on points and many more...

Joined: Aug 2014
Posts: 26
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2014
Posts: 26
True that...
But still Is there any way to edit commands with a command lol
And also a way to do a command list with all commands without having to add manually?

Last edited by Stracked; 03/09/14 12:39 AM.
Joined: Feb 2014
Posts: 9
F
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
F
Joined: Feb 2014
Posts: 9
The commands are saved in commands.ini (located in %appdata%/mIRC/commands.ini). From there it's just a matter of reading that file and displaying it in some way (be it a website, chat iself [although I wouldn't recommend it] or whatever you may find)
I really have no idea how to edit commands tbh but I guess you could just delete it and create a new one

Joined: Aug 2014
Posts: 26
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2014
Posts: 26
Yes i do know how to edit them manually but i wonder if there is a way so somebody else can for example a chat moderator
Also the way to open it is:
//run notepad.exe commands.ini

And.... figured out myself... thanks anyways

Last edited by Stracked; 04/09/14 01:52 AM.
Joined: Mar 2014
Posts: 215
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
Also
You can use the same !addcom command and change the text from addcom to editcom, then add a if statement to check for that command to be in the list. If you
Code:
writeini commands.ini $2 $3-
while $2 is already in the list it will just overwrite the $2 command
smile


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball

Link Copied to Clipboard