rendered paste bodyalias bakker {
return $read(bakkers.txt,s, $1)
}
alias telecomshops {
return $read(telecomshops.txt,s, $1)
}
alias update1 {
var %x 1
while ($read(mtusers.txt, %x)) {
inc %money. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc(50000 * $telecomshops($gettok($read(mtusers.txt,%x),1,32)))
msg $chan 14 telecomshop %x $+ / $+ $lines(mtusers.txt) updated owner: $gettok($read(mtusers.txt,%x),1,32)
var %x $calc($readn + 1)
if (%x > $lines(mtusers.txt)) {
halt
}
}
}
alias update2 {
var %y 1
while ($read(mtusers.txt, %y)) {
inc %money. [ $+ [ $gettok($read(mtusers.txt,%y),1,32) ] ] $calc(15000 * $bakker($gettok($read(mtusers.txt,%y),1,32)))
msg $chan 14 bakery %y $+ / $+ $lines(mtusers1.txt) updated owner: $gettok($read(mtusers.txt,%y),1,32)
inc %y
if (%y > $lines(mtusers.txt)) {
halt
}
}
}
on *:TEXT:!update*:#:{ if ($address($nick,2) == $address($me,2)) {
$update1
$update2
}
}