viewing paste group_chk | Text

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
//group_chk("variable",valuetocompare{,mode})
function    script  group_chk   {
    .@mode = getarg(2,0);
    .@count = 0;
    .@num = 0;
    if(!.@mode){
        getpartymember getcharid(1),1;
        .@num = $@partymembercount;
        for(.@x=0;.@x<.@num;.@x++){
            if(getvar(getd(getarg(0)),$@partymembercid[.@x]) >= getarg(1)) .@count++;
        }
    }else{
        getguildmember getcharid(2),1;
        .@num = $@guildmembercount;
        for(.@x=0;.@x<.@num;.@x++){
            if(getvar(getd(getarg(0)),$@guildmembercid[.@x]) >= getarg(1)) .@count++;
        }
    }
    if(.@count >= .@num) return 1;
    return 0;
}
Viewed 623 times, submitted by Guest.