mIRC Home    About    Download    Register    News    Help

Print Thread
#114361 13/03/05 10:42 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
The following two snippets, which are part of a larger script, seem to be conflicting with each other. When the command, that should activate the first snippet is used, the second one gets started.

Code:
 on *:text:!*list &:*:{ 
  set %file $iif((Truth isin $1) || (Dare isin $1),$+($v1,.txt)) 
  if (!$2) { 
    if ($play(1)) {       msg $nick The $right($1,-1) is on it's way. Please be patient as someone else may be viewing it     } 
    else {       .play $nick %file 2000 |      .unset %file     } 
  } 
  elseif $2 > $lines(%file) { .notice $nick Sorry, but $v1 number $2 doesn't exist } 
  else describe %td.chan $read(%file,$2) 
}
 


Code:
on *:TEXT:!dare*:#:{ 
  set %spinnick_choice d
  if ($nick == %spin.last) { 
    set %darenick %spin.nick 
    set %dare $iif(($1 == !dare),$2-, $remove($$1-,!dare))
    if $istok(%dare,%darenick,32) { set %dare $remtok(%dare,%darenick,1,32) }
    if $numtok(%dare,32) = 1 { set %dare $instok(%dare,15,1,32) }
    tokenize 32 %dare
    if ($1 isnum) {      set %daretime $calc(60 * $1)    }
    elseif ($numtok($1,58)) {      set %daretime $iif($numtok($1,58) = 1,$calc(60 * $duration($1)),$duration($1))    }
    describe # 5 Watches as 1 $nick  sets the egg timer to 4 $duration(%daretime)  for 12 %darenick $+ 's  dare, " $2- " 
    timer 1 %daretime describe # 5 hears the egg timer ding, time up for %darenick $+ 's dare, " $2- " 
  } 
  else if ($nick != %spin.nick) {    describe # 5 looks to $nick and laughs... "Sorry, you were not the one that spun the bottle"  } 
} 


Those are the two sections that I've identified problems with, but the entire script follows, in case someone can spot & help resolve a problem before it shows up.

Code:
#td2 on
on *:text:truth*:#:{  if $nick == %spin.nick {    set %spin.nick_choice T  } }
on *:text:dare*:#:{  if $nick == %spin.nick {    set %spin.nick_choice D  } }
on *:text:*choice*:#:{  if $nick == %spin.nick {      set %spin.nick_choice SC    }  }
on *:text:sc:#:{ set %spin.nick_choice SC }
on *:text:*who*turn*:#:{
  if !%spin.nick_choice {
    if $numtok(%play.list,44) > 1 {      describe # 5 says %spin.nick needs to pick Truth, Dare, %spin.last $+ 's choice, or !choose    }
    elseif $numtok(%play.list,44) == 1  {      describe # 5 says %play.list is the only player    }
    else describe # 5 says there are no players
  }
  elseif %spin.nick_choice == T  {
    describe # 5 reminds %spin.last that %spin.nick is waiting for a Truth query
    describe # 5 or %spin.nick needs to answer %spin.last $+ 's Truth query
  }
  elseif %spin.nick_choice == D {
    .notice %spin.last If you need to check %spin.nick $+ 's limits, type !showme %spin.nick
    describe # 5 reminds %spin.last that %spin.nick is waiting for a Dare
    describe # 5 or %spin.nick needs to complete %spin.last $+ 's dare
  }
  else describe # 5 It is %spin.nick $+ 's turn to spin
}
on *:TEXT:!autoplay:#:{
  if !$read($mknickfn($nick),s,Limits:) {
    describe # is sorry to say that the autoplay feature requires $nick to have their limits set
    set %play_temp $addtok(%play_temp,$nick,44)
    .msg $nick To set your limits, type !limit your limits here
    .msg $nick Put your limits in place of your limits here
    .msg $nick For example: !limit scat, animals, kids, golden showers
  }
  elseif $read($mknickfn($nick),s,autoplay) != on {
    .write -sautoplay $mknickfn($nick) autoplay on
    describe # is happy to announce that $nick has decided to be a permanent player
    set %play.list $addtok(%play.list,$nick,44)
    describe # 5 :Current Players Are %play.list
  }
  else {
    write -sautoplay $mknickfn($nick) autoplay off
    describe # sighs as $nick has decided to no longer be a permanent player
  }
}
on 10:text:!cheat &:?:{
  if (!$2) && (!%cheaters) {    .notice $nick No one is cheating  }
  elseif $2 == %spin.nick {      .notice $nick $2 cannot spin themselves    }
  elseif (!$istok(%play.list,$2,44)) {       .notice $nick $2 is not playing    }
  else {
    set %cheaters $addtok(%cheaters,$2,44)
    .notice $nick $2 is scheduled to be spun
  }
}

on 10:TEXT:!add *:#:{
  var %play.add = $2-
  var %a = 1
  while %a <= $numtok(%play.add,32) {
    if $istok(%watch,$gettok(%play.add,%a,32),44) {
      .timer 1 300 $remtok(%watch,$gettok(%play.add,%a,32),1,44)
      .notice $nick $gettok(%play.add,%a,32) is on a 5min play delay
    }
    else set %play.list $addtok(%play.list,$gettok(%play.add,%a,32),44)
    inc %a
  }
  describe # 5 Current Players Are %play.list
}
on 10:TEXT:!remove *:#:{
  if ( $numtok($2-,32) => 1 ) { 
    var %x = 1 
    while ( %x <= $numtok($2-,32) ) { 
      set %play.list $remtok(%play.list,$gettok($2-,%x,32),1,44) 
      set %cheaters $remtok(%cheaters,$gettok($2-,%x,32),1,44) 
      inc %x 
    } 
  }
  describe # 5 watches as $nick removes $2- from the playlist 
  if (!%play.list) describe # 5There are no players
  else describe # 5 :Current Players Are %play.list
  if $istok($2-,%spin.last,32) {    unset %spin.last   }
  if $istok($2-,%spin.nick,32) {    unset %spin.nick   }
}

