Jump to content
  • 0
Sign in to follow this  
hadiesyafiq

REQUEST Script auto spawn boss when kill normal mob

Question

Hi all how to create script that will spawn boss monster if total kill on that map reach 100 normal mob?

example

map prt_fild08

kill poring 100 will auto spawn mastering...

player 1 kill 50poring after that another player kill another 50 so total 100 and auto spawn mastering...after mastering dead...system will have cooldown time for 24hours..

not kill 100 poring on whole map just prt_fild08

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 1
-	script	kjhfkshdf	FAKE_NPC,{
OnNPCKillEvent:
	if (killedrid == PORING && strcharinfo(PC_MAP) == "prt_fild08") {
		if (++.poringkill == 100) {
			monster "prt_fild08", 0,0, "--ja--", MASTERING, 1, strnpcinfo(NPC_NAME_UNIQUE)+"::OnMobKill";
//			mapannounce "prt_fild08", "Mastering has been spawn", bc_map;
		}
	}
	end;
OnMobKill:
//	mapannounce "prt_fild08", "Mastering has been killed", bc_map;
	initnpctimer;
	end;
//OnTimer5000:
OnTimer86400000:
	.poringkill = 0;
	end;
}
prt_fild08,0,0,0,0	monster	Poring	1002,1000,0,0

tested with

https://annieruru.blogspot.com/2019/01/mapmoblist-script-version.html

Share this post


Link to post
Share on other sites
  • 0
On 10/22/2020 at 6:44 PM, AnnieRuru said:

