Advertisement
Mk83

Untitled

Mar 14th, 2019
483
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. options:
  2.     npc: &6[NPC]&e
  3.     npcmd: "citizens:citizens" or "citizens:citizens2" or "citizens:npc2" or "citizens:sc" or "citizens:script" or "citizens:template" or "citizens:tpl" or "citizens:tr" or "citizens:trait" or "citizens:traitc" or "citizens:trc" or "citizens:waypoint" or "citizens:waypoints" or "citizens:wp" or "wp" or "waypoints" or "waypoint" or "trc" or "traitc" or "trait" or "tr" or "tpl" or "template" or "sc" or "script" or "citizens" or "citizens2" or "npc" or "npc2"
  4.  
  5. on command:
  6.     if command is {@npcmd}:
  7.         send "&cCommande désactivé"
  8.         send "&6/sknpc"
  9.         cancel event
  10. command /sknpc [<text>] [<text>] [<offlineplayer>]:
  11.     permission: npc.all
  12.     permission message: Vous n'avez pas la permission de faire cette command
  13.     trigger:
  14.         if arg 1 is "add" or "spawn" or "summon" or "create":
  15.             if arg 2 is set:
  16.                 if arg 3 is set:
  17.                     if {npc.point} is set:
  18.                         if {npc.cout.%player%} is not set:
  19.                             set {npc.cout.%player%} to 0
  20.                         add 1 to {npc.cout.%player%}
  21.                         create a citizen named "%arg 2%" at {npc.point}
  22.                         set {npc.create.%player%.%{npc.cout.%player%}%.id} to last created citizen id
  23.                         set {npc.create.%player%.%{npc.cout.%player%}%.name} to arg 2
  24.                         wait 2 ticks
  25.                         change citizen {npc.create.%player%.%{npc.cout.%player%}%.id} skin to "%arg 3%"
  26.                         send "{@npc} Vous vennez de crée un npc en %{npc.point}%"
  27.                         send "&6[NPC]&7 Id : %{npc.create.%player%.%{npc.cout.%player%}%.id}%"
  28.                         send "&6[NPC]&7 Nom : %{npc.create.%player%.%{npc.cout.%player%}%.name}%"
  29.                     else:
  30.                         send "&6[NPC]&c Vous n'avez pas définit de point d'apparition !"
  31.                         send "&6[NPC]&c -  /sknpc setpoint&7 (le point sera définit à votre position)"
  32.                         stop
  33.                 else:
  34.                     make player execute command "/sknpc %arg 1% %arg 2% %arg 2%"
  35.             else:
  36.                 send "&6[NPC]&c Vous devez donné un nom a votre NPC !"
  37.         if arg 1 is "setpos" or "setpoint" or "spawnnpc":
  38.             set {npc.point} to player's location
  39.             send "{@npc} Vous vennez de définir le point de spawn de npc en %player's location%"
  40.         if arg 1 is "list" or "liste":
  41.             if arg 2 is set:
  42.                 if {npc.cout.%arg 2%} exists:
  43.                     send "{@npc} Liste des npc de %arg 2%"
  44.                     set {_nb} to 1
  45.                     if citizen {npc.cout.%arg 2%} exists:
  46.                         loop {npc.cout.%arg 2%} times:
  47.                             send "&6Npc%{_nb}%: &eId : %{npc.create.%arg 2%.%{_nb}%.id}%"
  48.                             send "&6Npc%{_nb}%: &eNom : %{npc.create.%arg 2%.%{_nb}%.name}%"
  49.                             send "&6Npc%{_nb}% ---- Fin"
  50.                             add 1 to {_nb}
  51.                             stop
  52.                     else:
  53.                         delete {npc.create.%arg 2%.%{_nb}%.id}
  54.                         delete {npc.create.%arg 2%.%{_nb}%.name}
  55.                         remove 1 from {npc.cout.%arg 2%}
  56.                 else:
  57.                     send "{@npc} &c%arg 2% n'a jamais créé de NPC"
  58.             else:
  59.                 loop all offline players:
  60.                     if {npc.cout.%loop-value-1%} is set:
  61.                         send "{@npc} Liste des npc de %loop-value%"
  62.                         set {_nb} to 1
  63.                         loop {npc.cout.%loop-value-1%} times:
  64.                             if citizen {npc.create.%loop-value-1%.%{_nb}%.id} exists:
  65.                                 send "&6Npc%{_nb}%: &eId : %{npc.create.%loop-value-1%.%{_nb}%.id}%"
  66.                                 send "&6Npc%{_nb}%: &eNom : %{npc.create.%loop-value-1%.%{_nb}%.name}%"
  67.                                 send "&6Npc%{_nb}% ---- Fin"
  68.                                 add 1 to {_nb}
  69.                                 stop
  70.                             else:
  71.                                 delete {npc.create.%loop-value-1%.%{_nb}%.id}
  72.                                 delete {npc.create.%loop-value-1%.%{_nb}%.name}
  73.                                 remove 1 from {npc.cout.%loop-value-1%}
  74.         if arg 1 is "remove" or "supp" or "rem" or "supprimer":
  75.             if {npc.count.%player%} is set:
  76.                 stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement