Advertisement
Guest User

Specinfo

a guest
Apr 10th, 2014
1,725
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.83 KB | None | 0 0
  1. options:
  2. Prefix: §f[§7SpecInfo§f]§r
  3. Prefix.Short: §f[§9S§f]§r
  4.  
  5. PermissionDeny: No permission!
  6.  
  7. Gold: §7%player%§r:§6GOLD §r[V:§6%{_Count}%§r] [T:§6%({SpecInfo.Mined.Gold::%player%})%§r]
  8. Diamond: §7%player%§r:§3DIAMOND §r[V:§3%{_Count}%§r] [T:§3%({SpecInfo.Mined.Diamond::%player%})%§r]
  9.  
  10. PvP.Bow: §4PvP§r:§a%attacker%§r-B>§c%victim% §r[§a%health of attacker%§r:§c%health of victim%§r] [§6%{_Damage}%§r]
  11. PvP.Melee: §4PvP§r:§a%attacker%§r-M>§c%victim% §r[§a%health of attacker%§r:§c%health of victim%§r] [§6%{_Damage}%§r]
  12. PvP.ProjectileUnknown: §4PvP§r:§a%attacker%§r-?P>§c%victim% §r[§a%health of attacker%§r:§c%health of victim%§r] [§6%{_Damage}%§r]
  13. PvP.Unknown: §4PvP§r:§a%attacker%§r-?>§c%victim% §r[§a%health of attacker%§r:§c%health of victim%§r] [§6%{_Damage}%§r]
  14.  
  15. PvE.NS.Fall: §5PvE§r:§c%victim%§r<-§dFall §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  16. PvE.NS.Lava: §5PvE§r:§c%victim%§r<-§dLava §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  17. PvE.NS.Fire: §5PvE§r:§c%victim%§r<-§dFire §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  18. PvE.NS.Burning: §5PvE§r:§c%victim%§r<-§dBurn §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  19. PvE.NS.Drowning: §5PvE§r:§c%victim%§r<-§dDrown §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  20. PvE.NS.Poison: §5PvE§r:§c%victim%§r<-§dPoison §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  21. PvE.NS.Wither: §5PvE§r:§c%victim%§r<-§dWither §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  22. PvE.NS.Starvation: §5PvE§r:§c%victim%§r<-§dStarv. §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  23. PvE.NS.Suffocation: §5PvE§r:§c%victim%§r<-§dSuffoc. §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  24. PvE.NS.Anvil: §5PvE§r:§c%victim%§r<-§dAnvil §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  25. PvE.NS: §5PvE§r:§c%victim%§r<-§d??? §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  26.  
  27. PvE.Zombie: §5PvE§r:§c%victim%§r<-§dZombie §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  28. PvE.Skeleton: §5PvE§r:§c%victim%§r<-§dSkeleton §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  29. PvE.Spider: §5PvE§r:§c%victim%§r<-§dSpider §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  30. PvE.Creeper: §5PvE§r:§c%victim%§r<-§dCreeper §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  31. PvE.Enderman: §5PvE§r:§c%victim%§r<-§dEnderman §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  32. PvE.Silverfish: §5PvE§r:§c%victim%§r<-§dSilverfish §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  33. PvE.Slime: §5PvE§r:§c%victim%§r<-§dSlime §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  34. PvE.Witch: §5PvE§r:§c%victim%§r<-§dWitch §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  35. PvE.Ghast: §5PvE§r:§c%victim%§r<-§dGhast §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  36. PvE.Blaze: §5PvE§r:§c%victim%§r<-§dBlaze §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  37. PvE.MCube: §5PvE§r:§c%victim%§r<-§dMCube §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  38. PvE.Pigman: §5PvE§r:§c%victim%§r<-§dPigman §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  39.  
  40. PvE: §5PvE§r:§c%victim%§r<-§d?%attacker% §r[§c%health of victim%§r] [§6%{_Damage}%§r]
  41.  
  42. ConsoleDeny: You cannot execute this as the console!
  43.  
  44. On.Already: Your §6SpecInfo §ris already §aon§r!
  45. On.ToSender: Your §6SpecInfo §ris now §aon§r!
  46. On.Notify: §c%command sender% §aenabled §rhis §6SpecInfo§r!
  47.  
  48. Off.Already: Your §6SpecInfo §ris already §coff§r!
  49. Off.ToSender: Your §6SpecInfo §ris now §coff§r!
  50. Off.Notify: §c%command sender% §cdisabled §rhis §6SpecInfo§r!
  51.  
  52. Reset.ToSender: You reset the §6SpecInfo§r!
  53. Reset.Notify: §c%command sender% §rreset the §6SpecInfo§r!
  54.  
  55. Help.Help: §e/specinfo help §9- §7This help page
  56. Help.On: §e/specinfo on §9- §7Turn your SpecInfo on
  57. Help.Off: §e/specinfo off §9- §7Turn your SpecInfo off
  58. Help.Reset: §e/specinfo reset §9- §7Reset the SpecInfo
  59.  
  60. # variables
  61.  
  62. # {SpecInfo.Mined.Gold::%player%} - integer
  63. # {SpecInfo.Mined.Diamond::%player%} - integer
  64. # {SpecInfo.TrackedBlock::%x%x%y%x%z%} - true/null
  65. # {SpecInfo.LastDamage::%player%} - system time
  66. # {SpecInfo.Enabled::%player%} - player has specinfo on
  67.  
  68.  
  69. command /specinfo [<text>]:
  70. description: Specinfo command
  71. trigger:
  72. if arg 1 is not set:
  73. command sender command "/specinfo help"
  74.  
  75. else if arg 1 is equal to "help":
  76. if command sender does not have the permission "skript.specinfo.help":
  77. message "{@PermissionDeny}"
  78. else:
  79. message "{@Help.Help}"
  80. message "{@Help.On}"
  81. message "{@Help.Off}"
  82. message "{@Help.Reset}"
  83.  
  84. else if arg 1 is equal to "on":
  85. #code for on
  86. if command sender does not have the permission "skript.specinfo.on":
  87. message "{@PermissionDeny}"
  88. else if command sender is console:
  89. message "{@ConsoleDeny}"
  90. else if {SpecInfo.Enabled::%player%} is true:
  91. message "{@Prefix} {@On.Already}"
  92. else:
  93. set {SpecInfo.Enabled::%player%} to true
  94. message "{@Prefix} {@On.ToSender}"
  95. loop all players:
  96. loop-player has the permission "skript.specinfo.notify"
  97. loop-player is not command sender
  98. message "{@Prefix} {@On.Notify}" to loop-player
  99.  
  100. else if arg 1 is equal to "off":
  101. #code for off
  102. if command sender does not have the permission "skript.specinfo.off":
  103. message "{@PermissionDeny}"
  104. else if command sender is console:
  105. message "{@ConsoleDeny}"
  106. else if {SpecInfo.Enabled::%player%} is not set:
  107. message "{@Prefix} {@Off.Already}"
  108. else:
  109. delete {SpecInfo.Enabled::%player%}
  110. message "{@Prefix} {@Off.ToSender}"
  111. loop all players:
  112. loop-player has the permission "skript.specinfo.notify"
  113. loop-player is not command sender
  114. message "{@Prefix} {@Off.Notify}" to loop-player
  115.  
  116.  
  117. else if arg 1 is equal to "reset":
  118. #code for reset
  119. if command sender does not have the permission "skript.specinfo.reset":
  120. message "{@PermissionDeny}"
  121. else:
  122. delete {SpecInfo.Mined.Gold::*}
  123. delete {SpecInfo.Mined.Diamond::*}
  124. delete {SpecInfo.TrackedBlock::*}
  125. delete {SpecInfo.LastDamage::*}
  126. delete {SpecInfo.Enabled::*}
  127. message "{@Prefix} {@Reset.ToSender}"
  128. loop all players:
  129. loop-player has the permission "skript.specinfo.notify"
  130. loop-player is not command sender
  131. message "{@Prefix} {@Reset.Notify}" to loop-player
  132.  
  133. else:
  134. command sender command "/specinfo help"
  135.  
  136.  
  137.  
  138. on mine of gold ore:
  139. {SpecInfo.TrackedBlock::%x-coordinate of event-block%x%y-coordinate of event-block%x%z-coordinate of event-block%} is not set
  140. set {_Count} to 0
  141. loop blocks in radius 2 around event-block:
  142. loop-block is equal to gold ore
  143. increase {_Count} by 1
  144. set {SpecInfo.TrackedBlock::%x-coordinate of loop-block%x%y-coordinate of loop-block%x%z-coordinate of loop-block%} to true
  145. if {SpecInfo.Mined.Gold::%player%} is not set:
  146. set {SpecInfo.Mined.Gold::%player%} to {_Count}
  147. else:
  148. increase {SpecInfo.Mined.Gold::%player%} by {_Count}
  149. loop all players:
  150. {SpecInfo.Enabled::%loop-player%} is true
  151. message "{@Prefix.Short} {@Gold}" to loop-player
  152.  
  153. on mine of diamond ore:
  154. {SpecInfo.TrackedBlock::%x-coordinate of event-block%x%y-coordinate of event-block%x%z-coordinate of event-block%} is not set
  155. set {_Count} to 0
  156. loop blocks in radius 2 around event-block:
  157. loop-block is equal to diamond ore
  158. increase {_Count} by 1
  159. set {SpecInfo.TrackedBlock::%x-coordinate of loop-block%x%y-coordinate of loop-block%x%z-coordinate of loop-block%} to true
  160. if {SpecInfo.Mined.Diamond::%player%} is not set:
  161. set {SpecInfo.Mined.Diamond::%player%} to {_Count}
  162. else:
  163. increase {SpecInfo.Mined.Diamond::%player%} by {_Count}
  164. loop all players:
  165. {SpecInfo.Enabled::%loop-player%} is true
  166. message "{@Prefix.Short} {@Diamond}" to loop-player
  167.  
  168.  
  169. on damage of player:
  170. victim's gamemode is not creative
  171.  
  172. if {SpecInfo.LastDamage::%victim%} is set:
  173. if {SpecInfo.LastDamage::%victim%} was less than 0.15 seconds ago:
  174. stop
  175.  
  176. set {SpecInfo.LastDamage::%victim%} to now
  177. set {_Damage} to (health of victim)
  178. wait 1 tick
  179. set {_Damage} to {_Damage}-(health of victim)
  180. if {_Damage} is equal to 0:
  181. stop
  182.  
  183.  
  184. if attacker is a player:
  185. if damage was caused by projectile:
  186. if projectile is an arrow:
  187. loop all players:
  188. {SpecInfo.Enabled::%loop-player%} is true
  189. message "{@Prefix.Short} {@PvP.Bow}" to loop-player
  190. else:
  191. loop all players:
  192. {SpecInfo.Enabled::%loop-player%} is true
  193. message "{@Prefix.Short} {@PvP.ProjectileUnknown}" to loop-player
  194. else:
  195. if damage was caused by attack:
  196. loop all players:
  197. {SpecInfo.Enabled::%loop-player%} is true
  198. message "{@Prefix.Short} {@PvP.Melee}" to loop-player
  199. else:
  200. loop all players:
  201. {SpecInfo.Enabled::%loop-player%} is true
  202. message "{@Prefix.Short} {@PvP.Unknown}" to loop-player
  203.  
  204.  
  205. else if attacker is not set:
  206. if damage was caused by fall:
  207. loop all players:
  208. {SpecInfo.Enabled::%loop-player%} is true
  209. message "{@Prefix.Short} {@PvE.NS.Fall}" to loop-player
  210. else if damage was caused by lava:
  211. loop all players:
  212. {SpecInfo.Enabled::%loop-player%} is true
  213. message "{@Prefix.Short} {@PvE.NS.Lava}" to loop-player
  214. else if damage was caused by fire:
  215. loop all players:
  216. {SpecInfo.Enabled::%loop-player%} is true
  217. message "{@Prefix.Short} {@PvE.NS.Fire}" to loop-player
  218. else if damage was caused by burning:
  219. loop all players:
  220. {SpecInfo.Enabled::%loop-player%} is true
  221. message "{@Prefix.Short} {@PvE.NS.Burning}" to loop-player
  222. else if damage was caused by drowning:
  223. loop all players:
  224. {SpecInfo.Enabled::%loop-player%} is true
  225. message "{@Prefix.Short} {@PvE.NS.Drowning}" to loop-player
  226. else if damage was caused by poison:
  227. loop all players:
  228. {SpecInfo.Enabled::%loop-player%} is true
  229. message "{@Prefix.Short} {@PvE.NS.Poison}" to loop-player
  230. else if damage was caused by wither:
  231. loop all players:
  232. {SpecInfo.Enabled::%loop-player%} is true
  233. message "{@Prefix.Short} {@PvE.NS.Wither}" to loop-player
  234. else if damage was caused by starvation:
  235. loop all players:
  236. {SpecInfo.Enabled::%loop-player%} is true
  237. message "{@Prefix.Short} {@PvE.NS.Starvation}" to loop-player
  238. else if damage was caused by suffocation:
  239. loop all players:
  240. {SpecInfo.Enabled::%loop-player%} is true
  241. message "{@Prefix.Short} {@PvE.NS.Suffocation}" to loop-player
  242. else if damage was caused by falling block:
  243. loop all players:
  244. {SpecInfo.Enabled::%loop-player%} is true
  245. message "{@Prefix.Short} {@PvE.NS.Anvil}" to loop-player
  246. else:
  247. loop all players:
  248. {SpecInfo.Enabled::%loop-player%} is true
  249. message "{@Prefix.Short} {@PvE.NS}" to loop-player
  250.  
  251. else:
  252. if attacker is a zombie:
  253. loop all players:
  254. {SpecInfo.Enabled::%loop-player%} is true
  255. message "{@Prefix.Short} {@PvE.Zombie}" to loop-player
  256. else if attacker is a skeleton:
  257. loop all players:
  258. {SpecInfo.Enabled::%loop-player%} is true
  259. message "{@Prefix.Short} {@PvE.Skeleton}" to loop-player
  260. else if attacker is a spider:
  261. loop all players:
  262. {SpecInfo.Enabled::%loop-player%} is true
  263. message "{@Prefix.Short} {@PvE.Spider}" to loop-player
  264. else if attacker is a creeper:
  265. loop all players:
  266. {SpecInfo.Enabled::%loop-player%} is true
  267. message "{@Prefix.Short} {@PvE.Creeper}" to loop-player
  268. else if attacker is a enderman:
  269. loop all players:
  270. {SpecInfo.Enabled::%loop-player%} is true
  271. message "{@Prefix.Short} {@PvE.Enderman}" to loop-player
  272. else if attacker is a silverfish:
  273. loop all players:
  274. {SpecInfo.Enabled::%loop-player%} is true
  275. message "{@Prefix.Short} {@PvE.Silverfish}" to loop-player
  276. else if attacker is a slime:
  277. loop all players:
  278. {SpecInfo.Enabled::%loop-player%} is true
  279. message "{@Prefix.Short} {@PvE.Slime}" to loop-player
  280. else if attacker is a witch:
  281. loop all players:
  282. {SpecInfo.Enabled::%loop-player%} is true
  283. message "{@Prefix.Short} {@PvE.Witch}" to loop-player
  284. else if attacker is a ghast:
  285. loop all players:
  286. {SpecInfo.Enabled::%loop-player%} is true
  287. message "{@Prefix.Short} {@PvE.Ghast}" to loop-player
  288. else if attacker is a blaze:
  289. loop all players:
  290. {SpecInfo.Enabled::%loop-player%} is true
  291. message "{@Prefix.Short} {@PvE.Blaze}" to loop-player
  292. else if attacker is a magma cube:
  293. loop all players:
  294. {SpecInfo.Enabled::%loop-player%} is true
  295. message "{@Prefix.Short} {@PvE.MCube}" to loop-player
  296. else if attacker is a zombie pigman:
  297. loop all players:
  298. {SpecInfo.Enabled::%loop-player%} is true
  299. message "{@Prefix.Short} {@PvE.Pigman}" to loop-player
  300. else:
  301. loop all players:
  302. {SpecInfo.Enabled::%loop-player%} is true
  303. message "{@Prefix.Short} {@PvE}" to loop-player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement