Aller au contenu
  • 0

All of the active potion effects


Question

Posté(e)

J'ai un problème avec mon skript 1.8 :

#============================[Commandes et permissions]===============================#
#/invview <joueur>: Permet de voir l'inventaire, la vie, la faim etc... du joueur.    #
#/invhide <joueur>: Permet de bloquer ou débloquer l'accès de l'inventaire du joueur. #
#_____________________________============.============_______________________________#
#Permission de /invview: invview.view                                                 #
#Permission de /invhide: invview.hide                                                   #
#=====================================================================================#   
command /invhide <player>:
   permission: invview.hide
   trigger:
       if {target.hide.%arg 1%} is false:
           message "&2[invView]&4 Mode caché activé pour %arg 1%"
           set {target.hide.%arg 1%} to true

       else:
           message "&2[invView]&4 Mode caché desactivé pour %arg 1%"
           set {target.hide.%arg 1%} to false

       if {target.hide.%arg 1%} is not set:
           message "&2[invView]&4 Mode caché activé pour %arg 1%"
           set {target.hide.%arg 1%} to true

command /invview <player>:
   permission: invview.view
   trigger:
       wait 1 tick
       if {target.hide.%arg 1%} is true:
           message "&2[invView]&4 Ce joueur ne peux pas être visionné!"
       else:
           set {target.%player%} to arg 1
           open chest with 6 rows named "&2%arg 1%" to player
           set {_playerinv} to arg 1
           set {_slot} to 0
           loop 36 times:
               set {invview.%arg 1%.%{_slot}%} to slot {_slot} of arg 1's inventory
               add 1 to {_slot}
           set {_slot} to 0
           set {_slotmenu} to 18
           wait 1 tick
           loop 36 times:
               format slot {_slotmenu} of player with {invview.%arg 1%.%{_slot}%} to close
               add 1 to {_slot}
               add 1 to {_slotmenu}
           set {_health.%arg 1%} to arg 1's health
           set {hunger.%arg 1%} to arg 1's hunger
           set {armorview.helmet.%arg 1%} to arg 1's helmet
           set {armorview.chestplate.%arg 1%} to arg 1's chestplate
           set {armorview.leggings.%arg 1%} to arg 1's leggings
           set {armorview.boots.%arg 1%} to arg 1's boots
           set {effects.%arg 1%::*} to all of the active potion effects on arg 1
           if arg 1's gamemode is survival:
               format slot 4 of player with arg 1's skull named "&6&l%arg 1%> &4%{_health.%arg 1%}% ❤" with lore "&c&k[]&r&4Inventaire&c&k[]-" to close
           else:
               format slot 4 of player with arg 1's skull named "&6&l%arg 1%> &4❤ Immortel ❤" with lore "&c&k[]&r&4Inventaire&c&k[]-" to close
           if arg 1's gamemode is survival:
               if {hunger.%arg 1%} = 10:
                   format slot 14 of player with 10 raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 9.5:
                   format slot 14 of player with 10 raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 9:
                   format slot 14 of player with 9 raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 8.5:
                   format slot 14 of player with 9 raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 8:
                   format slot 14 of player with 8 raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 7.5:
                   format slot 14 of player with 8 raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 7:
                   format slot 14 of player with 7 raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 6.5:
                   format slot 14 of player with 7 raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 6:
                   format slot 14 of player with 6 raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 5.5:
                   format slot 14 of player with 6 raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 5:
                   format slot 14 of player with 5 raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 4.5:
                   format slot 14 of player with 5 raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 4:
                   format slot 14 of player with 4 raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 3.5:
                   format slot 14 of player with 4 raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 3:
                   format slot 14 of player with 3 raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 2.5:
                   format slot 14 of player with 3 raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 2:
                   format slot 14 of player with 2 raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 1.5:
                   format slot 14 of player with 2 raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 1:
                   format slot 14 of player with raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 0.5:
                   format slot 14 of player with raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
               if {hunger.%arg 1%} = 0:
                   format slot 14 of player with raw chicken named "&a&lFaim:&r &6%{hunger.%arg 1%}%" to close
           else:
               format slot 14 of player with raw chicken named "&a&lFaim:&r &6Illimité!" to close
           if arg 1's gamemode is survival:
               format slot 12 of player with iron chestplate named "&a&lArmure" with lore "&6%{armorview.helmet.%arg 1%}%||&6%{armorview.chestplate.%arg 1%}%||&6%{armorview.leggings.%arg 1%}%||&6%{armorview.boots.%arg 1%}%" to close
           else:
               format slot 12 of player with iron chestplate named "&a&lArmure" with lore "On s'en fout, il est en créa" to close
           format slot 8 of player with red wool named "&c&lActualiser"  to close then run [make player execute command "invreload"]
           if arg 1 doesn't have speed:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has speed:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have slowness:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has slowness:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have haste:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has haste:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have mining fatigue:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has mining fatigue:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have strength:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has strength:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have instant health:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has instant health:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have instant damage:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has instant damage:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have jump boost:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has jump boost:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have nausea:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has nausea:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have regeneration:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has regeneration:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have resistance:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has resistance:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have fire resistance:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has fire resistance:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have water breathing:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has water breathing:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have invisibility:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has invisibility:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have blindness:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has blindness:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have night vision:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has night vision:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have hunger:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has hunger:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have weakness:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has weakness:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have poison:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has poison:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           if arg 1 doesn't have wither:
               format slot 13 of player with glass bottle named "&9&lPotions" with lore "&9&lPas d'effets!" to close
           if arg 1 has wither:
               format slot 13 of player with water bottle named "&9&lPotions" with lore "&9&lEffets: &6%{effects.%arg 1%::*}%" to close
               stop
           clear {effects.%arg 1%::*}