- script kjhfkshdf FAKE_NPC,{ OnNPCKillEvent: if (killedrid == PORING && strcharinfo(PC_MAP) == "prt_fild08") { if (++.poringkill == 100) { monster "prt_fild08", 0,0, "--ja--", MASTERING, 1, strnpcinfo(NPC_NAME_UNIQUE)+"::OnMobKill"; // mapannounce "prt_fild08", "Mastering has been spawn", bc_map; } } end; OnMobKill: // mapannounce "prt_fild08", "Mastering has been killed", bc_map; initnpctimer; end; //OnTimer5000: OnTimer86400000: .poringkill = 0; end; } prt_fild08,0,0,0,0 monster Poring 1002,1000,0,0


-	script	kjhfkshdf	FAKE_NPC,{
OnNPCKillEvent:
	if (killedrid == PORING && strcharinfo(PC_MAP) == "prt_fild08") {
		if (++.poringkill == 100) {
			monster "prt_fild08", 0,0, "--ja--", MASTERING, 1, strnpcinfo(NPC_NAME_UNIQUE)+"::OnMobKill";
//			mapannounce "prt_fild08", "Mastering has been spawn", bc_map;
		}
	}
	end;
OnMobKill:
//	mapannounce "prt_fild08", "Mastering has been killed", bc_map;
	initnpctimer;
	end;
//OnTimer5000:
OnTimer86400000:
	.poringkill = 0;
	end;
}
prt_fild08,0,0,0,0	monster	Poring	1002,1000,0,0

tested with

https://annieruru.blogspot.com/2019/01/mapmoblist-script-version.html

Thank you very much @AnnieRuru

Share this post


Link to post
Share on other sites
  • 0
On 10/22/2020 at 6:44 PM, AnnieRuru said:

- script kjhfkshdf FAKE_NPC,{ OnNPCKillEvent: if (killedrid == PORING && strcharinfo(PC_MAP) == "prt_fild08") { if (++.poringkill == 100) { monster "prt_fild08", 0,0, "--ja--", MASTERING, 1, strnpcinfo(NPC_NAME_UNIQUE)+"::OnMobKill"; // mapannounce "prt_fild08", "Mastering has been spawn", bc_map; } } end; OnMobKill: // mapannounce "prt_fild08", "Mastering has been killed", bc_map; initnpctimer; end; //OnTimer5000: OnTimer86400000: .poringkill = 0; end; } prt_fild08,0,0,0,0 monster Poring 1002,1000,0,0


-	script	kjhfkshdf	FAKE_NPC,{
OnNPCKillEvent:
	if (killedrid == PORING && strcharinfo(PC_MAP) == "prt_fild08") {
		if (++.poringkill == 100) {
			monster "prt_fild08", 0,0, "--ja--", MASTERING, 1, strnpcinfo(NPC_NAME_UNIQUE)+"::OnMobKill";
//			mapannounce "prt_fild08", "Mastering has been spawn", bc_map;
		}
	}
	end;
OnMobKill:
//	mapannounce "prt_fild08", "Mastering has been killed", bc_map;
	initnpctimer;
	end;
//OnTimer5000:
OnTimer86400000:
	.poringkill = 0;
	end;
}
prt_fild08,0,0,0,0	monster	Poring	1002,1000,0,0

tested with

https://annieruru.blogspot.com/2019/01/mapmoblist-script-version.html

hi @AnnieRuru i've test the script several time..there is nothing error on map-server but nothing happen when i kill 100 poring..no mastering spawn and no map announcement..

Share this post


Link to post
Share on other sites
  • 0

no announcement because the announce has been commented

and you can always use `@mapmoblist` to check ... it's working or not ...

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, AnnieRuru said:

no announcement because the announce has been commented

and you can always use `@mapmoblist` to check ... it's working or not ...

thank you very much @AnnieRuru it work

Share this post


Link to post
Share on other sites
  • 0

hi @AnnieRuru sorry ask again..but can the script make like this?

kill 10poring kill 10drops and kill 10poporing will spawn angeling?

i mean need to kill 3 different monster to spawn 1 boss...how to do it?

 

and can the script summon boss on the location last kill?

For example, angeling will spawn on the character who kills the 10th poring.

 

Edited by hadiesyafiq

Share this post


Link to post
Share on other sites
  • 0

is this a different request ?

feels totally different from the first post

 

-	script	kjhfkshdf	FAKE_NPC,{
OnNPCKillEvent:
	if (strcharinfo(PC_MAP) != "prt_fild08" || .spawned == true)
		end;
	if (killedrid == PORING)
		++.poringkill;
	else if (killedrid == DROPS)
		++.dropskill;
	else if (killedrid == POPORING)
		++.poporingkill;
	if (.poringkill > 10 && .dropskill > 10 && .poporingkill > 10) {
		getmapxy .@map$, .@x, .@y, UNITTYPE_PC;
		while (checkcell(.@map$, .@x2 = rand(.@x - .@area, .@x + .@area), .@y2 = rand(.@y - .@area, .@y + .@area), cell_chknopass));
		monster "prt_fild08", .@x2, .@y2, "--ja--", MASTERING, 1, strnpcinfo(NPC_NAME_UNIQUE)+"::OnMobKill";
		mapannounce "prt_fild08", "Mastering has been spawn", bc_map;
		.spawned = true;
	}
	end;
OnMobKill:
	mapannounce "prt_fild08", "Mastering has been killed", bc_map;
	initnpctimer;
	end;
//OnTimer5000:
OnTimer86400000:
	.poringkill = 0;
	.dropskill = 0;
	.poporingkill = 0;
	.spawned = false;
	end;
}
prt_fild08,0,0,0,0	monster	Poring	1002,1000,0,0
prt_fild08,0,0,0,0	monster	Drops	1113,1000,0,0
prt_fild08,0,0,0,0	monster	Poporing	1031,1000,0,0

 

Share this post


Link to post
Share on other sites
  • 0
3 minutes ago, AnnieRuru said:

is this a different request ?

feels totally different from the first post

 

- script kjhfkshdf FAKE_NPC,{ OnNPCKillEvent: if (strcharinfo(PC_MAP) != "prt_fild08" || .spawned == true) end; if (killedrid == PORING) ++.poringkill; else if (killedrid == DROPS) ++.dropskill; else if (killedrid == POPORING) ++.poporingkill; if (.poringkill > 10 && .dropskill > 10 && .poporingkill > 10) { getmapxy .@map$, .@x, .@y, UNITTYPE_PC; while (checkcell(.@map$, .@x2 = rand(.@x - .@area, .@x + .@area), .@y2 = rand(.@y - .@area, .@y + .@area), cell_chknopass)); monster "prt_fild08", .@x2, .@y2, "--ja--", MASTERING, 1, strnpcinfo(NPC_NAME_UNIQUE)+"::OnMobKill"; mapannounce "prt_fild08", "Mastering has been spawn", bc_map; .spawned = true; } end; OnMobKill: mapannounce "prt_fild08", "Mastering has been killed", bc_map; initnpctimer; end; //OnTimer5000: OnTimer86400000: .poringkill = 0; .dropskill = 0; .poporingkill = 0; .spawned = false; end; } prt_fild08,0,0,0,0 monster Poring 1002,1000,0,0 prt_fild08,0,0,0,0 monster Drops 1113,1000,0,0 prt_fild08,0,0,0,0 monster Poporing 1031,1000,0,0


-	script	kjhfkshdf	FAKE_NPC,{
OnNPCKillEvent:
	if (strcharinfo(PC_MAP) != "prt_fild08" || .spawned == true)
		end;
	if (killedrid == PORING)
		++.poringkill;
	else if (killedrid == DROPS)
		++.dropskill;
	else if (killedrid == POPORING)
		++.poporingkill;
	if (.poringkill > 10 && .dropskill > 10 && .poporingkill > 10) {
		getmapxy .@map$, .@x, .@y, UNITTYPE_PC;
		while (checkcell(.@map$, .@x2 = rand(.@x - .@area, .@x + .@area), .@y2 = rand(.@y - .@area, .@y + .@area), cell_chknopass));
		monster "prt_fild08", .@x2, .@y2, "--ja--", MASTERING, 1, strnpcinfo(NPC_NAME_UNIQUE)+"::OnMobKill";
		mapannounce "prt_fild08", "Mastering has been spawn", bc_map;
		.spawned = true;
	}
	end;
OnMobKill:
	mapannounce "prt_fild08", "Mastering has been killed", bc_map;
	initnpctimer;
	end;
//OnTimer5000:
OnTimer86400000:
	.poringkill = 0;
	.dropskill = 0;
	.poporingkill = 0;
	.spawned = false;
	end;
}
prt_fild08,0,0,0,0	monster	Poring	1002,1000,0,0
prt_fild08,0,0,0,0	monster	Drops	1113,1000,0,0
prt_fild08,0,0,0,0	monster	Poporing	1031,1000,0,0

 

Hehehehe thank you very very much @AnnieRuru

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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