viewing paste Max Guild Users in Map | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
-       script  CastleCheck     -1,{
OnInit:
        setarray .castles$[0], "prtg_cas01", "aldeg_cas01", "gefg_cas01", "payg_cas01", "schg_cas01", "arug_cas01", "guild_vs1";
        for (.@i = 0; .@i < getarraysize(.castles$); .@i++) {
                setmapflag .castles$[.@i],mf_loadevent;
        }
        .max_count = 30;        // Maximum Number of Players per guild
        end;
OnPCLoadMapEvent:
        .@found = false;
        if (!getcharid(2))
                end;
        for (.@i = 0; .@i < getarraysize(.castles$); .@i++) {
                if (strcharinfo(PC_MAP) == .castles$[.@i]) {
                        .@found = true;
                        break;
                }
        }
        if (.@found == false)
                end;
        if (getmapguildusers(strcharinfo(PC_MAP), getcharid(2)) > .max_count) {
                dispbottom "You have been warped back to SavePoint, due to large amount of guildmates in the castle";
                warp "SavePoint", 0, 0;
        }
        end;
 
}
Viewed 841 times, submitted by Dastgir.