command /invreload:
   permission: invview.reload
   trigger:
       wait 2 ticks
       make player execute command "invview %{target.%player%}%"
       clear {target.%player%}

5 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Salut, pour utiliser le code ci dessous, il te faut l'addon "ExtrasSk".

set {effects.%arg 1%::*} to all of the active potion effects on arg 1

Donc, si tu ne veux pas télécharger cet add-on, je te conseille le code ci dessous avec l'add-on "Skellet":

loop all active potions on arg 1:
   add loop-value to {_effects::*}

Faut ce qui est dit dans ma signature

  • 0
Posté(e)

Merci, j'ai un autre problème :

options:
   title: &8[&6&lJobs&8] &7
   jobs.max: 1
   c: &e

command /money [<text>] [<offline player>] [<int>]:
   aliases: monnaie, argent
   trigger:
       if arg 1 is "set":
           if arg 2 is set:
               if arg 3 is set:
                   if player has the permission "money.give.use":
                       set {money.%arg-2%} to arg 3
                       send "&8LionCoins : {@c}&l%arg-2%&8: {@c}%{money.%arg-2%}% ✪"
                       stop
       if arg 1 is "see":
           if arg 2 is set:
               send "&8LionCoins : {@c}&l%arg-2%&8: {@c}%{money.%arg-2%}% ✪"
               stop
       if arg 1 is "add":
           if arg 2 is set:
               if player has the permission "money.give.use":
                   add arg 3 to {money.%arg-2%}
                   send "&8LionCoins : {@c}&l%arg-2%&8: {@c}%{money.%arg-2%}% ✪"
                   stop
       if arg 1 is "give":
           loop all players:
               if arg 2 is loop-player:
                   if arg 3 > 0:
                       if arg 3 :
                           remove arg 3 from {money.%player%}
                           add arg 3 to {money.%loop-player%}
                           send "&8[&f&lTransaction&8] &7Montant envoyé à {@c}%loop-player%&7: {@c}%arg-3% ✪" to player
                           send "&8[&f&lTransaction&8] &7Montant reçut de {@c}%player%: {@c}%arg-3% ✪" to loop-player
                           stop
                   else:
                       send "&7Le montant envoyé à {@c}%loop-player% &7doit être supérieur à {@c}0"
                       stop
       else:
           send "&8LionCoins : {@c}%{money.%player%}% ✪"

command /jobs [<text>] [<text>]:
   trigger:
       if {jobs.list::*} is not set:
           add "Forgeron" to {jobs.list::*}
           add "Mineur" to {jobs.list::*}
           add "Cuisinier" to {jobs.list::*}
           add "Fermier" to {jobs.list::*}
           add "Chasseur" to {jobs.list::*}
           add "Jardinier" to {jobs.list::*}
           add "Bucheron" to {jobs.list::*}
           add "Mage" to {jobs.list::*}
           add "Pecheur" to {jobs.list::*}
           add "Chomeur" to {jobs.list::*}

       if arg 1 is not set:
           if {Jobs.%player%::*} is set:
               send "{@title}Vos métiers:"
               loop {Jobs.%player%::*}:
                   send "&7- {@c}%loop-value%"
           else:
               send "{@title}Vous n'avez pas de metier"

       if arg 1 is "join":
           if arg 2 is set:
               if {Jobs.%player%::*} is set:
                   loop {Jobs.%player%::*}:
                       if loop-value is arg 2:
                           send "{@title}Vous possédé déja ce métier: {@c}%loop-value%"
                           stop
                       set {nb.jobs.%player%} to true
                   if {nb.jobs.%player%} is true:
                       send "{@title}Supprimer d'abord un jobs!"
                       stop
               loop {jobs.list::*}:
                   if loop-value is arg 2:
                       add loop-value to {Jobs.%player%::*}
                       send "{@title}Vous rejoignez les {@c}%arg-2%{@c}s"
           else:
               send "{@title}Préciser quel jobs rejoindre!"

       if arg 1 is "leave":
           if arg 2 is set:
               loop {jobs.list::*}:
                   if loop-value is arg 2:
                       remove loop-value from {Jobs.%player%::*}
                       set {nb.jobs.%player%} to false
                       send "{@title}Vous quittez les {@c}%arg-2%{@c}s"
           else:
               send "{@title}Préciser quel jobs supprimer!"

       if arg 1 is "list":
           loop 100 times:
               send " "
           send "&8╒═════ {@title} &8═════╕"
           send "  &7- {@c}Forgeron      &7- {@c}Mineur %nl%  &7- {@c}Cuisinier        &7- {@c}Fermier %nl%  &7- {@c}Chasseur      &7- {@c}Jardinier %nl%  &7- {@c}Bucheron      &7- {@c}Mage %nl%  &7- {@c}Pecheur       &7- {@c}Chomeur"
           send "&8╘═══════════════╛"

       if arg 1 is "help":
           loop 100 times:
               send " "
           if arg 2 is "Forgeron":
               send "&7Métier:                {@c}&lForgeron%nl% %nl%&f- Fondre les minerais &8({@c}1&8/{@c}40✪&8)%nl%&f- Craft: outils/armures (fer|or|diamant) &8({@c}10&8/{@c}65✪&8)%nl% %nl%&f&lASTUCE: &fPrendre les minerais fondu 1/1 et ne pas resté sur la fenètre de fonte"
           if arg 2 is "Mineur":
               send "&7Métier:                {@c}&lMineur%nl% %nl%&f- Récolte les minerais &8({@c}1&8/{@c}105✪&8)%nl%&f- Craft: block de minerais &8({@c}1&8/{@c}30✪&8)"
           if arg 2 is "Cuisinier":
               send "&7Métier:                {@c}&lCuisinier%nl% %nl%&f- Cuisson: viande, poisson, féculant &8({@c}10&8/{@c}25✪&8)%nl%&f- Craft: sucre, gateau, cookie, tarte, soupe&8({@c}10&8/{@c}15✪&8)%nl% %nl%&f&lASTUCE: &fPrendre le résultat de cuisson 1/1 et ne pas resté sur la fenètre de fonte"
           if arg 2 is "Fermier":
               send "&7Métier:                {@c}&lFermier%nl% %nl%&f- Plantation de graines &8({@c}0&8/{@c}3✪&8)%nl%&f- Récolte de plantations &8({@c}2&8/{@c}3✪&8)%nl%&f- Craft: block de paille &8({@c}10&8/{@c}15✪&8)"
           if arg 2 is "Chasseur":
               send "&7Métier:                {@c}&lChasseur%nl% %nl%&f- Kill de mobs &8({@c}5&8/{@c}20✪&8)%nl%&f- Craft: arc, flèche &8({@c}5&8/{@c}10✪&8)"
           if arg 2 is "Jardinier":
               send "&7Métier:                {@c}&lJardinier%nl% %nl%&f- Plantation de fleurs &8({@c}1&8/{@c}3✪&8)%nl%&f- Récolte de végétaux (cisaille) &8({@c}1&8/{@c}2✪&8)%nl%&f- Bouture de fleurs &8({@c}5&8/{@c}10✪&8)"
           if arg 2 is "Bucheron":
               send "&7Métier:                {@c}&lBucheron%nl% %nl%&f- Récolte du bois &8({@c}2&8/{@c}3✪&8)%nl%&f- Craft: hache (pierre|bois) coffre, workbench, barriere or échelle &8({@c}5&8/{@c}10✪&8)"
           if arg 2 is "Mage":
               send "&7Métier:                {@c}&lMage%nl% %nl%&f- Echantement &8({@c}5&8/{@c}35✪&8)%nl%&f- Craft: pomme doré, poudre de blaze &8({@c}5&8/{@c}10✪&8)%nl%&f- Bonus XP (quotidien|aléatoire)"
           if arg 2 is "Pecheur":
               send "&7Métier:                {@c}&lPecheur%nl% %nl%&f- Peche &8({@c}1&8/{@c}100✪&8)%nl%&f- Craft: canne à peche, bateau &8({@c}5&8/{@c}10✪&8)"
           if arg 2 is "Chomeur":
               send "&7Métier:                {@c}&lChomeur%nl% %nl%&fAllez dormir, mangez, patientez le RSA..."
           if arg 2 is "Metier":
               send "{@c}⊙.⊙   &fJe voulais dire par exemple: &7/jobs {@c}help forgeron%nl%{@c}~    &fSi tu ne connais pas les jobs: &7/jobs {@c}list"
           if arg 2 is not set:
               send "&8╒════ {@title} &8════╤════════════════╕"
               send "  &7- /jobs {@c}join                 &f◉ Rejoind un jobs"
               send "  &7- /jobs {@c}leave               &f◉ Quitte un jobs"
               send "  &7- /jobs {@c}list                  &f◉ Liste des jobs"
               send "  &7- /jobs {@c}help metier         &f◉ Aide pour les jobs"
               send "&8╘═════════════╧════════════════╛"

