mIRC Home    About    Download    Register    News    Help

Print Thread
help me why issnt this working #114419 14/03/05 08:14 AM
Joined: Dec 2004
Posts: 16
E
Expo Offline OP
Pikka bird
OP Offline
Pikka bird
E
Joined: Dec 2004
Posts: 16
Hi ,
first the code

Code:

on *:TEXT:!*adv:#search-clan.nl: {
  if ( $1 == !startadv) {
    if ( $nick isop $chan ) {
      msg $chan Started Advertising
      timeradv 0 4000 msg $chan Idle Bot by #Search-clan.nl !request #channel , and stay in #search-clan.nl!!
    }
    else {
      msg $chan You do not have access to that command
      halt
    }
    halt
  }
  elseif ( $1 == !stopadv ) {
    if ( !$timer(adv) ) {
      msg $chan I am not advertising!
      halt
    }
    if ( $nick isop $chan ) {
      timeradv off
      msg $chan Stopped Advertising
    }
    else {
      msg $chan You do not have access to that command
    }
  }
} 
}

on *:TEXT:!help:#search-clan.nl: {
inc -u10 $+(%,flood.,$Nick)
if ( $+(%,flood.,$Nick) >= 2 ) halt
//msg $nick 7,14 -[1Doe "!ZoekC // Skill Info // Active // more info //" in de channel om een clan te zoeken  <7>1 Doe "!ZoekM // Skill Info // Active // more info //" in de channel om members te zoeken 7]-

on *:JOIN:#search-clan.nl: {
  //notice $nick 7,14Welcome to #search-clan.nl . !help voor commands. plz perform !!
}
}
}

on *:TEXT:!request*:#search-clan.nl:{
inc -u10 $+(%,flood.,$Nick)
if ( $+(%,flood.,$Nick) >= 2 ) halt
if ($left($2,1) == $chr(35)) {
if ($me !ison $2) {
  /join $2
  /notice $nick Joining $+(',$2,') if evrything is ok i stay !
  /timer 1 5 req_check $2 $nick $chan
}
else { .msg $chan Yow Yow i'm allready in $+(',$2,'.) }
}
else { .notice $chan It got to be: !request <#channel> }
}
alias req_check {
if ($me ison $1) {
if ($nick($1,0) >= 20) {
  if ($nick($1,0,o) >= 2) {
    if ($2 isop $1) {
      msg #search-clan.nl 5#search-clan.nl :: I'm requested by $+(',$2,') to $+(',$1,'.)Evrything is ok i'll stay!
      msg $1 5#search-clan.nl :: Evrything Lookst Alright, Min 20 idlers 2 ops !! i'll stay :: request your own bot #search-clan.nl
      writeini -n idler.ini $3 $2 $1
    }
    else { /msg $2 Error!. $+(',$2,') The 1 that Requested me need to have op | part $1 Error }
  }
  else { /msg $2 Error!. $+(',$1,') You need to have atleast 2 OPS in channel! | part $1 Error }
}
else { /msg $2 Error!. $+(',$1,') You need to have atleast 20 idlers in your channel! | part $1 Error }
}
}

on *:PART:#search-clan.nl: {
if ($readini(idler.ini,$chan,$nick)) { part $readini(idler.ini,$chan,$nick) $nick has left $chan | | msg $chan Purged $readini(idler.ini,$chan,$nick) | remini idler.ini $chan $nick   }
}
}


on *:TEXT:!zoekC *:#Search-clan.nl:  {
inc -u10 $+(%,flood.,$Nick)
if ( $+(%,flood.,$Nick) >= 2 ) halt
//amsg In #Search-clan.nl zoekt iemand een Clan om te joinen: $2- /msg $nick for details. }

on *:TEXT:!Zoekm *:#search-clan.nl:  {
inc -u10 $+(%,flood.,$Nick)
if ( $+(%,flood.,$Nick) >= 2 ) halt
//amsg In #search-clan.nl zoekt iemand een member om Clan te joinen: $2- /msg $nick for details. }

on *:TEXT:!help:#search-clan.nl: {
inc -u10 $+(%,flood.,$Nick)
if ( $+(%,flood.,$Nick) >= 2 ) halt
//msg $nick 7,14 -[1Doe "!ZoekC // Skill Info // Active // more info //" in de channel om een clan te zoeken  <7>1 Doe "!ZoekM // Skill Info // Active // more info //" in de channel om members te zoeken 7]-
}
}

on *:JOIN:#search-clan.nl: {
//notice $nick 7,14Welcome to #search-clan.nl . !help voor commands. plz perform !!
}
}



ok strangething is , first all works , and now nothing works ,
i dont see annything wrong in it , can some1 else plz take a good look at it ,

1 more thing with my request script , is it possibel that if some1 change's nick and leave my channel , that my idler.ini also change's that name and part that channel from that guy who's nick is changed .

thx alot

Re: help me why issnt this working #114420 14/03/05 08:54 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Go back to your code in remotes and look in the top left corner for the button labeled {} and click it, you have several extra close braces in places, and some missing in places.

Below is a quick fix, i havent checked the code, rather just inserted or removed } where they appear they should be.

