123. Mikrotik Hotspot Share User, Share Bandwidth(Speed) V.1


You can contact me: plus.google.com/+PhallaCCMT; youtube.com/phallaccmt; facebook.com/Phalla.CCMT; twitter.com/PhallaCCMT and Phalla.CCMT@gmail.com

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
}


Previous
Next Post »