Jump to content
  • 0

Points Share


I Cant Stop x3

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  14
  • Reputation:   0
  • Joined:  10/31/12
  • Last Seen:  

hello guys i have created an mvp points npc, whell i have a question if its possible to share the points in party?

 

this is my points :

OnMvPKill:
set .MvpPoint,rand(150,300);
set MvpPoint,MvpPoint+.MvpPoint;
 

i need to share it for 5 party members in the same map

Edited by nhofije
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   616
  • Joined:  07/05/12
  • Last Seen:  

Try this

if ( getcharid(1) ) {
	.@party_id = getcharid(1);
	.@map$ = strcharinfo(3);

	getpartymember .@party_id;
	getpartymember .@party_id, 2;

	.@count = $@partymembercount;
	copyarray .@aid, $@partymemberaid, .@count;
	copyarray .@name$, $@partymembername$, .@count;

	for ( ; .@i < $@partymembercount; .@i++ )
		if ( getcharid( 0,$@partymembername$[.@i] ) ) {
			getmapxy .@tmp$, .@x, .@y, 0, $@partymembername$[.@i];
			if ( .@tmp$ != .@map$ ) {
				deletearray .@aid[.@i], 1;
				deletearray .@name$[.@i], 1;
				.@count -= 1;
			}
		}
	while ( .@count > 5 ) {
		.@r = rand( .@count );
		deletearray .@aid[.@r], 1;
		deletearray .@name$[.@r], 1;
		.@count -= 1;
	}
	
	for ( .@i = 0; .@i < .@count; .@i++ ) {
		attachrid .@aid[.@i];
		set MvpPoint,MvpPoint+.MvpPoint;
	}
}
else
	set MvpPoint,MvpPoint+.MvpPoint;

The killer share the points with 5 players in the party, only if the member is online and on the same map

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  14
  • Reputation:   0
  • Joined:  10/31/12
  • Last Seen:  

I read the doc , but  I did not understand ,and this solved my problem,  thanks fot it sir capuche

Edited by nhofije
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...