Jump to content
  • 0

Need MVP Script With GM Reset Command


DEsMOn

Question


  • Group:  Members
  • Topic Count:  63
  • Topics Per Day:  0.05
  • Content Count:  172
  • Reputation:   1
  • Joined:  11/16/20
  • Last Seen:  

Hello rAthena Pro-Scripters,

I'm Looking for MVP script

1) Which included GM reset command. So MVP Kills count will be set to 0 again (So i can start MVP race with reset).

2) And this Script should count only  MVP which are spawned in map as default example pay_fild11 Eddga, gef_fild10 Orc Lord, gef_fil14 Orc Hero, etc. (Should not count Bloody branch MVP , @spawn MVPS, event MVPs)

Thanks in advance...!!

Edited by Mael
Stop tagging people
Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

prontera,0,0,0	script	mvp_kill_count	444,{
	copyarray(.@name$,$MVP_KILL_NM$,getarraysize($MVP_KILL_NM$));
	copyarray(.@count,$MVP_KILL_COUNT,getarraysize($MVP_KILL_COUNT));
	.@mx = min(.max_show,getarraysize(.@name$));
	if(.@mx <= 0){
		mes "No records found";
		end;
	}
	if(getgmlevel() >= .gm_level){
		switch(select("Skip:Skip:Reset:Skip")){
			case 3:
				deletearray($MVP_KILL_COUNT,getarraysize($MVP_KILL_COUNT));
				mes "Done";
				end;
		}
	}
	while(.@max < .@mx){
		.@max++;
		.@t1 = max(.@count);
		if(.@t1 <= 0) break;
		.@n = inarray(.@count,.@t1);
		if(.@n == -1) break;
		mes "(" + .@t1 + ") " + .@name$[.@n];
		deletearray(.@name$[.@n],1);
		deletearray(.@count[.@n],1);
	}
end;

OnNPCKillEvent:
	.@id = killedrid;
	if(inarray(.mvp_id,.@id) != -1){
		if(inarray(getd(".m_" + .@id + "$"),strcharinfo(3)) != -1){
			if((.@ndx = inarray($MVP_KILL_CID,getcharid(0))) == -1){
				.@ndx = getarraysize($MVP_KILL_CID);
				$MVP_KILL_CID[.@ndx] = getcharid(0);
				$MVP_KILL_NM$[.@ndx] = strcharinfo(0);
			}
			$MVP_KILL_COUNT[.@ndx]++;
		}
	}
end;

	function	AddMvp	{
		.@s = getarraysize(.mvp_id);
		.@id = getarg(0);
		.mvp_id[.@s] = .@id;
		setd(".m_" + .@id + "$[" + getarraysize(getd(".m_" + .@id + "$")) + "]",getarg(1));
		return;
	}

OnInit:
	.gm_level = 99;
	.max_show = 10;
	//AddMvp(<Monster ID>,<"Map Name">);
	//AddMvp(<Monster ID>,<"Map Name">);
	//AddMvp(<Monster ID>,<"Map Name">);
end;
}

 

Edited by sader1992
  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  103
  • Reputation:   14
  • Joined:  04/18/15
  • Last Seen:  

10 hours ago, DEsMOn said:

Hello rAthena Pro-Scripters,

I'm Looking for MVP script

1) Which included GM reset command. So MVP Kills count will be set to 0 again (So i can start MVP race with reset).

2) And this Script should count only  MVP which are spawned in map as default example pay_fild11 Eddga, gef_fild10 Orc Lord, gef_fil14 Orc Hero, etc. (Should not count Bloody branch MVP , @spawn MVPS, event MVPs)

Is it possible @Elysium @Emistry

Thanks in advance...!!

do you want to have like an mvp rank but in the summons room?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  63
  • Topics Per Day:  0.05
  • Content Count:  172
  • Reputation:   1
  • Joined:  11/16/20
  • Last Seen:  

On 11/1/2021 at 10:23 PM, JackTheGorrion said:

do you want to have like an mvp rank but in the summons room?

No brother, MVP Kill count should be count for default map mvp spawns, not for summon by any mean( BB, @spawn)

 

On 11/2/2021 at 2:39 AM, sader1992 said:


prontera,0,0,0	script	mvp_kill_count	444,{
	copyarray(.@name$,$MVP_KILL_NM$,getarraysize($MVP_KILL_NM$));
	copyarray(.@count,$MVP_KILL_COUNT,getarraysize($MVP_KILL_COUNT));
	.@mx = min(.max_show,getarraysize(.@name$));
	if(.@mx <= 0){
		mes "No records found";
		end;
	}
	if(getgmlevel() >= .gm_level){
		switch(select("Skip:Skip:Reset:Skip")){
			case 3:
				deletearray($MVP_KILL_COUNT,getarraysize($MVP_KILL_COUNT));
				mes "Done";
				end;
		}
	}
	while(.@max < .@mx){
		.@max++;
		.@t1 = max(.@count);
		if(.@t1 <= 0) break;
		.@n = inarray(.@count,.@t1);
		if(.@n == -1) break;
		mes "(" + .@t1 + ") " + .@name$[.@n];
		deletearray(.@name$[.@n],1);
		deletearray(.@count[.@n],1);
	}
end;

OnNPCKillEvent:
	.@id = killedrid;
	if(inarray(.mvp_id,.@id) != -1){
		if(inarray(getd(".m_" + .@id + "$")) != -1){
			if((.@ndx = inarray($MVP_KILL_CID,getcharid(0))) == -1){
				.@ndx = getarraysize($MVP_KILL_CID);
				$MVP_KILL_CID[.@ndx] = getcharid(0);
				$MVP_KILL_NM$[.@ndx] = strcharinfo(0);
			}
			$MVP_KILL_COUNT[.@ndx]++;
		}
	}
end;

	function	AddMvp	{
		.@s = getarraysize(.mvp_id);
		.@id = getarg(0);
		.mvp_id[.@s] = .@id;
		setd(".m_" + .@id + "$[" + getarraysize(getd(".m_" + .@id)) + "]",getarg(1));
		return;
	}

OnInit:
	.gm_level = 99;
	.max_show = 10;
	//AddMvp(<Monster ID>,<"Map Name">);
	//AddMvp(<Monster ID>,<"Map Name">);
	//AddMvp(<Monster ID>,<"Map Name">);
end;
}

 

