Jump to content
  • 0

progressbar and pcblockmove combined?


Angst

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  97
  • Reputation:   20
  • Joined:  11/13/11
  • Last Seen:  

I'd like to make a request as the topic title states, if possible?

Instead of progressbar canceling if the player moves or clicks to move, during the progressbar's duration the player shouldn't be able to move.

I've tried using these two commands together, but this just leads to the progressbar stopping when you click, regardless if you can move or not; ultimately ending up with no progressbar and unable to move status since the script ended prematurely. :/

Thank you for your time~

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

try add this ??

at the progressbar script there...

/src/map/script.c

sd->state.blockedmove = 1;

and to remove the BlockMove

sd->state.blockedmove = 0;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  97
  • Reputation:   20
  • Joined:  11/13/11
  • Last Seen:  

Not sure how to add that as I dont speak c. :/

But if I understand right, I have this:

BUILDIN_FUNC(progressbar)
{
#if PACKETVER >= 20080318
struct map_session_data * sd = script_rid2sd(st);
const char * color;
unsigned int second;

if( !st || !sd )
 return 0;

st->state = STOP;

color = script_getstr(st,2);
second = script_getnum(st,3);

sd->progressbar.npc_id = st->oid;
sd->progressbar.timeout = gettick() + second*1000;

clif_progressbar(sd, strtol(color, (char **)NULL, 0), second);
#endif
return 0;
}

And then I make it like this?

BUILDIN_FUNC(progressbar)
{
#if PACKETVER >= 20080318
struct map_session_data * sd = script_rid2sd(st);
const char * color;
unsigned int second;

if( !st || !sd )
 return 0;

st->state = STOP;

color = script_getstr(st,2);
second = script_getnum(st,3);

sd->state.blockedmove = 1
sd->progressbar.npc_id = st->oid;
sd->progressbar.timeout = gettick() + second*1000;
sd->state.blockedmove = 0

clif_progressbar(sd, strtol(color, (char **)NULL, 0), second);
#endif
return 0;
}

I tried this but it still allowed me to click away and move, canceling the progressbar. :<

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  407
  • Reputation:   159
  • Joined:  11/18/11
  • Last Seen:  

try add this ??

at the progressbar script there...

/src/map/script.c

sd->state.blockedmove = 1;

and to remove the BlockMove

sd->state.blockedmove = 0;

It doesn't help because problem in ехе file.

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...