Jump to content
  • 0

MVP Cash Points -> Party Share?


Zaon

Question


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   0
  • Joined:  07/30/12
  • Last Seen:  

Is it possible to share the cash points earned when you kill an MVP while inside a party?

 

For example:

 

5 people in a party, then they kill Satan Morroc for 100 cashpoints. Is it possible to divide it among the members equally? [each member gets 20points]

 

Thanks.

Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 1

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   0
  • Joined:  01/10/12
  • Last Seen:  

Hello im using this 

How can i set this script to 1 points only even 1 Player can only kill the mvp? and if in party all party members can get 1 only points..

 

-    script    MonsterKillParty    -1,{
OnNPCKillEvent:
if( killedrid == 1038 || killedrid == 1039 || killedrid == 1046 || killedrid == 1059 || killedrid == 1086 || killedrid == 1087 || killedrid == 1112 || killedrid == 1115 || killedrid == 1147 || killedrid == 1150 || killedrid == 1157 || killedrid == 1159 || killedrid == 1190 || killedrid == 1251 || killedrid == 1252 || killedrid == 1272 || killedrid == 1373 || killedrid == 1389 || killedrid == 1418 || killedrid == 1492 || killedrid == 1511 || killedrid == 1583 || killedrid == 1623 || killedrid == 1630 || killedrid == 1646 || killedrid == 1647 || killedrid == 1648 || killedrid == 1649 || killedrid == 1650 || killedrid == 1651 || killedrid == 1658 || killedrid == 1685 || killedrid == 1688 || killedrid == 1708 || killedrid == 1719 || killedrid == 1734 || killedrid == 1751 || killedrid == 1768 || killedrid == 1779 || killedrid == 1785 || killedrid == 1832 || killedrid == 1871 || killedrid == 1874 ){
    if (getcharid(1)){
    getpartymember getcharid(1),1;
    getpartymember getcharid(1),2;
    .@acc_id = getcharid(3);
    for( .@i = 0; .@i < $@partymembercount; .@i++ )
        if( isloggedin( $@partymemberaid[.@i],$@partymembercid[.@i] ) )
            if( attachrid( $@partymemberaid[.@i] ) )
                #MVPPoint += ( 100 / $@partymembercount );

    attachrid( .@acc_id );
    dispbottom "All ur partymember gained point.";
        announce "MVP Watcher: "+strcharinfo(0) +" and the "+strcharinfo(1) +" party have killed MVP for 1 MVP Point/s!",0,0x38ACEC;
    }
    else{
set #MVPPoint, #MVPPoint + 1;
dispbottom "You have gained 1 MVP Point point/s. Total is "+ #MVPPoint +" MVP Point points.";
announce "MVP Watcher: " +strcharinfo(0) +" has just killed " +getmonsterinfo(killedrid,0) +" for 1 MVP Point point/s!",0,0x38ACEC;
end;
}
}
}

 

 

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  01/02/21
  • Last Seen:  

Hi Guys, 

Tried to make the script below working. It seems to give to a one man party the whole points. I wanted to have the points given to all members regardless of the party member count 2 points each (not shared but points given to them). I would appreciate if someone can help me with this. ?

Thank you.

 

Quote

-    script    MonsterKillParty    -1,{
OnNPCKillEvent:
if( killedrid == 1038 || killedrid == 1039 || killedrid == 1046 || killedrid == 1059 || killedrid == 1086 || killedrid == 1087 || killedrid == 1112 || killedrid == 1115 || killedrid == 1147 || killedrid == 1150 || killedrid == 1157 || killedrid == 1159 || killedrid == 1190 || killedrid == 1251 || killedrid == 1252 || killedrid == 1272 || killedrid == 1373 || killedrid == 1389 || killedrid == 1418 || killedrid == 1492 || killedrid == 1511 || killedrid == 1583 || killedrid == 1623 || killedrid == 1630 || killedrid == 1646 || killedrid == 1647 || killedrid == 1648 || killedrid == 1649 || killedrid == 1650 || killedrid == 1651 || killedrid == 1658 || killedrid == 1685 || killedrid == 1688 || killedrid == 1708 || killedrid == 1719 || killedrid == 1734 || killedrid == 1751 || killedrid == 1768 || killedrid == 1779 || killedrid == 1785 || killedrid == 1832 || killedrid == 1871 || killedrid == 1874 ){
    if (getcharid(1)){
    getpartymember getcharid(1),1;
    getpartymember getcharid(1),2;
    .@acc_id = getcharid(3);
    for( .@i = 0; .@i < $@partymembercount; .@i++ )
        if( isloggedin( $@partymemberaid[.@i],$@partymembercid[.@i] ) )
            if( attachrid( $@partymemberaid[.@i] ) )
                #MVPPoint += ( 16 / $@partymembercount );

    attachrid( .@acc_id );
    dispbottom "All ur partymember gained point.";
    announce "MVP Watcher: "+strcharinfo(0) +" and the "+strcharinfo(1) +" party have killed "+getmonsterinfo(killedrid,0)+"!",0,0x38ACEC;
    }
    else{
    set #MVPPoint, #MVPPoint + 2;
    dispbottom "You have gained a total of "+ #MVPPoint +" MVP Point points.";
    announce "MVP Watcher: " +strcharinfo(0) +" has just killed " +getmonsterinfo(killedrid,0) +"!",0,0x38ACEC;
    end;
}
}
}

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   9
  • Joined:  04/16/12
  • Last Seen:  

