Jump to content

pcblockmove & progressbar


Kido

Recommended Posts


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

Hello, i'm not sure if this is a bug (pleasemove if is not the correct section and sorry DD: ), but the following happened while i was testing some stuff:

 

Since progressbar says that if the player moves, the scrip stops and to resume the player would need to talk again to the npc o do the action that starts the script

*progressbar "<color>",<seconds>;

This command works almost like sleep2, but displays a progress bar
above the head of the currently attached character (like cast bar).
Once the given amount of seconds passes, the script resumes. If the
character moves while the progress bar progresses, it is aborted and
the script ends. The color format is in RGB (0xRRGGBB). The color is
currently ignored by the client and appears always green.

I tried to prevent the script to stop if the player moves, so i used pbblockmove so the player won't move

*pcblockmove <id>,<option>;

Prevents the given GID from moving when the option is 1, and enables the ID to
move again when the option is 0. This command will run for the attached player
if the given GID is zero.

Examples:
	// Prevents the current char from moving away.
	pcblockmove getcharid(3),1;

	// Enables the current char to move again.
	pcblockmove getcharid(3),0;

The problem is, that even if i use pcblockmove to prevent the player to move while the progressbar is there, the player can try to move by clicking out and the progressbar will still make the script stop.

I'm not sure if it's a bug, but it would be awesome to make it work as i tried to do, just saying.

 

Hmm also, the progressbar only displays in green, it wold be awesome too if someone somehow can make it display other colors.

 

Hmm i think this both 2 commands can be improved, any ideas o: ? thanks to all for your attention (:

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  379
  • Reputation:   304
  • Joined:  11/10/11
  • Last Seen:  

Yep, it cancel the progressbar before checking in the player can move, not sure if it's intended. Can be easily things using:

@src/map/clif.c
+	else if( sd->state.blockedmove )
+		return;
	else if( sd->progressbar.npc_id )
		clif_progressbar_abort(sd);

About the progressbar color, official client doesn't support it yet.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

Yep, it cancel the progressbar before checking in the player can move, not sure if it's intended. Can be easily things using:

@src/map/clif.c
+	else if( sd->state.blockedmove )
+		return;
	else if( sd->progressbar.npc_id )
		clif_progressbar_abort(sd);

About the progressbar color, official client doesn't support it yet.

Thank you so much :DD may i ask, under what line should i add those lines? thanks again :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  846
  • Reputation:   136
  • Joined:  02/26/14
  • Last Seen:  

If I'm right it is intended because tbh it would suck not being able to break out of auto scripts that use progressbar

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

If I'm right it is intended because tbh it would suck not being able to break out of auto scripts that use progressbar

 

no i mean, if the player moves the script will stop, alright with that, but what about if i don't want the player move so the progressbar effect won't stop the script? i just like the effect of the progressbar command instead of using sleep2 to make the player wait or pause the script, that's why i tried to use pcblockmove to prevent that, but it's not working, even with pcblockmove, the player can just click the ground and the progressbar will break and stop the script, that's what i don't like x_x

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  846
  • Reputation:   136
  • Joined:  02/26/14
  • Last Seen:  

 

If I'm right it is intended because tbh it would suck not being able to break out of auto scripts that use progressbar

 

no i mean, if the player moves the script will stop, alright with that, but what about if i don't want the player move so the progressbar effect won't stop the script? i just like the effect of the progressbar command instead of using sleep2 to make the player wait or pause the script, that's why i tried to use pcblockmove to prevent that, but it's not working, even with pcblockmove, the player can just click the ground and the progressbar will break and stop the script, that's what i don't like x_x

 

The progressbar should only stop when the player actually moves a cell or teleports :x

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

 

 

If I'm right it is intended because tbh it would suck not being able to break out of auto scripts that use progressbar

 

no i mean, if the player moves the script will stop, alright with that, but what about if i don't want the player move so the progressbar effect won't stop the script? i just like the effect of the progressbar command instead of using sleep2 to make the player wait or pause the script, that's why i tried to use pcblockmove to prevent that, but it's not working, even with pcblockmove, the player can just click the ground and the progressbar will break and stop the script, that's what i don't like x_x

 

The progressbar should only stop when the player actually moves a cell or teleports :x

 

 

Nope is not sot working like that, even if the player is locked with pcblockmove and they click the ground the progressbar stops ):

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  379
  • Reputation:   304
  • Joined:  11/10/11
  • Last Seen:  

 

Yep, it cancel the progressbar before checking in the player can move, not sure if it's intended. Can be easily things using:

@src/map/clif.c
+	else if( sd->state.blockedmove )
+		return;
	else if( sd->progressbar.npc_id )
		clif_progressbar_abort(sd);

About the progressbar color, official client doesn't support it yet.

Thank you so much :DD may i ask, under what line should i add those lines? thanks again :D

 

 

in src/map/clif.c

 

Search for :

	else if( sd->progressbar.npc_id )
		clif_progressbar_abort(sd);

Add just before:

	else if( sd->state.blockedmove )
		return;
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

woa

	if (sd->sc.opt1 && ( sd->sc.opt1 == OPT1_STONEWAIT || sd->sc.opt1 == OPT1_BURNING ))
		; //You CAN walk on this OPT1 value.
	else if( sd->state.blockedmove )
		return;
	else if( sd->progressbar.npc_id )
		clif_progressbar_abort(sd);
	else if (pc_cant_act(sd))
		return;

thanks that totally worked as it should :33333!

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
Reply to this topic...

×   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...