on *:TEXT:!watch:#:{
  ;  if (%play.time. $+ $nick) { .write -splaytime $mknickfn($nick) playtime %play.time. $+ $nick }
  if $istok(%cheaters,$nick,44) {    set %cheaters $remtok(%cheaters,$nick,1,44)  }
  if $istok(%play.list,$nick,44) {
    set %play.list $remtok(%play.list,$nick,1,44)
    set %watch $addtok(%watch,$nick,44)
    describe # 5 sighs as $nick decides to stop playing
    if (!%play.list)       describe # 5There are no players 
    else         describe # 5 :Current Players Are %play.list
    if ($nick == %spin.last)  unset %spin.last 
    if ($nick == %spin.nick)  unset %spin.nick 
  }
  else     describe # 5 whispers to $nick $+ , "you are not playing"  
}

on *:PART:#:{
  ;  if (%play.time. $+ $nick) { .write -splaytime $mknickfn($nick) playtime %play.time. $+ $nick }
  if $istok(%cheaters,$nick,44) {    set %cheaters $remtok(%cheaters,$nick,1,44)  }
  if $istok(%watch,$nick,44) { set %watch $remtok(%watch,$nick,1,44) }
  if $istok(%play.list,$nick,44) {
    set %play.list $remtok(%play.list,$nick,1,44)
    if (!%play.list) describe # 5There are no players 
    else         describe # 5 :Current Players Are %play.list
    if ($nick == %spin.last)  unset %spin.last 
    if ($nick == %spin.nick)  unset %spin.nick 
  }
}
on *:QUIT:{
  ;  if (%play.time. $+ $nick) { .write -splaytime $mknickfn($nick) playtime %play.time. $+ $nick }
  if $istok(%cheaters,$nick,44) {    set %cheaters $remtok(%cheaters,$nick,1,44)  }
  if $istok(%watch,$nick,44) { set %watch $remtok(%watch,$nick,1,44) }
  if $istok(%play.list,$nick,44) {    set %play.list $remtok(%play.list,$nick,1,44)  }
  if ($nick == %spin.last)  unset %spin.last 
  if ($nick == %spin.nick)  unset %spin.nick 
}
on *:KICK:#:{
  ;  if (%play.time. $+ $knick) { .write -splaytime $mknickfn($knick) playtime %play.time. $+ $knick }
  if $istok(%cheaters,$knick,44) {    set %cheaters $remtok(%cheaters,$knick,1,44)  }
  if $istok(%watch,$knick,44) { set %watch $remtok(%watch,$knick,1,44) }
  if $istok(%play.list,$knick,44) {
    set %play.list $remtok(%play.list,$knick,1,44)
    if (!%play.list) describe # 5There are no players 
    else         describe # 5 :Current Players Are %play.list
    if ($knick == %spin.last)  unset %spin.last 
    if ($knick == %spin.nick)  unset %spin.nick 
  }
}
on *:NICK:{
  /*
  if (%play.time. $+ $nick) {
    set -u $+ $duration(%play.time. $+ $nick) %play.time. $+ $newnick
  }
  */
  if $istok(%play.list,$nick,44) {    set %play.list $reptok(%play.list,$nick,$newnick,1,44)  }
  if $istok(%watch,$nick,44) { set %watch $reptok(%watch,$nick,$newnick,44) }
  var %away.1 = afk,brb,bbl,ing,bbiab,away
  while (%away.1) && ($istok(%play.list,$newnick,44)) {
    var %away.2 $gettok(%away.1,1,44)
    if ($left($newnick,$len(%away.2)) == %away.2) || ($right($newnick,$len(%away.2)) == %away.2) {
      set %play.list $remtok(%play.list,$newnick,1,44)
      if $istok(%cheaters,$nick,44) {        set %cheaters $remtok(%cheaters,$nick,1,44)      }
      if ($nick == %spin.last) || ($nick == %spin.nick) {        unset $v2      }
    }
    set %away.1 $remtok(%away.1,%away.2,1,44)
  }
  if $read($mknickfn($newnick),s,autoplay) == on {
    set %play.list $addtok(%play.list,$newnick,44)
    describe %td.chan smiles as $newnick plays under the autoplay option
    describe %td.chan 5Current Players are: %play.list
  }
  else {
    if $istok(%play.list,$newnick,44) {
      if ($nick == %spin.last) { set %spin.last $newnick }
      if ($nick == %spin.nick) { set %spin.nick $newnick }
      if $istok(%cheaters,$nick,44) {      set %cheaters $reptok(%cheaters,$nick,$newnick,1,44)    }
    }
  }
}

