bluesky Posted December 27, 2017 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 17 Reputation: 2 Joined: 04/26/17 Last Seen: March 13 Share Posted December 27, 2017 (edited) I know auto trigger can't trigger not moving player But that's OK on not moving npc. Now I want use a moving npc to auto trigger player. like this: Quote job_sword1,117,238,1 script electricity 1002,1,1,{ warp "prontera",155,187; end; OnInit: npcspeed 60; npcwalkto 130,250; end; } But player not moving will not warp to prontera. I think maybe can use 0.for loop 1.getmapxy => to get npc position 2.getareausers => to get npc position area users, if getareauser >0 areawarp 3. sleep 100 But if I had 50+ moving npc, maybe that will Consume a lot of CPU resources? Have other better method to auto trigger not moving player? Thank you!! Edited December 27, 2017 by bluesky Quote Link to comment Share on other sites More sharing options...
0 Sehrentos Posted January 15, 2018 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 91 Reputation: 22 Joined: 10/24/14 Last Seen: November 1, 2024 Share Posted January 15, 2018 I'm not quite sure what you mean, like this perhaps? job_sword1,117,238,1 script electricity 1002,1,1,{ OnTouch: // Player has entered NPC's area warp "prontera",155,187; end; OnInit: npcspeed 60; npcwalkto 130,250; end; } You can increase the NPC's area of effect: 1002,2,2,{ But i'm not sure if OnTouch event will work on moving NPC's. Quote Link to comment Share on other sites More sharing options...
0 bluesky Posted January 16, 2018 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 17 Reputation: 2 Joined: 04/26/17 Last Seen: March 13 Author Share Posted January 16, 2018 12 hours ago, Sehrentos said: I'm not quite sure what you mean, like this perhaps? job_sword1,117,238,1 script electricity 1002,1,1,{ OnTouch: // Player has entered NPC's area warp "prontera",155,187; end; OnInit: npcspeed 60; npcwalkto 130,250; end; } You can increase the NPC's area of effect: 1002,2,2,{ But i'm not sure if OnTouch event will work on moving NPC's. if NPC's moving to player around and player not moving,then will not trigger OnTouch Now I used for { getmapxy getareausers , } it's work. Thank you Quote Link to comment Share on other sites More sharing options...
Question
bluesky
I know auto trigger can't trigger not moving player
But that's OK on not moving npc.
Now I want use a moving npc to auto trigger player.
like this:
But player not moving will not warp to prontera.
I think maybe can use
0.for loop
1.getmapxy => to get npc position
2.getareausers => to get npc position area users, if getareauser >0 areawarp
3. sleep 100
But if I had 50+ moving npc, maybe that will Consume a lot of CPU resources?
Have other better method to auto trigger not moving player?
Thank you!!
Edited by blueskyLink to comment
Share on other sites
2 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.