rendered paste bodyupdating for my little game ^^
but only the money dusnt increase cuz it always says 0...
alias telecomshops {
return $read(telecomshops.txt,s, $1)
}
alias update1 {
var %x 1
while ($read(mtusers.txt, %x)) {
set %selled. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc($rand(300,1000) * 40)
set %selled1. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc($rand(300,1000) * 100)
set %selled2. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc($rand(300,1000) * 140)
set %selled3. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ] $calc($rand(300,1000) * 120)
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($telecomshops($gettok($read(mtusers.txt,%x),1,32)) * %totalselled.total. [ $+ [ $gettok($read(mtusers.txt,%x),1,32) ] ])
var %x $calc($readn + 1)
if (%x >= $lines(mtusers.txt)) {
halt
}
}
}