REQUEST Script auto spawn boss when kill normal mob

hadiesyafiq

New member
Messages
160
Points
0
Age
35
Location
Malaysia
Github
hadiesyafiq
Emulator
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

 
- 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

 
- 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

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

 
no announcement because the announce has been commented

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

 
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.

 
Last edited by a moderator:
is this a different request ?

feels totally different from the first post

Code:
-	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
 
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

 
Back
Top