Nash Posted January 10, 2014 Posted January 10, 2014 Hi guys,i wanna make a script that uses npctalk if a players is around the npclike npc says hello if player passes please write a sample Script so ill know how to do it Thx for all your help guysRegards,Nash Quote
clydelion Posted January 10, 2014 Posted January 10, 2014 Just to give you an idea, you can use the OnTouch/OnTouch_ event. OnTouch: This label will be executed if a trigger area is defined for the NPC object it's in. If it isn't present, the execution will start from the beginning of the NPC code. The RID of the triggering character object will be attached. OnTouch_: Similar to OnTouch, but will only run one instance. Another character is chosen once the triggering character leaves the area. Quote
AnnieRuru Posted January 10, 2014 Posted January 10, 2014 please write a sample Script so ill know how to do it hmm ........... hmmmm........ prontera,150,189,5 script AnnieRuru 123,5,5,{ end; OnTouch: npctalk "Hi "+( ( sex )? "Handsome" : "Pretty" )+" one ~ How may I help you ?"; end; } Quote
Nash Posted January 11, 2014 Author Posted January 11, 2014 ontouch works if players touches npc right?guys i want it like it would say that even if Player is in 3-4 cells away ^^is it possible to do so?if yes . how?Btw thx for reply guys ^^ Quote
AnnieRuru Posted January 11, 2014 Posted January 11, 2014 Read The F***ing Manual prontera,150,189,5 script AnnieRuru 123,3,4,{ end; OnTouch: npctalk "Hi "+( ( sex )? "Handsome" : "Pretty" )+" one ~ How may I help you ?"; end; }this will trigger the npc with the range like thisxxxxxxx xxxxxxx xxxxxxx xxxxxxx xxxNxxx xxxxxxx xxxxxxx xxxxxxx xxxxxxx https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L224 Quote
Question
Nash
Hi guys,


i wanna make a script
that uses npctalk if a players is around the npc
like npc says hello if player passes
please write a sample Script so ill know how to do it
Thx for all your help guys
Regards,
Nash
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.