Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: script.c
- ===================================================================
- --- script.c (revision 17049)
- +++ script.c (working copy)
- @@ -9604,7 +9715,49 @@
- }
- /*==========================================
- + * Usage :
- + * showmapusers( <toggle>,<color> );
- + * Toggle : 1 = On , 2 = Off
- *------------------------------------------*/
- +BUILDIN_FUNC(showmapusers)
- +{
- + struct block_list* bl;
- + TBL_PC *sd, *pl_sd;
- + int group_level = 0,count = 0,map_id = 0,type,color;
- + struct s_mapiterator* iter;
- + char output[150];
- +
- + sd = script_rid2sd(st);
- + if( !sd ) return 0;
- +
- + map_id = sd->bl.m;
- + type = script_getnum(st,2);
- + color = script_getnum(st,3);
- +
- + group_level = pc_get_group_level(sd);
- + iter = mapit_getallusers();
- + for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) ){
- + // player who are lower gm level + non-hide + same map
- + if( sd->bl.m == pl_sd->bl.m ){
- + bl = &pl_sd->bl;
- + clif_viewpoint(sd,st->oid,type,bl->x,bl->y,count,color);
- + count++;
- + }
- + }
- + mapit_free(iter);
- +
- + // display players count in map.
- + if( !count ){
- + sprintf( output, msg_txt(54), map[map_id].name );
- + }else{
- + sprintf( output, msg_txt(56), count, map[map_id].name );
- + }
- + clif_displaymessage(sd->fd,output);
- + script_pushint(st,count);
- + return 0;
- +}
- +/*==========================================
- + *------------------------------------------*/
- BUILDIN_FUNC(getusers)
- {
- int flag, val = 0;
- @@ -17466,6 +17623,7 @@
- BUILDIN_DEF(announce,"si?????"),
- BUILDIN_DEF(mapannounce,"ssi?????"),
- BUILDIN_DEF(areaannounce,"siiiisi?????"),
- + BUILDIN_DEF(showmapusers,"ii"), // emistry
- BUILDIN_DEF(getusers,"i"),
- BUILDIN_DEF(getmapguildusers,"si"),
- BUILDIN_DEF(getmapusers,"s"),
Advertisement
Add Comment
Please, Sign In to add comment