My code still in testing, It will store unlimited number of names but overwrites the previous names atm. I will make it append once I figure out how to do it with the correct variables and for/next loops. The second half of the macro is the part that will do the consenting. I capped it high at 50 consents, currently EQ will only let you consent I think 20 people.. the rest will give the "you do not have permission to drag" message to the rest of the draggers.
Code: Select all
#define inipath "consent.ini"
Sub Main
|/echo usage: /mac consent name(1) name(2) name(3) ... name(n)
|/echo usage: /mac consent all : Consents players in ini file if they exist.
/zapvars
/declare rg array
/declare a1 global
/declare b1 global
/declare c1 global
/declare d1 global
/varset a1 -1
:loop
/varadd a1 1
/if "@Param$int(@a1)"~~"help" {
/echo Yea yea this isnt working yet
/end
}
/if "@Param$int(@a1)"~~"all" {
/echo Consenting the following.
/goto :loop2
}
/if $defined(Param$int(@a1))==false {
/end
}
/varset rg($int(@a1)) @Param$int(@a1)
/ini "inipath" consented $int(@a1) "@Param$int(@a1)"
/echo $int(@a1) - @rg($int(@a1))
/goto :loop
:loop2
/echo starting phase2
/varset c1 -1
/for d1 1 to 50 [step 1]
/varadd c1 1
|/varset b1 $ini(inipath,consented,$int(@c1))
|/varadd b1 @b1
/if "$ini(inipath,consented,$int(@c1))"~~"NOTFOUND" /end
/echo $ini(inipath,consented) - $ini(inipath,consented,$int(@c1))
/next d1
/return