Aller au contenu
  • 0

[Cosmétique] Skript de pet pour un lobby.


Question

Posté(e)

Sujet : Cosmétique

Version de minecraft / skript : 1.8.9

Type du skript : Skript de cosmétique

Description du script :

Bonjour je souhaiterais un skript qui permettrait aux joueurs sur mon lobby de choisir un pet.

En effet, je voudrais qu'à l'aide d'un compas placé dans le 1er slot de la barre d'inventaire, l'utilisateur puisse choisir au travers d'un gui le familier qu'il désire.

Il faudrait que les familiers en question soient configurables dans un fichier de configuration.

Je voudrais aussi que certains pets soient accessibles uniquement aux vips+ (voir permission) là aussi, la liste de ces familiers devra être configurable dans un fichier yml.

Commandes éventuelles avec les permissions :

Je n'ai pas besoin de commandes particulières, mais j'ai besoin des permissions suivantes :

  • Une permission lobby.vip donnant accès au choix d'un familier ;


  • Une permission lobby.vip.plus.


Autres précisions (bout de skript déjà fait, systèmes actuellement utilisés, etc.) :

J'utilise actuellement SkQuery et Umbaska et ça serait top si le skript pouvait marcher avec une base de donnée configurable dans la config.

 

Structure de la table pets :

  • id unique ;


  • uuid du joueur ;


  • son pet actuel ;


  • les pets autorisés (dans ce cas-là, pas besoin de permissions, il suffit d'aller voir dans la base si il a le droit de l'utiliser).


Cordialement,

AngelMoniac

  • J'aime 1

9 réponses à cette question

Messages recommandés

  • 0
Posté(e)

on load:
loop {pet.listesi::*}:
 kill loop-value

on disconnect:
"%{pet.listesi::*}%" contains "%{pet.%player%}%":
 kill {pet.%player%}
 delete {pet.%player%}
 remove {pet.%player%} from {pet.listesi::*}

