Code: Select all
|--- consent.mac V2 by Virtuoso65 ---
#define inipath "consent.ini"
#turbo
Sub Main
/zapvars
/declare rog global
/declare CG global 0
/declare a1 global
/varset a1 0
/declare c1 global
/varset c1 0
/declare e1 global
/varset e1 0
|--------------------------------------------
/if (!${Defined[Param0]}) {
/call Consentlist
}
/if (${String[@Param0].Equal[group]}) {
/Call ConsentGroup
/end
}
/if (${String[@Param0].Equal[list]}) {
/Call ListINI
/end
}
/if (${String[@Param0].Equal[help]}) {
/call Help
/end
}
/if (${Defined[Param0]}) {
/goto :loop3
}
|++++++++Adds new people into the consent list++++++++++++++++++++++++++++++++++++++
:loop3
/for c1 0 to 20
/if (!${Bool[${Ini[inipath, consented, @c1]}]}) {
/varset e1 @c1
/goto :loop4
}
/next c1
:loop4
/for a1 0 to 20
/if (!${Defined[Param@a1]}) {
/end
}
/ini "inipath" consented ${Int[@e1]} @Param@a1
/echo ${Int[@e1]} - @Param@a1, Is being appended to the ini.
/varadd e1 1
/next a1
/return
|-------Help for those who need it---------------------------------------
Sub Help
/echo If you add names by leaving params after mac call ie. /mac consent name1 name2 ...name(N).
/echo If you want to consent your group then /mac consent group.
/echo If you do not specify add params and it will consent the people in the ini.
/echo if you forgot who is on your consent list then type /mac consent list.
/return
|------Consents people on your list----------------------------------------
Sub Consentlist
/for c1 0 to 20
/if (!${Bool[${Ini[inipath, consented, @c1]}]}) {
/if (@c1<0) {
/echo There is noone on your consent list. Try /mac consent help.
/end
} else /end
}
/echo Consenting ${Ini[inipath, consented, @c1]}.
/varset rog ${Ini[inipath, consented, @c1]}
/consent @rog
/delay 3s
/next c1
/return
|-------Consents people in your group---------------------------------------
Sub ConsentGroup
/if (!${Me.Grouped}) {
/echo You do not have a group, go find one.
/end
}
/for CG 1 to ${Group}
/if (!${Me.Grouped}) /end
/varset rog ${Group[@CG]}
/echo @rog is being consented.
| /delay 3s
/consent @rog
/next CG
/return
|-------Lists people on your ini---------------------------------------
Sub ListINI
/echo Players on Consent.ini list.
/for c1 0 to 20
/if (!${Bool[${Ini[inipath, consented, @c1]}]}) {
/if (@c1<0) {
/echo There is noone on your consent list. Try /mac consent help.
/end
} else /end
}
/varset rog ${Ini[inipath, consented, @c1]}
/echo @rog
/next c1
/return

