Script:
#SetSpeed k/s
:local DSpeed "4096"
:local FullSpeed 4096
:local UName "zxc"
:loca ProName "Share_Pro"
:delay 270ms;
#CheckUserLogin
:local CountUser [/ip hotspot active print count-only where user=$UName]
#:log info $CountUser
:local SetUser ($CountUser+1)
#:log info $SetUser
#UserSpeed Per Account
:local UserSpeed ($FullSpeed / $SetUser)
#ShareSpeed
:local ShareSpeed [/ip hotspot user profile set [/ip hotspot user profile find name =$ProName] rate-limit= ($UserSpeed."k/".$UserSpeed."k")]
#--------------------if all user logout
:if ($CountUser =0) do={
/ip hotspot user profile set [/ip hotspot user profile find name =$ProName] rate-limit= ($DSpeed."k/".$DSpeed."k");
}\
else={
$ShareSpeed
}
EmoticonEmoticon