command /pet [<text>]:
trigger:
 arg 1 is "iremove":
 "%{pet.listesi::*}%" contains "%{pet.%player%}%":
 kill {pet.%player%}
 delete {pet.%player%}
 remove {pet.%player%} from {pet.listesi::*}
 else:
 delete {pet.%player%}
 stop trigger
 arg 1 is "icow":
 {pet.%player%} isn't set:
 spawn 1 cow at player's location
 set name of spawned entity to "&aVache de &e&l%player%"
 set {pet.%player%} to spawned entity
 add spawned entity to {pet.listesi::*}
 while {pet.%player%} is spawned entity:
 wait 6 tick
 if distance between player and last spawned entity is less than 15:
 make last spawned entity pathfind to player with speed 1
 else if distance between player and last spawned entity is bigger than 15:
 teleport last spawned entity to player
 arg 1 is "isheep":
 {pet.%player%} isn't set:
 spawn 1 sheep at player's location
 set name of spawned entity to "&aMouton de &e&l%player%"
 set {pet.%player%} to spawned entity
 add spawned entity to {pet.listesi::*}
 while {pet.%player%} is spawned entity:
 wait 6 tick
 if distance between player and last spawned entity is less than 15:
 make last spawned entity pathfind to player with speed 1
 else if distance between player and last spawned entity is bigger than 15:
 teleport last spawned entity to player
 arg 1 is "iwolf":
 {pet.%player%} isn't set:
 spawn 1 wolf at player's location
 set name of spawned entity to "&aLoup de &e&l%player%"
 set {pet.%player%} to spawned entity
 add spawned entity to {pet.listesi::*}
 while {pet.%player%} is spawned entity:
 wait 6 tick
 if distance between player and last spawned entity is less than 15:
 make last spawned entity pathfind to player with speed 1
 else if distance between player and last spawned entity is bigger than 15:
 teleport last spawned entity to player
 arg 1 is "ipig":
 {pet.%player%} isn't set:
 spawn 1 pig at player's location
 set name of spawned entity to "&aCochon de &e&l%player%"
 set {pet.%player%} to spawned entity
 add spawned entity to {pet.listesi::*}
 while {pet.%player%} is spawned entity:
 wait 6 tick
 if distance between player and last spawned entity is less than 15:
 make last spawned entity pathfind to player with speed 1
 else if distance between player and last spawned entity is bigger than 15:
 teleport last spawned entity to player
 arg 1 is "iocelot":
 {pet.%player%} isn't set:
 spawn 1 ocelot at player's location
 set name of spawned entity to "&aOcelot de &e&l%player%"
 set {pet.%player%} to spawned entity
 add spawned entity to {pet.listesi::*}
 while {pet.%player%} is spawned entity:
 wait 6 tick
 if distance between player and last spawned entity is less than 15:
 make last spawned entity pathfind to player with speed 1
 else if distance between player and last spawned entity is bigger than 15:
 teleport last spawned entity to player
 arg 1 is "ichicken":
 {pet.%player%} isn't set:
 spawn 1 chicken at player's location
 set name of spawned entity to "&aPoulet de &e&l%player%"
 set {pet.%player%} to spawned entity
 add spawned entity to {pet.listesi::*}
 while {pet.%player%} is spawned entity:
 wait 6 tick
 if distance between player and last spawned entity is less than 15:
 make last spawned entity pathfind to player with speed 1
 else if distance between player and last spawned entity is bigger than 15:
 teleport last spawned entity to player
 arg 1 is "ihorse":
 {pet.%player%} isn't set:
 spawn 1 horse at player's location
 set name of spawned entity to "&aCheval de &e&l%player%"
 set {pet.%player%} to spawned entity
 add spawned entity to {pet.listesi::*}
 while {pet.%player%} is spawned entity:
 wait 6 tick
 if distance between player and last spawned entity is less than 15:
 make last spawned entity pathfind to player with speed 1
 else if distance between player and last spawned entity is bigger than 15:
 teleport last spawned entity to player
 arg 1 isn't set:
 wait 6 tick
 open chest with 1 rows named "&2Pet Menu !" to player
 format slot 0 of player with 383:92 named "&aVache" to close then run [make player execute command "pet icow"]
 format slot 1 of player with 383:91 named "&aMouton" to close then run [make player execute command "pet isheep"]
 format slot 2 of player with 383:90 named "&aCochon" to close then run [make player execute command "pet ipig"]
 format slot 3 of player with 383:93 named "&aPoulet" to close then run [make player execute command "pet ichicken"]
 format slot 4 of player with 383:95 named "&aLoup" to close then run [make player execute command "pet iwolf"]
 format slot 5 of player with 383:98 named "&aOcelot" to close then run [make player execute command "pet iocelot"]
 format slot 6 of player with 383:100 named "&aCheval" to close then run [make player execute command "pet ihorse"]
 format slot 8 of player with 166 named "&cEnlever" to close then run [make player execute command "/pet iremove"]

on damage of entity:
 cancel event

on teleport:
wait 3 tick
loop 4 times:
 wait 1 second
 teleport {pet.%player%} to player

 

Dis moi juste sur quels pets veux-tu des permissions VIP ou VIP+

Et un petit merci ne serait pas de refus pour plusieurs jours de travail !

Et la commande pour avoir un pet est " /pet "

  • 0
Posté(e)
on load:
loop {pet.listesi::*}:
 kill loop-value

on disconnect:
"%{pet.listesi::*}%" contains "%{pet.%player%}%":
 kill {pet.%player%}
 delete {pet.%player%}
 remove {pet.%player%} from {pet.listesi::*}

