Last active
August 29, 2015 14:13
-
-
Save MattJeanes/16f43182496815f96b2c to your computer and use it in GitHub Desktop.
Can be used to mass set/unset privileges
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local thing="" | |
for k,v in pairs(evolve.privileges) do | |
if string.sub(v,0,thing:len())==thing then | |
local privilege = v | |
for k,v in pairs(evolve.ranks) do | |
local rank = k | |
if v.Immunity>=15 and v.Immunity < 99 then | |
if ( !table.HasValue( evolve.ranks[ rank ].Privileges, privilege ) ) then | |
table.insert( evolve.ranks[ rank ].Privileges, privilege ) | |
end | |
local enabled=1 | |
if Abyss and not evolve.offline then | |
Abyss:UpdatePrivilege(rank,privilege,enabled) | |
end | |
umsg.Start( "EVRankPrivilege" ) | |
umsg.String( rank ) | |
umsg.Short( evolve:KeyByValue( evolve.privileges, privilege ) ) | |
umsg.Bool( enabled ) | |
umsg.End() | |
end | |
end | |
end | |
end | |
evolve:SaveRanks() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment