[unSolved] Freeze player on use skill

HD Scripts

New member
Messages
40
Points
0
Github
HD Scripts
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

 
Last edited by a moderator:
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"

 
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?

 
yes, stop ALL operations...

but was only solution for this moment

u have a solution for now?

i don't know

 
Sorry, I'm not quite familiar with delayed operations, maybe some source dev will help you out.

 
Back
Top