viewing paste guildless cant enter castle | 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
 
-       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);
if( !getcharid(2) )
        while( .@i < .map_size ){
                if( .@map$ == .map$[.@i] ){
                        mes "You cant enter since you didnt have a guild.";
                        close2;
                        warp "prontera",155,181;
                        end;
                }
                set .@i,.@i + 1;
        }
}
Viewed 469 times, submitted by Emistry.