command /pet [<text>]:
trigger:
 arg 1 is "iremove":
 "%{pet.listesi::*}%" contains "%{pet.%player%}%":
 kill {pet.%player%}
 delete {pet.%player%}
 remove {pet.%player%} from {pet.listesi::*}
 else:
 delete {pet.%player%}
 stop trigger
 arg 1 is "icow":
 {pet.%player%} isn't set:
 spawn 1 cow at player's location
 set name of spawned entity to "&aVache de &e&l%player%"
 set {pet.%player%} to spawned entity
 add spawned entity to {pet.listesi::*}
 while {pet.%player%} is spawned entity:
 wait 6 tick
 if distance between player and last spawned entity is less than 15:
 make last spawned entity pathfind to player with speed 1
 else if distance between player and last spawned entity is bigger than 15:
 teleport last spawned entity to player
 arg 1 is "isheep":
 {pet.%player%} isn't set:
 spawn 1 sheep at player's location
 set name of spawned entity to "&aMouton de &e&l%player%"
 set {pet.%player%} to spawned entity
 add spawned entity to {pet.listesi::*}
 while {pet.%player%} is spawned entity:
 wait 6 tick
 if distance between player and last spawned entity is less than 15:
 make last spawned entity pathfind to player with speed 1
 else if distance between player and last spawned entity is bigger than 15:
 teleport last spawned entity to player
 arg 1 is "iwolf":
 {pet.%player%} isn't set:
 spawn 1 wolf at player's location
 set name of spawned entity to "&aLoup de &e&l%player%"
 set {pet.%player%} to spawned entity
 add spawned entity to {pet.listesi::*}
 while {pet.%player%} is spawned entity:
 wait 6 tick
 if distance between player and last spawned entity is less than 15:
 make last spawned entity pathfind to player with speed 1
 else if distance between player and last spawned entity is bigger than 15:
 teleport last spawned entity to player
 arg 1 is "ipig":
 {pet.%player%} isn't set:
 spawn 1 pig at player's location
 set name of spawned entity to "&aCochon de &e&l%player%"
 set {pet.%player%} to spawned entity
 add spawned entity to {pet.listesi::*}
 while {pet.%player%} is spawned entity:
 wait 6 tick
 if distance between player and last spawned entity is less than 15:
 make last spawned entity pathfind to player with speed 1
 else if distance between player and last spawned entity is bigger than 15:
 teleport last spawned entity to player
 arg 1 is "iocelot":
 {pet.%player%} isn't set:
 spawn 1 ocelot at player's location
 set name of spawned entity to "&aOcelot de &e&l%player%"
 set {pet.%player%} to spawned entity
 add spawned entity to {pet.listesi::*}
 while {pet.%player%} is spawned entity:
 wait 6 tick
 if distance between player and last spawned entity is less than 15:
 make last spawned entity pathfind to player with speed 1
 else if distance between player and last spawned entity is bigger than 15:
 teleport last spawned entity to player
 arg 1 is "ichicken":
 {pet.%player%} isn't set:
 spawn 1 chicken at player's location
 set name of spawned entity to "&aPoulet de &e&l%player%"
 set {pet.%player%} to spawned entity
 add spawned entity to {pet.listesi::*}
 while {pet.%player%} is spawned entity:
 wait 6 tick
 if distance between player and last spawned entity is less than 15:
 make last spawned entity pathfind to player with speed 1
 else if distance between player and last spawned entity is bigger than 15:
 teleport last spawned entity to player
 arg 1 is "ihorse":
 {pet.%player%} isn't set:
 spawn 1 horse at player's location
 set name of spawned entity to "&aCheval de &e&l%player%"
 set {pet.%player%} to spawned entity
 add spawned entity to {pet.listesi::*}
 while {pet.%player%} is spawned entity:
 wait 6 tick
 if distance between player and last spawned entity is less than 15:
 make last spawned entity pathfind to player with speed 1
 else if distance between player and last spawned entity is bigger than 15:
 teleport last spawned entity to player
 arg 1 isn't set:
 wait 6 tick
 open chest with 1 rows named "&2Pet Menu !" to player
 format slot 0 of player with 383:92 named "&aVache" to close then run [make player execute command "pet icow"]
 format slot 1 of player with 383:91 named "&aMouton" to close then run [make player execute command "pet isheep"]
 format slot 2 of player with 383:90 named "&aCochon" to close then run [make player execute command "pet ipig"]
 format slot 3 of player with 383:93 named "&aPoulet" to close then run [make player execute command "pet ichicken"]
 format slot 4 of player with 383:95 named "&aLoup" to close then run [make player execute command "pet iwolf"]
 format slot 5 of player with 383:98 named "&aOcelot" to close then run [make player execute command "pet iocelot"]
 format slot 6 of player with 383:100 named "&aCheval" to close then run [make player execute command "pet ihorse"]
 format slot 8 of player with 166 named "&cEnlever" to close then run [make player execute command "/pet iremove"]

on damage of entity:
 cancel event

on teleport:
wait 3 tick
loop 4 times:
 wait 1 second
 teleport {pet.%player%} to player

 

Dis moi juste sur quels pets veux-tu des permissions VIP ou VIP+

Et un petit merci ne serait pas de refus pour plusieurs jours de travail !

Et la commande pour avoir un pet est " /pet "

 

Bonjours je tien te dire merci pour se script mais j'ai des erreur (6)

×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.