ProfesseurCraft

Donjon skript

Mar 18th, 2014
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. variables:
  2. {pcm.Mobs} = "zombie,skeleton,zombie pigman"
  3.  
  4. #--------- Détection des actions courantes nécessaire au script ---------
  5. on region enter:
  6. #set {pcm.currentRegion} to region
  7.  
  8. on chat:
  9. clear {pcm.currentChat}
  10. if {pcm.addDungeon.chat} is true:
  11. if message is "oui":
  12. set {pcm.currentChat} to "oui"
  13. else if message is "non":
  14. set {pcm.currentChat} to "non"
  15. set {pcm.response} to true
  16. set {pcm.addDungeon.chat} to false
  17.  
  18. #----------------------------------- / -----------------------------------
  19.  
  20. command /dj help:
  21. trigger:
  22. message "<yellow>-------- Commandes principales --------"
  23. message "<yellow>/addDungeon"
  24. message "<yellow>/addMob"
  25.  
  26. command /addDungeon:
  27. trigger:
  28. if {pcm.currentRegion} isn't empty:
  29. set {pcm.addDungeon.chat} to true
  30. message "<cyan>La région actuelle est %{pcm.currentRegion}%"
  31. message "<yellow>Souhaitez vous lier cette region à votre donjon ? (oui ou non)"
  32. set {_timer} to 0
  33. set {pcm.response} to false
  34. while {pcm.response} is false:
  35. wait 3 seconds
  36. add 1 to {_timer}
  37. if {_timer} is larger than 3:
  38. message "<pink>Aucun réponse, annulation de la commande..."
  39. stop trigger
  40. if {pcm.currentChat} contain "oui":
  41. set {pcm.region::*} to {pcm.currentRegion}
  42. message "<light green> Votre donjon à bien été ajouté"
  43. stop trigger
  44. else if {pcm.currentChat} contain "non":
  45. message "<yellow>Placer-vous dans une autre région et répéter la commande /addDungeon"
  46. stop trigger
  47.  
  48. else:
  49. message "<pink>Veuillez vous placer dans une region"
  50.  
  51. command /addMobs:
  52. trigger:
  53. set {pcm.listMobs::*} to {Mobs} split at ","
  54. message "<yellow>-------- Mobs disponibles --------"
  55. loop {pcm.listMobs::*}:
  56. message "<yellow>%loop-index% : %loop-value%"
Advertisement
Add Comment
Please, Sign In to add comment