daikatana_ Posted June 22, 2019 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 15 Reputation: 0 Joined: 05/09/19 Last Seen: August 19, 2019 Share Posted June 22, 2019 Hi, Is there any way I can create an NPC inside an instance that would trigger OnTouch? Or just trigger some script after stepping on certain coordinates inside an instance without an NPC? Thanks. Quote Link to comment Share on other sites More sharing options...
0 Skorm Posted June 22, 2019 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted June 22, 2019 Sorta but it would be dumb to do so... In order to do it without an npc at those coordinates, you would need to loop and constantly track your players' positions until they are at that point then run the rest of the script. The better way of doing that would be to create a hidden npc at the coordinates you want to trigger OnTouch. They should still work within an instance. Using -1 for an npc's sprite will make it hidden from the client. Quote Link to comment Share on other sites More sharing options...
0 daikatana_ Posted June 22, 2019 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 15 Reputation: 0 Joined: 05/09/19 Last Seen: August 19, 2019 Author Share Posted June 22, 2019 (edited) Thanks. But how do I create that NPC just for the current instance? Map name won't accept variables. To explain that a bit further.... After the character touches certain coordinates, I want to display a message and then a mob will attack the character. Edited June 22, 2019 by daikatana_ Quote Link to comment Share on other sites More sharing options...
0 Skorm Posted June 24, 2019 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted June 24, 2019 On 6/22/2019 at 1:45 PM, daikatana_ said: To explain that a bit further.... After the character touches certain coordinates, I want to display a message and then a mob will attack the character. prontera,173,200,4 script Blah -1,5,5,{ end; OnTouch: if(!instance_id()) end; npctalk "This is a message!"; monster "place",60,100,"Poring",1002,1,"NPCNAME::OnLabel"; disablenpc instance_npcname(strnpcinfo(0)); } This is the best way to figure out commands. https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L6194 Quote Link to comment Share on other sites More sharing options...
Question
daikatana_
Hi,
Is there any way I can create an NPC inside an instance that would trigger OnTouch? Or just trigger some script after stepping on certain coordinates inside an instance without an NPC?
Thanks.
Link to comment
Share on other sites
3 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.