viewing paste map citizen with item check | 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
-   script  citizen_main    -1,{
    
    OnInit:
        setarray .map$,"payon","prontera","izlude";
        setarray .itemid,501,502,503;
        
        .map_size = getarraysize( .map$ );
        while ( .@i < .map_size )
            setmapflag .map$[.@i++],mf_loadevent;
        end;
        
    OnPCLoadMapEvent:
        .@map$ = strcharinfo(3);
        while ( .@i < .map_size ) {
            if ( .@map$ = .map$[.@i] ) 
                if ( !countitem( .itemid[.@i] ) ) {
                    mes "You're not the citizen of this town.";
                    close2;
                    warp "SavePoint",0,0;
                    break;
                }
            .@i++;
        }
        end;
 
}
Viewed 1472 times, submitted by Emistry.