i will like to know too if this is possible /ok

Link to comment
Share on other sites


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


OnMobsterKillEvent:

getpartymember getcharid(1),1;

getpartymember getcharid(1),2;

.@acc_id = getcharid(3);

for( .@i = 0; .@i < $@partymembercount; .@i++ )

if( isloggedin( $@partymemberaid[.@i],$@partymembercid[.@i] ) )

if( attachrid( $@partymemberaid[.@i] ) )

#CASHPOINTS += ( 100 / $@partymembercount );

attachrid( .@acc_id );

dispbottom "All ur partymember gained point.";

end;

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  326
  • Reputation:   47
  • Joined:  04/01/12
  • Last Seen:  

how will it do the math for 100/7, (=7 person with14pts or 6 person with 14pts. & 1 with 16pts.?)

 

OnMobsterKillEvent: = typo? maybe OnMonsterKillEvent: ^_^

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   0
  • Joined:  07/30/12
  • Last Seen:  

Can I use any label?

 

Because right now I'm using OnNPCKillEvent: for my MVP Points script.

Link to comment
Share on other sites


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

how will it do the math for 100/7, (=7 person with14pts or 6 person with 14pts. & 1 with 16pts.?)

On Emistry's script, =7 persons with14pts

 

OnMobsterKillEvent: = typo? maybe OnMonsterKillEvent: ^_^

a label name can be ~anything

 

Because right now I'm using OnNPCKillEvent: for my MVP Points script.

then add the script under OnNPCKillEvent

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   0
  • Joined:  07/30/12
  • Last Seen:  

How can i make the script check if the player has a party or not?

 

OnNPCKillEvent:
if (killedrid == 1832)	{ // IFRIT
set #CASHPOINTS, #CASHPOINTS + 95;
dispbottom "You have gained 95 DaedaRO point/s. Total is "+ #CASHPOINTS +" DaedaRO points.";
announce "MVP Watcher: " +strcharinfo(0) +" has just killed " +getmonsterinfo(killedrid,0) +" for 95 DaedaRO point/s!",0,0x38ACEC;
end;
}
}

this is what im using for ifrit right now.

how can i make so that it will check if i the killer has a party or not.

if the killer has a party, the points will be divided among the members equally.

 

 

 

BTW i'm using eA
Edited by djmmac07
Link to comment
Share on other sites


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

use getcharid

