GmOcean 92 Posted September 5, 2014 I just need this src converted to Hercules src code, plugin version is fine if that's how you choose to make it. Original Src code: http://rathena.org/board/topic/97690-r-getareauserid-command/ Quote Share this post Link to post Share on other sites
0 GmOcean 92 Posted September 5, 2014 (edited) EDIT: I don't need this any more due to the fact Annieruru made a command that does exactly what I want AND MORE. Truly a wonderful command that is. Thank you for helping out though Angelmelody. Edited September 5, 2014 by GmOcean Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted September 5, 2014 (edited) static int buildin_getareausers_sub(struct block_list *bl,va_list ap){ int *users=va_arg(ap,int *); struct map_session_data *sd = (TBL_PC *)bl; struct script_state* st; st=va_arg(ap,struct script_state*); if( *users < 128 ) script->setd_sub(st, NULL, ".@account_ids", *users, (void *)__64BPRTSIZE(sd->status.account_id), NULL); (*users)++; return false;}BUILDIN(getareausers){ const char *str; int16 m,x0,y0,x1,y1,users=0; //doubt we can have more then 32k users on str=script_getstr(st,2); x0=script_getnum(st,3); y0=script_getnum(st,4); x1=script_getnum(st,5); y1=script_getnum(st,6); if( (m=map->mapname2mapid(str))< 0){ script_pushint(st,-1); return false; } map->foreachinarea(buildin_getareausers_sub, m,x0,y0,x1,y1,BL_PC,&users,st); script_pushint(st,users); return true;} Edited September 6, 2014 by Angelmelody Quote Share this post Link to post Share on other sites
I just need this src converted to Hercules src code, plugin version is fine if that's how you choose to make it.
Original Src code: http://rathena.org/board/topic/97690-r-getareauserid-command/
Share this post
Link to post
Share on other sites