Aller au contenu

Messages recommandés

Posté(e)

Titre du sujet : BotPvp

Sujet :

Version de minecraft / skript : 1.8.8

Description du script :

Bonjour, j'ai un skript de BotPvp et j'aimerai que l'ont puissent lancé la partie en fessant une commande (exemple: /join botpvp) mais je n'y arrive pas et il y a plusieurs erreurs et je ne mis connais pas trop en skript donc si vous pouvez m'aidé svp :x

Merci j’espère m'avoir bien expliquer :x

command /botsetup [<text>] [<text>]:
   trigger:
       if player has permission "bot.setup":
           if arg 1 is "setspawn":
               if arg 2 is "player":
                   set {botarena.spawn.player} to location of player
                   message "&7The &cplayer &7spawn of the bot arena has been set to &8:&c %{botarena.spawn.player}%" to player
               else if arg 2 is "bot":
                   set {botarena.spawn.bot} to location of player
                   message "&7The &cbot &7spawn of the bot arena has been set to &8:&c %{botarena.spawn.bot}%" to player
               else if arg 2 is "main":
                   set {botarena.spawn.main} to location of player
                   message "&7The &cmain &7spawn of the bot arena has been set to &8:&c %{botarena.spawn.main}%" to player

               else:
                   message "&8==========[&c&lPVP Bot&8]==========" to player
                   message "&7>&c/botsetup setspawn <bot/player/main>" to player
                   message "&7>&c/botsetup setsign" to player
                   message "&7>&c/botsetup difficulty <easy/normal/hard>" to player
                   message "&7>&c/botsetup join" to player
                   message "&8==========[&c&lPVP Bot&8]==========" to player
           else if arg 1 is "join":
               if arg 2 is not set:
                   if player's targeted block is wooden sword:
                   else:
                       message "&7This block is not a sign" to player
               else:
                   message "&7Wrong usage!" to player
           else if arg 1 is "difficulty":
               if arg 2 is "easy":
                   message "&7The bot arena &cdifficulty &7has been set to&8: &cEasy" to player
                   set {botarena.difficulty} to "Easy"
               else if arg 2 is "normal":
                   message "&7The bot arena &cdifficulty &7has been set to&8: &cNormal" to player
                   set {botarena.difficulty} to "normal"
               else if arg 2 is "hard":
                   message "&7The bot arena &cdifficulty &7has been set to&8: &cHard" to player
                   set {botarena.difficulty} to "hard"
               else:
                   message "&7Invaild entry" to player
           else if arg 1 is "reload":
               broadcast "&c&l%player%&7 is reloading the &c&lPVPBot &7plugin please wait a few second"
               make console execute command "/sk reload %script%"
               broadcast "&c&l%player%&7 has finished reloading sorry for the lag"
           else:
               message "&8==========[&c&lPVP Bot&8]==========" to player
               message "&7>&c/botsetup setspawn <bot/player/main>" to player
               message "&7>&c/botsetup setsign" to player
               message "&7>&c/botsetup reload" to player
               message "&7>&c/botsetup difficulty <easy/normal/hard>" to player
               message "&7>&c/botsetup join" to player
               message "&8==========[&c&lPVP Bot&8]==========" to player
       else:
           message "&7Nope :3" to player

on right click on a wooden sword:
       if {botarena.ingame} is not set:
               delete {botarena.player}
               set {botarena.ingame} to "ingame"
               make console execute command "/npc remove %{botarena.botid}%"
               delete {botarena.botid}
               heal the player
               set {botarena.player} to player
               create a citizen named "&c&lPVP Bot" at {botarena.spawn.bot}
               set {botarena.botid} to last created citizen id
               change citizen {botarena.botid} skin to "%player%"
               make console execute command "/npc select %{botarena.botid}%"
               make console execute command "/npc flyable false"
               teleport the player to {botarena.spawn.player}
               wait 1 tick              
               make citizen {botarena.botid} vulnerable
               set slot 1 of citizen {botarena.botid} to stone sword
               if {botarena.difficulty} is "Easy":
                   set {botarena.damage} to 0.6
               if {botarena.difficulty} is "Normal":
                   set {botarena.damage} to 0.4
               if {botarena.difficulty} is "Hard":
                   set {botarena.damage} to 0.2
               else:
                   set {botarena.damage} to 0.4
               clear player's inventory
               give 1 of diamond sword to the player  
               give 1 of diamond helmet to the player  
               give 1 of diamond chestplate to the player  
               give 1 of diamond leggings to the player  
               give 1 of diamond boots to the player  
               set player's gamemode to survival              
               set {_num} to 3
               set {botarena.soups} to 0
               loop 3 times:
                   teleport citizen {botarena.botid} to {botarena.spawn.bot}
                   teleport the player to {botarena.spawn.player}
                   message "&7Votre combat contre le bot va commencer dans&8: &c%{_num}%" to player
                   remove 1 from {_num}
                   wait 1 second
               message "&7Le combat commence" to player
               loop 1000 times:
                   set {_block} to location of player
                   subtract 1 from y-coord of {_block}
                   if block at {_block} is not air:
                       move citizen {botarena.botid} to location of {botarena.player} at speed 1.5
                   if distance between {botarena.player} and citizen {botarena.botid} is smaller than 4:
                       make citizen {botarena.botid} look at location of {botarena.player}
                       make citizen {botarena.botid} attack {botarena.player}  
                   wait 10 ticks
           else:
               message "&7Ce bot PVP est utilisé par&8: &c%{botarena.player}%" to the player