Thank you Sader Sir,

Will test n update..!!

I got this error 

image.png.805094365adc24821df9d5d7f0c043db.png

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

13 hours ago, DEsMOn said:

Thank you Sader Sir,

Will test n update..!!

I got this error 

[Error]:
script error on npc/custom/sadermvprank.txt line 33
    parse_callfunc: not enough arguments, expected ','
    28 : end;
    29 :
    30 : OnNPCKillEvent:
    31 :        .@id = killedrid;
    32 :        if(inarray(.mvp_id,.@id) != -1){
*   33 :                if(inarray(getd(".m_" + .@id + "$")')' != -1){
    34 :                        if((.@ndx = inarray($MVP_KILL_CID,getcharid(0))) == -1){
    35 :                                .@ndx = getarraysize($MVP_KILL_CID);
    36 :                                $MVP_KILL_CID[.@ndx] = getcharid(0);
    37 :                                $MVP_KILL_NM$[.@ndx] = strcharinfo(0);
    38 :                        }

image.png.805094365adc24821df9d5d7f0c043db.png

replace the line with

if(inarray(getd(".m_" + .@id + "$"),strcharinfo(3)) != -1){

 

i edited the script in the first post

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  63
  • Topics Per Day:  0.05
  • Content Count:  172
  • Reputation:   1
  • Joined:  11/16/20
  • Last Seen:  

1 hour ago, sader1992 said:

replace the line with

if(inarray(getd(".m_" + .@id + "$"),strcharinfo(3)) != -1){

 

i edited the script in the first post

I've noticed 1 small issue where the mvp has multiple map spawn that doesn't count

Example These 2 MVP has multiple spawn in field.

Atroce MVP - Kill counts for ra_fild02 but doesn't count for ra_fild03,ra_fild04,ve_fild01,ve_fild02

AddMvp(1785,"ra_fild02","ra_fild03","ra_fild04","ve_fild01","ve_fild02");

Same for Orc Hero - Kill counts for gef_fild14 but doesn't count for gef_fild02

AddMvp(1087,"gef_fild14","gef_fild02");

Rest All fine...

Thank you so much sir  you are amazing if u can provide solution for above would be great .

1 Small NPC dedicated on your name small token of appreciation...!

 

 

image.png

Edited by DEsMOn
Small Update
Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

58 minutes ago, DEsMOn said:

I've noticed 1 small issue where the mvp has multiple map spawn that doesn't count

Example These 2 MVP has multiple spawn in field.

Atroce MVP - Kill counts for ra_fild02 but doesn't count for ra_fild03,ra_fild04,ve_fild01,ve_fild02

AddMvp(1785,"ra_fild02","ra_fild03","ra_fild04","ve_fild01","ve_fild02");

Same for Orc Hero - Kill counts for gef_fild14 but doesn't count for gef_fild02

AddMvp(1087,"gef_fild14","gef_fild02");

Rest All fine...

Thank you so much sir  you are amazing if u can provide solution for above would be great .

1 Small NPC dedicated on your name small token of appreciation...!

 

 

image.png

I already did consider the multi field

AddMvp(1785,"ra_fild02","ra_fild03","ra_fild04","ve_fild01","ve_fild02");

to

AddMvp(1785,"ra_fild02");
AddMvp(1785,"ra_fild03");
AddMvp(1785,"ra_fild04");
AddMvp(1785,"ve_fild01");
AddMvp(1785,"ve_fild02");

 

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  63
  • Topics Per Day:  0.05
  • Content Count:  172
  • Reputation:   1
  • Joined:  11/16/20
  • Last Seen:  

15 hours ago, sader1992 said:

I already did consider the multi field

AddMvp(1785,"ra_fild02","ra_fild03","ra_fild04","ve_fild01","ve_fild02");

to

AddMvp(1785,"ra_fild02");
AddMvp(1785,"ra_fild03");
AddMvp(1785,"ra_fild04");
AddMvp(1785,"ve_fild01");
AddMvp(1785,"ve_fild02");

 

I've tried your given solution but doesn't count. 

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

49 minutes ago, DEsMOn said:

I've tried your given solution but doesn't count. 

oh i see , line 47

from 

setd(".m_" + .@id + "$[" + getarraysize(getd(".m_" + .@id)) + "]",getarg(1));

to

setd(".m_" + .@id + "$[" + getarraysize(getd(".m_" + .@id + "$")) + "]",getarg(1));

 

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  63
  • Topics Per Day:  0.05
  • Content Count:  172
  • Reputation:   1
  • Joined:  11/16/20
  • Last Seen:  

1 hour ago, sader1992 said:

oh i see , line 47

from 

setd(".m_" + .@id + "$[" + getarraysize(getd(".m_" + .@id)) + "]",getarg(1));

to

setd(".m_" + .@id + "$[" + getarraysize(getd(".m_" + .@id + "$")) + "]",getarg(1));

 

Amazing bro...now its working awesome...!!! THANK YOU SOOOOOOOOOOOOOOO MUCH...!!!!!!!!!!!!!!!!

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