on break:
   loop {Jobs.%player%::*}:
       if loop-value is "Mineur":
           if event-block is a coal ore:
               add a random integer between 1 and 5 to {money.%player%}
           if event-block is a iron ore:
               cancel event
               set event-block to air
               drop 1 iron ingot
               add a random integer between 5 and 10 to {money.%player%}
           if event-block is a redstone ore:
               add a random integer between 10 and 15 to {money.%player%}
           if event-block is a lapis ore:
               add a random integer between 20 and 25 to {money.%player%}
           if event-block is a quartz ore:
               add a random integer between 10 and 15 to {money.%player%}
           if event-block is a gold ore:
               cancel event
               set event-block to air
               drop 1 gold ingot
               add a random integer between 35 and 40 to {money.%player%}
           if event-block is a diamond ore:
               add a random integer between 50 and 55 to {money.%player%}
           if event-block is a emerald ore:
               add a random integer between 100 and 105 to {money.%player%}

       if loop-value is "Bucheron":
           if event-block is a log:
               cancel event
               set event-block to air
               drop 4 planks
               add a random integer between 2 and 3 to {money.%player%}

       if loop-value is "Fermier":
           if event-block is a crops max, potato max, carrot max, pumpkin, melon, cactus or sugar cane:
               add a random integer between 2 and 3 to {money.%player%}

       if loop-value is "Jardinier":
           if target block is any flower or lily pad:
               if player is holding a shears:
                   add a random integer between 1 and 3 to {money.%player%}
                   stop
               else:
                   add a random integer between -1 and -5 to {money.%player%}
           if target block is any leaves, any tall grass or vines:
               if player is holding a shears:
                   add a random integer between 1 and 2 to {money.%player%}

