Login

Username:

Password:


Lost Password?
Forum Index   -   Topic Index
   Scripting
     Message
Register To Post

Flat Previous Topic | Next Topic
Poster Thread
CrazyGirl
Posted on: 2010/2/10 22:00
Just popping in
Joined: 1970/1/1
From:
Posts: 0
Re: Message
the solution is:

alias -l getboxes 
  ; $
chan 
  
if ( !$) return 
  var %
$boxes, %6, %5, %1, %d, %h, %
  
while %
    %
$gettok(%f,$r(1,$numtok(%f,44)),44
    
hadd -m $tbl $+(boxes:,$1,:1$hget($tbl,$+(boxes:,$1,:1)) $+($iif(%3,good,bad),:,%d,:,$+($iif($r(1,2) == 2,-),$r($score.min,$score.max))) 
    
hadd $tbl $+(boxes:,$1,:2$hget($tbl,$+(boxes:,$1,:2)) %
    hadd $tbl 
$+(boxes:,$1,:3$hget($tbl,$+(boxes:,$1,:3)) %
    
%$remtok(%f,%d,1,44
    
inc %
    dec 
%
  

  return 
$sorttok($hget($tbl,$+(boxes:,$1,:2)),32


alias -l startboxes 
  ; $
chan, $roundlimit 
  
var %$chan_ 
  
if ( $hadd -m $tbl $+(rounds:,,:limit) $
  
if ( $hget($tbl,$+(rounds:,%a,:limit)) ) { 
    
hinc $tbl $+(rounds:,%a,:current
    msg 
%** ROUND $hget($tbl,$+(rounds:,%a,:current)) of $hget($tbl,$+(rounds:,%a,:limit)) ** 
  } 
  
msg %a Each box is worth a certain score and can be chosen only onceYou must enter one of the following box availableBe careful, as there are empty boxes 
  tokenize 32 $getboxes
(%a
  
msg %a The boxes available are12,08 $1 08,12 $2 12,08 $3 08,12 $4 12,08 $5 08,12 $6  
  
$+(.timerboxes.,%a,.END1 $time.limit endboxes $!chan_ 1 


alias -l endboxes 
  var %
$chan_ 
  
if ( $timer($+(boxes.,$chan_,.END)) ) $+(.timerboxes.,$chan_,.ENDoff 
  
if ( !$) $+(.timerboxes.,$chan_,.*) off 
  
var %= %a, %= $
  
if ( %) { 
    
msg $chan_ Box A: ( $+ $getscoreorempty($chan_,A) $+ ) Box D: ( $+ $getscoreorempty($chan_,D) $+ ) 
    
msg $chan_ Box B: ( $+ $getscoreorempty($chan_,B) $+ ) Box E: ( $+ $getscoreorempty($chan_,E) $+ ) 
    
msg $chan_ Box C: ( $+ $getscoreorempty($chan_,C) $+ ) Box F: ( $+ $getscoreorempty($chan_,F) $+ ) 
  } 
  
scorenickboxes $chan_ %


alias -l getboxescore 
  var %
$hfind($tbl,$+(*:,$2,:*),0,w).data, %
  
while %
    if ( 
$chan_ == $gettok($hfind($tbl,$+(*:,$2,:*),%a,w).data,2,58) ) return $gettok($wildtok($hget($tbl,$+(boxes:,$v2,:1)),$+(*:,$2,:*),1,32),3,58
    
dec %
  


;
$getboxescore(#chan,box) 

alias -l getscoreorempty return $iif($goodorbadbox($chan_,$2) == bad,Empty,$getboxescore($chan_,$2)) 
;
$getscoreorempty(#chan,box) 

alias -l getnickscore return $iif($hget($tbl,scores: $+ $iif($2,$+($1,:,$2),$1)),$v1,0
;
$getnickscore(nick,[#chan]) { 
Flat Previous Topic | Next Topic

Subject Poster Date
   Message CrazyGirl 2010/2/3 10:04
     Re: Message Pk 2010/2/4 6:34
       Re: Message CrazyGirl 2010/2/4 8:45
         Re: Message Da®K 2010/2/4 12:15
           Re: Message CrazyGirl 2010/2/4 14:43
             Re: Message FireHorse 2010/2/5 11:19
               Re: Message Pk 2010/2/7 22:04
                 Re: Message CrazyGirl 2010/2/8 18:27
                   Re: Message FireHorse 2010/2/9 9:55
                   » Re: Message CrazyGirl 2010/2/10 22:00

Register To Post