Jump to content
  • 0

bind @ command to call NPC


Mabuhay

Question


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

I want to call an NPC using bindatcommand function. Example NPC 1. when i type @npc1, i can access the NPC1 but NPC1 also exist in map.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  461
  • Reputation:   61
  • Joined:  08/28/12
  • Last Seen:  

prontera,50,50,3	script	NPC_Name	700, { 
OnInit:
bindatcmd "npc1",strnpcinfo(3)+"::OnAtNPC1";
	
OnAtNPC1:
	mes "Hi "+strcharinfo(0)+";
	mes "How can I help you?";
	close;
}

Let me know if it right. :D

Edited by WhiteEagle
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  461
  • Reputation:   61
  • Joined:  08/28/12
  • Last Seen:  

I don't know if I understand you right, but here my excample:

-	script	NPC_Caller	-1, {
	bindatcmd "npc1",strnpcinfo(3)+"::OnAtNPC1";
	bindatcmd "npc2",strnpcinfo(3)+"::OnAtNPC2";

OnAtNPC1:
	getmapxy "@map$,@x,@y,0;
	unitwarp getnpcid(0),"@map$",@x,@y;
	end;
	
OnAtNPC2:
	getmapxy "@map$,@x,@y,0;
	unitwarp getnpcid(0),"@map$",@x,@y;
	end;
}

prontera,0,0,0	script	NPC_1	1234, {
	mes "Why you called me?";
	close;
}

prontera,0,0,0	script	NPC_2	1234, {
	mes "Why you called me?";
	close;
}

Not tested.^^

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

No, sorry by that. What i meant is that you can access the NPC Anywhere in the server by a command. But the same time, the NPC also exist in server.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

thanks!

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