Jump to content
  • 0
GM Winter

[Solved] Disable Body Reload in NPC

Question

hello i would like to ask is there any script how to disable body relocation in an npc coordinates  or npc location so that they cant cover the npc thanks in advance

Edited by GM Winter
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1
7 hours ago, GM Winter said:

hello i would like to ask is there any script how to disable body relocation in an npc coordinates  or npc location so that they cant cover the npc thanks in advance


Go to skill.cpp and do this:
 

	case MO_BODYRELOCATION:
+		if ( map_count_oncell(src->m,x,y,BL_NPC,0) ) {
+			clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
+			return 0;
+		}
		if (unit_movepos(src, x, y, 2, 1)) {
#if PACKETVER >= 20111005
			clif_snap(src, src->x, src->y);

 

Dont forget to recompile

Edited by RagEmp
  • Upvote 2
Link to comment
Share on other sites

  • 0
7 hours ago, RagEmp said:


Go to skill.cpp and do this:
 

	case MO_BODYRELOCATION:
+		if ( map_count_oncell(src->m,x,y,BL_NPC,0) ) {
+			clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
+			return 0;
+		}
		if (unit_movepos(src, x, y, 2, 1)) {
#if PACKETVER >= 20111005
			clif_snap(src, src->x, src->y);

 

Dont forget to recompile

thank you sir 100% working ❤️

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

Important Information

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