on *:text:!play:#:{
  if $istok(%play.list,$nick,44) {    describe # 5 whispers to $nick $+ , "you are already playing"  }
  elseif !$read($mknickfn($nick),w,Limit*) {
    set %play_temp $addtok(%play_temp,$nick,44)
    describe # is sorry to say that $nick can't play until they set their limits
    .msg $nick To set your limits, type !limits your limits here
    .msg $nick Put your limits in place of your limits here
    .msg $nick For example: !limit scat, animals, kids, golden showers
  }
  else {
    ;    set -u $+ $read($mknickfn($nick),s,playtime) %play.time. $+ $nick
    set %play.list $addtok(%play.list,$nick,44)
    if $istok(%watch,$nick,44) { set $remtok(%watch,$nick,1,44) }
    describe # 5 smiles as $nick decides to play
    describe # 5 Current Players Are %play.list
  }
}
on *:text:!play*list:*:{
  if (%play.list) {
    .msg $nick 5 Current Players: %play.list
    if (%spin.last)       .msg $nick 5 The last person to spin was: %spin.last
    if (%spin.nick)       .msg $nick 5 The last person to be chosen was: %spin.nick
  }
  else     .msg $nick 5 There is no game currently going
}
on *:text:!players:*:{
  if (%play.list) {
    .msg $nick 5 Current Players: %play.list
    if (%spin.last)       .msg $nick 5 The last person to spin was: %spin.last
    if (%spin.nick)       .msg $nick 5 The last person to be chosen was: %spin.nick
  }
  else     .msg $nick 5 There is no game currently going
}
/*
on *:text:!playtime &:#:{
  if (!$2) && (!%play.time. $+ $nick) {
    .msg $nick Format for the !playtime command is !playtime <time>
    .msg $nick <time> is to be set in HH:MM:SS format
  }
  elseif (!$2) .msg $nick Time remaining is $duration(%play.time. $+ $nick)
  else {    set -u $+ $duration($2) %play.time. $+ %spinnick  }
}
*/