if( getcharid(1) ){
    // you got party..
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   0
  • Joined:  07/30/12
  • Last Seen:  

use getcharid

if( getcharid(1) ){
    // you got party..
}

 

 

You mean like this?


-	script	MVPShareTest	-1,{

OnNPCKillEvent:
if (killedrid == 1956)	{ // NAGHT SIEGER
if (getcharid(1)){
	getpartymember getcharid(1),1;
	getpartymember getcharid(1),2;
	.@acc_id = getcharid(3);
	for( .@i = 0; .@i < $@partymembercount; .@i++ )
		if( isloggedin( $@partymemberaid[.@i],$@partymembercid[.@i] ) )
			if( attachrid( $@partymemberaid[.@i] ) )
				#CASHPOINTS += ( 100 / $@partymembercount );

	attachrid( .@acc_id );
	dispbottom "All ur partymember gained point.";
		announce "MVP Watcher: "+strcharinfo(0) +" and the "+strcharinfo(1) +" party have killed Naght Sieger for 50 DaedaRO point/s!",0,0x38ACEC;
	}
	else{
set #CASHPOINTS, #CASHPOINTS + 50;
dispbottom "You have gained 50 DaedaRO point/s. Total is "+ #CASHPOINTS +" DaedaRO points.";
announce "MVP Watcher: " +strcharinfo(0) +" has just killed " +getmonsterinfo(killedrid,0) +" for 50 DaedaRO point/s!",0,0x38ACEC;
end;
}
}
}

 

Will this work on eA?

Edited by djmmac07
Link to comment
Share on other sites


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

eathena doesn't support direct variable assignment

-	.@acc_id = getcharid(3);
-	for( .@i = 0; .@i < $@partymembercount; .@i++ )
+	set .@acc_id, getcharid(3);
+	for( set .@i, 0; .@i < $@partymembercount; set .@i, .@i +1 )
-	#CASHPOINTS += ( 100 / $@partymembercount );
+	set #CASHPOINTS, #CASHPOINTS + ( 100 / $@partymembercount );
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   0
  • Joined:  07/30/12
  • Last Seen:  

Thanks capuche and emistry, it's working now.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  326
  • Reputation:   47
  • Joined:  04/01/12
  • Last Seen:  

hello, im using  something like this from the given ahead

can someone help 

 

 

-	script	partygetitem	-1,{
OnNPCKillEvent:
	if( killedrid == 1170 || killedrid == 1956 ){	//entweihen/sieger

	getpartymember getcharid(1),1;
	getpartymember getcharid(1),2;
	set .@acc_id, getcharid(3);
	for( set .@i, 0; .@i < $@partymembercount; set .@i, .@i +1 )
		if( isloggedin( $@partymemberaid[.@i],$@partymembercid[.@i] ) )
			if( attachrid( $@partymemberaid[.@i] ) )
				set #CASHPOINTS, #CASHPOINTS + ( 100 / $@partymembercount );
				//getitem 5379,1,$@partymemberaid[.@i];

	attachrid( .@acc_id );
	dispbottom "All Your party member gained cash point/s.";
	end;
	}
} 

 

my problems are:

1. other party members not on same map where the monster is killed still gets their share (supposed to be not)

2. other party members offline will still be part of the math(division)/ (a party of 2, 1 is offline and one online, when the online one kills the monster he will only get half of the points) supposed to be 100%

3. when your not on a party, you wont get anything but the dispbottom message still shows after killing the mob

4. dead players still get their share (i want them not to get any & excluded in the calculation if they are dead)

5. requesting also this to work w/ or w/out a party (so whether you kill it solo or on party, you can get cash)

6. requesting a check for each monster (i want ID1170 to give 50 cash only and ID1956 to give 100 cash)

7. supposedly i put/enable the getitem(which i commented out). will that be correct?

 

tnx if anyone helps

Edited by frenzmu06
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  326
  • Reputation:   47
  • Joined:  04/01/12
  • Last Seen:  

works great Emistry, thanks very much ^_^, love you man

Link to comment
Share on other sites


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

or

-	script	hibicus	-1,{
function MobReward;

OnInit:// setting
// <mob id>, <itemid or variable>,<amount>, <itemid or variable>,<amount>...
	MobReward( 1002, 501,1, "#CASHPOINTS",5, 502,3 );
	MobReward( 1003, 501,1, "#CASHPOINTS",5, 505,5, "#random_variable",1 );
	MobReward( 1004, 501,1, "#CASHPOINTS",5 );
	end;
OnNPCKillEvent:
	.@mob_id = killedrid;
	if ( !compare( .concat_mobid$, .@mob_id +"" ) ) end;// not in the list
	.@party_id = getcharid(1);
	.@aid[.@count] = .@self_aid = getcharid(3);// killer index 0
	.@count++;
	if ( .@party_id ) {
		.@map_killer$ = strcharinfo(3);
		getpartymember .@party_id,0;
		getpartymember .@party_id,1;
		getpartymember .@party_id,2;
		while( .@i < $@partymembercount ) {
			if ( isloggedin( $@partymemberaid[.@i],$@partymembercid[.@i] ) && .@self_aid != $@partymemberaid[.@i] ) {// don't count killer
				if ( readparam( 5,$@partymembername$[.@i] ) && !getmapxy( .@map$, .@x, .@y, 0,$@partymembername$[.@i] ) && .@map$ == .@map_killer$ ) {// hp > 0 and same map
					.@aid[.@count] = $@partymemberaid[.@i];
					.@count++;// count players online in party
				}
			}
			.@i++;
		}
	}
	.@ratio = 1000/.@count;
	for ( .@i = 0; .@i < .@count; .@i++ ) {
		.@size = getd( ".size_item_id_"+ .@mob_id );
		if ( .@size ) {// give item reward
			for ( .@j = 0; .@j < .@size; .@j += 2 ) {
				.@itemid = getd( ".item_id_"+ .@mob_id +"["+ .@j +"]" );
				.@amount = getd( ".amount_item_id_"+ .@mob_id +"["+ .@j +"]" );
				if ( getd( ".@i_"+ .@itemid ) < .@amount ) {// amount already given
					.@amount2 = .@amount - getd( ".@i_"+ .@itemid );// rest
					.@r = ( .@i == .@count -1 ) ? .@amount2 : ( ( .@amount* .@ratio / 1000 ) > 0 ? ( .@amount * .@ratio / 1000 ) : rand( 0,.@amount2 ) );
					if ( .@r ) {
						setd ".@i_"+ .@itemid, getd( ".@i_"+ .@itemid ) + .@r;
						getitem .@itemid, .@r, .@aid[.@i];
					}
				}
			}
		}
		.@size = getd( ".size_variable_"+ .@mob_id );
		if ( .@size ) {// give variable reward
			if ( .@aid[.@i] != .@self_aid ) attachrid .@aid[.@i];
			for ( .@j = 0; .@j < .@size; .@j += 2 ) {
				.@var$ = getd( ".variable_"+ .@mob_id +"$["+ .@j +"]" );
				.@amount = getd( ".amount_variable_"+ .@mob_id +"["+ .@j +"]" );
				if ( getd( ".@v_"+ .@var$ ) < .@amount ) {
					.@amount2 = .@amount - getd( ".@v_"+ .@var$ );
					.@r = ( .@i == .@count -1 ) ? .@amount2 : ( ( .@amount* .@ratio / 1000 ) > 0 ? ( .@amount * .@ratio / 1000 ) : rand( 0,.@amount2 ) );
					if ( .@r ) {
						setd ".@v_"+ .@var$, getd( ".@v_"+ .@var$ ) + .@r;
						setd .@var$, getd( .@var$ ) + .@r;
						dispbottom "You got "+ .@r +" "+ .@var$ +". Total: "+  getd( .@var$ ) +" "+ .@var$;
					}
				}
			}
		}
	}
	end;

function MobReward {// split item/variable rewards to avoid attachrid if none variable reward
	.@argcount = getargcount();
	.@mob_id = getarg(0);
	if ( .@argcount < 3 || (.@argcount+1)%2 )
		debugmes strnpcinfo(3) +": not enough argument for monster "+ .@mob_id +".. skipping";
	else if ( compare( .concat_mobid$, .@mob_id +"" ) )
		debugmes strnpcinfo(3) +": mob id "+ .@mob_id +" give already a reward.. skipping";
	else {
		.concat_mobid$ = .concat_mobid$ +"|"+ .@mob_id;
		for ( .@i = 1; .@i < .@argcount; .@i += 2 ) {
			if ( atoi( getarg(.@i) +"" ) ) {// is item
				setd ".item_id_"+ .@mob_id +"["+ .@size_item +"]", getarg(.@i);
				setd ".amount_item_id_"+ .@mob_id +"["+ .@size_item +"]", getarg(.@i+1);
				.@size_item++;
			}
			else {// is var
				setd ".variable_"+ .@mob_id +"$["+ .@size_var +"]", getarg(.@i);
				setd ".amount_variable_"+ .@mob_id +"["+ .@size_var +"]", getarg(.@i+1);
				.@size_var++;
			}
		}
		setd ".size_item_id_"+ .@mob_id, .@size_item;// size item for this monster
		setd ".size_variable_"+ .@mob_id, .@size_var;
	}
}
}
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  171
  • Reputation:   0
  • Joined:  06/19/13
  • Last Seen:  

how about npc. if the player want to trade the points to item   100points trade to item 7227.

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