Tournament "small" code by me

Paste Your code(s) here, and state your problem.

Tournament "small" code by me

Postby InT69x » Mon Jul 20, 2009 1:16 pm

My bot no reponding me on

!deladmin nick

( And, i need commands to !addga ) to write my admin.ini ^^


Code: Select all
on *:text:*:#:{
  if ($chan == %tnchan) {
    if ($1 == !cmds) {
      .notice $nick :: Commands ::
      .notice $nick !admin - Pour connaître l'admin du tournois
      .notice $nick !site - Pour connaître le site du tournois
      .notice $nick !tn - Pour connaîte l'état du tournois
      .notice $nick !tn on/off - Pour Lancer/Arrêter le tournois.

    }
    if ($1 == !addadmin) {
      if ($address($nick,2) isin $readini(Admin.ini,Global,Admin)) {
        set %admintn %admintn $2
        .notice $nick Done.
      }
    }
    if ($1 == !addsite) {
      if ($address($nick,2) isin $readini(Admin.ini,Global,Admin)) {
        set %sitetn %sitetn $2
        .notice $nick Done.
      }
    }
    if ($1 == !tnoff) {
      if ($address($nick,2) isin $readini(Admin.ini,Global,Admin)) {
        set %tn $remtok(%tn,$2,1,32)
        .notice $nick Done. | msg $chan Tournament CLOSE on #CPL.Topstars !
      }
    }
    if ($1 == !tnon) {
      if ($address($nick,2) isin $readini(Admin.ini,Global,Admin)) {
        set %tn %tn on
        .notice $nick Done. | msg $chan Tournament OPEN on #CPL.Topstars ! :: Admin: 4 %admintn  ::
      }
    }
    if ($1 == !admin) {
      msg $chan Admin ::  $iif(%admintn,$v1,Aucun)
    }
    if ($1 == !site) {
      msg $chan Site ::  $iif(%sitetn,$v1,Aucun)
    }
    if ($1 == !tn) {
      msg $chan TN ::  $iif(%tn,$v1,OFF)
    }
    if ($1 == !delsite) {
      if ($address($nick,2) isin $readini(Admin.ini,Global,Admin)) {
        set %sitetn $remtok(%sitetn,$2,1,32)
        .notice $nick Done.
      }
      if ($1 == !deladmin) {
        if ($address($nick,2) isin $readini(Admin.ini,Global,Admin)) {
          set %admintn $remtok(%admintn,$2,1,32)
          .notice $nick Done.
        }
      }
    }
  }
}
InT69x
 

Re: Tournament "small" code by me

Postby fraguk » Mon Jul 20, 2009 2:47 pm

InT69x wrote:My bot no reponding me on

!deladmin nick

( And, i need commands to !addga ) to write my admin.ini ^^


Code: Select all
on *:text:*:#:{
  if ($chan == %tnchan) {
    if ($1 == !cmds) {
      .notice $nick :: Commands ::
      .notice $nick !admin - Pour connaître l'admin du tournois
      .notice $nick !site - Pour connaître le site du tournois
      .notice $nick !tn - Pour connaîte l'état du tournois
      .notice $nick !tn on/off - Pour Lancer/Arrêter le tournois.

    }
    if ($1 == !addadmin) {
      if ($address($nick,2) isin $readini(Admin.ini,Global,Admin)) {
        set %admintn %admintn $2
        .notice $nick Done.
      }
    }
    if ($1 == !addsite) {
      if ($address($nick,2) isin $readini(Admin.ini,Global,Admin)) {
        set %sitetn %sitetn $2
        .notice $nick Done.
      }
    }
    if ($1 == !tnoff) {
      if ($address($nick,2) isin $readini(Admin.ini,Global,Admin)) {
        set %tn $remtok(%tn,$2,1,32)
        .notice $nick Done. | msg $chan Tournament CLOSE on #CPL.Topstars !
      }
    }
    if ($1 == !tnon) {
      if ($address($nick,2) isin $readini(Admin.ini,Global,Admin)) {
        set %tn %tn on
        .notice $nick Done. | msg $chan Tournament OPEN on #CPL.Topstars ! :: Admin: 4 %admintn  ::
      }
    }
    if ($1 == !admin) {
      msg $chan Admin ::  $iif(%admintn,$v1,Aucun)
    }
    if ($1 == !site) {
      msg $chan Site ::  $iif(%sitetn,$v1,Aucun)
    }
    if ($1 == !tn) {
      msg $chan TN ::  $iif(%tn,$v1,OFF)
    }
    if ($1 == !delsite) {
      if ($address($nick,2) isin $readini(Admin.ini,Global,Admin)) {
        set %sitetn $remtok(%sitetn,$2,1,32)
        .notice $nick Done.
      }
      if ($1 == !deladmin) {
        if ($address($nick,2) isin $readini(Admin.ini,Global,Admin)) {
          set %admintn $remtok(%admintn,$2,1,32)
          .notice $nick Done.
        }
      }
    }
  }
}


is the bot giving any error info in its status window ?
fraguk
 

Re: Tournament "small" code by me

Postby zNigel- » Mon Jul 20, 2009 4:22 pm

Try this

Code: Select all
on *:text:*:#:{
  if ($chan == %tnchan) {
    if ($1 == !cmds) {
      .notice $nick :: Commands ::
      .notice $nick !admin - Pour connaître l'admin du tournois
      .notice $nick !site - Pour connaître le site du tournois
      .notice $nick !tn - Pour connaîte l'état du tournois
      .notice $nick !tn on/off - Pour Lancer/Arrêter le tournois.

    }
    elseif ($1 == !addadmin) {
      if ($address($nick,2) isin $readini(Admin.ini,Global,Admin)) {
        set %admintn %admintn $2
        .notice $nick Done.
      }
    }
    elseif ($1 == !addsite) {
      if ($address($nick,2) isin $readini(Admin.ini,Global,Admin)) {
        set %sitetn %sitetn $2
        .notice $nick Done.
      }
    }
    elseif ($1 == !tnoff) {
      if ($address($nick,2) isin $readini(Admin.ini,Global,Admin)) {
        set %tn $remtok(%tn,$2,1,32)
        .notice $nick Done. | msg $chan Tournament CLOSE on #CPL.Topstars !
      }
    }
    elseif ($1 == !tnon) {
      if ($address($nick,2) isin $readini(Admin.ini,Global,Admin)) {
        set %tn %tn on
        .notice $nick Done. | msg $chan Tournament OPEN on #CPL.Topstars ! :: Admin: 4 %admintn  ::
      }
    }
    elseif ($1 == !admin) {
      msg $chan Admin ::  $iif(%admintn,$v1,Aucun)
    }
    elseif ($1 == !site) {
      msg $chan Site ::  $iif(%sitetn,$v1,Aucun)
    }
    elseif ($1 == !tn) {
      msg $chan TN ::  $iif(%tn,$v1,OFF)
    }
    elseif ($1 == !delsite) {
      if ($address($nick,2) isin $readini(Admin.ini,Global,Admin)) {
        set %sitetn $remtok(%sitetn,$2,1,32)
        .notice $nick Done.
      }
    }
    elseif ($1 == !deladmin) {
      if ($address($nick,2) isin $readini(Admin.ini,Global,Admin)) {
        set %admintn $remtok(%admintn,$2,1,32)
        .notice $nick Done.
      }
    }
  }
}
zNigel-
 

Re: Tournament "small" code by me

Postby InT69x » Fri Jul 24, 2009 1:10 pm

Thanks you =D
InT69x
 


Return to Mirc Scripting Help

Who is online

Users browsing this forum: No registered users and 3 guests

cron