Jump to content

Question

Posted

Hello!

i have problem onNPCkillvent

cuz even if they are not taking the quest , the kill event is ON

heres the script.. 

..

please help me Master scripters!
thank!

	if (readpain2 >= 1) {
		mes "[Pain]";
		mes "Did you capture the tailed beast?";
		menu "Yes", L_YES, "What are those again?", L_list;
		
		L_YES:
			if (AddaxKills < 2 || TGCKills < 2 || BHZKills < 2 || FabKills < 2) {
			mes "[Pain]";
				mes "I don't see them complete!!";
				close;
			}
			
			if (AddaxKills >= 2 || TGCKills >= 2 || BHZKills >= 2 || FabKills >= 2 ) {
				mes "[Pain]";
				mes "This is it.....!";
				next;
				mes "Now,";
				mes "Lets go to Uchiha Madara";
				set donepain2, 1;
				close;
				warp "niflheim",304,76;	
				end;
			}
	
		L_list:
		mes "[Pain]";
			mes "Hmmm. You are missing...";
			if (AddaxKills < 2) mes "^FF0000"+(2 - AddaxKills) +"^000000 Addax";
			if (TGCKills < 2) mes "^FF0000"+(2 - TGCKills) +"^000000 Green Teen Chipmunks";
			if (BHZKills < 2) mes "^FF0000"+(2 - BHZKills) +"^000000 Blue Hell Centaur";
			if (FabKills < 2) mes "^FF0000"+(2 - FabKills) +"^000000 Fabilsag";
			close;
}

		mes "[Pain]";
		mes "Yes?";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "I want to meet";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "Uchiha Madara";
		next; 
		mes "[Pain]";
		mes "meet Uchiha Madara huh?";
		next;
		mes "[Pain]";
		mes "I'll let you meet him";
		mes "but I need you to hunt/capture this beast";
		next;
		mes "2 Blue Hell Centaur";
		mes "2 Green Teen chipmunks";
		mes "2 Addax";
		mes "1 fabilsag";
		set npc, 1;
		set readpain2, 1;
		next;
		menu "I will!",-,"Are you kidding me?",l_v;
		
		mes "[Pain]";
		mes "Go now!";
		close;
	
l_v:
	mes "[Pain]";
	mes "Do I look like I am kidding?!!!";
	next;
	mes "[Pain]";
	mes "Nimpu";
	mes "Deva path!";
	close2;
	percentheal -100,0;
	end;

OnNPCKillEvent:
	if(killedrid == 3221) {
	set AddaxKills,AddaxKills + 1;
		if(AddaxKills == 2) announce ""+strcharinfo(0)+" has captured one tailed beast.",bc_all,0x00FF4C;
}

else if (killedrid == 3249) {
	set TGCKills,TGCKills + 1;
		if(TGCKills == 2) announce ""+strcharinfo(0)+" has captured one tailed beast.",bc_all,0x00FF4C;
}
else if (killedrid == 3218) {
	set BHZKills,BHZKills + 1;
		if(BHZKills == 2) announce ""+strcharinfo(0)+" has captured one tailed beast.",bc_all,0x00FF4C;
}
else if (killedrid == 3250) {
		set FabKills,FabKills + 1;
		if(FabKills == 2) announce ""+strcharinfo(0)+" has captured one tailed beast.",bc_all,0x00FF4C;
					}
				}
			}
		}
	}
	end;
}

3 answers to this question

Recommended Posts

Posted

Simply add

if (readpain2 < 1 || donepain2 == 1) end;

​after OnNPCKillEvent

 

like this?

OnNPCKillEvent:
if (readpain2 < 1 || donepain2 == 1) end;

	if(killedrid == 3221) {
	set AddaxKills,AddaxKills + 1;
		if(AddaxKills == 2) announce ""+strcharinfo(0)+" has captured one tailed beast.",bc_all,0x00FF4C;
}

else if (killedrid == 3249) {
	set TGCKills,TGCKills + 1;
		if(TGCKills == 2) announce ""+strcharinfo(0)+" has captured one tailed beast.",bc_all,0x00FF4C;
}
else if (killedrid == 3218) {
	set BHZKills,BHZKills + 1;
		if(BHZKills == 2) announce ""+strcharinfo(0)+" has captured one tailed beast.",bc_all,0x00FF4C;
}
else if (killedrid == 3250) {
		set FabKills,FabKills + 1;
		if(FabKills == 2) announce ""+strcharinfo(0)+" has captured one tailed beast.",bc_all,0x00FF4C;
					}
				}
			}
		}
	}
	end;
}

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...