on 10:TEXT:!spinfor*:*:{
  if (%spin.nick_choice == t) {
    .write -sTruth: $mknickfn($2) Truth: $calc(1 + $read($mknickfn($2),s,Truth:))
    .write -l1 Choices.txt $calc(1 + $read(Choices.txt,1))
  }
  elseif (%spinick_choice == d) {
    .write -sDare: $mknickfn($2) Dare: $calc(1 + $read($mknickfn($2),s,Dare:))
    .write -l2 Choices.txt $calc(1 + $read(Choices.txt,2))
  }
  else {
    .write -s"Spinner's Choice:" $mknickfn($2) Spinner's Choice: $calc(1 + $read($mknickfn($2),s,Spinner's Choice:))
    .write -l3 Choices.txt $calc(1 + $read(Choices.txt,3))
  }
  unset %spin.nick_choice
  set %cheat $gettok(%cheaters,1,44)
  set %cheaters $remtok(%cheaters,%cheat,1,44)
  if !%cheat {
    if $numtok(%play.list,44) == 1 {      describe # It appears that %play.list is the only player    }
    elseif ($numtok(%play.list,44) == 2) {
      set %spin.nick $gettok(%play.list,$rand(1,$numtok(%play.list,44)),44)
      set %spin.last $$2
      describe # 5 looks at  %spin.nick  $+ , and says " $+ $$2 wishes to know 'Truth, Dare, $$2 $+ 's Choice, # $+ 's choice with !choose?"
      .timer 1 3 .notice %spin.nick 4You were picked! Truth, Dare, $$2 $+ 's Choice, !choose?
    }
    else {
      set %spin.nick $gettok(%play.list,$rand(1,$numtok(%play.list,44)),44)
      set %spin.last $$2
      .write $+(lastspin_,$ctime($date)) %spin.last
      .timer 1 1 describe # 5 grins as $nick spins the bottle for $$2
      .timer 1 3 describe # 5 gasps happily as it halts, pointing to %spin.nick
      .timer 1 5 describe # 4 %spin.nick  $+ 5, Truth, Dare, $$2 $+ 's Choice, or !choose?
      .timer 1 6 .notice %spin.nick 4You were picked! Truth, Dare, $$2 $+ 's Choice, or !choose?
    }
  }
  else {
    set %spin.nick %cheat
    unset %cheat
    set %spin.last $$2
    if $numtok(%play.list,44) == 2 {
      describe # 5 looks at %spin.nick $+ , and says " $+ $$2 wishes to know 'Truth, Dare, $$2 $+ 's Choice, # $+ 's choice with !choose?"
      .timer 1 3 .notice %spin.nick 4You were picked! Truth, Dare, $$2 $+ 's Choice, !choose?
    }
    elseif $numtok(%play.list,44) > 2 {
      .timer 1 1 describe # 5 grins as $nick spins the bottle for $$2
      .timer 1 3 describe # 5 gasps happily as it halts, pointing to %spin.nick
      .timer 1 5 describe # 5 %spin.nick  $+ , Truth, Dare, $$2 $+ 's Choice, or !choose?
      .timer 1 6 .notice %spin.nick 4You were picked! Truth, Dare, $$2 $+ 's Choice, or !choose?
    }
    else {
      .timer 1 1 describe # 5 grins as $nick spins the bottle for $$2
      .timer 1 3 describe # 5 gasps happily as it halts, pointing to %spin.nick
      .timer 1 5 describe # 4 %spin.nick  $+ 5, Truth, Dare, $$2 $+ 's Choice, or !choose?
      .timer 1 6 .notice %spin.nick 4You were picked! Truth, Dare, $$2 $+ 's Choice, or !choose?
    }
  }
}
on *:TEXT:!spin:#:{
  if (!$istok(%play.list,$nick,44)) {
    describe # Sorry $nick $+ , but I don't see your name in the players list
    .msg $nick type !play if you wish to play
    halt
  }
  if ($nick != %spin.nick) && $istok(%play.list,%spin.nick,44) {    
    describe # 5 whispers to $nick $+ , Sorry..but it's not your turn to spin 
    halt
  }
  if (t isin %spin.nick_choice) {
    .write -sTruth: $mknickfn($nick) Truth: $calc(1 + $read($mknickfn($nick),s,Truth:))
    .write -l1 Choices.txt $calc(1 + $read(Choices.txt,1))
  }
  elseif (d isin %spin.nick_choice) {
    .write -sDare: $mknickfn($nick) Dare: $calc(1 + $read($mknickfn($nick),s,Dare:))
    .write -l2 Choices.txt $calc(1 + $read(Choices.txt,2))
  }
  else {
    .write -s"Spinner's Choice:" $mknickfn($nick) Spinner's Choice: $calc(1 + $read($mknickfn($nick),s,Spinner's Choice:))
    .write -l3 Choices.txt $calc(1 + $read(Choices.txt,3))
  }
  unset %spin.nick_choice
  set %cheat $gettok(%cheaters,1,44)
  set %cheaters $remtok(%cheaters,%cheat,1,44)
  if $numtok(%play.list,44) == 1 {      .describe # 5apologizes to $nick $+ . It appears you are the only player.    }
  else {
    if (!%cheat) {
      if $numtok(%play.list,44) == 2 {
        set %spin.last $nick
        set %spin.nick $remtok(%play.list,$nick,1,44)
        describe # 5 looks at  %spin.nick  $+ , and says " $+ $nick wishes to know 'Truth, Dare, $nick $+ 's Choice, or $me $+ 's choice with !choose?"
        .timer 1 3 .notice %spin.nick 4You were picked! Truth, Dare, $nick $+ 's Choice, or !choose?
        halt
      }
      else {
        if (!%spin.nick) { set %spin.nick $nick }
        while %spin.nick == $nick {          set %spin.nick $gettok(%play.list,$rand(1,$numtok(%play.list,44)),44)        }
        set %spin.last $nick
        .timer 1 1 describe # 5 grins as $nick spins the bottle...
        .timer 1 3 describe # 5 gasps happily as it halts, pointing to %spin.nick
        .timer 1 5 describe # 5 %spin.nick $+ , Truth, Dare, $nick $+ 's choice, or !choose
        .timer 1 6 .notice %spin.nick 4You were picked! Truth, Dare, $nick $+ 's Choice, or !choose?
        halt
      }
    }
    if $numtok(%play.list,44) == 2 {
      set %spin.nick %cheat
      set %spin.last $nick
      describe # 5 looks at %spin.nick $+ , and says " $+ $nick wishes to know 'Truth, Dare, $nick $+ 's Choice, or $me $+ 's choice with !choose?"
      .timer 1 3 .notice %spin.nick 4You were picked! Truth, Dare, $nick $+ 's Choice, or !choose?
      halt
    }
    else {
      set %spin.nick %cheat
      set %spin.last $nick
      .timer 1 1 describe # 5 grins as $nick spins the bottle...
      .timer 1 3 describe # 5 gasps happily as it halts, pointing to %spin.nick
      .timer 1 5 describe # 5 %spin.nick $+ , Truth, Dare, $nick $+ 's Choice, or !choose? 
      .timer 1 6 .notice %spin.nick 4You were picked! Truth, Dare, $nick $+ 's Choice, or !choose?
      halt
    }
  }
}

