Jump to content
  • 0

How to check party members using code?


Talon

Question


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  78
  • Reputation:   1
  • Joined:  09/01/14
  • Last Seen:  

set .@partyid,getcharid(1);
	set .@mob_base_exp,(( getmonsterinfo( killedrid,MOB_BASEEXP ) / 100 ) * .rotd_exp_bonus );
	set .@mob_job_exp,(( getmonsterinfo( killedrid,MOB_JOBEXP ) / 100 ) * .rotd_exp_bonus );
	if( .@partyid ){
		set .@aid,getcharid(3);
		set .@baselevel,BaseLevel;
		set .@map$,strcharinfo(3);
		getpartymember .@partyid,1;
		getpartymember .@partyid,2;
		while( .@i < $@partymembercount ){
			if( isloggedin( $@partymemberaid[.@i],$@partymembercid[.@i] ) )
				if( attachrid( $@partymemberaid[.@i] ) )
					if( strcharinfo(3) == .@map$ && ( BaseLevel - .@baselevel ) <= .party_level_range && ( BaseLevel - .@baselevel ) >= ~.party_level_range ){	
						set BaseExp,( BaseExp + .@mob_base_exp );
						set JobExp,( JobExp + .@mob_job_exp );
						dispbottom "[ROTD Party] : "+.@mob_base_exp+" EXP";
					}
			set .@i,.@i + 1;
		}
		attachrid( .@aid );
	}else{
		set BaseExp,( BaseExp + .@mob_base_exp );
		set JobExp,( JobExp + .@mob_job_exp );
		dispbottom "[ROTD SOLO] : "+.@mob_base_exp+" EXP";
	}
	if( rand( 100 ) < .rotd_item_rate && .rotd_zeny ) 
		set Zeny,Zeny + rand( .rotd_zeny );
	if( rand( 100 ) < .rotd_item_rate && .rotd_item_amount ) 
		getitem .rotd_item_id,rand( .rotd_item_amount ),.@aid;

Trying to find out how to get how many party members are in a party, then divide the experience rates;

Was trying to do   if ( $@partymembercount > 2 ){ set .@mob_job_exp,(( getmonsterinfo( killedrid,MOB_JOBEXP ) / 100 ) * .rotd_exp_bonus / 2 ); }

...But I guess $@partymembercount isn't the code to get how many members in a party tho  /hum Anyone can help me a bit in this?.. Thanks~!

Edited by Talon
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

Check the wiki. There is everything you need to know about party related commands and informations: http://rathena.org/wiki/Getpartymember

 

first you have to use this command to store the informations in global variables:

getpartymember <party id>{,<type>};

then just use this global variable for your script:

$@partymembercount
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  78
  • Reputation:   1
  • Joined:  09/01/14
  • Last Seen:  

 

Check the wiki. There is everything you need to know about party related commands and informations: http://rathena.org/wiki/Getpartymember

 

first you have to use this command to store the informations in global variables:

getpartymember <party id>{,<type>};

then just use this global variable for your script:

$@partymembercount

Okay, thanks for replied. I'll have a look when I'm free =)

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...