There's a part in my game where the character breaks his leg and needs an item to fix it. How can I make it so the player cannot move while it's leg is broken?
You could turn off the walkable area under the player:
RemoveWalkableArea(GetWalkableAreaAt(player.x - GetViewportX(), player.y - GetViewportY()));
And when he's ready to walk again, turn it back on (provided he's still in the same position):
RestoreWalkableArea(GetWalkableAreaAt(player.x - GetViewportX(), player.y - GetViewportY()));
If you have other characters that need to move around, you might want to make a special walkable area for the location where the character breaks his leg and turn that on/off. There are probably other ways to achieve this. This is just the most direct way I can think of.