Jump to content
kaeyih

Mini boss and Boss spawns

Recommended Posts

How to create script of boss monster spawn after 4 mini boss on the same map is killed? 

Edited by kaeyih

Share this post


Link to post
Share on other sites

does this mini boss have only on that map or is it on another maps?
if he is just on that map you can use something like this, didn't test it but should work fine!

 

-	script	BOSSSPAWN	-1,{
OnInit:
	set .bspawn,0;				//Where the kills will be saved(don't change)
	set .bneed,4;				//Kills needed
	set .bossid,XXXX;			//Boss ID
	set .minibossid,XXXX;		//Mini Boss ID
	set .reward,512;			//Reward for killing the Boss
	set .map$"MAPNAME";			//Name of the map you kill mini bosses
	end;
	
OnNPCKillEvent:
	if (killedrid == .minibossid){
		set .bspawn,.bspawn +1;
		if (.bspawn >= .bneed){
			mapannounce .map$,"The map boss has appeared!",0;
			monster .map$,0,0,"NAME OF BOSS MONSTER",.bossid,1,"BOSSSPAWN::OnBossKill";
			set .bspawn, 0;
		}
	}
	end;

OnBossKill:
	mapannounce "The player "+strcharinfo(0)+" has killed the boss!";
	getitem .reward,1;
	end;
}

 

Share this post


Link to post
Share on other sites

It may be better to contact active members through the discord. The website's been getting slow lately.

Share this post


Link to post
Share on other sites

Thank you for all your replies. Really appreicated!

 

Share this post


Link to post
Share on other sites

Thank you for all your replies. Really appreicated!

Ok I have tried out the script but I dont really understand how to edit it. 
losttower1b is my custommap that added in and is working. 

This is what I've written

losttower1b,111,262,0,0	monster	MH_COELACANTH_Y_A1	20787,1,90000,0,0
losttower1b,111,384,0,0	monster	MH_COELACANTH_Y_A2	20788,1,90000,0,0
losttower1b,291,384,0,0	monster	MH_COELACANTH_Y_A3	20789,1,90000,0,0
losttower1b,288,263,0,0	monster	MH_COELACANTH_Y_A4	20790,1,90000,0,0
//losttower1b,199,327,0,0	monster	MH_BAKONAWA	20863,1,90000,0,0

-	script	Losttower1b	-1,{
OnInit:
	set .bspawn,0;				//Where the kills will be saved(don't change)
	set .bneed,4;				//Kills needed
	set .bossid,20863;			//Boss ID
	set .minibossid,20787;		//Mini Boss ID
	set .reward,512;			//Reward for killing the Boss
	set .map$,"losttower1b";			//Name of the map you kill mini bosses
	end;
	
OnNPCKillEvent:
	if (killedrid == .minibossid){
		set .bspawn,.bspawn +1;
		if (.bspawn >= .bneed){
			mapannounce .map$,"The map boss has appeared!",0;
			monster .map$,199,331,10,10,"MH_BAKONAWA",.bossid,1,"BOSSSPAWN::OnBossKill";
			set .bspawn, 0;
		}
	}
	end;

OnBossKill:
	mapannounce "The player "+strcharinfo(0)+" has killed the boss!",
	getitem (.reward,1),
	end;
}

But i end up getting these errors 


[Warning]: script: buildin_getmapxy: Invalid type 0.
[Debug]: Source (NPC): Gold Room Warper at ordeal_1-2 (0,0)
[Warning]: script: buildin_getmapxy: Invalid type 0.
[Debug]: Source (NPC): Gold Room Warper at ordeal_1-2 (0,0)
[Warning]: script: buildin_getmapxy: Invalid type 0.
[Debug]: Source (NPC): Gold Room Warper at ordeal_1-2 (0,0)
[Info]: Pinging SQL server to keep connection alive...
[Info]: Pinging SQL server to keep connection alive...
[Info]: Pinging SQL server to keep connection alive...
[Warning]: script: buildin_getmapxy: Invalid type 0.
[Debug]: Source (NPC): Gold Room Warper at ordeal_1-2 (0,0)
[Warning]: Unexpected type for argument 4. Expected string.
[Debug]: Data: number value=10
[Warning]: Unexpected type for argument 6. Expected number.
[Debug]: Data: string value="MH_BAKONAWA"
[Debug]: Function: monster
[Debug]: Source (NPC): Losttower1b (invisible/not on a map)
[Warning]: NPC event parameter deprecated! Please use 'NPCNAME::OnEVENT' instead of '20863'.
[Debug]: Source (NPC): Losttower1b (invisible/not on a map)
[Warning]: buildin_monster: Attempted to spawn non-existing monster class 10
[Debug]: Source (NPC): Losttower1b (invisible/not on a map)




I am trying to make players kill 4 mini boss on same map 4 different fixed location to spawn the boss. 
Mini boss 
20787,
20788,
20789,
20790,

Boss spawn 
MH_BAKONAWA 
20863
 

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
Reply to this topic...

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

Important Information

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