Limiting total bytes for ppp secrets

This is a tutorial on how to limit the quota for ppp users using mikrotik winbox only without user-manager or any other RADIUS system:
At first download this script:
https://drive.google.com/…/0B38ofZbyyLXPS1dlYnZXYTVhb…/view…now if you are using version 6.34 or newer copy the required fields
then paste it at winbox new terminal
1- you ll have script called ppp quota , scheduler called ppp quota and ppp profile called 1GB
2-You can copy the profile 1GB and create other profiles and to change the total quota , from scripting on-up tab you can change the field as shown in pic2
3-Add user at ppp secret and choose profile 1GB (dont add any comment till the user login) , after the user login the comment will add to show the remaining total quota and the last used quota , you can change the Total to the required quota for the user , you can also add any required comment before “$@” but dont change anything after it. Now when user is using the internet the total amount will be decreased by his usage.
4-from scheduler ppp quota you can change the user’s usage update time from interval, also if you add any other profile for limiting quota for ppp users , you have to add this
|| profile=“name” where name is the name of the added profile , add this at this line:
:foreach i in=[/ppp secret find profile=“1GB”### add here ###] do={
5-When the total remaining quota reached 0 MB or less the user will be disabled and commented as Finished user.
If you are using version older than 6.34 then you ll have only script and scheduler , you ll have to add ppp profile by yourself and name it “1GB”, also you ll have to add script for each new user, this script :
{
‪#Enter‬ the name of the user at the end of next line
:local user “SAW”
#Enter the quota of the user in MB at the end of next line
:local MB 1024
:local c [/ppp secret get value-name=comment [find name=“$user”]]
:local c2 [:pick $c ([find $c “$@”]+3) [:len $c]]
:if ($c=“”||$c2=“Finished”) do={
/ppp secret set comment=“$@Total=$MB MB@t Tx=0 MB@tx Rx=0 MB@rx” [find name=“$user”]
}}
change the name and the quota for each user you ll add.
If you have any questions i ll be glad to help

Google drive link not working

Google drive link not working, please publish a valid link…
broken link also for images at the end of the post.

tnx




sir google drive not working anymore plase upddate