Jump to content
  • 0

OnNPCKillEvent not work in instances


Ichigo

Question


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  99
  • Reputation:   11
  • Joined:  01/22/13
  • Last Seen:  

Hi.
I don't know why, but OnNPCKillEvent doesn't work on instance mobs.
Can someone help me, I'm going crazy.
Thank you.

-	script	instance_coins	-1,{
	end;
OnNPCKillEvent:
	switch(killedrid) {
		case 3450:
		case 3254:
		case 3097:
		case 3096:
		case 3092:
		case 3091:
		case 3000:
		case 3029:
		case 3190:
		case 2942:
		case 2564:
		case 2961:
		case 2959:
		case 2529:
		case 2542:
		case 2476:
		case 2322:
		case 2327:
		case 2194:
		case 2190:
		case 2189:
		case 2131:
		case 2538:
		case 3150:
		case 3758:
		case 1929:
		case 1087:
		case 2022:
		case 1956:
		case 1734:
		case 2109:
		case 2253:
		case 2249:
		case 3073:
		case 3181:
		case 3473:
		case 2319:
		case 1874:
		case 2251:
		case 1832:
		case 3124:
		case 2255:
		case 30006:
		case 30007: goto OnFinInstance; end;
		default: end;
	}
	end;

OnFinInstance:
	.@map$ = strcharinfo(3);
	if((compare(.@map$, "@")) || (.@map$=="skycity")) {
		getitem 50014, 1;
	}
	end;
}

]

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

The monsters of yours instance probably have their own label.

monster "place",60,100,"Poring",1002,1;	// call OnNPCKillEvent on monster dead
monster "place",60,100,"Poring",1002,1,"NPCNAME::OnLabel";	// call OnLabel on monster dead (not OnNPCKillEvent)

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  625
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

Global events like that can't be duplicated for instances.

Also try to assign an event to your mob spawns like capuche mentioned.

Edited by llchrisll
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  99
  • Reputation:   11
  • Joined:  01/22/13
  • Last Seen:  

OKAY.
Thanks for the info.
I guess you have to modify the instance manually.

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

rename the event label into OnXXX and assign it to your instance monsters.  (instance_coins::OnXXXX)

else leave the event label empty to have it trigger the global event.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  625
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

If you would use a global event but want it only to a affect an instance then it's the same as using an event label for the monsters.

Edited by llchrisll
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...