Jump to content
  • 0
DEsMOn

Need MVP Script With GM Reset Command

Question

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

10 answers to this question

Recommended Posts

  • 0
prontera,0,0,0	script	mvp_kill_count	444,{
	copyarray([email protected]$,$MVP_KILL_NM$,getarraysize($MVP_KILL_NM$));
	copyarray([email protected],$MVP_KILL_COUNT,getarraysize($MVP_KILL_COUNT));
	[email protected] = min(.max_show,getarraysize([email protected]$));
	if([email protected] <= 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([email protected] < [email protected]){
		[email protected]++;
		[email protected] = max([email protected]);
		if([email protected] <= 0) break;
		[email protected] = inarray([email protected],[email protected]);
		if([email protected] == -1) break;
		mes "(" + [email protected] + ") " + [email protected]$[[email protected]];
		deletearray([email protected]$[[email protected]],1);
		deletearray([email protected][[email protected]],1);
	}
end;

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

	function	AddMvp	{
		[email protected] = getarraysize(.mvp_id);
		[email protected] = getarg(0);
		.mvp_id[[email protected]] = [email protected];
		setd(".m_" + [email protected] + "$[" + getarraysize(getd(".m_" + [email protected] + "$")) + "]",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
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
12 hours ago, 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)

Link to comment
Share on other sites

  • 0
15 hours ago, sader1992 said:


prontera,0,0,0	script	mvp_kill_count	444,{
	copyarray([email protected]$,$MVP_KILL_NM$,getarraysize($MVP_KILL_NM$));
	copyarray([email protected],$MVP_KILL_COUNT,getarraysize($MVP_KILL_COUNT));
	[email protected] = min(.max_show,getarraysize([email protected]$));
	if([email protected] <= 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([email protected] < [email protected]){
		[email protected]++;
		[email protected] = max([email protected]);
		if([email protected] <= 0) break;
		[email protected] = inarray([email protected],[email protected]);
		if([email protected] == -1) break;
		mes "(" + [email protected] + ") " + [email protected]$[[email protected]];
		deletearray([email protected]$[[email protected]],1);
		deletearray([email protected][[email protected]],1);
	}
end;

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

	function	AddMvp	{
		[email protected] = getarraysize(.mvp_id);
		[email protected] = getarg(0);
		.mvp_id[[email protected]] = [email protected];
		setd(".m_" + [email protected] + "$[" + getarraysize(getd(".m_" + [email protected])) + "]",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 

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

image.png.805094365adc24821df9d5d7f0c043db.png

Edited by DEsMOn
Updates
Link to comment
Share on other sites

  • 0
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 :        [email protected] = killedrid;
    32 :        if(inarray(.mvp_id,[email protected]) != -1){
*   33 :                if(inarray(getd(".m_" + [email protected] + "$")')' != -1){
    34 :                        if(([email protected] = inarray($MVP_KILL_CID,getcharid(0))) == -1){
    35 :                                [email protected] = getarraysize($MVP_KILL_CID);
    36 :                                $MVP_KILL_CID[[email protected]] = getcharid(0);
    37 :                                $MVP_KILL_NM$[[email protected]] = strcharinfo(0);
    38 :                        }

image.png.805094365adc24821df9d5d7f0c043db.png

replace the line with

if(inarray(getd(".m_" + [email protected] + "$"),strcharinfo(3)) != -1){

 

i edited the script in the first post

Link to comment
Share on other sites

  • 0
1 hour ago, sader1992 said:

replace the line with

if(inarray(getd(".m_" + [email protected] + "$"),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
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
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
49 minutes ago, DEsMOn said:

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

oh i see , line 47

from 

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

to

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

 

  • Love 1
Link to comment
Share on other sites

  • 0
1 hour ago, sader1992 said:

oh i see , line 47

from 

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

to

setd(".m_" + [email protected] + "$[" + getarraysize(getd(".m_" + [email protected] + "$")) + "]",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...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.