prontera,150,190,4 script test flag 1 722,{ end; OnInit: .tick = 1000; // .areasize = 3; // the player has to stand in the .times * .tick mili-seconds in the .areasize area to capture this flag pole getmapxy .@map$, .@x, .@y, 1; while ( true ) { getmemberaid AREA, .@map$, .@x - .areasize, .@y - .areasize, .@x + .areasize, .@y + .areasize; for ( .@i = 0; .@i < $@onlinecount; .@i++ ) { attachrid $@onlineaid[.@i]; mapannounce .@map$, strcharinfo(0) +" -> "+ strcharinfo(2), bc_map; } sleep .tick; } end; // shouldn't reach } // ============================================================= prontera,160,190,4 script test flag 2 722,{ end; OnInit: .tick = 1000; // .areasize = 3; // the player has to stand in the .times * .tick mili-seconds in the .areasize area to capture this flag pole getmapxy .@map$, .@x, .@y, 1; while ( true ) { deletearray .@array_gid; deletearray .@array_inside; getmemberaid AREA, .@map$, .@x - .areasize, .@y - .areasize, .@x + .areasize, .@y + .areasize; for ( .@i = 0; .@i < $@onlinecount; .@i++ ) { attachrid $@onlineaid[.@i]; .@j = 0; .@size = getarraysize( .@array_gid ); while ( getcharid(2) != .@array_gid[.@j] && .@j < .@size ) .@j++; if ( .@j == .@size ) { .@array_gid[ .@size ] = getcharid(2); .@array_inside[ .@size ] = 1; } else .@array_inside[ .@j ]++; } .@size = getarraysize( .@array_gid ); for ( .@i = 0; .@i < .@size; .@i++ ) { mapannounce .@map$, getguildname( .@array_gid[.@i] ) +" has "+ .@array_inside[.@i] +" players standing in", bc_map; } sleep .tick; } end; // shouldn't reach } // =================================================================== prontera,150,180,4 script test flag 3 722,{ if ( .gid ) dispbottom "this current flag belongs to "+ getguildname( .gid ); else dispbottom "nobody has claim this flag pole yet"; end; OnInit: .times = 2; .tick = 1000; // .areasize = 3; // the player has to stand in the .times * .tick mili-seconds in the .areasize area to capture this flag pole getmapxy .@map$, .@x, .@y, 1; while ( true ) { deletearray .@array_gid; deletearray .@array_inside; getmemberaid AREA, .@map$, .@x - .areasize, .@y - .areasize, .@x + .areasize, .@y + .areasize; for ( .@i = 0; .@i < $@onlinecount; .@i++ ) { attachrid $@onlineaid[.@i]; .@j = 0; .@size = getarraysize( .@array_gid ); while ( getcharid(2) != .@array_gid[.@j] && .@j < .@size ) .@j++; if ( .@j == .@size ) { .@array_gid[ .@size ] = getcharid(2); .@array_inside[ .@size ] = 1; } else .@array_inside[ .@j ]++; } .@size = getarraysize( .@array_gid ); // for ( .@i = 0; .@i < .@size; .@i++ ) // mapannounce .@map$, getguildname( .@array_gid[ .@idx[.@i] ] ) +" has "+ .@array_inside[ .@idx[.@i] ] +" players standing in", bc_map; // announce "tesT "+ .@size +" "+ .@array_gid +" "+ .@high_gid +" "+ .@high_count, 0; if ( .@size > 1 ) .@high_count = 0; else if ( .@size == 1 ) { if ( .@array_gid != .@high_gid ) { .@high_gid = .@array_gid; .@high_count = 0; } .@high_count++; if ( .@high_count == .times && .gid != .@high_gid ) { .gid = .@high_gid; flagemblem .@high_gid; mapannounce .@map$, getguildname( .@high_gid ) +" has capture this flag pole", bc_map; } } sleep .tick; } end; // shouldn't reach }