chevansea Posted June 9, 2012 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 23 Reputation: 0 Joined: 05/29/12 Last Seen: September 6, 2012 Share Posted June 9, 2012 Hi! i want to ask about how to give npc's delay aftar i was finished his quest? hm.. for example. i already finished quest A from NPC X, and i want to take the quest again, but i must waiting 3hours to take the quest again. Thanks before. and sorry for my english T_T Quote Link to comment Share on other sites More sharing options...
-1 Rojen Posted June 1, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 9 Reputation: 0 Joined: 05/22/18 Last Seen: June 19, 2018 Share Posted June 1, 2018 Please help. Post more scripts. Quote Link to comment Share on other sites More sharing options...
en_dev Posted June 9, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 113 Reputation: 5 Joined: 06/06/12 Last Seen: December 25, 2013 Share Posted June 9, 2012 (edited) This will give you idea. if(.takeQuest == 0){ mes "Take Quest?"; .takeQuest == 1; addtimer 10800000, strnpcinfo(3)+"::On3Hours"; end; } else{ mes "Sorry, you have to wait 3hrs to take the quest again"; end; } On3Hours: .takeQuest, 1; end; Edited June 9, 2012 by en_dev Quote Link to comment Share on other sites More sharing options...
_Dynosawr_ Posted June 9, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 69 Reputation: 10 Joined: 05/14/12 Last Seen: June 26, 2012 Share Posted June 9, 2012 (edited) You can use this: // By: Joey prontera,155,155,3 script Timer 66,{ if(questdelay < gettimetick(2)){ // Check timer, if over it will allow you to continue. mes "You are able to do the quest again. Congratulations."; close; } set questdelay,gettimetick(2)+10800; // Sets timer. if(questdelay > gettimetick(2)){ // Checks timer, if active it will block you from doing the quest. set .@delayremaining,(((questdelay-gettimetick(2))+1)/60); mes "Please wait "+.@delayremaining+" minutes longer."; close; } } It will work even if the player logs out. (Permanant character variable.) If you wish to make it temporary, where logging out will remove the timer, add an @ sign infront of each "questdelay" variable. Here's one that's set to the account: // By: Joey prontera,155,155,3 script Timer 66,{ if(#questdelay < gettimetick(2)){ // Check timer, if over it will allow you to continue. mes "You are able to do the quest again. Congratulations."; close; } set #questdelay,gettimetick(2)+10800; // Sets Timer. if(#questdelay > gettimetick(2)){ // Checks timer, if active it will block you from doing the quest. set .@delayremaining,(((#questdelay-gettimetick(2))+1)/60); mes "Please wait "+.@delayremaining+" minutes longer."; close; } } This will give you idea. if(.takeQuest == 0){ mes "Take Quest?"; .takeQuest == 1; addtimer 10800000, strnpcinfo(3)+"::On3Hours"; end; } else{ mes "Sorry, you have to wait 3hrs to take the quest again"; end; } On3Hours: .takeQuest, 1; end; If you wish to be able to do the quest after the timer triggers, you'd need to set .takeQuest to 0 at the end of the timer. Change: .takeQuest, 1; To: set .takeQuest, 0; Edited June 9, 2012 by Joey Quote Link to comment Share on other sites More sharing options...
en_dev Posted June 9, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 113 Reputation: 5 Joined: 06/06/12 Last Seen: December 25, 2013 Share Posted June 9, 2012 oh my bad, i wasnt paying attention on my coding, i got it wrong coded. Quote Link to comment Share on other sites More sharing options...
_Dynosawr_ Posted June 9, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 69 Reputation: 10 Joined: 05/14/12 Last Seen: June 26, 2012 Share Posted June 9, 2012 (edited) It happens when you're not paying attention (Hence why I edit my posts so much lol) Edited June 9, 2012 by Joey Quote Link to comment Share on other sites More sharing options...
en_dev Posted June 9, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 113 Reputation: 5 Joined: 06/06/12 Last Seen: December 25, 2013 Share Posted June 9, 2012 hehe I was doing my website while coding that xD Quote Link to comment Share on other sites More sharing options...
_Dynosawr_ Posted June 9, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 69 Reputation: 10 Joined: 05/14/12 Last Seen: June 26, 2012 Share Posted June 9, 2012 Rofl, not a good thing to do while writing code xD I'm a hypocrite. I watch movies, chat, and play games while I code. LOL Quote Link to comment Share on other sites More sharing options...
en_dev Posted June 9, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 113 Reputation: 5 Joined: 06/06/12 Last Seen: December 25, 2013 Share Posted June 9, 2012 bare with me, the last time I modified npc codes was like a year ago xD I got addicted to league of legends while doing websites Lol. Quote Link to comment Share on other sites More sharing options...
Rikimaru Posted June 9, 2012 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 658 Reputation: 57 Joined: 11/20/11 Last Seen: July 1, 2017 Share Posted June 9, 2012 Anyways,I always use gettimetick,like you can see in my released iRO Daily Quests <npc header>,{ if(gettimetick(2) - CooldownQuest < (60 * 60 * 24)) { mes "[ NPC NAME ]"; mes "Sorry you have to wait 24 Hours until you can do the Quest again!"; close; } mes "[ NPC NAME ]"; mes "Hey,now you have to wait 24 Hours until you can talk to me again!"; set CooldownQuest,gettimetick(2); close; } The 60*60*24 defines the time,which you have to wait until you can talk to the NPC again. That means 60 seconds multipled with 60 for getting 1 Hour and this * 24 , which means that you have to wait 24 Hours. So you just have to edit the 24 to the Hour time,which you want it to change to. Quote Link to comment Share on other sites More sharing options...
en_dev Posted June 9, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 113 Reputation: 5 Joined: 06/06/12 Last Seen: December 25, 2013 Share Posted June 9, 2012 (edited) oh world of warcraft and MW3 also. xD Edited June 9, 2012 by en_dev Quote Link to comment Share on other sites More sharing options...
chevansea Posted June 10, 2012 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 23 Reputation: 0 Joined: 05/29/12 Last Seen: September 6, 2012 Author Share Posted June 10, 2012 thanks everybody who replied at here thank you so much :3 ! Quote Link to comment Share on other sites More sharing options...
Question
chevansea
Hi!
i want to ask about how to give npc's delay aftar i was finished his quest?
hm.. for example.
i already finished quest A from NPC X, and i want to take the quest again, but i must waiting 3hours to take the quest again.
Thanks before. and sorry for my english T_T
Link to comment
Share on other sites
11 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.