User Profile Hotspot Scripts:
1h_10000: on login
:put (",rem,10000,1h,10000,,Enable,"); {:local comment [ /ip hotspot user get [/ip hotspot user
find where name="$user"] comment]; :local ucode [:pic $comment 0 2]; :if ($ucode = "vc" or
$ucode = "up" or $comment = "") do={ :local date [ /system clock get date ];:local year [ :pick
$date 7 11 ];:local month [ :pick $date 0 3 ]; /sys sch add name="$user" disable=no start-
date=$date interval="1h"; :delay 5s; :local exp [ /sys sch get [ /sys sch find where name="$user"
] next-run]; :local getxp [len $exp]; :if ($getxp = 15) do={ :local d [:pic $exp 0 6]; :local t [:pic $exp
7 16]; :local s ("/"); :local exp ("$d$s$year $t"); /ip hotspot user set comment="$exp" [find where
name="$user"];}; :if ($getxp = 8) do={ /ip hotspot user set comment="$date $exp" [find where
name="$user"];}; :if ($getxp > 15) do={ /ip hotspot user set comment="$exp" [find where
name="$user"];};:delay 5s; /sys sch remove [find where name="$user"]; [:local mac $"mac-
address"; /ip hotspot user set mac-address=$mac [find where name=$user]]}}
10m_1000: on login
:put (",rem,1000,10m,1000,,Enable,"); {:local comment [ /ip hotspot user get [/ip hotspot user
find where name="$user"] comment]; :local ucode [:pic $comment 0 2]; :if ($ucode = "vc" or
$ucode = "up" or $comment = "") do={ :local date [ /system clock get date ];:local year [ :pick
$date 7 11 ];:local month [ :pick $date 0 3 ]; /sys sch add name="$user" disable=no start-
date=$date interval="10m"; :delay 5s; :local exp [ /sys sch get [ /sys sch find where
name="$user" ] next-run]; :local getxp [len $exp]; :if ($getxp = 15) do={ :local d [:pic $exp 0 6];
:local t [:pic $exp 7 16]; :local s ("/"); :local exp ("$d$s$year $t"); /ip hotspot user set
comment="$exp" [find where name="$user"];}; :if ($getxp = 8) do={ /ip hotspot user set
comment="$date $exp" [find where name="$user"];}; :if ($getxp > 15) do={ /ip hotspot user set
comment="$exp" [find where name="$user"];};:delay 5s; /sys sch remove [find where
name="$user"]; [:local mac $"mac-address"; /ip hotspot user set mac-address=$mac [find
where name=$user]]}}
12_jam: on login
:put (",rem,20000,12h,20000,,Enable,Disable,"); :local mode "X"; {:local date [ /system clock get
date ];:local year [ :pick $date 7 11 ];:local month [ :pick $date 0 3 ];:local comment [ /ip hotspot
user get [/ip hotspot user find where name="$user"] comment]; :local ucode [:pic $comment 0
2]; :if ($ucode = "vc" or $ucode = "up" or $comment = "") do={ /sys sch add name="$user"
disable=no start-date=$date interval="12h"; :delay 2s; :local exp [ /sys sch get [ /sys sch find
where name="$user" ] next-run]; :local getxp [len $exp]; :if ($getxp = 15) do={ :local d [:pic $exp
0 6]; :local t [:pic $exp 7 16]; :local s ("/"); :local exp ("$d$s$year $t"); /ip hotspot user set
comment="$exp $mode" [find where name="$user"];}; :if ($getxp = 8) do={ /ip hotspot user set
comment="$date $exp $mode" [find where name="$user"];}; :if ($getxp > 15) do={ /ip hotspot
user set comment="$exp $mode" [find where name="$user"];}; /sys sch remove [find where
name="$user"]; [:local mac $"mac-address"; /ip hotspot user set mac-address=$mac [find
where name=$user]]}}
seminggu: on login
:put (",rem,30000,7d,30000,,Disable,"); {:local comment [ /ip hotspot user get [/ip hotspot user
find where name="$user"] comment]; :local ucode [:pic $comment 0 2]; :if ($ucode = "vc" or
$ucode = "up" or $comment = "") do={ :local date [ /system clock get date ];:local year [ :pick
$date 7 11 ];:local month [ :pick $date 0 3 ]; /sys sch add name="$user" disable=no start-
date=$date interval="7d"; :delay 5s; :local exp [ /sys sch get [ /sys sch find where name="$user"
] next-run]; :local getxp [len $exp]; :if ($getxp = 15) do={ :local d [:pic $exp 0 6]; :local t [:pic $exp
7 16]; :local s ("/"); :local exp ("$d$s$year $t"); /ip hotspot user set comment="$exp" [find where
name="$user"];}; :if ($getxp = 8) do={ /ip hotspot user set comment="$date $exp" [find where
name="$user"];}; :if ($getxp > 15) do={ /ip hotspot user set comment="$exp" [find where
name="$user"];};:delay 5s; /sys sch remove [find where name="$user"]}}