#=== Téléphone Sk ===# # By LavaPower # #====================# # Dépendance : # # - Skript # # - TuSKe # #====================# command /&sms : permission: OP description: Envoyer un sms trigger: loop {RP.Phonelist::*}: if loop-value is arg-1: set {_use} to 1 if {_use} is 1: loop all players: if {RP.Phone.%loop-player%} is arg-1: if arg-2 is set: loop {RP.Repertoire.%loop-player%::*}: if loop-index is " %arg 1%": set {_find} to loop-value-2 if {_find} is set: send "%{_find}% --> %arg 2%" to loop-player set {_find} to "Venant de : %{_find}%" if size of {RP.Historique.%loop-player%::*} is 52 : send "Attention : Votre historique est plein." to loop-player else: set {RP.Historique.%loop-player%::%{_find}%} to arg-2 else: send "%arg 1% --> %arg 2%" to loop-player set {_find} to "Venant de : %arg 1%" if size of {RP.Historique.%loop-player%::*} is 52 : send "Attention : Votre historique est plein." to loop-player else: set {RP.Historique.%loop-player%::%{_find}%} to arg-2 loop {RP.Repertoire.%player%::*}: if loop-index is " %arg 1%": set {_find} to loop-value-2 if {_find} is set: send "%arg 2% --> %{_find}%" set {_find} to "Vers : %{_find}%" if size of {RP.Historique.%player%::*} is 52 : send "Attention : Votre historique est plein." else: set {RP.Historique.%player%::%{_find}%} to arg-2 else: set {_find} to "Vers : %arg 1%" if size of {RP.Historique.%player%::*} is 52 : send "Attention : Votre historique est plein." else: set {RP.Historique.%player%::%{_find}%} to arg 2 else: send "&4[ERREUR] Usage : /sms " set {_send} to "1" if {_send} isn't set: send "Ce numéro n'est pas sous couverture. Sms non reçu" else if arg-1 is set: send "Ce numéro n'est pas atribué. Sms non envoyé" else: send "&4[ERREUR] Usage : /sms " command /!n° []: permission: OP description: Liste des N° de téléphone trigger: if arg-1 is "important": open virtual chest inventory with size 1 named "N° Important" to player create a gui slot 2 of player with paper named "Taxi" with lore "Besoin de se déplacer ?" to close then run player command "!n° taxi" with permission "OP" create a gui slot 3 of player with paper named "Police" with lore "Besoin d'un policier ?" to close then run player command "!n° police" with permission "OP" create a gui slot 4 of player with paper named "Ambulance" with lore "Besoin d'un médecin ?" to close then run player command "!n° ambulance" with permission "OP" create a gui slot 5 of player with paper named "Staff" with lore "Besoin d'un admin ?" to close then run player command "!n° staff" with permission "OP" create a gui slot 6 of player with red wool named "&8Retour" to close then run player command "phone" with permission "OP" else if arg-1 is "staff": send "Entrez votre message :" set {RP.Chat.%player%} to "SMSStaff" else if arg-1 is "police": send "Entrez votre message :" set {RP.Chat.%player%} to "SMSPolice" else if arg-1 is "ambulance": send "Entrez votre message :" set {RP.Chat.%player%} to "SMSAmbulance" else if arg-1 is "taxi": send "Entrez votre message :" set {RP.Chat.%player%} to "SMSTaxi" else if arg-1 is "saisie": if {RP.NumSaisie.%player%} isn't set: set {RP.NumSaisie.%player%} to " " open virtual chest inventory with size 4 named "Clavier" to player create a gui slot 3 of player with paper named "1" with lore "Appuyer sur 1" to close then run player command "!n° add 1" with permission "OP" create a gui slot 4 of player with paper named "2" with lore "Appuyer sur 2" to close then run player command "!n° add 2" with permission "OP" create a gui slot 5 of player with paper named "3" with lore "Appuyer sur 3" to close then run player command "!n° add 3" with permission "OP" create a gui slot 12 of player with paper named "4" with lore "Appuyer sur 4" to close then run player command "!n° add 4" with permission "OP" create a gui slot 13 of player with paper named "5" with lore "Appuyer sur 5" to close then run player command "!n° add 5" with permission "OP" create a gui slot 14 of player with paper named "6" with lore "Appuyer sur 6" to close then run player command "!n° add 6" with permission "OP" create a gui slot 21 of player with paper named "7" with lore "Appuyer sur 7" to close then run player command "!n° add 7" with permission "OP" create a gui slot 22 of player with paper named "8" with lore "Appuyer sur 8" to close then run player command "!n° add 8" with permission "OP" create a gui slot 23 of player with paper named "9" with lore "Appuyer sur 9" to close then run player command "!n° add 9" with permission "OP" create a gui slot 30 of player with paper named "-" with lore "Appuyez sur -" to close then run player command "!n° add -" with permission "OP" create a gui slot 31 of player with name tag named "%{RP.NumSaisie.%player%}%" with lore "N° Affiché à l'écran" to do nothing create a gui slot 32 of player with paper named "0" with lore "Appuyer sur 0" to close then run player command "!n° add 0" with permission "OP" create a gui slot 27 of player with green wool named "Valider" with lore "Valider le n° composé" to close then run player command "!n° valide" create a gui slot 35 of player with red wool named "&8Retour" to close then run player command "phone" with permission "OP" else if arg-1 is "add": set {RP.NumSaisie.%player%} to "%{RP.NumSaisie.%player%}%%arg-2%" make player execute command "!n° saisie" with permission "OP" else if arg-1 is "historique": open virtual chest inventory with size 6 named "Historique" to player set {_counter} to 0 loop {RP.Historique.%player%::*}: make gui slot {_counter} of player with paper named "%loop-index%" with lore "%loop-value%" to close then run player command "/!n° info2 %loop-index%" add 1 to {_counter} create a gui slot 53 of player with red wool named "&8Retour" to close then run player command "phone" with permission "OP" else if arg-1 is "valide": open virtual chest inventory with size 1 named "N° : %{RP.NumSaisie.%player%}%" to player create a gui slot 3 of player with green wool named "SMS" with lore "Envoyer un sms au n°" to close then run player command "!n° n°" with permission "OP" create a gui slot 4 of player with yellow wool named "Répertoire" with lore "Ajouter le n° au répertoire" to close then run player command "!n° rep" with permission "OP" create a gui slot 5 of player with red wool named "&8Retour" to close then run player command "!n° saisie" with permission "OP" else if arg-1 is "n°": send "Entrez votre message :" set {RP.Chat.%player%} to "SMSSaisie" else if arg-1 is "nS": set {_mess} to arg-2 replace all "venant de : " with "" in {_mess} replace all "vers : " with "" in {_mess} loop {RP.Phonelist::*}: if loop-value is {_mess}: set {_use} to 1 if {_use} is 1: set {RP.NumSaisie.%player%} to {_mess} else: loop {RP.Repertoire.%player%::*}: if loop-value is {_mess}: set {RP.NumSaisie.%player%} to loop-index make player execute command "!n° n°" else if arg-1 is "rep": if size of {RP.Repertoire.%player%::*} is 51 : send "ERREUR : Votre répertoire est plein." else: send "Entrez le nom d'enregistrement :" set {RP.Chat.%player%} to "REPRegister" else if arg-1 is "repertoire": open virtual chest inventory with size 6 named "Répertoire" to player set {_counter} to 0 loop {RP.Repertoire.%player%::*}: make gui slot {_counter} of player with paper named "%loop-value%" with lore "%loop-index%" to close then run player command "/!n° info %loop-value%" add 1 to {_counter} create a gui slot 52 of player with name tag named "MOI" with lore "%{RP.Phone.%player%}%" to do nothing create a gui slot 53 of player with red wool named "&8Retour" to close then run player command "phone" with permission "OP" else if arg-1 is "info": open virtual chest inventory with size 1 named "Info : %arg 2%" to player create a gui slot 3 of player with green wool named "SMS" with lore "Envoyer un sms à %arg 2%" to close then run player command "!n° n°Index %arg 2%" with permission "OP" create a gui slot 4 of player with yellow wool named "Historique" with lore "Supprimer %arg 2% de l'historique" to close then run player command "!n° delrep %arg 2%" with permission "OP" create a gui slot 5 of player with red wool named "&8Retour" to close then run player command "!n° repertoire" with permission "OP" else if arg-1 is "delhist": send "l'historique %arg 2% a été supprimé" set {_temp} to {RP.Repertoire.%player%::%arg 2%} remove {_temp} from {RP.Repertoire.%player%::*} delete {RP.Repertoire.%player%::%arg 2%} else if arg-1 is "info2": open virtual chest inventory with size 1 named "Info : %arg 2%" to player create a gui slot 3 of player with green wool named "SMS" with lore "Envoyer un sms à %arg 2%" to close then run player command "!n° nS %arg 2%" with permission "OP" create a gui slot 4 of player with yellow wool named "Répertoire" with lore "Supprimer %arg 2% du répertoire" to close then run player command "!n° delhist %arg 2%" with permission "OP" create a gui slot 5 of player with red wool named "&8Retour" to close then run player command "!n° historique" with permission "OP" else if arg-1 is "delrep": send "le numéro associé à %arg 2% a été supprimé de votre répertoire" remove arg-2 from {RP.Repertoire.%player%::*} else if arg-1 is "n°Index": loop {RP.Repertoire.%player%::*}: if loop-value is arg-2: set {RP.NumSaisie.%player%} to loop-index make player execute command "!n° n°" command /telephone: permission: OP description: Sortir son téléphone. aliases: phone trigger: if {RP.NumSaisie.%player%} is set: delete {RP.NumSaisie.%player%} open virtual chest inventory with size 1 named "Téléphone" to player create a gui slot 2 of player with paper named "Historique" with lore "Historique des derniers SMS" to close then run player command "!n° historique" with permission "OP" create a gui slot 3 of player with paper named "Répertoire" with lore "Liste des N° enregistrés" to close then run player command "!n° repertoire" with permission "OP" create a gui slot 4 of player with paper named "Clavier" with lore "Composer un n°" to close then run player command "!n° saisie" with permission "OP" create a gui slot 5 of player with paper named "N° Important" with lore "Liste les N° importants" to close then run player command "!n° important" with permission "OP" create a gui slot 6 of player with paper named "Info" with lore "Modèle : %name of player's tool%" to do nothing create a gui slot 8 of player with red wool named "&8Vérouiller" to close command /viewphone: trigger: send "%{RP.Phone.%player%}%" command /deletephone: trigger: delete {RP.Phone.%player%} on join: if {RP.Phone.%player%} isn't set: set {RP.Phone.%player%} to "06%random integer between 10000000 and 99999999%" while {RP.Phone.%player%} is in {RP.Phonelist::*}: set {RP.Phone.%player%} to "06%random integer between 10000000 and 99999999%" add {RP.Phone.%player%} to {RP.Phonelist::*} set {RP.Repertoire.%player%::%{RP.Phone.%player%}%} to player send "Bienvenue &l%player%." send "Votre numéro de téléphone est &l%{RP.Phone.%player%}%" on rightclick with book: make player execute command "phone" with permission "OP" on chat: if {RP.Chat.%player%} is "SMSStaff": cancel event send "Le standard va dispatcher votre message..." set {_counter} to 0 loop all players: if loop-player has permission "admin.*": add 1 to {_counter} send "%{RP.Phone.%player%}% (%player%) --> %message%" to loop-player set {_find} to "Venant de : %player%" if size of {RP.Historique.%loop-player%::*} is 52 : send "Attention : Votre historique est plein." to loop-player else: set {RP.Historique.%loop-player%::%{_find}%} to message send "Le standard a trouvé %{_counter}% staff(s)." if {_counter} is bigger than 0: send "%message% --> STAFF" set {_temp} to "Vers : STAFF" if size of {RP.Historique.%player%::*} is 52 : send "Attention : Votre historique est plein." else: set {RP.Historique.%player%::%{_temp}%} to message delete {RP.Chat.%player%} else if {RP.Chat.%player%} is "SMSPolice": cancel event send "Le standard va dispatcher votre message..." send "ERREUR : Numéro inconnu (bientôt rajouté)" delete {RP.Chat.%player%} else if {RP.Chat.%player%} is "SMSAmbulance": cancel event send "Le standard va dispatcher votre message..." send "ERREUR : Numéro inconnu (bientôt rajouté)" delete {RP.Chat.%player%} else if {RP.Chat.%player%} is "SMSTaxi": cancel event send "Le standard va dispatcher votre message..." send "ERREUR : Numéro inconnu (bientôt rajouté)" delete {RP.Chat.%player%} else if {RP.Chat.%player%} is "SMSSaisie": cancel event make player execute command "&sms %{RP.NumSaisie.%player%}% %message%" with permission "OP" delete {RP.NumSaisie.%player%} delete {RP.Chat.%player%} else if {RP.Chat.%player%} is "REPRegister": cancel event set {RP.Repertoire.%player%::%{RP.NumSaisie.%player%}%} to message send "Le numéro %{RP.NumSaisie.%player%}% est enregistré au nom de %message%" delete {RP.NumSaisie.%player%} delete {RP.Chat.%player%}