Aller au contenu

[Shop/Spawners/SkyBlock] Skript de spawners pour un skybloc


Messages recommandés

Posté(e) (modifié)

Bonjour je cherche quelqu'un pouvant me faire un skript de spawners pour mon skyblock.

 

Version du serveur skyblock: 1.10 à 1.12.2

 

Version de notre plugin skript: Skript 2.2 bensku-dev30d + Skript normal

 

Addons: Aucun me dire lesquels rajouté

 

Je voudrais que ce script permette d'acheté des spawners a cochon (50000$) mais pouvant les modifié dans un GUI par la suite en d'autre spawners d'autre mobs.

 

Il faudrait que le GUI s'ouvre grace a la command /spawner ou /spawners avec la permission spawners.open

 

Pouvoir acheté des spawners a cochon grave a un spawner en bas à droite et qu'il y a les tête de certain mobs ci-dessous avec lesquels en cliquant dessus changera notre spawner par le type de la tête (mobs).

 

Liste des mobs pouvant être mis dans les spawners:

- Blaze (5000$)

- Vache (1000$)

- Poulet (1000$)

- Poulpe (1500$)

- EnderMite (10000$)

- SilverFish (10000$)

- Shulker (5000$)

- EnderMan (15000$)

- Cochon (gratuit)

- Lama (10000$)

- Arraigné (2500$)

- Squelette (2500$)

- Zombie (2500$)

- Creeper (2500$)

- Guardian (10000$)

- Ours Polaire (5000$)

- Sorcière (10000$)

- Villageois (40000$)

- Slime (10000$)

 

Pour changé les spawners en un autre type besoin de aucune permissions.

 

Pour me parlé merci de me contacté par discord: CreazyPeople_#6667

 

Je vous remerci de lire ceci et j'éspère que quelqu'un arrivera a le faire :).

Modifié par Invité
  • J'aime 1
Posté(e)
Bonjour je cherche quelqu'un pouvant me faire un skript de spawners pour mon skyblock.

 

Version du serveur skyblock: 1.10 à 1.12.2

 

Version de notre plugin skript: Skript 2.2 bensku-dev30d + Skript normal

 

Addons: Aucun me dire lesquels rajouté

 

Je voudrais que ce script permette d'acheté des spawners a cochon (50000$) mais pouvant les modifié dans un GUI par la suite en d'autre spawners d'autre mobs.

 

Il faudrait que le GUI s'ouvre grace a la command /spawner ou /spawners avec la permission spawners.open

 

Pouvoir acheté des spawners a cochon grave a un spawner en bas à droite et qu'il y a les tête de certain mobs ci-dessous avec lesquels en cliquant dessus changera notre spawner par le type de la tête (mobs).

 

Liste des mobs pouvant être mis dans les spawners:

- Blaze (5000$)

- Vache (1000$)

- Poulet (1000$)

- Poulpe (1500$)

- EnderMite (10000$)

- SilverFish (10000$)

- Shulker (5000$)

- EnderMan (15000$)

- Cochon (gratuit)

- Lama (10000$)

- Arraigné (2500$)

- Squelette (2500$)

- Zombie (2500$)

- Creeper (2500$)

- Guardian (10000$)

- Ours Polaire (5000$)

- Sorcière (10000$)

- Villageois (40000$)

- Slime (10000$)

 

Pour changé les spawners en un autre type besoin de aucune permissions.

 

Pour me parlé merci de me contacté par discord: CreazyPeople_#6667

 

Je vous remerci de lire ceci et j'éspère que quelqu'un arrivera a le faire :).

Sa m'intéresse ce skript :) Surtout que la commande de mon coté faudrait quelle soit possible d'être execute seulement dans le monde "ASkyBlock"

Posté(e) (modifié)

@MaxDu56YT

@Ertonia

 

J'ai réalisé ce script, il marche pour moi.

Version de mon serveur: 1.11.2

 

Add-ons:

- TuSKe 1.8.3-PikachuPatch-v1

- Skript 2.2-dev32d

- SkStuff

- skript-yaml

Dans 'plugins/Skript/scripts/'

load:
   load yaml "plugins/sS/config.yml" as "sSConfig"
function spawners() :: objects:
   loop skript-yaml nodes with keys "GUI.spawners" from "sSConfig" without string checks:
       if loop-value is not "global item":
           add loop-value to {_S::*}
   return {_S::*}
function decorations() :: objects:
   set {_R::*} to skript-yaml list "GUI.decoration" from "sSConfig"
   return {_R::*}
function d(S:string) :: string:
   set {_R} to skript-yaml value "GUI.spawners.%{_S}%.data" from "sSConfig"
   return {_R}
function s(S:string) :: number:
   set {_R} to skript-yaml value "GUI.spawners.%{_S}%.slot" from "sSConfig"
   return {_R}
function p(S:string) :: number:
   set {_R} to skript-yaml value "GUI.spawners.%{_S}%.price" from "sSConfig"
   return {_R}
function nbt(S:object) :: string:
   set {_R} to skript-yaml value "GUI.spawners.%{_S}%.nbt" from "sSConfig"
   replace all "$s" with "%s({_S})%" in {_R}
   replace all "$p" with "%p({_S})%" in {_R}
   replace all "$id" with "%{_S}%" in {_R}
   return {_R}
