Jump to content
  • 0
Sign in to follow this  
iZeal

Update how many seconds left?

Question

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.";

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

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

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0

Oh sorry Annie that was just for example I meant to use it on another Script..

like Buff NPC and a Warper NPC.

Share this post


Link to post
Share on other sites
  • 0

will the delay update to something like this:

"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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.