Added pcblock and checkpcblock script commands. (#3951)

* Added getpcblock and setpcblock script commands.
* Added the docs
* Added the message 'This action is currently blocked.' when the player attempts to perform the following blocked actions
* PCBLOCK_USEITEM
* PCBLOCK_SITSTAND
* PCBLOCK_NPCCLICK
* The actions blocked are saved in state.block_action
* Click to the npc returns the WORK_IN_PROGRESS message when PCBLOCK_NPCCLICK is enabled
* Blocked action and reload script.
The player will return to his/her original state after reload script.

Thanks to @aleos89, @Lemongrass3110, @secretdataz
This commit is contained in:
Atemo
2019-03-26 16:18:59 +01:00
committed by Jittapan Pluemsumran
parent 7cc8c96467
commit 3e0d3d2fe6
14 changed files with 169 additions and 19 deletions

View File

@@ -1376,7 +1376,7 @@ int unit_can_move(struct block_list *bl) {
if (DIFF_TICK(ud->canmove_tick, gettick()) > 0)
return 0;
if ((sd && (pc_issit(sd) || sd->state.vending || sd->state.buyingstore)) || ud->state.blockedmove)
if ((sd && (pc_issit(sd) || sd->state.vending || sd->state.buyingstore || (sd->state.block_action & PCBLOCK_MOVE))) || ud->state.blockedmove)
return 0; // Can't move
// Status changes that block movement