on craft:
   loop {Jobs.%player%::*}:
       if loop-value is "Mineur":
           if event-item is a coal block:
               add a random integer between 1 and 2 to {money.%player%}
           if event-item is a iron block:
               add a random integer between 2 and 5 to {money.%player%}
           if event-item is a redstone block:
               add a random integer between 5 and 7 to {money.%player%}
           if event-item is a lapis block:
               add a random integer between 7 and 10 to {money.%player%}
           if event-item is a quartz block:
               add a random integer between 10 and 15 to {money.%player%}
           if event-item is a gold block:
               add a random integer between 15 and 20 to {money.%player%}
           if event-item is a diamond block:
               add a random integer between 20 and 25 to {money.%player%}
           if event-item is a emerald block:
               add a random integer between 25 and 30 to {money.%player%}

       if loop-value is "Forgeron":
           if event-item is a iron sword, iron hoe, iron spade, iron pickaxe or iron axe:
               add a random integer between 10 and 20 to {money.%player%}
           if event-item is a iron helmet, iron chestplate, iron leggings or iron boots:
               add a random integer between 30 and 35 to {money.%player%}
           if event-item is a gold sword, gold hoe, gold spade, gold pickaxe or gold axe:
               add a random integer between 30 and 35 to {money.%player%}
           if event-item is a gold helmet, gold chestplate, gold leggings or gold boots:
               add a random integer between 45 and 50 to {money.%player%}
           if event-item is a diamond sword, diamond hoe, diamond spade, diamond pickaxe or diamond axe:
               add a random integer between 45 and 50 to {money.%player%}
           if event-item is a diamond helmet, diamond chestplate, diamond leggings or diamond boots:
               add a random integer between 60 and 65 to {money.%player%}
           if event-item is a iron fence:
               add a random integer between 10 and 20 to {money.%player%}

       if loop-value is "Bucheron":
           if event-item is a wooden axe, stone axe, chest, workbench, fence or ladder:
               add a random integer between 5 and 10 to {money.%player%}

       if loop-value is "Pecheur":
           if event-item is a boat or fishing rod:
               add a random integer between 5 and 10 to {money.%player%}

       if loop-value is "Cuisinier":
           if event-item is a sugar, mushroom soup, rabbit soup or bread:
               add a random integer between 10 and 15 to {money.%player%}
           if event-item is a cookie, cake or pumpkin pie:
               add a random integer between 20 and 25 to {money.%player%}

       if loop-value is "Fermier":
           if event-item is a hay block:
               add a random integer between 10 and 15 to {money.%player%}

       if loop-value is "Chasseur":
           if event-item is a bow or arrow:
               add a random integer between 5 and 10 to {money.%player%}

       if loop-value is "Mage":
           if event-item is a golden apple or a blaze powder:
               add a random integer between 5 and 10 to {money.%player%}

on rightclick:
   loop {Jobs.%player%::*}:
       if loop-value is "Forgeron":
           if target block is a furnace:
               if the fuel slot of the clicked block is air:
                   set the fuel slot of the clicked block to 2 coal
               if result slot of block is coal:
                   add a random integer between 1 and 10 to {money.%player%}
               if result slot of block is redstone:
                   add a random integer between 5 and 15 to {money.%player%}
               if result slot of block is lapis:
                   add a random integer between 10 and 20 to {money.%player%}
               if result slot of block is iron ingot:
                   add a random integer between 1 and 10 to {money.%player%}
               if result slot of block is gold ingot:
                   add a random integer between 1 and 20 to {money.%player%}
               if result slot of block is diamond:
                   add a random integer between 30 and 35 to {money.%player%}
               if result slot of block is emerald:
                   add a random integer between 35 and 40 to {money.%player%}

       if loop-value is "Cuisinier":
           if target block is a furnace:
               if result slot of block is cooked beef:
                   add a random integer between 10 and 15 to {money.%player%}
               if result slot of block is grilled pork:
                   add a random integer between 10 and 15 to {money.%player%}
               if result slot of block is cooked chicken:
                   add a random integer between 7 and 12 to {money.%player%}
               if result slot of block is cooked rabbit:
                   add a random integer between 10 and 15 to {money.%player%}
               if result slot of block is cooked mutton:
                   add a random integer between 7 and 12 to {money.%player%}
               if result slot of block is baked potato:
                   add a random integer between 15 and 20 to {money.%player%}
               if result slot of block is cooked fish:
                   add a random integer between 15 and 20 to {money.%player%}
               if result slot of block is cooked salmon:
                   add a random integer between 15 and 20 to {money.%player%}

       if loop-value is "Fermier":
           if target block is dirt or grass:
               if player is holding any hoe:
                   add a random integer between 0 and 1 to {money.%player%}
           if target block is farmland:
               if player is holding potato, seeds, melon seeds, pumpkin seeds or carrot:
                   add a random integer between 2 and 3 to {money.%player%}
           if target block is sand:
               if player is holding sugar cane or cactus:
                   add a random integer between 2 and 3 to {money.%player%}
           if target block is crops, potato plant, melon stem, pumpkin stem or carrot plant:
               if player is holding a white dye:
                   add a random integer between 1 and 2 to {money.%player%}

       if loop-value is "Jardinier":
           if target block is grass:
               if player is holding any flower:
                   add a random integer between 1 and 5 to {money.%player%}
           if target block is water:
               if player is holding a lily pad:
                   add a random integer between 1 and 5 to {money.%player%}
           if target block is any large plant:
               if player is holding a white dye:
                   add a random integer between 5 and 10 to {money.%player%}

       if loop-value is "Mage":
           if target block is not a workbench:
               if player is holding a stick of fortune named " &8[{@c}&lSceptre&8]" with lore " ||&f&lBONUS:||&7xp aléatoire":
                   chance of 45%:
                       give 100 xp to the player
                   chance of 35%:
                       give 250 xp to the player
                   chance of 20%:
                       give 400 xp to the player
                   remove 1 stick of fortune named " &8[{@c}&lSceptre&8]" with lore " ||&f&lBONUS:||&7xp aléatoire" from player's inventory

       if loop-value is "Pecheur":
           if target block is water:
               if player is holding a fishing rod:
                   chance of 5%:
                       repair player's tool
                       enchant player's tool with lure 3
                       set the name of player's tool to "&8[{@c}&lCanne à peche&8]"

on bed enter:
   loop {Jobs.%player%::*}:
       if loop-value is "Chomeur":
           set {jobs.chomeur.sleep} to now
           add a random integer between 0 and 1 to {money.%player%}

