Jump to content
  • 0
Eross

Kill Count Command

Question

Hi ! I would like to request for a script that counts mob kills .. 

 @killcount <mob id> or @killcount <mobname>
 

For example. @killcount 1002 / @killcount Poring or poring (not case sensitive) . Everytime I kill poring a bottom message will show on my bottom chat saying "Poring kill: <number of kills>" .. When I type @killcount without monster name or ID it should show "Killed Porings: <kill count>" ..With @killcount reset function. Thanks 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
-	script	atcmd_example	-1,{
OnInit:
	bindatcmd "killcount", strnpcinfo(3) + "::OnAtcommand";
	end;
	
OnAtcommand:
	if (compare([email protected]_parameters$, "reset")) {
		#killcount_mob_id = 0;
		#killcount_amount = 0;
		dispbottom [email protected]_command$+" reset successfully.";
	}
	else if (getmonsterinfo(atoi([email protected]_parameters$), MOB_NAME) != "null") {
		[email protected]_mob_id = atoi([email protected]_parameters$);
		if ([email protected]_mob_id != #killcount_mob_id) {
			#killcount_mob_id = [email protected]_mob_id;
			#killcount_amount = 0;
			dispbottom [email protected]_command$+" will start count "+getmonsterinfo(#killcount_mob_id, MOB_NAME)+".";
		}
	}
	else if (#killcount_mob_id) {
		dispbottom getmonsterinfo(#killcount_mob_id, MOB_NAME)+" Kill: "+F_InsertComma(#killcount_amount);
	}
	else {
		dispbottom [email protected]_command$+" failed. Usage: "[email protected]_command$+" <mob_id/reset>";
	}
	end;
	
OnNPCKillEvent:
	if (killedrid == #killcount_mob_id) {
		#killcount_amount++;
		dispbottom getmonsterinfo(#killcount_mob_id, MOB_NAME)+" Kill: "+F_InsertComma(#killcount_amount);
	}
	end;
}

 

  • Upvote 3
Link to comment
Share on other sites

  • 0
6 hours ago, Emistry said:
-	script	atcmd_example	-1,{
OnInit:
	bindatcmd "killcount", strnpcinfo(3) + "::OnAtcommand";
	end;
	
OnAtcommand:
	if (compare([email protected]_parameters$, "reset")) {
		#killcount_mob_id = 0;
		#killcount_amount = 0;
		dispbottom [email protected]_command$+" reset successfully.";
	}
	else if (getmonsterinfo(atoi([email protected]_parameters$), MOB_NAME) != "null") {
		[email protected]_mob_id = atoi([email protected]_parameters$);
		if ([email protected]_mob_id != #killcount_mob_id) {
			#killcount_mob_id = [email protected]_mob_id;
			#killcount_amount = 0;
			dispbottom [email protected]_command$+" will start count "+getmonsterinfo(#killcount_mob_id, MOB_NAME)+".";
		}
	}
	else if (#killcount_mob_id) {
		dispbottom getmonsterinfo(#killcount_mob_id, MOB_NAME)+" Kill: "+F_InsertComma(#killcount_amount);
	}
	else {
		dispbottom [email protected]_command$+" failed. Usage: "[email protected]_command$+" <mob_id/reset>";
	}
	end;
	
OnNPCKillEvent:
	if (killedrid == #killcount_mob_id) {
		#killcount_amount++;
		dispbottom getmonsterinfo(#killcount_mob_id, MOB_NAME)+" Kill: "+F_InsertComma(#killcount_amount);
	}
	end;
}

 

Thankyou sir !!! I will try this later ... One more question .. How about making it up to max 5 mob id ??? like for example I type @killcount Poring and @killcount Fabre and 3 other they all work but on 6th it should say , @killcount max is 5 only . with @killcount reset 1 to 5 ,,and @killcount will show 5 mobs ..Thankyou sir 

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.