Mabuhay Posted April 15, 2014 Share Posted April 15, 2014 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. Quote Link to comment Share on other sites More sharing options...
WhiteEagle Posted April 15, 2014 Share Posted April 15, 2014 (edited) 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. Edited April 15, 2014 by WhiteEagle Quote Link to comment Share on other sites More sharing options...
WhiteEagle Posted April 15, 2014 Share Posted April 15, 2014 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.^^ Quote Link to comment Share on other sites More sharing options...
Mabuhay Posted April 15, 2014 Author Share Posted April 15, 2014 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. Quote Link to comment Share on other sites More sharing options...
Mabuhay Posted April 16, 2014 Author Share Posted April 16, 2014 thanks! Quote Link to comment Share on other sites More sharing options...
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