on $10:text:/!c[dt] /i:?:{ 
  var %a = $mid($1,2) $+ .txt,%b = $remove(cd.txtct.txt,%a), $& 
    %c = $iif(%a = ct.txt,truthed,dared),%n = .notice $nick $2 
  if (!$2) && ($1 == !ct) { .play $nick ct.txt 2000 }
  elseif (!$2) && ($1 == !cd) { .play $nick cd.txt 2000 }
  else {
    if ($read(%a,w,$2)) { 
      write -dl $readn %a 
      %n is no longer being %c 
      halt  
    } 
    if ($read(%b,w,$2)) { 
      write -dl $readn %b 
      %n is no longer being $remove(trutheddared,%c) 
    } 
    write %a $2 
    %n has been %c 
  }
} 

on *:TEXT:!choose:#:{
  if $read(cd.txt,w,$nick) {    set %choice B  }
  elseif $read(ct.txt,w,$nick) {    set %choice A  }
  else {    set %choice $rand(A,B)  }
  if (%choice == A) {
    set %choice Truth
    set %spin.nick_choice T
    write -sTruth choose.txt Truth $calc(1 + $read(choose.txt,s,Truth))
    write choose.txt Truth $fulldate %spin.nick
  }
  else {
    set %choice Dare
    set %spin.nick_choice D
    write -sDare choose.txt Dare $calc(1 + $read(choose.txt,s,Dare))
    write choose.txt Dare $fulldate %spin.nick
  }
  describe # 5 randomly picks %choice for4 %spin.nick 
  //echo # Truth $read(choose.txt,s,Truth), Dare $read(choose.txt,s,Dare)
}

