Jump to content
  • 0
Sign in to follow this  
GmOcean

R> getareauserid command

Question

2 answers to this question

Recommended Posts

  • 0

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 by GmOcean

Share this post


Link to post
Share on other sites
  • 0
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 by Angelmelody

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.