on bed leave:
   loop {Jobs.%player%::*}:
       if loop-value is "Chomeur":
           set {_jobs.chomeur.sleep} to difference between {jobs.chomeur.sleep} and now
           send "%{_jobs.chomeur.sleep}%"
           if {_jobs.chomeur.sleep} < 1 minute:
               send "{@title}&f&lHEIN!! &fLe chomeur n'a pas besoin de se lever...%nl%&fAttend encore {@c}&l1min &fde te reveiller completement..."
               wait 1 second
               set {jobs.chomeur.attente} to true
               add a random integer between 1 and 10 to {money.%player%}

on any move:
   if {jobs.chomeur.attente} is set:
       set {_jobs.chomeur.sleep} to difference between {jobs.chomeur.sleep} and now
       if {_jobs.chomeur.sleep} < 1 minute:
           if {jobs.chomeur.attente} is true:
               send "&f&lWOO! &fpas trop vite..."
               set {jobs.chomeur.attente} to false
           apply potion of slowness of tier 5 to the player for 1 minute
       else:
           delete {jobs.chomeur.attente}
           delete {jobs.chomeur.sleep}
           execute console command "effect %player% clear"

at 12:00:
   loop all players:
       loop {Jobs.%loop-player%::*}:
           if loop-value-2 is "Chomeur":
               add a random integer between 1 and 10 to {_money.day.%loop-player%}
               add {_money.day.%loop-player%} to {money.%loop-player%}
               send "{@title}C'est la paye du jour...          money: {@c}%{_money.day.%loop-player%}% ✪" to loop-player

           if loop-value-2 is "Mage":
               chance of 50%:
                   give a stick of fortune named " &8[{@c}&lSceptre&8]" with lore " ||&f&lBONUS:||&7xp aléatoire" to loop-player

on fishing:
   loop {Jobs.%player%::*}:
       if loop-value is "Pecheur":
           chance of 80%:
               add a random integer between 1 and 25 to {money.%player%}
           chance of 15%:
               add a random integer between 1 and 50 to {money.%player%}
           chance of 4%:
               add a random integer between 1 and 75 to {money.%player%}
           chance of 1%:
               chance of 50%:
                   drop a diamond
               add a random integer between 1 and 100 to {money.%player%}

on death:
   loop {Jobs.%player%::*}:
       if loop-value is "Chasseur":
           if victim is a cow, chicken, pig, sheep, squid, wolf, mooshroom, ocelot, iron golem, horse or bat:
               add a random integer between 5 and 10 to {money.%attacker%}
           if victim is a creeper, skeleton, spider, zombie, slime, ghast, zombie pigman, enderman, cave spider, ender crystal, silverfish, blaze, magma cube, witch or wither skeleton:
               add a random integer between 15 and 20 to {money.%attacker%}
   if victim is a ender dragon, giant or wither:
       add a random integer between 500 and 1000 to {money.%attacker%}

on enchant:
   loop {Jobs.%player%::*}:
       if loop-value is "Mage":
           if event-item is a iron sword, iron hoe, iron spade, iron pickaxe or iron axe:
               add a random integer between 5 and 10 to {money.%player%}
           if event-item is a iron helmet, iron chestplate, iron leggings or iron boots:
               add a random integer between 10 and 15 to {money.%player%}
           if event-item is a gold sword, gold hoe, gold spade, gold pickaxe or gold axe:
               add a random integer between 15 and 20 to {money.%player%}
           if event-item is a gold helmet, gold chestplate, gold leggings or gold boots:
               add a random integer between 20 and 25 to {money.%player%}
           if event-item is a diamond sword, diamond hoe, diamond spade, diamond pickaxe or diamond axe:
               add a random integer between 25 and 30 to {money.%player%}
           if event-item is a diamond helmet, diamond chestplate, diamond leggings or diamond boots:
               add a random integer between 30 and 35 to {money.%player%}

  • 0
Posté(e)

Fais ceci:

 

remplace

if event-block is a crops max, potato max, carrot max, pumpkin, melon, cactus or sugar cane:

par

if id of event-block is id or id or id or id or id or id

après regarde ligne 30 tu à une erreur tu à marquer if arg 3 :

×
×
  • 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.