Jump to content
  • 0

OnNPCKillEvent announce Help


Question

Posted

the announce is not working properly, i kill 10 Vitata or 5 Familiar and she is coming, but she shall not come until I have killed all.

 

OnNPCKillEvent:
if(anthell) end;
if(killedrid == 1176 && VitataKills < 10) // = Vitata
{
	set VitataKills,VitataKills + 1;
	dispbottom "You killed "+VitataKills+"/10 Vitata.";
	if(VitataKills >= 10) 
		dispbottom "You have killed all Vitatas.";
		
} else if (killedrid == 1097 && AntEggKills < 55) // = Ant Egg
{
	set AntEggKills,AntEggKills + 1;
	dispbottom "You killed "+AntEggKills+"/55 AntEgg.";
	if(AntEggKills >= 55)
		dispbottom "You have killed all AntEggs.";
		
}else if (killedrid == 1005 && FamiliarKills < 5) // = Familiar
{
	set FamiliarKills,FamiliarKills + 1;
	dispbottom "You killed "+FamiliarKills+"/5 Familiar.";
	if(FamiliarKills >= 5)
		dispbottom "You have killed all Familiars.";
		
} else if(anthell == 0) {
announce " You have killed every Monster. Come back to me to !",bc_self;
set anthell,1;
}
end;
}

 

3 answers to this question

Recommended Posts

  • 0
Posted

imho, I don't like this script. better you use quest_db and add monster's objectives

OnNPCKillEvent:
	if(anthell) end;
	if(killedrid == 1176) // = Vitata
	{
		set VitataKills,VitataKills + 1;
		if (VitataKills < 10) {
			dispbottom "You killed "+VitataKills+"/10 Vitata.";
		}
		else if(VitataKills == 10) {
			dispbottom "You have killed all Vitatas.";
		}
	}
	else if (killedrid == 1097) // = Ant Egg
	{
		set AntEggKills,AntEggKills + 1;
		if (AntEggKills < 55) {
			dispbottom "You killed "+AntEggKills+"/55 AntEgg.";
		}
		else if(AntEggKills == 55) {
			dispbottom "You have killed all AntEggs.";
		}
	}
	else if (killedrid == 1005) // = Familiar
	{
		set FamiliarKills,FamiliarKills + 1;
		if (FamiliarKills < 5) {
			dispbottom "You killed "+FamiliarKills+"/5 Familiar.";
		}
		else if(FamiliarKills == 5) {
			dispbottom "You have killed all Familiars.";
		}
	}
	if(anthell == 0 && FamiliarKills >= 5 && AntEggKills >= 55 && VitataKills >= 10) {
		announce " You have killed every Monster. Come back to me to !",bc_self;
		set anthell,1;
	}
	end;

 

  • 0
Posted
7 hours ago, Kinx said:

the announce is not working properly, i kill 10 Vitata or 5 Familiar and she is coming, but she shall not come until I have killed all.

I agree with @Cydh only use OnNPCKillEvent: when you absolutely have to. Since it's going to trigger every time a mob gets killed in your server ever...

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