viewing paste disable access if member exceed | 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 21 22 23 24 25 26 27 28 29
-       script  Sample  -1,{
OnInit:
// list all the guild castle map here.
setarray .map$,
        "prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05",
        "gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05",
        "payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05";
       
set .map_size,getarraysize( .map$ );
for( set .@i,0; .@i < .map_size; set .@i,.@i + 1 )
        setmapflag .map$[.@i],.mf_laodevent;
 
OnPCLoadMapEvent:
set .@map$,strcharinfo(3);
set .@guild,getcharid(2);
if( .@guild )
        while( .@i < .map_size ){
                if( .@map$ == .map$[.@i] )
                        if( getmapguildusers( .@map$,.@guild ) >= 12 ){
                                mes "You cant enter since there are 12 guild member in this maps.";
                                close2;
                                warp "prontera",155,181;
                                break;
                        }
                set .@i,.@i + 1;
        }
}
Viewed 511 times, submitted by Emistry.