Jump to content
  • 0

OnNPCKillEvent announce Help


Kinx

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   30
  • Joined:  04/03/17
  • Last Seen:  

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;
}

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

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;

 

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  106
  • Reputation:   30
  • Joined:  04/03/17
  • Last Seen:  

how do you use the quest_db?

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