Free2Code
The majority of forums are now only available as archives, which means posting/editing is disabled.

The Anything and Everything forum is still open.
 
Time: 2013-05-18, 11:50pm
another master scripter question ...help
Subject: another master scripter question ...help  ·  Posted: 2004-07-27, 05:41am
Rank: ? (27)
Member #: 15623
i have been working on a voice timer script that times how long someone was voiced for and keeps adding the time on each time and deleting the old one it times ok but i cannt figure out how i can make a trigger
that when its typed with a nick it searches for the $2 nick and displays the time of that person
it theres an easier way to make this script work pls help
thankyou
heres the code,
________________________________________________________________________________________
ctcp *:Time:?:{
if (!$read(C:\names.txt,w,$2)) {
/notice $nick $2 Is Now Bieng Timed On Voice Time
/write C:\names.txt $2
}
else notice $nick $2 Is Already Bieng Timed
}
}
on *:VOICE:#:{
vtimechkfile
hadd voicetime $+($vnick,.vtime) $ctime
}
}
on *EVOICE:#:{
vtimechkfile
if ($hget(voicetime,$+($vnick,.vnick))) {
var %tmp = $calc($ctime - $hget(voicetime,$+($vnick,.vtime)))
.hinc voicetime $+($vnick,.total) %tmp
.hdel voicetime $+($vnick,.vtime)
}
}
on *:PART:#:{
vtimechkfile
if ($hget(voicetime,$+($vnick,.vnick))) {
.hinc voicetime $+($vnick,.total) %tmp
.hdel voicetime $+($vnick,.vtime)
}
}
on *:QUIT:#:{
vtimechkfile
if ($hget(voicetime,$+($vnick,.vnick))) {
.hinc voicetime $+($vnick,.total) %tmp
.hdel voicetime $+($vnick,.vtime)
}
}
on *:TEXT:!trigger*:#: { //notice $nick $duration($hget(voicetime,$+($2,.total))) } }
alias vtimechkfile {
if (!$hget(voicetime)) {
hmake voicetime 5000
if ($isfile($mircdirvoicetime.hash)) { hload voicetime $+(",$mircdirvoicetime.hash," }
}
else { hsave -o voicetime $+(",$mircdirvoicetime.hash," }
}

i really need help with this script as its the final piece on a irc bot im making so pls help me
thanks alot
___________________________________________________________________________
cloud369

the saiyan in the night ........ is just too bright
 
  Reply to this ·  Post link ·  Top

Pages: 1

Please login or register to post a reply.

Penguino AVR

Want to learn about robotics or microcontrollers?
Check out the Penguino AVR from our friends at
Icy Labs