Jump to content
  • 0

Mini boss and Boss spawns


kaeyih

Question


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  27
  • Reputation:   2
  • Joined:  10/08/20
  • Last Seen:  

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

Edited by kaeyih
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   1
  • Joined:  11/01/20
  • Last Seen:  

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

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  27
  • Reputation:   2
  • Joined:  10/08/20
  • Last Seen:  

Thank you for all your replies. Really appreicated!

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  27
  • Reputation:   2
  • Joined:  10/08/20
  • Last Seen:  

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
 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

Quote

[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)

On this Error you need to change the 0 into

  • BL_NPC if NPC
  • BL_PC if Player



     

On this Error you need to use string not number & use number instead of string
Ex:
String = Word
Number = Number

Quote

[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



On this error you need to use the NPCNAME:OnEventLabel

Quote

[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)

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  27
  • Reputation:   2
  • Joined:  10/08/20
  • Last Seen:  

Thanks for the reply, this post solved. 

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