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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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