Jump to content
  • 0
Sign in to follow this  
HD Scripts

[unSolved] Freeze player on use skill

Question

Well, i try to make a custom skill, Fishing

 

So, i need to player "stop" or "freeze" while executing this skill...

On after this line:

 

clif_progressbar(sd, strtol(color, (char **)NULL, 0), 10);

This line, make a progressbar on char, but, i need to after create the progressbar, the player will stop ou freeze while command after this line is executing...

 

ex:

 

Use skill Fishing, appears 10 second progressbar and stop player and script (src) until stop 10 seconds. After, the command create a fish...

 

 

What to do? ps: sorry my bad english

Edited by HD Scripts

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Solved!

 

Just add this on skill.c

#include "../common/atomic.h"

 

And use the command:

Sleep (10000); // 10 seconds

Will freeze player and script until progress...

 

thanks"

Share this post


Link to post
Share on other sites
  • 0

I'm not really familiar with sleep operation, but since Herc is single-threaded, wouldn't it stop ALL operations for 10 seconds? Like everything will freeze, not only the player?

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.