iZeal 5 Posted September 4, 2014 Hi guys wanted to ask some help on how I can update how many seconds left just like Yggdrasil Berry. on an example: dispbottom "Please wait " + callfunc("Time2Str", gettimetick(2)+.@Delay)" this is what I got problem is it only shows the set delay = 10 seconds "Please wait 10 seconds." how can i make it like when they click it, it will update how many seconds remaining like: "Please wait 10 seonds." click again. "Please wait 9 seconds." and again "Please wait 8 seconds."; Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted September 4, 2014 Delay: Delay to use item (int, defaults to 0) { Id: 607 AegisName: "Yggdrasilberry" Name: "Yggdrasil Berry" Type: 0 Buy: 5000 Weight: 300 Upper: 63 BuyingStore: true Delay: 5000 Script: <" percentheal 100,100; ">},already has 5 seconds default cool-down Quote Share this post Link to post Share on other sites
0 iZeal 5 Posted September 4, 2014 Oh sorry Annie that was just for example I meant to use it on another Script.. like Buff NPC and a Warper NPC. Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted September 4, 2014 http://herc.ws/wiki/Timers_%28Scripting%29#Use_Number_3:_Deny_Usage change 86400 into 10 Quote Share this post Link to post Share on other sites
0 iZeal 5 Posted September 4, 2014 will the delay update to something like this: "Please wait 10 seonds." click again. "Please wait 9 seconds." and again "Please wait 8 seconds."; Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted September 4, 2014 prontera,155,172,5 script kjdhfkdjsf 100,{ .@deny = 10; if ( @delay + .@deny > gettimetick(2) ) { dispbottom "Please wait "+( @delay + .@deny - gettimetick(2) )+" seconds."; end; } @delay = gettimetick(2); percentheal 100,100; skilleffect AL_HEAL, 10; end;}I usually set the deny variable equal to gettimetick(2)its because from my experience in script release example like instance dungeon set it deny for 3 hours before re-entering, and I always make it configurable if admin suddenly change it into 5 hours, player's deny usage doesn't change ... ( well just 2 hours doesn't matter much .. ) so I didn't follow wiki example 1 iZeal reacted to this Quote Share this post Link to post Share on other sites
0 iZeal 5 Posted September 4, 2014 I will try this., I'm just going to use minutes and seconds. Quote Share this post Link to post Share on other sites
Hi guys wanted to ask some help on how I can update how many seconds left just like Yggdrasil Berry.
on an example:
this is what I got problem is it only shows the set delay = 10 seconds
"Please wait 10 seconds."
how can i make it like when they click it, it will update how many seconds remaining like:
"Please wait 10 seonds."
click again. "Please wait 9 seconds." and again "Please wait 8 seconds.";
Share this post
Link to post
Share on other sites