EyesRo Posted February 26, 2013 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 15 Reputation: 0 Joined: 01/11/13 Last Seen: November 11, 2013 Share Posted February 26, 2013 (edited) Hello I have a few questions "Please"I create an NPC that moves in a MAP I wish to know what to do to ensure that:here is the script "little bit for a simple example." map,xxx,xx,x script xxxxxxx xxx,2,2,{ OnInit: initnpctimer; end; OnTimer5000: npcwalkto 127,106; end; OnTimer10000: npcwalkto 114,125; stopnpctimer; initnpctimer; end; OnTouch: npctalk "Hey! Toi!"; mes "Test"; next; mes "test"; close; end; close; } first: once the NPC finished thatthe round when should add that for every 30 minutes he resumed hisround, because now it stop at the last point indicated at the endbut not restart. 2nd that must be added when talking to npc it stop then leave again once we finished the conversationThank you in advance, I can mess this one script .. good morning thank you again! sorry sorry sorry , for my bad english .. i'm french , thank's very muchEyes UP , thanks up sorry , I blocked on this script .. Edited April 20, 2013 by Capuche Quote to Code Quote Link to comment Share on other sites More sharing options...
nanakiwurtz Posted February 26, 2013 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Share Posted February 26, 2013 prontera,152,183,0 script Poring#test1 1002,2,2,{ end; OnInit: initnpctimer; setarray .x[0],160,152,159,152; setarray .y[0],187,175,169,183; set .a,0; set .m$,"prontera"; end; OnTimer2000: getmapxy(.m$,.nowx,.nowy,1); if (.nowx != .x[.a] && .nowy != .y[.a]) { npcwalkto .x[.a],.y[.a]; } else {set .a,.a+1; if (.a >= getarraysize(.x)) set .a,0; } initnpctimer; end; OnTouch: npctalk "Hey! Toi!"; mes "Line 1"; next; mes "Don't block me!","Now I'll continue to walk..","Even though if you haven't press the next or the close button."; close; } Here you go! Oh.... I think I have misread your second request Anyway, here you go: prontera,152,183,0 script Poring#test1 1002,2,2,{ end; OnInit: initnpctimer; setarray .x[0],160,152,159,152; setarray .y[0],187,175,169,183; set .a,0; set .m$,"prontera"; end; OnTimer2000: getmapxy(.m$,.nowx,.nowy,1); if (.nowx != .x[.a] && .nowy != .y[.a] && .stop != 1) { npcwalkto .x[.a],.y[.a]; } else {set .a,.a+1; if (.a >= getarraysize(.x)) set .a,0; } initnpctimer; end; OnTouch: set .stop,1; npctalk "Hey! Toi!"; mes "I'll stop right here."; next; mes "Now I'll continue to walk after you press the close button."; close2; set .stop,0; end; } For delay between points, just add a delay by using sleep 1000 //Delay by 1 second. sleep 60000 //Delay by 1 minute. Hope it is solved now.. 1 Quote Link to comment Share on other sites More sharing options...
EyesRo Posted February 26, 2013 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 15 Reputation: 0 Joined: 01/11/13 Last Seen: November 11, 2013 Author Share Posted February 26, 2013 (edited) ok thanks , yes sorry for my bad english ...in the second question I wanted to know when I talk to the NPC that he stop repard then when I finished talking to him but thanks your reponse Edited February 26, 2013 by EyesRo Quote Link to comment Share on other sites More sharing options...
karazu Posted October 10, 2013 Group: Members Topic Count: 57 Topics Per Day: 0.01 Content Count: 374 Reputation: 5 Joined: 03/09/12 Last Seen: June 19, 2018 Share Posted October 10, 2013 Great prontera,152,183,0 script Poring#test1 1002,2,2,{ end; OnInit: initnpctimer; setarray .x[0],160,152,159,152; setarray .y[0],187,175,169,183; set .a,0; set .m$,"prontera"; end; OnTimer2000: getmapxy(.m$,.nowx,.nowy,1); if (.nowx != .x[.a] && .nowy != .y[.a]) { npcwalkto .x[.a],.y[.a]; } else {set .a,.a+1; if (.a >= getarraysize(.x)) set .a,0; } initnpctimer; end; OnTouch: npctalk "Hey! Toi!"; mes "Line 1"; next; mes "Don't block me!","Now I'll continue to walk..","Even though if you haven't press the next or the close button."; close; } Here you go! Oh.... I think I have misread your second request Anyway, here you go: prontera,152,183,0 script Poring#test1 1002,2,2,{ end; OnInit: initnpctimer; setarray .x[0],160,152,159,152; setarray .y[0],187,175,169,183; set .a,0; set .m$,"prontera"; end; OnTimer2000: getmapxy(.m$,.nowx,.nowy,1); if (.nowx != .x[.a] && .nowy != .y[.a] && .stop != 1) { npcwalkto .x[.a],.y[.a]; } else {set .a,.a+1; if (.a >= getarraysize(.x)) set .a,0; } initnpctimer; end; OnTouch: set .stop,1; npctalk "Hey! Toi!"; mes "I'll stop right here."; next; mes "Now I'll continue to walk after you press the close button."; close2; set .stop,0; end; } For delay between points, just add a delay by using sleep 1000 //Delay by 1 second. sleep 60000 //Delay by 1 minute. Hope it is solved now.. is it possible to Duplicate the NPC? so that i can make them so many and spread all over the map? Quote Link to comment Share on other sites More sharing options...
Question
EyesRo
Hello I have a few questions "Please"
I create an NPC that moves in a MAP I wish to know what to do to ensure that:
here is the script "little bit for a simple example."
first: once the NPC finished that
the round when should add that for every 30 minutes he resumed his
round, because now it stop at the last point indicated at the end
but not restart.
2nd that must be added when talking to npc it stop then leave again once we finished the conversation
Thank you in advance, I can mess this one script .. good morning thank you again!
sorry sorry sorry , for my bad english .. i'm french , thank's very much
Eyes
UP , thanks
up sorry , I blocked on this script ..
Edited by CapucheQuote to Code
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.