Organized

Spec Info [SK]

Dec 4th, 2016
669
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.53 KB | None | 0 0
  1. Options:
  2. # +-+ These options will change how things look
  3.  
  4. P: &e&LEclipse
  5. PP: &e&LEclipse &8»&7
  6. PS: &8(&4SpecMode&8)&7
  7. PSS: &8(&4SpecMode&8) &8»&7
  8. PI: &8(&6SpecInfo&8)
  9. PII: &8(&6SpecInfo&8) &8»&7
  10. PSC: &8(&bSpec&8)
  11. PSC: &8(&bSpec&8) &8»&7
  12. A: &8»
  13. AA: &8«
  14. C: &6
  15. N: &7
  16. (: &8(
  17. ): &8)
  18. Line: &8»&M-----------------------------------&R&8«
  19. e: &7is now &aenabled&7.
  20. d: &7is now &cdisabled&7.
  21.  
  22. SI: &8(&bS&8)
  23.  
  24. GoldColour: &6
  25. DiaColour: &3
  26.  
  27. Ore.Text: &8(&5Ore&8)
  28. PvP.Text: &8(&4PvP&8)
  29. PvE.Text: &8(&1PvE&8)
  30. Craft.Text: &8(&2Craft&8)
  31. CmdSpy.Text: &8(&6CmdSpy&8)
  32. Reach.Text: &8(&cReach&8)
  33. Near.Text: &8(&aNear&8)
  34. iPvP.Text: &8(&3iPvP&8)
  35.  
  36. Ore.Size: Size
  37. Ore.Total: Tot
  38.  
  39. # +-+ important stuff - true = will show, false = wont show
  40.  
  41. ore: true
  42. pvp: true
  43. pve: true
  44. craft: false
  45. cmdspy: true
  46. reach: true
  47. near: true
  48. ipvp: true
  49. left.click: true
  50. right.click: true
  51.  
  52. # +-+ the amount of ticks before the invsee gui updates
  53.  
  54. InvUpdate: 3
  55. DancingTeams: true
  56.  
  57. # ------ functions -----------
  58.  
  59. # DONT TOUCH UNLESS YOU KNOW WHAT YOU ARE DOING!
  60.  
  61. function SpecOn(p: player):
  62. if {SI::on::%{_p}%} is set:
  63. send "{@PSS} Your {@PI}{@N} is already &aenabled{@N}." to {_p}
  64. stop
  65. set {_uuid} to uuid of {_p}
  66. command "van %{_p}%"
  67. if {Van::%{_uuid}%} is not set:
  68. make {_p} execute command "vanflag +chat"
  69. make {_p} execute command "vanflag +interact"
  70. set {Van::%{_uuid}%} to true
  71. command "gamemode 3 %{_p}%"
  72. set {SI::on::%{_p}%} to true
  73. set {spec::%{_p}%} to true
  74. set {SI::cmdspy::%{_p}%} to true
  75. send "{@Line}" to {_p}
  76. send "{@PSS} Your {@PI} {@e}" to {_p}
  77. send "{@Line}" to {_p}
  78. send "&7&o[&o%{_p}%: &oEnabled &oSpecInfo.]" to all ops
  79.  
  80.  
  81. function SpecOff(p: player):
  82. if {SI::on::%{_p}%} is not set:
  83. send "{@PSS} Your {@PI}{@N} is already &cdisabled{@N}." to {_p}
  84. stop
  85. delete {SI::on::%{_p}%}
  86. delete {spec::%{_p}%}
  87. command "reappear %{_p}%"
  88. command "gamemode 0 %{_p}%"
  89. teleport {_p} to {spawn::location}
  90. delete {SI::cmdspy::%{_p}%}
  91. remove night vision from {_p}
  92. send "{@Line}" to {_p}
  93. send "{@PSS} Your {@PI} {@d}" to {_p}
  94. send "{@Line}" to {_p}
  95. send "&7&o[%{_p}%: Disabled SpecInfo.]" to all ops
  96.  
  97.  
  98. function Capital(t: text) :: text:
  99. set {_t} to 1st char in each word of "%{_t}%" to caps
  100. return {_t}
  101.  
  102. function TeamColour(p: player) :: text:
  103. if {@DancingTeams} is not true:
  104. set {_colour} to "{@N}"
  105. else if {TeamColor::%{TeamNumber::%{_p}%}%::Reference} is set:
  106. set {_colour} to {TeamColor::%{TeamNumber::%{_p}%}%::Reference}
  107. else:
  108. set {_colour} to "&f"
  109. return {_colour}
  110.  
  111. # ---------- spec on/off -------------
  112.  
  113. command /spec [<text>] [<player>]:
  114. usage: /spec <on/off/reset> [<player>]
  115. trigger:
  116. if arg-1 is "on" or "enable":
  117. sender has permission "skript.op"
  118. if arg 2 is not set:
  119. SpecOn(sender)
  120. else:
  121. SpecOn(arg-player)
  122.  
  123. else if arg-1 is "off" or "disable":
  124. sender has permission "skript.op"
  125. if arg 2 is not set:
  126. SpecOff(sender)
  127. else:
  128. SpecOff(arg-player)
  129.  
  130. else if arg 1 is "reset":
  131. sender has permission "skript.op"
  132. loop all players:
  133. {SI::on::%loop-player%} is true
  134. SpecOff(loop-player)
  135. delete {SI::*}
  136. send "&7&o[%sender%: Reset SpecInfo.]" to all ops
  137.  
  138. else if arg 1 is "help":
  139. if {SI::on::%player%} is not set:
  140. send "{@PSS} You need to &aenable{@N} SpecMode first."
  141. stop
  142. open chest with 3 rows named "{@PSS} Help" to player
  143. loop integers from 0 to 26:
  144. if loop-integer is 0 or 2 or 4 or 6 or 8 or 10 or 12 or 14 or 16 or 18 or 20 or 22 or 24 or 26:
  145. format slot loop-integer of player with light blue stained glass pane named " " to be unstealable
  146. else:
  147. format slot loop-integer of player with red stained glass pane named " " to be unstealable
  148. format slot 10 of player with golden carrot named "{@PSS} Night Vision" with lore "{@A} &aEnable {@N}Night Vision {@AA}" to run "effect %sender% 16 3600"
  149. format slot 11 of player with glass bottle named "{@PSS} Clear Effects" with lore "{@A} {@N}Clear all Effects {@AA}" to run "effect %sender% clear"
  150. format slot 12 of player with golden apple:0 named "{@PSS} 0,0!" with lore "{@A} {@N}Go to 0,0 {@AA}" to close then run "tp %sender% 0 100 0"
  151. format slot 13 of player with nether wart item named "{@PSS} Nether!" with lore "{@A} {@N}Go to the &cNether {@AA}" to close then run "mw move %sender% %{TargetWorld}%_Nether"
  152. format slot 14 of player with iron sword named "{@PSS} Player" with lore "{@A} {@N}TP to Random Player {@AA}" to close then run [execute sender command "t"]
  153. format slot 15 of player with spider eye named "{@PSS} Nearby" with lore "{@A} {@N}Near Players {@AA}" to run [execute sender command "near"]
  154. format slot 16 of player with paper named "{@PSS} Help!" with lore "{@A} {@N}Helpful Commands {@AA}||{@Line}|||| {@A} {@C}/inv|| {@A}{@N} Check someone's inventory|||| {@A} {@C}/t|| {@A}{@N} Teleport to Random Player|||| {@A}{@C}/d|| {@A}{@N} Teleport to last Diamonds Mined|||| {@A}{@C}/g|| {@A}{@N} Teleport to last Gold Mined|||| {@A}{@C}/c|| {@A}{@N} Teleport to PvP Action|||| {@A}{@C}/spec list|| {@A}{@N} Lists all Specs||||{@Line}" to be unstealable
  155.  
  156. else if arg 1 is "list":
  157. if {SI::on::%player%} is not set:
  158. send "{@PSS} You need to &aenable{@N} SpecMode first."
  159. stop
  160. else:
  161. loop all players:
  162. {si::on::%loop-player%} is true
  163. add "{@C}%loop-player%&8" to {_specs::*}
  164. add 1 to {_specs}
  165. if {_specs} is greater than 0:
  166. send "{@Line}" to sender
  167. send "{@PSS} Currently Spectating {@A} %{_specs::*}%" to sender
  168. send "{@Line}" to sender
  169. delete {_specs}
  170. delete {_specs::*}
  171. else if arg 1 is "help":
  172. if {SI::on::%player%} is not set:
  173. send "{@PSS} You need to &aenable{@N} SpecMode first."
  174. stop
  175.  
  176. else if arg 1 is not set:
  177. send "{@PP} Valid arguments {@A} <{@C}on&8/{@C}off&8/{@C}list&8/{@C}reset&8/{@C}help&8>"
  178.  
  179. # -------- invsee -----------
  180.  
  181. on rightclick on player:
  182. {@right.click} is true
  183. {SI::on::%player%} is true
  184. cancel event
  185. if player's target is a player:
  186. make player execute command "inv %player's target%"
  187.  
  188. command /inv <player>:
  189. trigger:
  190. {SI::on::%sender%} is true
  191. set {_c} to TeamColour(arg-1)
  192. open chest with 6 rows named "&8(&bInv&8)&7 %arg 1%" to player
  193. loop integers from 0 to 17:
  194. format slot loop-integer of player with red stained glass pane named " " to be unstealable
  195. while inventory name of player's current inventory is "&8(&bInv&8)&7 %arg 1%":
  196.  
  197. loop integers from 0 to 35:
  198. add (slot loop-integer of arg-1) to {SI::inv::invent::%arg 1%::*}
  199.  
  200. format slot 0 of player with helmet of arg-1 to be unstealable
  201. format slot 1 of player with chestplate of arg-1 to be unstealable
  202. format slot 2 of player with leggings of arg-1 to be unstealable
  203. format slot 3 of player with boots of arg-1 to be unstealable
  204. format slot 4 of player with tool of arg-1 to be unstealable
  205.  
  206. set {SI::inv::potions::*} to all of the active potion effects on argument-1
  207. if {mute::%uuid of arg-player%::mins} is set:
  208. set {_muted} to "&aTrue &8(&a%{mute::%uuid of arg-player%::mins}%&8)"
  209. else:
  210. set {_muted} to "&cFalse"
  211. if {SI::inv::potions::*} is not set:
  212. set {_pots} to "{@C}None"
  213. else:
  214. set {_pots} to Capital("%{SI::inv::potions::*}%")
  215. format slot 6 of player with grass block named "{@PSS} Player Info" with lore "{@Line}|||| {@N}Muted {@A} %{_muted}%|||| {@N}World {@A} {@C}%world of arg-player%|||| {@N}Ping {@A} {@C}%arg-player's ping%||||{@Line}" to be unstealable
  216.  
  217. format slot 7 of player with book named "{@PSS} Info" with lore "{@Line}|||| {@N}Health {@A} {@C}%health of arg-player*10%%%|| {@N}Food Level {@A} {@C}%food level of arg-1%&8/{@C}10|| {@N}Position {@A} {@C}%location of arg-1%|| {@N}XP {@A} {@C}%level of arg-1%{@N}/{@C}%{SI::levels::%uuid of arg-player%}%||||{@N}Potion Effects:|| {@A} {@C}%{_pots}%|||| {@DiaColour}Diamonds {@A} {@DiaColour}%{SI::Mined::Diamond::%uuid of arg-1%}%|| {@GoldColour}Gold {@A} {@GoldColour}%{SI::Mined::Gold::%uuid of arg-1%}%||||{@Line}" to be unstealable
  218. if {Teams.InTeam::%arg-1%} is true:
  219. set {_lore} to " {@N}Number {@A} {@C}%{TeamNumber::%arg-1%}%|| {@N}Size {@A} {@C}%(size of {Team.%{TeamNumber::%arg-1%}%::*})%|| {@N}Teammates {@A} {@C}%{Team.%{TeamNumber::%arg-1%}%::*}%|| {@N}Colour {@A} %{TeamColor::%{TeamNumber::%arg-1%}%::Reference}%%{TeamColor::%{TeamNumber::%arg-1%}%::Color}%"
  220. else:
  221. set {_lore} to " {@A} &cFalse"
  222. format slot 8 of player with wool:14 named "{@PSS} Teams" with lore "{@Line}||||%{_lore}%||||{@Line}" to be unstealable
  223. set {_c} to 18
  224. loop {SI::inv::invent::%arg 1%::*}:
  225.  
  226. format slot {_c} of player with loop-value to be unstealable
  227. add 1 to {_c}
  228. delete {SI::inv::invent::%arg 1%::*}
  229. delete {SI::inv::potions::*}
  230. wait {@InvUpdate} ticks
  231. loop integers from 18 to 53:
  232. format slot loop-integer of player with air to be unstealable
  233.  
  234. every 30 seconds:
  235. loop all players:
  236. if {SI::levels::%uuid of loop-player%} is set:
  237. if level of loop-player is greater than {SI::levels::%uuid of loop-player%}:
  238. set {SI::levels::%uuid of loop-player%} to level of loop-player
  239. else:
  240. set {SI::levels::%uuid of loop-player%} to level of loop-player
  241.  
  242. # --------- Spec info -------------
  243.  
  244. on mine of gold ore:
  245. {@ore} is true
  246. wait 1 tick
  247. {SI::Gold::%x-coordinate of event-block%.%y-coordinate of event-block%.%z-coordinate of event-block%} is not set
  248. set {_c} to 1
  249. loop blocks in radius 2 around event-block:
  250. loop-block is equal to gold ore
  251. add 1 to {_c}
  252. set {SI::Gold::%x-coordinate of loop-block%.%y-coordinate of loop-block%.%z-coordinate of loop-block%} to true
  253. add {_c} to {SI::mined::gold::%uuid of player%}
  254. loop all players:
  255. {SI::on::%loop-player%} is true
  256. send "{@SI} {@N}%player% {@A} {@GoldColour}Gold {@AA} {@(}{@N}{@Ore.Size}:{@GoldColour}%{_c}%{@)} {@(}{@N}{@Ore.Total}:{@GoldColour}%{SI::mined::gold::%uuid of player%}%{@)}" to loop-player
  257. set {SI::Last::Gold} to player
  258.  
  259. on mine of diamond ore:
  260. {@ore} is true
  261. wait 1 tick
  262. {SI::Diamond::%x-coordinate of event-block%.%y-coordinate of event-block%.%z-coordinate of event-block%} is not set
  263. set {_c} to 1
  264. loop blocks in radius 2 around event-block:
  265. loop-block is equal to diamond ore
  266. add 1 to {_c}
  267. set {SI::Diamond::%x-coordinate of loop-block%.%y-coordinate of loop-block%.%z-coordinate of loop-block%} to true
  268. add {_c} to {SI::mined::diamond::%uuid of player%}
  269. loop all players:
  270. {SI::on::%loop-player%} is true
  271. send "{@SI} {@N}%player% {@A} {@DiaColour}Diamond {@AA} {@(}{@N}{@Ore.Size}:{@DiaColour}%{_c}%{@)} {@(}{@N}{@Ore.Total}:{@DiaColour}%{SI::mined::diamond::%uuid of player%}%{@)}" to loop-player
  272. set {SI::Last::Diamond} to player
  273.  
  274. command /d:
  275. permission: skript.op
  276. trigger:
  277. {SI::on::%player%} is true
  278. teleport sender to {SI::Last::Diamond}
  279.  
  280. command /g:
  281. permission: skript.op
  282. trigger:
  283. {SI::on::%player%} is true
  284. teleport sender to {SI::Last::Gold}
  285.  
  286. command /v:
  287. permission: skript.op
  288. trigger:
  289. {SI::on::%player%} is true
  290. teleport sender to {SI::Last::Damage}
  291.  
  292. command /c:
  293. permission: skript.op
  294. trigger:
  295. {SI::on::%player%} is true
  296. teleport sender to {SI::Last::Hit}
  297.  
  298. on damage:
  299. {@reach} is true
  300. set {_c} to TeamColour(attacker)
  301. attacker is a player
  302. projectile does not exist
  303. attacker's gamemode is not creative
  304. if distance between attacker and victim is greater than 4.9:
  305. set {_distance} to the distance between attacker and victim
  306. set {_ms} to attacker's ping
  307. {_ms} is less than 200
  308. loop all players:
  309. {SI::on::%loop-player%} is true
  310. send "{@SI} {@Reach.Text} %{_c}%%attacker% {@A} {@C}%{_distance}% {@N}blocks {@A} {@C}%{_ms}% {@N}ping" to loop-player
  311.  
  312. on damage of player:
  313. victim's gamemode is not creative
  314. if {SI::LastDamage::%victim%} is set:
  315. if {SI::LastDamage::%victim%} was less than 0.15 seconds ago:
  316. stop
  317. set {SI::LastDamage::%victim%} to now
  318. set {_d} to (health of victim)
  319. wait 1 tick
  320. set {_d} to {_d}-(health of victim)
  321. if {_d} is equal to 0:
  322. stop
  323. set {SI::Last::Damage} to victim
  324. if {TeamColor::%{TeamNumber::%victim%}%::Reference} is set:
  325. set {_cv} to {TeamColor::%{TeamNumber::%victim%}%::Reference}
  326. else:
  327. set {_cv} to "&c"
  328. if attacker is a player:
  329. if {TeamColor::%{TeamNumber::%attacker%}%::Reference} is set:
  330. set {_ca} to {TeamColor::%{TeamNumber::%attacker%}%::Reference}
  331. else:
  332. set {_ca} to "&a"
  333. set {SI::Last::Hit} to attacker
  334. {@pvp} is true
  335. if damage was caused by projectile:
  336. if projectile is an arrow:
  337. set {_type} to "B"
  338. else:
  339. set {_type} to "B?"
  340. else:
  341. if damage was caused by attack:
  342. set {_type} to "M"
  343. else:
  344. set {_type} to "M?"
  345.  
  346. loop all players:
  347. {SI::on::%loop-player%} is true
  348. send "{@SI} {@PvP.Text} &a%{_ca}%%attacker% &8-&7%{_type}%&8» &c%{_cv}%%victim% {@(}&a%health of attacker%&8:&c%health of victim%&8:&6%{_d}%{@)}" to loop-player
  349.  
  350. else if attacker is not set:
  351. {@pve} is true
  352. set {_t} to Capital("%damage cause%")
  353. loop all players:
  354. {SI::on::%loop-player%} is true
  355. send "{@SI} {@PvE.Text} &c%{_cv}%%victim% &8« &d%{_t}% {@(}&c%health of victim%&8:&6%{_d}%{@)}" to loop-player
  356. else:
  357. {@pve} is true
  358. set {_t} to Capital("%attacker%")
  359. loop all players:
  360. {SI::on::%loop-player%} is true
  361. send "{@SI} {@PvE.Text} &c%{_cv}%%victim% &8« &d%{_t}% {@(}&c%health of victim%&8:&6%{_d}%{@)}" to loop-player
  362.  
  363. on craft:
  364. {@craft} is true
  365. "%event-item%" contains "diamond" or "apple" or "anvil" or "enchant"
  366. set {_t} to Capital("%event-item%")
  367. set {_c} to TeamColour(player)
  368. loop all players:
  369. {SI::on::%loop-player%} is true
  370. send "{@SI} {@Craft.Text} %{_c}%%player% &8« &d%{_t}%" to loop-player
  371.  
  372.  
  373. on mine of stone:
  374. {@ore} is true
  375. set {_c} to TeamColour(player)
  376. if player's y-coordinate is smaller than 32:
  377. loop blocks in radius 1 of event-block:
  378. loop-block is diamond ore or gold ore:
  379. block north of loop-block is air:
  380. stop
  381. block south of loop-block is air:
  382. stop
  383. block east of loop-block is air:
  384. stop
  385. block west of loop-block is air:
  386. stop
  387. block above loop-block is air:
  388. stop
  389. block below loop-block is air:
  390. stop
  391. loop all players:
  392. if {SI::on::%loop-player%} is true:
  393. set {SI::Last::UnExOre} to player
  394. send "{@SI} {@Ore.Text} %{_c}%%player% {@AA} {@N}Unexposed Ore {@(}{@N}/u{@)}" to loop-player
  395. stop
  396.  
  397.  
  398. command /u:
  399. permission: skript.op
  400. trigger:
  401. {SI::on::%player%} is true
  402. teleport sender to {SI::Last::UnExOre}
  403.  
  404. on inventory click:
  405. if player is sneaking:
  406. set {_c} to TeamColour(player)
  407. loop all players:
  408. {SI::on::%loop-player%} is true
  409. send "{@SI} %{_c}%%player% {@AA} {@C}Togglesneak" to loop-player
  410.  
  411. on chat:
  412. if player is sneaking:
  413. set {_c} to TeamColour(player)
  414. loop all players:
  415. {SI::on::%loop-player%} is true
  416. send "{@SI} %{_c}%%player% {@AA} {@C}Togglesneak" to loop-player
  417.  
  418.  
  419.  
  420. command /commandspy <text>:
  421. aliases: /socialspy, /cspy, /sspy
  422. permission: skript.op
  423. trigger:
  424. if {SI::on::%sender%} is not set:
  425. send "{@PSS} You must be in Spec Mode to &aEnable {@N}Command Spy."
  426. stop
  427. if arg 1 is "on":
  428. set {SI::cmdspy::%sender%} to true
  429. send "{@PSS}{@N} Command Spy {@e}" to sender
  430. send "&7&o[%sender%: %sender% enabled Command Spy.]" to all ops
  431. else if arg 1 is "off":
  432. delete {SI::cmdspy::%sender%}
  433. send "{@PSS}{@N} Command Spy {@d}" to sender
  434. send "&7&o[%sender%: %sender% enabled Command Spy.]" to all ops
  435. else if arg 1 is "reset":
  436. delete {SI::cmdspy::*}
  437. send "{@PSS}{@N} Command Spy has been &creset{@N}." to sender
  438. send "&7&o[%sender%: %sender% reset Command Spy.]" to all ops
  439.  
  440. on command:
  441. {@cmdspy} is true
  442. command is not "ac" or "helpop" or "sc" or "pmc" or "tl" or "pmcoords" or "ms" or "ping" or "t" or "uhc" or "ti"
  443. player is online
  444. loop all players:
  445. {SI::cmdspy::%loop-player%} is true
  446. if loop-player is the same as command sender:
  447. stop
  448. else if player is op:
  449. send "{@SI} {@CmdSpy.Text} &4%player% {@A} {@N}/%full command%" to loop-player
  450. else:
  451. send "{@SI} {@CmdSpy.Text} &E%player% {@A} {@N}/%full command%" to loop-player
  452.  
  453. on command "/tp":
  454. if "%arguments%" contains " ":
  455. stop
  456. else:
  457. {SI::on::%sender%} is true
  458. cancel the event
  459. sender command "/t %arguments%"
  460.  
  461. command /sc <text>:
  462. aliases: /specchat, /specc
  463. trigger:
  464. if {SI::on::%sender%} is not set:
  465. send "{@PSS} You are not spectating!"
  466. stop
  467. loop all players:
  468. {SI::on::%loop-player%} is true
  469. send "{@PSC} %sender% {@A} &b%arg-1%" to loop-player
  470.  
  471. on gamemode change:
  472. {SI::on::%event-player%} is set
  473. cancel the event
  474.  
  475. on quit:
  476. {SI::on::%player%} is true
  477. SpecOff(player)
  478.  
  479. command /t [<player>]:
  480. usage: /t [<player>]
  481. trigger:
  482. if {SI::on::%sender%} is true:
  483. if arg-1 is not set:
  484. loop all players:
  485. {spec::%loop-player%} is not set
  486. add loop-player to {_tp::*}
  487. set {_player} to (a random element out of {_tp::*})
  488. if {_player} is not set:
  489. send "{@PSS} Nobody to teleport to."
  490. set {_c} to TeamColour({_player})
  491. send "{@PSS} Teleported to %{_c}%%{_player}%"
  492. teleport command sender to {_player}
  493. else:
  494. set {_c} to TeamColour(arg-1)
  495. teleport command sender to arg-1
  496. else:
  497. send "{@PSS} You are not spectating!"
  498.  
  499. on left click:
  500. {@left.click} is true
  501. {SI::on::%sender%} is true
  502. loop all players:
  503. {spec::%loop-player%} is not set
  504. loop-player is not in world "spawn" or "world"
  505. add loop-player to {_tp::*}
  506. set {_player} to (a random element out of {_tp::*})
  507. teleport command sender to {_player}
  508. set {_c} to TeamColour({_player})
  509. send "{@PSS} Teleported to %{_c}%%{_player}%"
  510.  
  511. command /near [<int=200>]:
  512. trigger:
  513. {@near} is true
  514. {si::on::%sender%} is true
  515. loop all players in radius arg-1 around player:
  516. loop-player is not sender
  517. set {_c} to TeamColour(loop-player)
  518. send "{@Near.Text} %{_c}%%loop-player% &8({@C}%distance between loop-player and sender% {@N}blocks&8)" to sender
  519.  
  520.  
  521. function iPvP(p: player, cause: text):
  522. {@ipvp} is true
  523. {ipvp} is true
  524. loop all players in radius 7 around {_p}:
  525. loop-player is not {_p}
  526. set {_c} to TeamColour(loop-player)
  527. add "%{_c}%%loop-player%{@N}" to {_ipvp::%{_p}%::*}
  528. if {_ipvp::%{_p}%::*} is set:
  529. set {_c} to TeamColour({_p})
  530. loop all players:
  531. {si::on::%loop-player%} is true
  532. send "{@SI} {@iPvP.Text} %{_c}%%{_p}% {@A} &c%{_ipvp::%{_p}%::*}% {@(}{@C}%{_cause}%{@)}" to loop-player
  533. delete {_ipvp::%{_p}%::*}
  534.  
  535. on place of lava:
  536. iPvP(player, "Lava")
  537.  
  538. on place of fire:
  539. iPvP(player, "FnS")
  540.  
  541. on place of cactus:
  542. iPvP(player, "Cactus")
Advertisement
Add Comment
Please, Sign In to add comment