[suggestions]
on *:text:!& &:#:{ 
  if ($left($1,2) == !s) {
    if ($2 == Truth) || ($2 == Dare) { 
      if ($($+(%,$2,line),2) == $($+(%old,$2),2)) set $+(%,$2,line) $rand(1,$lines($+($2,.txt))) 
      describe $chan suggests $read($+($2,.txt),$($+(%,$2,line),2)) 
      set %old $2 
      set % $+ $2 $+ line $rand(1,$lines($2 $+ .txt)) 
    } 
  }
}

[lists]
/*
on *:text:!*list &:*:{ 
  set %file $iif((Truth isin $1) || (Dare isin $1),$+($v1,.txt)) 
  if (!$2) { 
    if ($play(1)) {       msg $nick The $right($1,-1) is on it's way. Please be patient as someone else may be viewing it     } 
    else {       .play $nick %file 2000 |      .unset %file     } 
  } 
  elseif $2 > $lines(%file) { .notice $nick Sorry, but $v1 number $2 doesn't exist } 
  else describe %td.chan $read(%file,$2) 
}
*/
on *:text:!darelist &:*:{
  if $2 == $null .play $nick dare.txt
  else describe %td.chan $read(dare.txt,$2)
}
on *:text:!truthlist &:*:{
  if $2 == $null .play $nick truth.txt
  else describe %td.chan $read(truth.txt,$2)
}


[timers]
on *:TEXT:!timer*:*:{
  if (!$2) && !$timer(0) {
    .msg $nick There are no timers active
    halt
  }
  elseif ($2 isnum) && ($2 <= $timer(0)) {
    if $+($timer,$chr(40),$2,$chr(41)) == checkconnect { halt }
    else {
      .timer $+ $2 off
      describe $chan anounces that Timer $+($chr(35),$2) has been stopped by $nick
    }
  }
  else {
    var %timer_count = 1
    while %timer_count <= $timer(0) {
      if $timer(%timer_count) isnum {        .msg $nick Timer $chr(35) %timer_count $duration($timer(%timer_count).secs) remaining      }
      inc %timer_count 1
    }
  }
}
on 10:TEXT:!truthfor & *:#:{ 
  set %spinnick_choice t
  set %truthnick $2
  describe # 5 Watches as 1 $nick  sets the egg timer to 4 $duration(%truthtime)  for 12 %truthnick $+ 's  truth, " $3- " 
  .splay -p (C:\My Shared Folder\MP3\Jeopardy Think Music.mp3)
  timer 1 300 describe # 5 hears the egg timer ding, time up for %truthnick $+ 's truth, " $3- " 
} 

on *:TEXT:!truth *:#:{ 
  set %spinnick_choice t
  if ($nick == %spin.last) { 
    set %truthnick %spin.nick 
    describe # 5 Watches as 1 $nick  sets the egg timer to 4 5mins  for 12 %truthnick $+ 's  truth, " $2- " 
    .splay -p (C:\My Shared Folder\MP3\Jeopardy Think Music.mp3)
    timer 1 300 describe # 5 hears the egg timer ding, time up for %truthnick $+ 's truth, " $2- " 
  } 
  else if ($nick != %spin.nick) {    describe # 5 looks to $nick and laughs... "Sorry, you were not the one that spun the bottle"  } 
} 

on 10:TEXT:!darefor*:#:{ 
  if (!$2) && $len($1) = 8 {
    .msg $nick Use !darefor <time> <nick> <dare>
    .msg $nick <time> can be in minutes or HH:MM:SS format
  }
  else {
    set %spinnick_choice d
    set %darenick $2
    set %dare $iif(($1 == !darefor), $2-, $remove($$1-,!darefor))
    if istok(%dare,%darenick,44) { set %dare $remtok(%dare,%darenick,1,44) }
    tokenize 32 %dare
    if ($1 isnum) {      set %daretime $calc(60 * $1)    }
    elseif ($numtok($1,58)) {      set %daretime $iif($numtok($1,58) = 1,$calc(60 * $duration($1)),$duration($1))    }
    else set %daretime 900
    describe # 5 Watches as 1 $nick  sets the egg timer to 4 $duration(%daretime)  for 12 %darenick $+ 's  dare, " $2- " 
    timer 1 %daretime describe # 5 hears the egg timer ding, time up for %darenick $+ 's dare, " $2- " 
  } 
} 

