rendered paste bodyalias update1 {
var %x 1
while ($read(mtusers.txt, %x)) {
set %selled.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $rand(300,1000)
set %selled1.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $rand(300,1000)
set %selled2.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $rand(300,1000)
set %selled3.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $rand(300,1000)
set %selled. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc(%selled.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] * 40)
if ($calc(%selled.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] * $telecomshops($gettok($read(mtusers.txt,%x),1,32))) > %tecos.1 [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ]) {
set %selled.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] %tecos.1 [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ]
set %selled. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc(%selled.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] * 40)
}
set %selled1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc(%selled1.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] * 100)
if ($calc(%selled1.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] * $telecomshops($gettok($read(mtusers.txt,%x),1,32))) > %tecos.2 [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ]) {
set %selled1.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] %tecos.2 [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ]
set %selled1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc(%selled1.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] * 100)
}
set %selled2. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc(%selled2.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] * 120)
if ($calc(%selled2.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] * $telecomshops($gettok($read(mtusers.txt,%x),1,32))) > %tecos.3 [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ]) {
set %selled2.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] %tecos.3 [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ]
set %selled2. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc(%selled2.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] * 120)
}
set %selled3. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc(%selled3.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] * 140)
if ($calc(%selled3.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] * $telecomshops($gettok($read(mtusers.txt,%x),1,32))) > %tecos.4 [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ]) {
set %selled3.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] %tecos.4 [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ]
set %selled3. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc(%selled3.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] * 140)
}
dec %tecos.1 [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc(%selled.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] * $telecomshops($gettok($read(mtusers.txt,%x),1,32)))
dec %tecos.2 [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc(%selled1.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] * $telecomshops($gettok($read(mtusers.txt,%x),1,32)))
dec %tecos.3 [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc(%selled2.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] * $telecomshops($gettok($read(mtusers.txt,%x),1,32)))
dec %tecos.4 [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc(%selled3.1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] * $telecomshops($gettok($read(mtusers.txt,%x),1,32)))
set %totalselled. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc(%selled. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] + %selled1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] + %selled2. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] + %selled3. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ])
inc %money. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc(%totalselled. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] * $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
}
}
}