Code:
on *:TEXT:!*adv:#search-clan.nl: {
  if ( $1 == !startadv) {
    if ( $nick isop $chan ) {
      msg $chan Started Advertising
      timeradv 0 4000 msg $chan Idle Bot by #Search-clan.nl !request #channel , and stay in #search-clan.nl!!
    }
    else {
      msg $chan You do not have access to that command
      halt
    }
    halt
  }
  elseif ( $1 == !stopadv ) {
    if ( !$timer(adv) ) {
      msg $chan I am not advertising!
      halt
    }
    if ( $nick isop $chan ) {
      timeradv off
      msg $chan Stopped Advertising
    }
    else {
      msg $chan You do not have access to that command
    }
  }
} 

on *:TEXT:!help:#search-clan.nl: {
  inc -u10 $+(%,flood.,$Nick)
  if ( $+(%,flood.,$Nick) >= 2 ) halt
  //msg $nick 7,14 -[1Doe "!ZoekC // Skill Info // Active // more info //" in de channel om een clan te zoeken  <7>1 Doe "!ZoekM // Skill Info // Active // more info //" in de channel om members te zoeken 7]-
}

on *:JOIN:#search-clan.nl: {
  //notice $nick 7,14Welcome to #search-clan.nl . !help voor commands. plz perform !!
}

on *:TEXT:!request*:#search-clan.nl:{
  inc -u10 $+(%,flood.,$Nick)
  if ( $+(%,flood.,$Nick) >= 2 ) halt
  if ($left($2,1) == $chr(35)) {
    if ($me !ison $2) {
      /join $2
      /notice $nick Joining $+(',$2,') if evrything is ok i stay !
      /timer 1 5 req_check $2 $nick $chan
    }
    else { .msg $chan Yow Yow i'm allready in $+(',$2,'.) }
  }
  else { .notice $chan It got to be: !request <#channel> }
}

alias req_check {
  if ($me ison $1) {
    if ($nick($1,0) >= 20) {
      if ($nick($1,0,o) >= 2) {
        if ($2 isop $1) {
          msg #search-clan.nl 5#search-clan.nl :: I'm requested by $+(',$2,') to $+(',$1,'.)Evrything is ok i'll stay!
          msg $1 5#search-clan.nl :: Evrything Lookst Alright, Min 20 idlers 2 ops !! i'll stay :: request your own bot #search-clan.nl
          writeini -n idler.ini $3 $2 $1
        }
        else { /msg $2 Error!. $+(',$2,') The 1 that Requested me need to have op | part $1 Error }
      }
      else { /msg $2 Error!. $+(',$1,') You need to have atleast 2 OPS in channel! | part $1 Error }
    }
    else { /msg $2 Error!. $+(',$1,') You need to have atleast 20 idlers in your channel! | part $1 Error }
  }
}

on *:PART:#search-clan.nl: {
  if ($readini(idler.ini,$chan,$nick)) { part $readini(idler.ini,$chan,$nick) $nick has left $chan | msg $chan Purged $readini(idler.ini,$chan,$nick) | remini idler.ini $chan $nick }
}

on *:TEXT:!zoekC *:#Search-clan.nl:  {
  inc -u10 $+(%,flood.,$Nick)
  if ( $+(%,flood.,$Nick) >= 2 ) halt
  //amsg In #Search-clan.nl zoekt iemand een Clan om te joinen: $2- /msg $nick for details.
}

on *:TEXT:!Zoekm *:#search-clan.nl:  {
  inc -u10 $+(%,flood.,$Nick)
  if ( $+(%,flood.,$Nick) >= 2 ) halt
//amsg In #search-clan.nl zoekt iemand een member om Clan te joinen: $2- /msg $nick for details. }

on *:TEXT:!help:#search-clan.nl: {
  inc -u10 $+(%,flood.,$Nick)
  if ( $+(%,flood.,$Nick) >= 2 ) halt
  //msg $nick 7,14 -[1Doe "!ZoekC // Skill Info // Active // more info //" in de channel om een clan te zoeken  <7>1 Doe "!ZoekM // Skill Info // Active // more info //" in de channel om members te zoeken 7]-
}

on *:JOIN:#search-clan.nl: {
  //notice $nick 7,14Welcome to #search-clan.nl . !help voor commands. plz perform !!
}

Re: help me why issnt this working #114421 14/03/05 06:04 PM
Joined: Dec 2004
Posts: 16
E
Expo Offline OP
Pikka bird
OP Offline
Pikka bird
E
Joined: Dec 2004
Posts: 16
this works great again thx alot ,

but is there a way to keep on track from those usrs who change;s nick? thx alot

Re: help me why issnt this working #114422 14/03/05 08:27 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Code:
on *:nick:{
  ;
  ;* nick change has no $chan value so i use a %chan for similarity of code sakes * also so if u ever change the channel you only have to replace it here once.
  var %chan = #search-clan.nl
  ;
  if ($readini(idler.ini,%chan,$nick)) {
    writeini -n idler.ini %chan $newnick $v1
    remini idler.ini %chan $nick
  }
}

Re: help me why issnt this working #114423 18/03/05 10:10 AM
Joined: Dec 2004
Posts: 16
E
Expo Offline OP
Pikka bird
OP Offline
Pikka bird
E
Joined: Dec 2004
Posts: 16
Quote:
Code:
on *:nick:{
  ;
  ;* nick change has no $chan value so i use a %chan for similarity of code sakes * also so if u ever change the channel you only have to replace it here once.
  var %chan = #search-clan.nl
  ;
  if ($readini(idler.ini,%chan,$nick)) {
    writeini -n idler.ini %chan $newnick $v1
    remini idler.ini %chan $nick
  }
}


Thx alot , thisa works great , i have a nice script now smile