on hunger meter change:
   if {botarena.player} is player:
       cancel event
on click with mushroom stew:
   if {botarena.player} is player:
       if health of player is less than 10:
           play raw sound "random.burp" at player with pitch 2 volume 0.5
           cancel event
           heal the player by 3 hearts
           set tool to bowl

on damage:
   if attacker's name is "&c&lPVP Bot":
       if {botarena.player} is not attacker:
           set damage to 2.0
   if victim's name is "&c&lPVP Bot":
       set damage to {botarena.damage}
       if {botarena.difficulty} is "Easy":  
           chance of 20%:
               wait 4 ticks
               set slot 0 of citizen {botarena.botid} to stone sword
       if {botarena.difficulty} is "Normal":  
           chance of 45%:
               wait 4 ticks
               set slot 0 of citizen {botarena.botid} to stone sword
       if {botarena.difficulty} is "Hard":  
           chance of 75%:
               wait 4 ticks
               set slot 0 of citizen {botarena.botid} to stone sword
       else:  
           chance of 20%:
               wait 4 ticks
               set slot 0 of citizen {botarena.botid} to stone sword
       push the victim downwards at speed 1.0
       push the victim backwards at speed 0.2

on death:
   if {botarena.player} is attacker:
       delete {botarena.ingame}
       delete {botarena.player}
       set death message to ""
       clear attacker's inventory
       wait 1 tick
       execute console command "npc select %{botarena.botid}%"
       execute console command "npc remove"
       loop all entities in radius 30 of victim:
           if loop-entity is item:
               clear loop-entity
       wait 1 tick
       set attacker's gamemode to survival
       teleport attacker to {botarena.spawn.main}
       wait 1 tick
       loop 3 times:
           wait 5 ticks
           shoot a firework from the attacker at speed 0.0      
       heal the attacker
       broadcast "&c&l%attacker%&7 a gagné le combat contre son &c&lBot PvP"
       delete {botarena.player}
on death:
   if {botarena.player} is victim:
       delete {botarena.ingame}
       delete {botarena.player}
       set {_health} to health of citizen {botarena.botid}
       message "&8================" to player
       message "&7>&c&lVie du Bot&8: &4&l❤ %{_health}%" to player
       message "&8================" to player
       execute console command "npc select %{botarena.botid}%"
       execute console command "npc remove"

on respawn:
   clear player's inventory
   wait 1 tick
   teleport player to {botarena.spawn.main}

on quit:
   if {botarena.player} is player:
       execute console command "npc select %{botarena.botid}%"
       execute console command "npc remove"
       delete {botarena.player}
       delete {botarena.bot}
       delete {botarena.ingame}
on drop:
   if {botarena.player} is player:
       wait 25 ticks
       spawn 25 of particle smoke offset by 0.5, 0.5, 0.5 at event-entity's location
       clear event-entity
on break:
   if {botarena.player} is player:
       cancel event
on command:
   if {botarena.player} is player:
       cancel event
       message "&7Vous ne pouvez pas utiliser cette commande en partie" to player
on skript load:
   execute console command "npc select %{botarena.botid}%"
   execute console command "npc remove"
   teleport {botarena.player} to {botarena.spawn.main}
   clear {botarena.player}'s inventory
   delete {botarena.player}
   delete {botarena.bot}
   delete {botarena.ingame}


[/i]
×
×
  • 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.