on *:TEXT:!dare*:#:{ 
  set %spinnick_choice d
  if ($nick == %spin.last) { 
    set %darenick %spin.nick 
    set %dare $iif(($1 == !dare),$2-, $remove($$1-,!dare))
    if $istok(%dare,%darenick,32) { set %dare $remtok(%dare,%darenick,1,32) }
    if $numtok(%dare,32) = 1 { set %dare $instok(%dare,15,1,32) }
    tokenize 32 %dare
    if ($1 isnum) {      set %daretime $calc(60 * $1)    }
    elseif ($numtok($1,58)) {      set %daretime $iif($numtok($1,58) = 1,$calc(60 * $duration($1)),$duration($1))    }
    describe # 5 Watches as 1 $nick  sets the egg timer to 4 $duration(%daretime)  for 12 %darenick $+ 's  dare, " $2- " 
    timer 1 %daretime describe # 5 hears the egg timer ding, time up for %darenick $+ 's dare, " $2- " 
  } 
  else if ($nick != %spin.nick) {    describe # 5 looks to $nick and laughs... "Sorry, you were not the one that spun the bottle"  } 
} 
#td2 end
  


I know that there's some duplication in the script, but that's due to a quick fix on the current problem

#114362 13/03/05 11:54 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
* Just off the mark i can see problems in your script already, u have events that look like they well cacth other events text or possable texts etc.

on your specific problem...
Show us the actual text that someone might type for the first event, that is triggering the second event?

#114363 14/03/05 01:41 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
When someone issues the command
Code:
!darelist 
the timer under !dare starts up at 15mins for the dare "list"

#114364 14/03/05 02:05 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
on *:text:!*list &:*:{ this matches !<anything here>list<space><something here>
on *:TEXT:!dare*:#:{ this matches !dare<anything here>

!darelist only matches the 2nd event, the first event needs a word following it. try replacing with on *:text:!*list*:*:{

#114365 14/03/05 03:44 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Thanks...didn't realize that the & meant that there had to be something in that location. The help file says that the & is to be used in place of a single word, but it doesn't say that the word has to be supplied.

You also mentioned that a quick look at my overall script made you think there might/will be other problems. If you wouldn't mind going through, identifying those problems and coming up with resolutions, it would be appreciated...rather than me trying to find solutions as they come up, and maybe coming here again & again.

#114366 14/03/05 05:07 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
If its going its going, however the following 3 text events i would move below all others, as someone might match them while issueing a command ment for the others.

on *:text:*choice*:#:{
on *:text:*who*turn*:#:{
on *:text:!& &:#:{


I would have thought on *:text:!& &:#:{ may have already been trapping others but im not fully sure on that.

#114367 15/03/05 02:12 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Appreciate your suggestions, and while the !& & wasn't catching stuff it wasn't supposed to, it did end up giving me difficulties elsewhere, which I have resolved. The other two that you mentioned are placed at the beginning because I need them to be caught first, otherwise I found that they weren't working properly.

#114368 15/03/05 03:01 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
no worries, i just saw problems with something like...

!dare fred 10 to make a choice between blah and blah blah
Trips >>> on *:text:*choice*:#:{

!dare fred 10 find who turned off the lights
Trips >>> on *:text:*who*turn*:#:{

#114369 15/03/05 04:12 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
While, technically, those are possibilities, in running the bot in the Truth or Dare room for almost a year now, I can't say that I can recall a situation like that ever coming up. laugh

#114370 15/03/05 07:39 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
/me searchs aimlessly for the room in irc space so i can complain when my dare doesnt work smile

#114371 15/03/05 02:48 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
No need to search aimlessy. We're on irc.bondage.com and the room is #A-BDSM-Truth-or-Dare-Dungeon

#114372 15/03/05 02:59 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
You shouldn't spam servers/channels. wink

#114373 15/03/05 11:11 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Didn't realize that posting the address of the server & room name where I run the bot would be considered spamming it. If so, I apologize.

Tried to edit the earlier posting, which you're claiming is spamming the server/room, but was told that the maximum edit time had expired.

#114374 15/03/05 11:15 PM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
If it were spam, I'd have edited it by now smirk

P.S. I think SladeKraven was being facetious.

Regards,

Last edited by Mentality; 15/03/05 11:15 PM.

Mentality/Chris
#114375 16/03/05 12:28 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Thanks for the update, Mentality. Sometimes it's hard to tell what's acceptable and what's not, so I usually try to use what I've seen in other postings as a basis.


Link Copied to Clipboard