• Home
  • Servers
  • Chat
  • Channels
  • Commands
  • Forum
  • FAQ
  • Software
  • Quotes
Page 2 of 2 < 1 2
Topic Options
Rate This Topic
#4431 - 03/05/09 03:30 PM Re: !add !edIT !del for a mIRC bot [Re: FordLawnmower]
SLT_Studios Offline
n00b

Registered: 04/10/08
Posts: 5
Loc: Raleigh, NC, USA
Also can you make it chan specific so say you were to do "!add command" in #slt it wont be able to do !command some other chan?
_________________________
"Please stand clear of the doors por favor mentenga se alejado de las puertas"- Disney Monorails

Top
Sponsored Links
Sponsored Links
Member
*****

Registered: 27/08/04
Posts: 10136
Loc: Mountain View, CA
Top
#4439 - 03/05/09 09:23 PM Re: !add !edIT !del for a mIRC bot [Re: SLT_Studios]
FordLawnmower Offline
Over 100 posts

Registered: 02/15/09
Posts: 111
Loc: Ohio
Here you go SLT. I changed it to be channel specific. Of course this means that if you want a common trigger in more than one channel, you will have to add it in each one. I also changed the name, to prevent a conflict, added Freelancers !* at the top and added a !list function to list the triggers.
Code:
;I still suggest putting channel names here to keep you out of
;trouble. Ex. on *:TEXT:!*:#chan1,#chan2: {
on *:TEXT:!*:#: {
  if ($1 == !add) {
    if (!$2) { .notice $nick Need Trigger name. Syntax !add !triggername trigger response halt }
    if (!$3) { .notice $nick Need Trigger Response. Syntax !add !triggername trigger response halt }
    writeini TriggerList.ini $chan $+ - $+ Triggers $2 $3-
    .msg $chan $2 was added to TriggerList.ini by $nick as $3-
  }
  if ($1 == !del) && ($2) { 
    remini TriggerList.ini $chan $+ - $+ Triggers $2
    .msg $chan $2 was deleted from TriggerList.ini by $nick 
  }
  if ($1 == !list) {
    listtriggers $chan
  }
  if ($readini(Triggerlist.ini,$chan $+ - $+ Triggers,$1)) {
    .msg $chan $readini(Triggerlist,$chan $+ - $+ Triggers,$1) 
  }
}
alias listtriggers {
  if ($isfile(Triggerlist.ini)) {
    if (!$1) { .play -nt $+ $chan $+ - $+ Triggers $me Triggerlist.ini 1500 }
    if ($1) { .play -t $+ $chan $+ - $+ Triggers $1 Triggerlist.ini 1000 }
  }
}
_________________________
If you already know everything, You can never learn anything :P

Top
#4449 - 03/06/09 06:10 PM Re: !add !edIT !del for a mIRC bot [Re: FordLawnmower]
SLT_Studios Offline
n00b

Registered: 04/10/08
Posts: 5
Loc: Raleigh, NC, USA
Doesn't work it's saying "Invalid Parameters: $readini (line 1371, remote.ini)" whenever I try to run the command. If I could bring iNtellistar into #Script-Help I can show you what I'm talking about.
_________________________
"Please stand clear of the doors por favor mentenga se alejado de las puertas"- Disney Monorails

Top
#4450 - 03/06/09 09:47 PM Re: !add !edIT !del for a mIRC bot [Re: SLT_Studios]
FordLawnmower Offline
Over 100 posts

Registered: 02/15/09
Posts: 111
Loc: Ohio
Sorry about that SLT Studios. I fixed it below.
Code:
;I still suggest putting channel names here to keep you out of
;trouble. Ex. on *:TEXT:!*:#chan1,#chan2: {
on *:TEXT:!*:#: {
  if ($1 == !add) {
    if (!$2) { .notice $nick Need Trigger name. Syntax !add !triggername trigger response halt }
    if (!$3) { .notice $nick Need Trigger Response. Syntax !add !triggername trigger response halt }
    writeini TriggerList.ini $chan $+ - $+ Triggers $2 $3-
    .msg $chan $2 was added to TriggerList.ini by $nick as $3-
  }
  if ($1 == !del) && ($2) { 
    remini TriggerList.ini $chan $+ - $+ Triggers $2
    .msg $chan $2 was deleted from TriggerList.ini by $nick 
  }
  if ($1 == !list) {
    listtriggers $chan
  }
  if ($readini(Triggerlist.ini,$chan $+ - $+ Triggers,$1)) {
    .msg $chan $readini(Triggerlist.ini,$chan $+ - $+ Triggers,$1) 
  }
}
alias listtriggers {
  if ($isfile(Triggerlist.ini)) {
    if (!$1) { .play -nt $+ $chan $+ - $+ Triggers $me Triggerlist.ini 1500 }
    if ($1) { .play -t $+ $chan $+ - $+ Triggers $1 Triggerlist.ini 1000 }
  }
}
_________________________
If you already know everything, You can never learn anything :P

Top
Page 2 of 2 < 1 2


Moderator:  Jeff, mandy, usrbingeek