Bonsoir, j'èspere que cela correspond à ce que tu as demandé:
on rightclick on 71:
if {lock.%location of block%.%player%} is set:
if {key.%player%} is "%{lock.%location of block%.%player%}%":
if {stat.lock} is true:
send "La porte est ferme"
stop
if {stat.lock} is false:
toggle the block at targeted block
else:
send "Cette porte est déja acheter"
else:
send "Porte Acheter" to player
set {stat.lock} to false
set {key.%player%} to player
set {lock.%location of block%.%player%} to {key.%player%}
on leftclick on 71:
if {lock.%location of block%.%player%} is set:
if {key.%player%} is "%{lock.%location of block%.%player%}%":
close targeted block
if {stat.lock} is false:
set {stat.lock} to true
send "Porte fermer"
stop
if {stat.lock} is true:
set {stat.lock} to false
send "Porte ouverte"
toggle the block at targeted block
stop
stop
else:
send "Tu n'a pas acheter cet porte"