Jump to content
  • 1

"getexp" for map or party


Question

Posted

I've figured out a way to do it for getitem since we can attach id to getitem

		getpartymember( getcharid(1),2 );
		getpartymember( getcharid(1),1 );
		.@map_killer$ = strcharinfo(3);
		for( .@i = 0; .@i < $@partymembercount; .@i++ )
			if( isloggedin( $@partymemberaid[ .@i ],$@partymembercid[ .@i ] ) )
				if( !getmapxy( .@map$, .@x, .@y, 0, rid2name( $@partymemberaid[ .@i ] ) ) && .@map$ == .@map_killer$ ) {
					for( set .@a,0; .@a < getarraysize( .Reward ); set .@a,.@a + 2 ) {
						getitem .Reward[.@a],.Reward[.@a+1], $@partymemberaid[.@i];
					}
				}

But if I add the "getexp" below the getitem, only the first player will get all the exp for each party member.

 

Is there any way to "getexp" to every player in a map or party?
This is for a reward that after a party clear a instance/mission, they got a item per party member and EXP.

6 answers to this question

Recommended Posts

  • 0
Posted
if ( attachrid( $@partymemberaid[.@i] ) ) {
	for( set .@a,0; .@a < getarraysize( .Reward ); set .@a,.@a + 2 ) {
		getitem .Reward[.@a],.Reward[.@a+1], $@partymemberaid[.@i];
	}
	getexp .BExp,.JExp;
	detachrid;
}

or

.@party_id = getcharid(1);
setd( ".party_"+.@party_id+"_map$" ),strcharinfo(3);
addrid(2,0,.@party_id);
if ( strcharinfo(3) == getd( ".party_"+.@party_id+"_map$" ) ) {
	for( set .@a,0; .@a < getarraysize( .Reward ); set .@a,.@a + 2 ) {
		getitem .Reward[.@a],.Reward[.@a+1], $@partymemberaid[.@i];
	}
	getexp .BExp,.JExp;
}
  • Upvote 1
  • 0
Posted
if ( attachrid( $@partymemberaid[.@i] ) ) {
	for( set .@a,0; .@a < getarraysize( .Reward ); set .@a,.@a + 2 ) {
		getitem .Reward[.@a],.Reward[.@a+1], $@partymemberaid[.@i];
	}
	getexp .BExp,.JExp;
	detachrid;
}

or

.@party_id = getcharid(1);
setd( ".party_"+.@party_id+"_map$" ),strcharinfo(3);
addrid(2,0,.@party_id);
if ( strcharinfo(3) == getd( ".party_"+.@party_id+"_map$" ) ) {
	for( set .@a,0; .@a < getarraysize( .Reward ); set .@a,.@a + 2 ) {
		getitem .Reward[.@a],.Reward[.@a+1], $@partymemberaid[.@i];
	}
	getexp .BExp,.JExp;
}

Get it, Thanks for the help Emistry! 

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...