mIRC Home    About    Download    Register    News    Help

Print Thread
#144312 08/03/06 09:38 PM
Joined: Oct 2005
Posts: 91
T
truguce Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Oct 2005
Posts: 91
I cant figure out why this script stops after the second room
Code:
on ^*:notice:Your vhost*:*: {
  if ($nick == HostServ) {
    .enable #rawjoin
    /join #botz
  }
}
#rawjoin off
raw 329:*: {
  if ($2 == #botz) { 
    /join #scorpio-lounge
    halt
  }
}
raw 329:*: {
  if ($2 == #my-lounge) {
    /join #w4rgod
    halt
  }
}
raw 329:*: {
  if ($2 == #w4rgod) {
    /join #my-training
    halt
  }
}
raw 329:*: {
  if ($2 == #my-training} {
    /join #help
    halt
  }
}
raw 329:*: {
  if ($2 == #help) {
    .disable #rawjoin
  }
}
#rawjoin end
  

no matter what order i put it in it always stops after the second room opens.

#144313 08/03/06 11:01 PM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
Well, take a look at your code. You have the exact same event over and over, so only the first one is going to get executed.

Also, why not just do this. It's much simpler and does exactly the same thing.

Code:
on *:notice:Your vhost*:*: {
  if ($nick == HostServ) {
    join #botz,#my-lounge,#w4rgod,#my-training,#help
  }
}

#144314 08/03/06 11:07 PM
Joined: Oct 2005
Posts: 91
T
truguce Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Oct 2005
Posts: 91
I will try that out. The reason i have it setup that way is because the bot is going to be joining around 13 channels and did not want it to join all at the same time. Thought i could get away with using the raw events in that manner.

#144315 08/03/06 11:10 PM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
Yes, you could do it that way still but it would require each raw to be in a separate file.

Though, doing it that way can be simplified into a single raw event.

Code:
raw 329:*: {
  if ($2 == #botz) join #scorpio-lounge
  else if ($2 == #my-lounge) join #w4rgod
  else if ($2 == #w4rgod) join #my-training
  else if ($2 == #my-training) join #help
  .disable #rawjoin
}

#144316 09/03/06 04:38 AM
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
Small code correction..
Code:
on ^*:notice:Your vhost*:?: {
  if ($nick == HostServ) {
    .enable #rawjoin
    join #botz
  }
}
#rawjoin off
raw 329:*: {
  if ($2 == #botz) join #scorpio-lounge
  else if ($2 == #my-lounge) join #w4rgod
  else if ($2 == #w4rgod) join #my-training
  else if ($2 == #my-training) join #help
  else if ($2 == #help) .disable #rawjoin
}
#rawjoin end


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
#144317 09/03/06 07:36 AM
Joined: Oct 2005
Posts: 91
T
truguce Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Oct 2005
Posts: 91
I thought about that after reading the first responce and i used what you put and it works perfectly. Thanks a bunch. I just got into using dlls today so i might have questions about that soon.
Thanks again


Link Copied to Clipboard