Jump to content
  • 1

"getexp" for map or party


BugMeNot2014

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  46
  • Reputation:   3
  • Joined:  07/19/14
  • Last Seen:  

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.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

use attachrid then getexp and lastly detachrid.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  46
  • Reputation:   3
  • Joined:  07/19/14
  • Last Seen:  

use attachrid then getexp and lastly detachrid.

Thanks for the quick reply!

If I'm not wrong, then it will be
addrid(4,0,0,0,300,300);
getexp .BExp,.JExp;
detachrid;

Tested and working but I'm not sure if its correct or not

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

FYI, addrid and attachrid work differently ... 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  46
  • Reputation:   3
  • Joined:  07/19/14
  • Last Seen:  

FYI, addrid and attachrid work differently ... 

So, should I use the addrid or attachrid? I have no idea on how to use attachrid to set it to party/map

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  46
  • Reputation:   3
  • Joined:  07/19/14
  • Last Seen:  

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! 

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...