viewing paste [func] guild member reward | Athena

Posted on the | Last edited on
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
 
// ......{ callfunc "GuildReward"; },{},{}
 
function    script  GuildReward {
    .@guild_id = getcharid(2);
    if( .@guild_id ){
        query_sql( "SELECT `account_id`,`char_id` FROM `guild_member` WHERE `guild_id` = "+.@guild_id,.@aid,.@cid );
        .@size = getarraysize( .@aid );
        for( .@i = 0; .@i < .@size; .@i++ )
            if( isloggedin( .@aid[.@i],.@cid[.@i] ) ){
                getitem 512,1,.@aid[.@i];
                getitem 512,2,.@aid[.@i];
                getitem 512,3,.@aid[.@i];
                .@count++;
            }
        dispbottom .@count+" guild members gained rewards.";
    }
    return;
}
 
Viewed 1146 times, submitted by Emistry.