Jump to content
  • 0
edwardluciano

[Instance issue] Monster not respawn when killed

Question

Posted (edited)

i tried to convert abyss dungeon to instance now i can spawn when instance create but when player kill monster monster note respawn

Lasted code  i tried to use OnNPCKillEvent 
Mapserver Msg when kill monster :
[Debug]: (map_mapname2mapid) mapindex_name2id: Map "" not found in index list!
[Debug]: (map_mapname2mapid) mapindex_name2id: Map "" not found in index list!
[Debug]: (map_mapname2mapid) mapindex_name2id: Map "" not found in index list!

[email protected]_03,0,0,0	script	AbyssLake	HIDDEN_WARP_NPC,{

OnInstanceInit:
	
	set [email protected]$, instance_mapname("[email protected]_03");
	//set [email protected]$, instance_npcname(strnpcinfo(0))+"::OnMobDead";
			
	monster [email protected]$,0,0,"Acidus",1713,60,strnpcinfo(0)+"::OnMobDead";
	monster [email protected]$,0,0,"Dragon Egg",1721,10,strnpcinfo(0)+"::OnMobDead";
	monster [email protected]$,0,0,"Mimic",1191,10,strnpcinfo(0)+"::OnMobDead";
	monster [email protected]$,0,0,"Acidus",1716,10,strnpcinfo(0)+"::OnMobDead";
	monster [email protected]$,0,0,"Ancient Mimic",1699,10,strnpcinfo(0)+"::OnMobDead";
	monster [email protected]$,0,0,"Ferus",1714,10,strnpcinfo(0)+"::OnMobDead";
	monster [email protected]$,0,0,"Ferus",1717,10,strnpcinfo(0)+"::OnMobDead";
	monster [email protected]$,0,0,"Hydrolancer",1720,3,strnpcinfo(0)+"::OnMobDead";
end;

OnMobDead:
	//set [email protected]$, instance_mapname("[email protected]_03");
	setarray .Mob_id[0]
	,1713
	,1721
	,1191
	,1716
	,1699
	,1714
	,1717
	,1720;
	
	for([email protected] = 0; [email protected] < getarraysize(.Mob_id); [email protected]++)
	{
		if (killedrid == .Mob_id[[email protected]])
		{
			monster instance_mapname("[email protected]_03"),0,0,"--ja--",.Mob_id[[email protected]],1,strnpcinfo(0)+"::OnMobDead";
		}
	}
end;

}

 

Edited by edwardluciano

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 1

Hey,

Use instance commands when targeting instance NPC's, like the ones you commented out.

instance_npcname(strnpcinfo(0))+"::OnMobDead"

 

  • Upvote 1

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)
[email protected]_03,0,0,0	script	AbyssLake	HIDDEN_WARP_NPC,{

OnInstanceInit:
	set .map$, instance_mapname("[email protected]_03");
	//set [email protected]$, instance_npcname(strnpcinfo(0))+"::OnMobDead";
	setarray .Mob_id[0]
	,1713
	,1721
	,1191
	,1716
	,1699
	,1714
	,1717
	,1720;
	
	monster .map$,0,0,"Acidus",1713,70,instance_npcname(strnpcinfo(0))+"::OnMobDead";
	monster .map$,0,0,"Dragon Egg",1721,20,instance_npcname(strnpcinfo(0))+"::OnMobDead";
	monster .map$,0,0,"Mimic",1191,20,instance_npcname(strnpcinfo(0))+"::OnMobDead";
	monster .map$,0,0,"Acidus",1716,20,instance_npcname(strnpcinfo(0))+"::OnMobDead";
	monster .map$,0,0,"Ancient Mimic",1699,20,instance_npcname(strnpcinfo(0))+"::OnMobDead";
	monster .map$,0,0,"Ferus",1714,20,instance_npcname(strnpcinfo(0))+"::OnMobDead";
	monster .map$,0,0,"Ferus",1717,20,instance_npcname(strnpcinfo(0))+"::OnMobDead";
	monster .map$,0,0,"Hydrolancer",1720,13,instance_npcname(strnpcinfo(0))+"::OnMobDead";
end;

OnMobDead:
	for([email protected] = 0; [email protected] < getarraysize(.Mob_id); [email protected]++)
	{
		if (killedrid == .Mob_id[[email protected]])
		{
			monster .map$,0,0,"--ja--",.Mob_id[[email protected]],1,instance_npcname(strnpcinfo(0))+"::OnMobDead";
		}
	}
end;

}

Now it ok but when reach 20 minute monster not spawn again


Msg:
[Error]: npc_event: event not found [dup_13_110044598::OnMobDead]

Edited by edwardluciano

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