on command:
   set {_CMD} to skript-yaml value "command" from "sSConfig"
   if command is {_CMD}:
       cancel event
       set {_NAME} to skript-yaml value "GUI.name" from "sSConfig"
       set {_S} to skript-yaml value "GUI.height" from "sSConfig"
       set {_B} to "%skript-yaml value ""GUI.spawners.global item"" from ""sSConfig""%" parsed as item

       open virtual chest inventory with size {_S} named "%{_NAME}%" to player
       loop spawners():
           set {_S} to loop-value
           format gui slot s({_S}) of player with {_B} with custom nbt "%nbt({_S})%" to run:
               if targeted block of player is a mob spawner:
                   set {_E} to "%nbt of targeted block%"
                   set {_E::*} to {_E} split by ":{Entity:{id:"""
                   set {_F} to first element of {_E::2} split by """}"
                   if d({_S}) is not "%{_F}%":
                       replace all "%{_F}%" with "%d({_S})%" in {_E}

                       if money of player is bigger or equal to p({_S}):
                           remove p({_S}) from money of player
                           set block at targeted block to mob spawner
                           add "%{_E}%" to nbt of targeted block
       loop decorations():
           set {_I} to loop-value
           set {_I::*} to {_I} split by "|"
           if {_I::4} is "confirmation":
               format gui slot {_I::1} parsed as number of player with "%{_I::2}%" parsed as item with custom nbt "%{_I::3}%" to run:

                   set {_P} to skript-yaml value "GUI.basic spawner.price" from "sSConfig"
                   set {_NAME} to skript-yaml value "GUI.basic spawner.confirmation.name" from "sSConfig"
                   set {_S} to skript-yaml value "GUI.basic spawner.confirmation.height" from "sSConfig"

                   open virtual chest inventory with size {_S} named "%{_NAME}%" to player
                   set {_I::*} to "GUI.basic spawner.confirmation.accept" and "GUI.basic spawner.confirmation.deny"
                   set {_I2::*} to "slot", "item" and "nbt"
                   loop {_I::*}:
                       loop {_I2::*}:
                           set {_I3::%loop-value-3%} to skript-yaml value "%loop-value-2%.%loop-value-3%" from "sSConfig"
                       set {_A} to loop-value-2
                       format gui slot {_I3::slot} of player with "%{_I3::item}%" parsed as item with custom nbt "%{_I3::nbt}%" to run:
                           if {_A} is "GUI.basic spawner.confirmation.accept":
                               if player's money is bigger or equal to {_P}:
                                   remove {_P} from money of player
                                   execute console command "/give %player% mob_spawner 1 0 {BlockEntityTag:{EntityId:minecraft:pig}}"
                           else:
                               execute player command "%{_CMD}%"
                       clear {_I3::*}
                   loop skript-yaml list "GUI.basic spawner.decoration" from "sSConfig":
                       set {_F} to loop-value-2
                       set {_F::*} to {_F} split by "|"
                       format gui slot {_F::1} parsed as number of player with "%{_F::2}%" parsed as item with custom nbt "%{_F::3}%"
           else:
               format gui slot {_I::1} parsed as number of player with "%{_I::2}%" parsed as item with custom nbt "%{_I::3}%"    

'plugins/sS/config.yml'

command: sS-edit
GUI:
 name: '§3Spawners'
 height: 6
 basic spawner:
   price: 50000
   confirmation:
     name: '§3Spawners'
     height: 3 # between 1 and 6

     accept:
       slot: 15
       item: emerald
       nbt: '{display:{Name:"§2Valider l''achat"}}'

     deny:
       slot: 11
       item: rose red
       nbt: '{display:{Name:"§4Annuler l''achat"}}'
   decoration:
   - '4|mob spawner|{display:{Name:"§3Achat Spawner Cochon"}}|confirmation'
 decoration:
 - '53|mob spawner|{display:{Name:"§3Achat Spawner Cochon"}}|confirmation'
 # You can add others decoration tools
 spawners:
   global item: 'spawn egg' # do not edit this

   # http://minecraft-ids.grahamedgecombe.com/entities
   # $p is price
   # $s is slot
   # $id is ID, for llama is 'llama'
   llama:
     slot: 0
     data: 'minecraft:llama'
     nbt: '{EntityTag:{id:minecraft:llama},display:{Name:"$id",Lore:["$p$"]}}'
     price: 5000
   enderman:
     slot: 1
     data: 'minecraft:enderman'
     nbt: '{EntityTag:{id:minecraft:enderman},display:{Name:"$id",Lore:["$p$"]}}'
     price: 10000
   endermite:
     slot: 2
     data: 'minecraft:endermite'
     nbt: '{EntityTag:{id:minecraft:endermite},display:{Name:"$id",Lore:["$p$"]}}'
     price: 5000
   spider:
     slot: 3
     data: 'minecraft:spider'
     nbt: '{EntityTag:{id:minecraft:spider},display:{Name:"$id",Lore:["$p$"]}}'
     price: 2500
   blaze:
     slot: 4
     data: 'minecraft:blaze'
     nbt: '{EntityTag:{id:minecraft:blaze},display:{Name:"$id",Lore:["$p$"]}}'
     price: 5000
   chicken:
     slot: 5
     data: 'minecraft:chicken'
     nbt: '{EntityTag:{id:minecraft:chicken},display:{Name:"$id",Lore:["$p$"]}}'
     price: 1000
   cow:
     slot: 6
     data: 'minecraft:cow'
     nbt: '{EntityTag:{id:minecraft:cow},display:{Name:"$id",Lore:["$p$"]}}'
     price: 2500

Modifié par McLincoln2
Invité
Ce sujet ne peut plus recevoir de nouvelles réponses.
×
×
  • 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.