Sulfu Posté(e) le 20 avril 2018 Auteur Posté(e) le 20 avril 2018 Je sais pas pourquoi ça marche pas quand on fait /unclaim il dise toujours (vous n'êtes pas dans une région) alors que je suis dans un claim.
Sulfu Posté(e) le 20 avril 2018 Auteur Posté(e) le 20 avril 2018 Quand je fais /claim 100 100 il me dise que ils ont claim alors que mon pote peut casser dedans alors qu'il n'est ni op ni add au claim. Et quand on /unclaim il dise " vous n'êtes pas dans une région" Voilà
McLincoln2 Posté(e) le 21 avril 2018 Posté(e) le 21 avril 2018 Quand je fais /claim 100 100 il me dise que ils ont claim alors que mon pote peut casser dedans alors qu'il n'est ni op ni add au claim. Et quand on /unclaim il dise " vous n'êtes pas dans une région" Voilà function index(x:text="") :: objects: loop {claims::*}: loop {claims::%loop-value%::*}: add loop-value-2 to {_result::*} return {_result::*} function randomIndex(s:number) :: string: set {_char} to "abcdefghijklmnopqrstuvwxzABCDEFGHIJKLMNOPQRSTUVWXZ0123456789" loop {_s} times: add a random element of {_char} split by "" to {_result::*} return join {_result::*} function claimsof(uuid:string) :: objects: return {claims::%{_uuid}%::*} function claimat(location:location,world:world) :: object: loop {claims::*}: loop {claims::%loop-value%::*}: set {_c} to {claims::%loop-value-1%::%loop-value-2%::1} set {_c2} to {claims::%loop-value-1%::%loop-value-2%::2} if {claims::%loop-value-1%::%loop-value-2%::world} is {_world}: if {_location} is within {_c} to {_c2}: return loop-value-2 return false function claimof(location:location,world:world) :: object: set {_i} to claimat({_location},{_world}) loop {claims::*}: if {claims::%loop-value-1%::%{_i}%} is set: return loop-value-1 return false function accessat(location:location,world:world) :: objects: loop {claims::*}: loop {claims::%loop-value%::*}: set {_c} to {claims::%loop-value-1%::%loop-value-2%::1} set {_c2} to {claims::%loop-value-1%::%loop-value-2%::2} if {claims::%loop-value-1%::%loop-value-2%::world} is {_world}: if {_location} is within {_c} to {_c2}: add loop-value-1 to {_result::*} add {claims::%loop-value-1%::%loop-value-2%::players::*} to {_result::*} return {_result::*} return false function canEdit(uuid:string,location:location,world:world) :: boolean: if claimat({_location},{_world}) is not false: loop accessat({_location},{_world}): if loop-value is {_uuid}: return true if offline player from {_uuid} has permission "edit.another": return true return false return true command /claim <integer> <integer>: trigger: set {_corner} to location x-location of block at player-(int-arg-1), 256, z-location of block at player-(int-arg-2) of world of player set {_corner2} to location x-location of block at player+(int-arg-1), 0, z-location of block at player+(int-arg-2) of world of player loop {claims::*}: loop {claims::%loop-value%::*}: set {_world} to {claims::%loop-value-1%::%loop-value-2%::world} set {_c} to {claims::%loop-value-1%::%loop-value-2%::1} set {_c2} to {claims::%loop-value-1%::%loop-value-2%::2} set {_c3} to location x-location of {_c}, 256, z-location of {_c2} of {_world} set {_c4} to location x-location of {_c2}, 0, z-location of {_c} of {_world} if {_world} is world of player: if {_c} is within {_corner} to {_corner2}: send "§cLa région appartient au joueur:§7 %offline player from loop-value-1%§c." to player stop if {_c2} is within {_corner} to {_corner2}: send "§cLa région appartient au joueur:§7 %offline player from loop-value-1%§c." to player stop if {_c3} is within {_corner} to {_corner2}: send "§cLa région appartient au joueur:§7 %offline player from loop-value-1%§c." to player stop if {_c4} is within {_corner} to {_corner2}: send "§cLa région appartient au joueur:§7 %offline player from loop-value-1%§c." to player stop set {_r} to randomIndex(10) while "%index()%" contains "%{_r}%": set {_r} to randomIndex(10) send "§aLa région est protégée et enregistrée dans vos régions en tant que:§f %{_r}%§a." to player set {claims::%uuid of player%::%{_r}%} to {_r} set {claims::%uuid of player%::%{_r}%::1} to {_corner} set {claims::%uuid of player%::%{_r}%::2} to {_corner2} set {claims::%uuid of player%::%{_r}%::world} to world of player command /unclaim: trigger: if claimat(location of player,world) is not false: set {_claim} to claimat(location of player,world) set {_owner} to claimof(location of player,world) set {_c} to {claims::%{_owner}%::%{_claim}%::1} set {_c2} to {claims::%{_owner}%::%{_claim}%::2} if {claims::%{_owner}%::%{_claim}%::world} is world of player: if block at player is within {_c} to {_c2}: if {_owner} is uuid of player: set {_o} to true else if player has permission "unclaim.another": set {_o} to true if {_o} is true: send "§aLa région qui était enregistrée en tant que:§f %{_claim}%§a, a été supprimée." to player delete {claims::%{_owner}%::%{_claim}%::players::*} delete {claims::%{_owner}%::%{_claim}%::1} delete {claims::%{_owner}%::%{_claim}%::2} delete {claims::%{_owner}%::%{_claim}%::world} delete {claims::%{_owner}%::%{_claim}%} stop send "§cVous ne possédez pas les droits pour supprimer la région:§7 %{_claim}%§c, appartenant au joueur:§7 %offline player from {_owner}%§c." to player stop send "§cVous n'êtes pas dans une région." to player command /claimadd <player>: trigger: if claimat(location of player,world) is not false: set {_claim} to claimat(location of player,world) set {_owner} to claimof(location of player,world) set {_c} to {claims::%{_owner}%::%{_claim}%::1} set {_c2} to {claims::%{_owner}%::%{_claim}%::2} if {claims::%{_owner}%::%{_claim}%::world} is world of player: if block at player is within {_c} to {_c2}: if {_owner} is uuid of player: set {_o} to true else if player has permission "invite.another": set {_o} to true if {_o} is true: if {claims::%{_owner}%::%{_claim}%::players::%uuid of arg%} is not set: if arg is not player: set {claims::%{_owner}%::%{_claim}%::players::%uuid of arg%} to uuid of arg send "§aLe joueur:§f %arg%§a, a été ajouté dans la région:§f %{_claim}%§a." to player else: send "§cVous ne pouvez pas vous inviter vous-même." to player stop send "§cLe joueur:§7 %arg%§c, est dans cette région." to player stop send "§cVous ne possédez pas les droits pour ajouter des joueurs dans la région:§7 %{_claim}%§c, appartenant au joueur:§7 %offline player from {_owner}%§c." to player stop send "§cVous n'êtes pas dans une région." to player command /claimremove <offline player>: trigger: if claimat(location of player,world) is not false: set {_claim} to claimat(location of player,world) set {_owner} to claimof(location of player,world) set {_c} to {claims::%{_owner}%::%{_claim}%::1} set {_c2} to {claims::%{_owner}%::%{_claim}%::2} if {claims::%{_owner}%::%{_claim}%::world} is world of player: if block at player is within {_c} to {_c2}: if {_owner} is uuid of player: set {_o} to true else if player has permission "kick.another": set {_o} to true if {_o} is true: if {claims::%{_owner}%::%{_claim}%::players::%uuid of arg%} is set: if arg is not player: delete {claims::%{_owner}%::%{_claim}%::players::%uuid of arg%} send "§aLe joueur:§f %arg%§a, a été retiré de la région:§f %{_claim}%§a." to player else: send "§cVous ne pouvez pas vous exclure vous-même." to player stop send "§cLe joueur:§7 %arg%§c, n'est pas dans cette région." to player stop send "§cVous ne possédez pas les droits pour exclure des joueurs de la région:§7 %{_claim}%§c, appartenant au joueur:§7 %offline player from {_owner}%§c." to player stop send "§cVous n'êtes pas dans une région." to player break: cancel event if canEdit(uuid of player,event-location,world) is true: uncancel event place: cancel event if canEdit(uuid of player,event-location,world) is true: uncancel event rightclick on door item or chest or trapped chest or furnace or ender chest or note block or dispenser or dropper or anvil or enchantment table or hopper or crafting table or bed: cancel event if canEdit(uuid of player,event-location,world) is true: uncancel event on join: while player is online: set {_claim} to claimat(location of block at player,world) while claimat(location of block at player,world) is {_claim}: wait 3 ticks if claimat(location of block at player,world) is not false: show an action bar from string "§fEntering:§a %claimat(location of block at player,world)%" to player else: show an action bar from string "§fLeaving:§a %{_claim}%" to player Skelett,SkQuery. J'ai testé.
Sulfu Posté(e) le 22 avril 2018 Auteur Posté(e) le 22 avril 2018 Merci ça marche ^^ Vous pouvez le passer en Résolu
Messages recommandés