Jump to content
  • 0

Custom Instance Spawn Double Mob While in Script only 1..


rakuzas

Question


  • Group:  Members
  • Topic Count:  152
  • Topics Per Day:  0.03
  • Content Count:  459
  • Reputation:   7
  • Joined:  06/29/12
  • Last Seen:  

Hi guys,

I make custom instance and its working right now.. But the problem is, the instance spawn double mob which suppose to spawn only 1 mob.. Tried tweaking but its same.. Hope you guys can guide me..

Sample Script : 

1@prison,236,18,0	script	#inst01Monsters1	111,{
	end;

	.@n$ = "#inst01Monsters1";
	.@map$ = "1@prison";

OnInstanceInit:
	//enablenpc instance_npcname(.@n$);
	.@killcount = 0;
		mapannounce instance_mapname("1@prison"),"Prisoner : We must defeat this Guards to get out from here!!",bc_map;
		monster instance_mapname("1@prison"),230,18,"Prison Guard",2445,1,instance_npcname("#inst01Monsters1")+"::OnMyMobDead01";
		

OnDisable:
	stopnpctimer;
	killmonster instance_mapname("1@prison"),instance_npcname("#inst01Monsters1")+"::OnMyMobDead";
	end;
	
OnMyMobDead01:

	addrid(2,0,getcharid(1));
	getitem 31240,1;
	detachrid;
	set .@dead, mobcount(instance_mapname("1@prison"),instance_npcname("#inst01Monsters1")+"::OnMyMobDead01");
	if (.@dead == 0) {
		if (.@dead > 1) {
			debugmes "Already spawn";
		}
		
		if (.@dead < 1) {
	monster instance_mapname("1@prison"),230,18,"Prison Guard",2443,1,instance_npcname("#inst01Monsters1")+"::OnMyMobDead1";
		}
	mapannounce instance_mapname("1@prison"),"Prisoner : Ahhhh.. Their Twins are already here!!",bc_map;
	}
	end;
	
OnMyMobDead1:

	addrid(2,0,getcharid(1));
	getitem 31240,1;
	detachrid;
	set .@dead, mobcount(instance_mapname("1@prison"),instance_npcname("#inst01Monsters1")+"::OnMyMobDead1");
	if (.@dead == 0) {
				if (.@dead > 1) {
			debugmes "Already spawn";
		}
		
		if (.@dead < 1) {
	monster instance_mapname("1@prison"),215,15,"Prison Guard",2448,1,instance_npcname("#inst01Monsters1")+"::OnMyMobDead2";
		}
	mapannounce instance_mapname("1@prison"),"Prisoner : Ahhhh.. Their Twins are already here!!",bc_map;
	}
	end;

BTW.. I dont get any debug or error message.. Just don't know why it spawn double mob..

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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