Guest User

Specinfo remastered

a guest
Jul 23rd, 2015
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.52 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. Craft.GoldenApple: &2Craft&r: &a%player%&r<->&6Golden Apple
  43. Craft.GoldenHead: &2Craft&r: &a%player%&r<->&5Golden Head
  44. Craft.NotchApple: &2Craft&r: &a%player%&r<->&6&lUBER APPLE
  45. Craft.EnchantTable: &2Craft&r: &a%player%&r<->&dEnchanting Table
  46. Craft.Anvil: &2Craft&r: &a%player%&r<->&7Anvil
  47. Craft.Diamond.Helmet: &2Craft&r: &a%player%&r<->&bDia. Helmet
  48. Craft.Diamond.Chest: &2Craft&r: &a%player%&r<->&bDia. Chest
  49. Craft.Diamond.Leggings: &2Craft&r: &a%player%&r<->&bDia. Leggings
  50. Craft.Diamond.Boots: &2Craft&r: &a%player%&r<->&bDia. Boots
  51.  
  52. Heal.Apple: &aHeal: &6%player%&r<->&6Golden Apple
  53. Heal.Head: &aHeal: &6%player%&r<->&5Golden Head
  54.  
  55. Portal: &dPortal:&r&6%player% &rfrom &a%{_from}% &rto &c%world of player%
  56.  
  57. ConsoleDeny: You cannot execute this as the console!
  58.  
  59. On.Already: Your &6SpecInfo &ris already &aon&r!
  60. On.ToSender: Your &6SpecInfo &ris now &aon&r!
  61. On.Notify: &c%command sender% &aenabled &rhis &6SpecInfo&r!
  62.  
  63. Off.Already: Your &6SpecInfo &ris already &coff&r!
  64. Off.ToSender: Your &6SpecInfo &ris now &coff&r!
  65. Off.Notify: &c%command sender% &cdisabled &rhis &6SpecInfo&r!
  66.  
  67. Reset.ToSender: You reset the &6SpecInfo&r!
  68. Reset.Notify: &c%command sender% &rreset the &6SpecInfo&r!
  69.  
  70. Help.Help: &e/specinfo help &9- &7This help page
  71. Help.On: &e/specinfo on &9- &7Turn your SpecInfo on
  72. Help.Off: &e/specinfo off &9- &7Turn your SpecInfo off
  73. Help.Reset: &e/specinfo reset &9- &7Reset the SpecInfo
  74.  
  75. # variables
  76.  
  77. # {SpecInfo.Mined.Gold::%player%} - integer
  78. # {SpecInfo.Mined.Diamond::%player%} - integer
  79. # {SpecInfo.TrackedBlock::%x%x%y%x%z%} - true/null
  80. # {SpecInfo.LastDamage::%player%} - system time
  81. # {SpecInfo.Enabled::%player%} - player has specinfo on
  82.  
  83.  
  84. command /specinfo [<text>]:
  85. description: Specinfo command
  86. trigger:
  87. if arg 1 is not set:
  88. command sender command "/specinfo help"
  89.  
  90. else if arg 1 is equal to "help":
  91. if command sender does not have the permission "skript.specinfo.help":
  92. message "{@PermissionDeny}"
  93. else:
  94. message "{@Help.Help}"
  95. message "{@Help.On}"
  96. message "{@Help.Off}"
  97. message "{@Help.Reset}"
  98.  
  99. else if arg 1 is equal to "on":
  100. #code for on
  101. if command sender does not have the permission "skript.specinfo.on":
  102. message "{@PermissionDeny}"
  103. else if command sender is console:
  104. message "{@ConsoleDeny}"
  105. else if {SpecInfo.Enabled::%player%} is true:
  106. message "{@Prefix} {@On.Already}"
  107. else:
  108. set {SpecInfo.Enabled::%player%} to true
  109. message "{@Prefix} {@On.ToSender}"
  110. loop all players:
  111. loop-player has the permission "skript.specinfo.notify"
  112. loop-player is not command sender
  113. message "{@Prefix} {@On.Notify}" to loop-player
  114.  
  115. else if arg 1 is equal to "off":
  116. #code for off
  117. if command sender does not have the permission "skript.specinfo.off":
  118. message "{@PermissionDeny}"
  119. else if command sender is console:
  120. message "{@ConsoleDeny}"
  121. else if {SpecInfo.Enabled::%player%} is not set:
  122. message "{@Prefix} {@Off.Already}"
  123. else:
  124. delete {SpecInfo.Enabled::%player%}
  125. message "{@Prefix} {@Off.ToSender}"
  126. loop all players:
  127. loop-player has the permission "skript.specinfo.notify"
  128. loop-player is not command sender
  129. message "{@Prefix} {@Off.Notify}" to loop-player
  130.  
  131.  
  132. else if arg 1 is equal to "reset":
  133. #code for reset
  134. if command sender does not have the permission "skript.specinfo.reset":
  135. message "{@PermissionDeny}"
  136. else:
  137. delete {SpecInfo.Mined.Gold::*}
  138. delete {SpecInfo.Mined.Diamond::*}
  139. delete {SpecInfo.TrackedBlock::*}
  140. delete {SpecInfo.LastDamage::*}
  141. delete {SpecInfo.Enabled::*}
  142. message "{@Prefix} {@Reset.ToSender}"
  143. loop all players:
  144. loop-player has the permission "skript.specinfo.notify"
  145. loop-player is not command sender
  146. message "{@Prefix} {@Reset.Notify}" to loop-player
  147.  
  148. else:
  149. command sender command "/specinfo help"
  150.  
  151.  
  152.  
  153. on mine of gold 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 gold 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.Gold::%player%} is not set:
  161. set {SpecInfo.Mined.Gold::%player%} to {_Count}
  162. else:
  163. increase {SpecInfo.Mined.Gold::%player%} by {_Count}
  164. loop all players:
  165. {SpecInfo.Enabled::%loop-player%} is true
  166. message "{@Prefix.Short} {@Gold}" to loop-player
  167. command "/playsound note.bassattack %loop-player%"
  168.  
  169. on mine of diamond ore:
  170. {SpecInfo.TrackedBlock::%x-coordinate of event-block%x%y-coordinate of event-block%x%z-coordinate of event-block%} is not set
  171. set {_Count} to 0
  172. loop blocks in radius 2 around event-block:
  173. loop-block is equal to diamond ore
  174. increase {_Count} by 1
  175. set {SpecInfo.TrackedBlock::%x-coordinate of loop-block%x%y-coordinate of loop-block%x%z-coordinate of loop-block%} to true
  176. if {SpecInfo.Mined.Diamond::%player%} is not set:
  177. set {SpecInfo.Mined.Diamond::%player%} to {_Count}
  178. else:
  179. increase {SpecInfo.Mined.Diamond::%player%} by {_Count}
  180. loop all players:
  181. {SpecInfo.Enabled::%loop-player%} is true
  182. message "{@Prefix.Short} {@Diamond}" to loop-player
  183. command "/playsound note.harp %loop-player%"
  184.  
  185.  
  186. on damage of player:
  187. victim's gamemode is not creative
  188.  
  189. if {SpecInfo.LastDamage::%victim%} is set:
  190. if {SpecInfo.LastDamage::%victim%} was less than 0.15 seconds ago:
  191. stop
  192.  
  193. set {SpecInfo.LastDamage::%victim%} to now
  194. set {_Damage} to (health of victim)
  195. wait 1 tick
  196. set {_Damage} to {_Damage}-(health of victim)
  197. if {_Damage} is equal to 0:
  198. stop
  199.  
  200.  
  201. if attacker is a player:
  202. if damage was caused by projectile:
  203. if projectile is an arrow:
  204. loop all players:
  205. {SpecInfo.Enabled::%loop-player%} is true
  206. message "{@Prefix.Short} {@PvP.Bow}" to loop-player
  207. else:
  208. loop all players:
  209. {SpecInfo.Enabled::%loop-player%} is true
  210. message "{@Prefix.Short} {@PvP.ProjectileUnknown}" to loop-player
  211. else:
  212. if damage was caused by attack:
  213. loop all players:
  214. {SpecInfo.Enabled::%loop-player%} is true
  215. message "{@Prefix.Short} {@PvP.Melee}" to loop-player
  216. else:
  217. loop all players:
  218. {SpecInfo.Enabled::%loop-player%} is true
  219. message "{@Prefix.Short} {@PvP.Unknown}" to loop-player
  220.  
  221.  
  222. else if attacker is not set:
  223. if damage was caused by fall:
  224. loop all players:
  225. {SpecInfo.Enabled::%loop-player%} is true
  226. message "{@Prefix.Short} {@PvE.NS.Fall}" to loop-player
  227. else if damage was caused by lava:
  228. loop all players:
  229. {SpecInfo.Enabled::%loop-player%} is true
  230. message "{@Prefix.Short} {@PvE.NS.Lava}" to loop-player
  231. else if damage was caused by fire:
  232. loop all players:
  233. {SpecInfo.Enabled::%loop-player%} is true
  234. message "{@Prefix.Short} {@PvE.NS.Fire}" to loop-player
  235. else if damage was caused by burning:
  236. loop all players:
  237. {SpecInfo.Enabled::%loop-player%} is true
  238. message "{@Prefix.Short} {@PvE.NS.Burning}" to loop-player
  239. else if damage was caused by drowning:
  240. loop all players:
  241. {SpecInfo.Enabled::%loop-player%} is true
  242. message "{@Prefix.Short} {@PvE.NS.Drowning}" to loop-player
  243. else if damage was caused by poison:
  244. loop all players:
  245. {SpecInfo.Enabled::%loop-player%} is true
  246. message "{@Prefix.Short} {@PvE.NS.Poison}" to loop-player
  247. else if damage was caused by wither:
  248. loop all players:
  249. {SpecInfo.Enabled::%loop-player%} is true
  250. message "{@Prefix.Short} {@PvE.NS.Wither}" to loop-player
  251. else if damage was caused by starvation:
  252. loop all players:
  253. {SpecInfo.Enabled::%loop-player%} is true
  254. message "{@Prefix.Short} {@PvE.NS.Starvation}" to loop-player
  255. else if damage was caused by suffocation:
  256. loop all players:
  257. {SpecInfo.Enabled::%loop-player%} is true
  258. message "{@Prefix.Short} {@PvE.NS.Suffocation}" to loop-player
  259. else if damage was caused by falling block:
  260. loop all players:
  261. {SpecInfo.Enabled::%loop-player%} is true
  262. message "{@Prefix.Short} {@PvE.NS.Anvil}" to loop-player
  263. else:
  264. loop all players:
  265. {SpecInfo.Enabled::%loop-player%} is true
  266. message "{@Prefix.Short} {@PvE.NS}" to loop-player
  267.  
  268. else:
  269. if attacker is a zombie:
  270. loop all players:
  271. {SpecInfo.Enabled::%loop-player%} is true
  272. message "{@Prefix.Short} {@PvE.Zombie}" to loop-player
  273. else if attacker is a skeleton:
  274. loop all players:
  275. {SpecInfo.Enabled::%loop-player%} is true
  276. message "{@Prefix.Short} {@PvE.Skeleton}" to loop-player
  277. else if attacker is a spider:
  278. loop all players:
  279. {SpecInfo.Enabled::%loop-player%} is true
  280. message "{@Prefix.Short} {@PvE.Spider}" to loop-player
  281. else if attacker is a creeper:
  282. loop all players:
  283. {SpecInfo.Enabled::%loop-player%} is true
  284. message "{@Prefix.Short} {@PvE.Creeper}" to loop-player
  285. else if attacker is a enderman:
  286. loop all players:
  287. {SpecInfo.Enabled::%loop-player%} is true
  288. message "{@Prefix.Short} {@PvE.Enderman}" to loop-player
  289. else if attacker is a silverfish:
  290. loop all players:
  291. {SpecInfo.Enabled::%loop-player%} is true
  292. message "{@Prefix.Short} {@PvE.Silverfish}" to loop-player
  293. else if attacker is a slime:
  294. loop all players:
  295. {SpecInfo.Enabled::%loop-player%} is true
  296. message "{@Prefix.Short} {@PvE.Slime}" to loop-player
  297. else if attacker is a witch:
  298. loop all players:
  299. {SpecInfo.Enabled::%loop-player%} is true
  300. message "{@Prefix.Short} {@PvE.Witch}" to loop-player
  301. else if attacker is a ghast:
  302. loop all players:
  303. {SpecInfo.Enabled::%loop-player%} is true
  304. message "{@Prefix.Short} {@PvE.Ghast}" to loop-player
  305. else if attacker is a blaze:
  306. loop all players:
  307. {SpecInfo.Enabled::%loop-player%} is true
  308. message "{@Prefix.Short} {@PvE.Blaze}" to loop-player
  309. else if attacker is a magma cube:
  310. loop all players:
  311. {SpecInfo.Enabled::%loop-player%} is true
  312. message "{@Prefix.Short} {@PvE.MCube}" to loop-player
  313. else if attacker is a zombie pigman:
  314. loop all players:
  315. {SpecInfo.Enabled::%loop-player%} is true
  316. message "{@Prefix.Short} {@PvE.Pigman}" to loop-player
  317. else:
  318. loop all players:
  319. {SpecInfo.Enabled::%loop-player%} is true
  320. message "{@Prefix.Short} {@PvE}" to loop-player
  321.  
  322. on portal:
  323. player's gamemode is not creative
  324. set {_from} to world of player
  325. wait 2 ticks
  326. loop all players:
  327. {SpecInfo.Enabled::%loop-player%} is true
  328. message "{@Prefix.Short} {@Portal}" to loop-player
  329.  
  330.  
  331. on craft:
  332. if event-item is golden apple item:
  333. player's gamemode is not creative
  334. if (name of event-item) is not set:
  335. loop all players:
  336. {SpecInfo.Enabled::%loop-player%} is true
  337. message "{@Prefix.Short} {@Craft.GoldenApple}" to loop-player
  338. else:
  339. loop all players:
  340. {SpecInfo.Enabled::%loop-player%} is true
  341. message "{@Prefix.Short} {@Craft.GoldenHead}" to loop-player
  342. if event-item is enchanted golden apple:
  343. player's gamemode is not creative
  344. loop all players:
  345. {SpecInfo.Enabled::%loop-player%} is true
  346. message "{@Prefix.Short} {@Craft.NotchApple}" to loop-player
  347.  
  348. else if event-item is enchantment table:
  349. player's gamemode is not creative
  350. loop all players:
  351. {SpecInfo.Enabled::%loop-player%} is true
  352. message "{@Prefix.Short} {@Craft.EnchantTable}" to loop-player
  353. else if event-item is diamond helmet:
  354. player's gamemode is not creative
  355. loop all players:
  356. {SpecInfo.Enabled::%loop-player%} is true
  357. message "{@Prefix.Short} {@Craft.Diamond.Helmet}" to loop-player
  358. else if event-item is diamond chestplate:
  359. player's gamemode is not creative
  360. loop all players:
  361. {SpecInfo.Enabled::%loop-player%} is true
  362. message "{@Prefix.Short} {@Craft.Diamond.Chest}" to loop-player
  363. else if event-item is diamond leggings:
  364. player's gamemode is not creative
  365. loop all players:
  366. {SpecInfo.Enabled::%loop-player%} is true
  367. message "{@Prefix.Short} {@Craft.Diamond.Leggings}" to loop-player
  368. else if event-item is diamond boots:
  369. player's gamemode is not creative
  370. loop all players:
  371. {SpecInfo.Enabled::%loop-player%} is true
  372. message "{@Prefix.Short} {@Craft.Diamond.Boots}" to loop-player
  373.  
  374.  
  375. on eat:
  376. event-item is golden apple item
  377. player's gamemode is not creative
  378. if (name of event-item) is not set:
  379. loop all players:
  380. {SpecInfo.Enabled::%loop-player%} is true
  381. message "{@Prefix.Short} {@Heal.Apple}" to loop-player
  382. else:
  383. loop all players:
  384. {SpecInfo.Enabled::%loop-player%} is true
  385. message "{@Prefix.Short} {@Heal.Head}" to loop-player
Advertisement
Add Comment
Please, Sign In to add comment