xMateuszP0L

mChatP0L

Jan 6th, 2016
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Kopanie
  2. on mine:
  3.     set {_block} to single value "config.block" get of "plugins/Skript/scripts/mChatP0L/config.yml" parsed as number
  4.     id of block is {_block}:
  5.         set {_chat} to value "chat" get of "plugins/Skript/scripts/mChatP0L/players/%player%.yml" parsed as text
  6.         if {_chat} is "false":
  7.             set {_kop-stone} to value "stone" get of "plugins/Skript/scripts/mChatP0L/players/%player%.yml" parsed as number
  8.             set {_amount} to single value "config.amount" get of "plugins/Skript/scripts/mChatP0L/config.yml" parsed as number
  9.             add 1 to {_kop-stone}
  10.             set "stone" to "%{_kop-stone}%" in yaml file "plugins/Skript/scripts/mChatP0L/players/%player%.yml"
  11.             if {_kop-stone} is equal to {_amount}:
  12.                 set {_line} to value "message.line" get of "plugins/Skript/scripts/mChatP0L/config.yml" parsed as text
  13.                 set {_chat-unlock} to value "message.chat-unlock" get of "plugins/Skript/scripts/mChatP0L/config.yml" parsed as text
  14.                 send "%colored {_line}%"
  15.                 send "%colored {_chat-unlock}%"
  16.                 send "%colored {_line}%"
  17.                 set "chat" to "true" in yaml file "plugins/Skript/scripts/mChatP0L/players/%player%.yml"
  18. # Komenda
  19. command wykopane:
  20.     trigger:
  21.         executor is player:
  22.             set {_line} to value "message.line" get of "plugins/Skript/scripts/mChatP0L/config.yml" parsed as text
  23.             set {_cmd} to value "message.cmd" get of "plugins/Skript/scripts/mChatP0L/config.yml" parsed as text
  24.             set {_amount} to single value "config.amount" get of "plugins/Skript/scripts/mChatP0L/config.yml" parsed as number
  25.             set {_kop-stone} to value "stone" get of "plugins/Skript/scripts/mChatP0L/players/%player%.yml" parsed as number
  26.             set {_block-name} to value "config.block-name" get of "plugins/Skript/scripts/mChatP0L/config.yml" parsed as text
  27.             send "%colored {_line}%"
  28.             replace all "{AMOUNT}" with "%{_amount}%" in {_cmd}
  29.             replace all "{P-AMOUNT}" with "%{_kop-stone}%" in {_cmd}
  30.             replace all "{BLOCK-NAME}" with "%{_block-name}%" in {_cmd}
  31.             send "%colored {_cmd}%"
  32.             send "%colored {_line}%"
  33. # Chat
  34. on chat:
  35.     set {_chat} to value "chat" get of "plugins/Skript/scripts/mChatP0L/players/%player%.yml" parsed as text
  36.     if {_chat} is "false":
  37.         set {_line} to value "message.line" get of "plugins/Skript/scripts/mChatP0L/config.yml" parsed as text
  38.         set {_chat} to value "message.chat" get of "plugins/Skript/scripts/mChatP0L/config.yml" parsed as text
  39.         set {_amount} to single value "config.amount" get of "plugins/Skript/scripts/mChatP0L/config.yml" parsed as number
  40.         set {_kop-stone} to value "stone" get of "plugins/Skript/scripts/mChatP0L/players/%player%.yml" parsed as number
  41.         set {_block-name} to value "config.block-name" get of "plugins/Skript/scripts/mChatP0L/config.yml" parsed as text
  42.         send "%colored {_line}%"
  43.         replace all "{AMOUNT}" with "%{_amount}%" in {_chat}
  44.         replace all "{P-AMOUNT}" with "%{_kop-stone}%" in {_chat}
  45.         replace all "{BLOCK-NAME}" with "%{_block-name}%" in {_chat}
  46.         send "%colored {_chat}%"
  47.         send "%colored {_line}%"
  48.         cancel event
  49. # Foldery i pliki
  50. on script load:
  51.     if file "plugins/Skript/scripts/mChatP0L/config.yml" doesn't exists:
  52.         create file "plugins/Skript/scripts/mChatP0L/config.yml"
  53.         download from "http://pastebin.com/raw/RJbHLSyB" to "plugins/Skript/scripts/mChatP0L/config.yml"
  54.     if folder "plugins/Skript/scripts/mChatP0L/players" doesn't exists:
  55.         create folder "plugins/Skript/scripts/mChatP0L/players"
  56.         loop all players:
  57.             kick loop-player due to "Wejdz ponownie na serwer!"
  58. on join:
  59.     if file "plugins/Skript/scripts/mChatP0L/players/%player%.yml" doesn't exists:
  60.         create file "plugins/Skript/scripts/mChatP0L/players/%player%.yml"
  61.         set "stone" to "0" in yaml file "plugins/Skript/scripts/mChatP0L/players/%player%.yml"
  62.         set "chat" to "false" in yaml file "plugins/Skript/scripts/mChatP0L/players/%player%.yml"
  63.     set {_chat} to value "chat" get of "plugins/Skript/scripts/mChatP0L/players/%player%.yml" parsed as text
  64.     if {_chat} is "false":
  65.         set {_line} to value "message.line" get of "plugins/Skript/scripts/mChatP0L/config.yml" parsed as text
  66.         set {_join} to value "message.join" get of "plugins/Skript/scripts/mChatP0L/config.yml" parsed as text
  67.         set {_amount} to single value "config.amount" get of "plugins/Skript/scripts/mChatP0L/config.yml" parsed as number
  68.         set {_block-name} to value "config.block-name" get of "plugins/Skript/scripts/mChatP0L/config.yml" parsed as text
  69.         replace all "{AMOUNT}" with "%{_amount}%" in {_join}
  70.         replace all "{BLOCK-NAME}" with "%{_block-name}%" in {_join}
  71.         send "%colored {_line}%" to player
  72.         send "%colored {_join}%" to player
  73.         send "%colored {_line}%" to player
Advertisement
Add Comment
Please, Sign In to add comment