Advertisement
Guest User

Untitled

a guest
Sep 24th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 63.94 KB | None | 0 0
  1. script options:
  2. $ init com.mysql.jdbc.Driver
  3. $ db url jdbc:mysql://localhost:3306/Minecraft
  4. $ db username Minecraft
  5. $ db password Han9pizu0guertler
  6.  
  7. # #########################################################################
  8.  
  9. # +------------------------------------------------------+
  10. # | <~ Gun Game ~> |
  11. # +------------------------------------------------------+
  12.  
  13.  
  14. # Scripter:
  15. # lePoker
  16.  
  17. # © Copyright by lePoker
  18.  
  19. # #######################################################################################
  20.  
  21. on load:
  22. register new shaped recipe for enchanted golden apple named "&6&lOP Apple" with lore "&7Heals you over time" using air, nether star, air, nether star, apple, nether star, air, nether star, air
  23. register new shaped recipe for name tag named "&4&lFluchtticket" with lore "&7-> &eRechtsklick zum benutzen &7<-" using flint, nether star, flint, nether star, compass, nether star, flint, nether star, flint
  24. register new shaped recipe for tnt named "&3&lTNT" with lore "&7-> &eRechtsklick zum benutzen &7<-" using air, gunpowder, air, gunpowder, emerald, gunpowder, air, gunpowder, air
  25. register new shaped recipe for blaze rod named "&6&lFirefly" with lore "&7Zünde deine Gegner an!" using air, nether star, air, nether star, emerald, nether star, air, nether star, air
  26.  
  27. on consume:
  28. if item is enchanted golden apple named "&6&lOP Apple" with lore "&7Heals you over time":
  29. cancel event
  30. remove 1 of player's tool from player's tool
  31. apply absorption 5 to player for 30 seconds
  32. apply strength 1 to player for 10 seconds
  33. apply regeneration 5 to player for 30 seconds
  34. apply fire resistance 2 to player for 30 seconds
  35. if item is golden apple named "&a&lOP-APFEL" with lore "Notch Apfel":
  36. cancel event
  37. remove 1 of player's tool from player's tool
  38. apply absorption 5 to player for 30 seconds
  39. apply regeneration 5 to player for 30 seconds
  40.  
  41. on craft a diamond hoe or a iron hoe or a wood hoe or a gold hoe:
  42. cancel event
  43.  
  44. on server ping:
  45. if {Maintenance} is true:
  46. set motd to "&f[&4&lGun&f-&3&lGame&f] &c&lWartungsarbeiten"
  47. else:
  48. set motd to "&f[&4&lGun&f-&3&lGame&f] &b&lJoin Now <3"
  49. on join:
  50. send player title "&3Willkommen auf FeelPvP.eu, %player%!" with subtitle "&6Viel Spaß" for 8 seconds
  51.  
  52. on first join:
  53. broadcast "&aDer Spieler %player% ist neu auf Gun-Game.de!"
  54. if player is in region "FirstJoin":
  55. teleport player to {spawn}
  56.  
  57.  
  58.  
  59.  
  60.  
  61. # +------------------------------------------------------+
  62. # | <~ Clear all OP - Shit ~> |
  63. # +------------------------------------------------------+
  64. command /itemlist:
  65. permission: gg.admin
  66. trigger:
  67. send "%{items::*}%" to player
  68.  
  69. command /resetitemlist:
  70. permission: gg.admin
  71. trigger:
  72. delete {items::*}
  73.  
  74. command /additem:
  75. permission: gg.admin
  76. trigger:
  77. add the player's tool to {items::*}
  78. send "Item added to database" to player
  79.  
  80. on inventory open:
  81. loop {items::*}:
  82. if helmet of player is loop-value:
  83. set helmet of player to air
  84. if chestplate of player is loop-value:
  85. set chestplate of player to air
  86. if leggings of player is loop-value:
  87. set leggings of player to air
  88. if boots of player is loop-value:
  89. set boots of player to air
  90. if player has loop-value:
  91. remove all loop-value from player
  92.  
  93. on inventory close:
  94. loop {items::*}:
  95. if helmet of player is loop-value:
  96. set helmet of player to air
  97. if chestplate of player is loop-value:
  98. set chestplate of player to air
  99. if leggings of player is loop-value:
  100. set leggings of player to air
  101. if boots of player is loop-value:
  102. set boots of player to air
  103. if player has loop-value:
  104. remove all loop-value from player
  105.  
  106. # +------------------------------------------------------+
  107. # | <~ ~~~~~~~~ ~> |
  108. # +------------------------------------------------------+
  109.  
  110. on hunger bar change:
  111. cancel event
  112.  
  113. on weather change to rain or thunder:
  114. cancel event
  115.  
  116. on join:
  117. set join message to ""
  118.  
  119. teleport player to {spawn}
  120. remove player from {GunGame.%{ns_Playing.%player%}%::*}
  121. delete {ns_Playing.%player%}
  122.  
  123. if {ns_tempns_god.%player%} is set:
  124. delete {ns_tempns_god.%player%}
  125. send "[&4&lGun&f-&3&lGame&f] Welcome back %player%" to player
  126. if {mgc} is not 0:
  127. send "[&4&lGun&f-&3&lGame&f] &aGP werden &l%{mgc}%x &amultipliziert"
  128.  
  129. on quit:
  130. set quit message to ""
  131. Delete {ns_god.%player%}
  132. Delete {ns_vanish.%player%}
  133. Delete {ns_fly.%player%}
  134.  
  135. if player is in the region "spawn":
  136. remove player from {GunGame.%{ns_Playing.%player%}%::*}
  137. delete {ns_Playing.%player%}
  138. else:
  139. remove player from {GunGame.%{ns_Playing.%player%}%::*}
  140. delete {ns_Playing.%player%}
  141. kill the player
  142.  
  143. on kick:
  144. remove event-player from {GunGame.%{ns_Playing.%event-player%}%::*}
  145. delete {ns_Playing.%event-player%}
  146.  
  147. on place:
  148. if player's gamemode is not creative:
  149. cancel event
  150.  
  151. on break:
  152. If player's gamemode is not creative:
  153. cancel event
  154. if line 1 of event-block is "&b[Gun-Game]" or "&bGP-Shop" or "&bGC-Shop":
  155. cancel event
  156.  
  157. on skript start:
  158. if {mgc} is not set:
  159. set {mgc} to 0
  160. set {gaingc} to 2
  161.  
  162. on damage:
  163. if {ns_tempns_god.%attacker%} is set:
  164. cancel event
  165. if {ns_tempns_god.%victim%} is set:
  166. cancel event
  167. if victim is a player:
  168. if attacker is a player:
  169. set {ns_lastkiller.%victim%} to attacker
  170. if damage cause is fall:
  171. cancel event
  172.  
  173. on respawn:
  174. wait 5 tick
  175. if {GunGame.Maps::%{ns_Playing.%player%}%} is set:
  176. teleport player to {GunGame.Maps::%{ns_Playing.%player%}%}
  177. else:
  178. teleport player to {spawn}
  179. give player wooden sword with lore "&f[&4&lGun&f-&3&lGame&f]"
  180.  
  181. on any movement:
  182. if player is in the region "spawn":
  183. wait 1 tick
  184. else:
  185. if {ns_god.%player%} is not set:
  186. if block at player is water:
  187. kill the player
  188.  
  189. if {ns_moved.%player%} is "teleporting":
  190. delete {ns_moved.%player%}
  191. send "[&4&lGun&f-&3&lGame&f] &cTeleport aborted, don't move while teleporting" to player
  192.  
  193. on drop:
  194. If player's gamemode is not creative:
  195. cancel event
  196.  
  197. on pickup:
  198. If player's gamemode is not creative:
  199. cancel event
  200.  
  201. # +------------------------------------------------------+
  202. # | <~ Commands ~> |
  203. # +------------------------------------------------------+
  204.  
  205. command /sv <text>:
  206. permission: gg.admin
  207. trigger:
  208. if arg is not "Shop" or "Repair":
  209. send "Please just use Shop or Repair" to player
  210. stop
  211. if arg is "Shop":
  212. run player command "summon Villager ~ ~ ~ {CustomName:Shop,CustomNameVisible:1,Profession:1}" as op
  213. if arg is "Repair":
  214. run player command "summon Villager ~ ~ ~ {CustomName:Repair Man,CustomNameVisible:1,Profession:3}" as op
  215.  
  216. command /bc <text>:
  217. permission: gg.admin
  218. usage: /bc <message>
  219. trigger:
  220. broadcast "[&4&lGun&f-&3&lGame&f] &f&l%arg%"
  221.  
  222. command /server <text>:
  223. permission: gg.owner
  224. usage: /server <message>
  225. trigger:
  226. broadcast "&f[&4&lCONSOLE&f] &b&l%arg%"
  227.  
  228.  
  229. #command /tpall:
  230. # permission: gg.admin
  231. # trigger:
  232. # loop all players:
  233. # if {ns_InvStored.%loop-player%} is set:
  234. # run loop-player command "/storeinv" as op
  235. # remove loop-player from {GunGame.%{ns_Playing.%loop-player%}%::*}
  236. # delete {ns_Playing.%loop-player%}
  237. # teleport loop-player to player
  238.  
  239. command /mgp <integer>:
  240. permission: gg.admin
  241. trigger:
  242. set {mgc} to argument
  243. send "[&4&lGun&f-&3&lGame&f] &aSet MGP to *%{mgc}%" to player
  244. if {mgc} > 1:
  245. broadcast "[&4&lGun&f-&3&lGame&f] &aGP werden nun mit %{mgc}% multipliziert"
  246. else:
  247. broadcast "[&4&lGun&f-&3&lGame&f] &cGP werden nicht mehr multipliziert"
  248.  
  249. command /spawnall:
  250. executable by: Console
  251. trigger:
  252. loop all players:
  253. if {ns_InvStored.%loop-player%} is set:
  254. run loop-player command "/storeinv" as op
  255. remove loop-player from {GunGame.%{ns_Playing.%loop-player%}%::*}
  256. delete {ns_Playing.%loop-player%}
  257. teleport loop-player to {spawn}
  258. delete {ns_moved.%loop-player%}
  259. send "[&4&lGun&f-&3&lGame&f] &aYou were teleported to the spawn" to loop-player
  260. make console execute command "effect %loop-player% clear"
  261.  
  262.  
  263. command /spawn:
  264. trigger:
  265. if player has permission "gg.mod":
  266. if {ns_InvStored.%player%} is set:
  267. run player command "/storeinv" as op
  268. remove player from {GunGame.%{ns_Playing.%player%}%::*}
  269. delete {ns_Playing.%player%}
  270. teleport player to {spawn}
  271. delete {ns_moved.%player%}
  272. send "[&4&lGun&f-&3&lGame&f] &aYou were teleported to the spawn" to player
  273. make console execute command "effect %player% clear"
  274. else:
  275. if {ns_moved.%player%} is set:
  276. send "[&4&lGun&f-&3&lGame&f] &cYou are already teleporting..." to player
  277. stop
  278. send "[&4&lGun&f-&3&lGame&f] &aPlease wait 5 seconds and don't move" to player
  279. set {ns_moved.%player%} to "teleporting"
  280. wait 5 real seconds
  281. if {ns_moved.%player%} is "teleporting":
  282. if {ns_InvStored.%player%} is set:
  283. run player command "/storeinv" as op
  284. remove player from {GunGame.%{ns_Playing.%player%}%::*}
  285. delete {ns_Playing.%player%}
  286. teleport player to {spawn}
  287. delete {ns_moved.%player%}
  288. send "[&4&lGun&f-&3&lGame&f] &aYou were teleported to the spawn" to player
  289. make console execute command "effect %player% clear"
  290.  
  291. command /lobby:
  292. trigger:
  293. send "[&4&lGun&f-&3&lGame&f] &4&lBitte nutze &c&l/spawn" to player
  294.  
  295. command /kd <offlineplayer> [<int>] [<int>]:
  296. permission: gg.admin
  297. usage: /kd <name> <kills> <deaths>
  298. trigger:
  299. update "UPDATE GunGame SET kills = %arg-2% WHERE uuid= '%uuid of arg-1%';"
  300. update "UPDATE GunGame SET deaths = %arg-3% WHERE uuid= '%uuid of arg-1%';"
  301. send "[&4&lGun&f-&3&lGame&f] &aUpdated the K/D" to player
  302.  
  303. # +------------------------------------------------------+
  304. # | <~ Level System ~> |
  305. # +------------------------------------------------------+
  306.  
  307. on level change:
  308. if level of player > 0:
  309. if level of player < 31:
  310. # Clear the Players Inventory for New Items
  311. loop all items in the player's inventory:
  312. if loop-item is loop-item with lore "&f[&4&lGun&f-&3&lGame&f]":
  313. remove loop-item from player
  314.  
  315. # Clear the Players Armor for New Items
  316. loop items of type iron armor and leather armor and chain armor and gold armor and diamond armor:
  317. if the player's helmet is loop-item with lore "&f[&4&lGun&f-&3&lGame&f]":
  318. set the player's helmet to air
  319. if the player's chestplate is loop-item with lore "&f[&4&lGun&f-&3&lGame&f]":
  320. set the player's chestplate to air
  321. if the player's leggings is loop-item with lore "&f[&4&lGun&f-&3&lGame&f]":
  322. set the player's leggings to air
  323. if the player's boots is loop-item with lore "&f[&4&lGun&f-&3&lGame&f]":
  324. set the player's boots to air
  325.  
  326. wait 5 ticks
  327.  
  328. if level of player is 1:
  329. give player wooden sword with lore "&f[&4&lGun&f-&3&lGame&f]"
  330. if level of player is 2:
  331. if the player's helmet is air:
  332. equip player with leather tunic with lore "&f[&4&lGun&f-&3&lGame&f]"
  333. give player 1 wooden sword with lore "&f[&4&lGun&f-&3&lGame&f]"
  334. give player 1 bow with lore "&f[&4&lGun&f-&3&lGame&f]"
  335. give player 16 arrow with lore "&f[&4&lGun&f-&3&lGame&f]"
  336. if level of player is 3:
  337. give player 1 stone sword with lore "&f[&4&lGun&f-&3&lGame&f]"
  338. if the player's chestplate is air:
  339. equip player with leather tunic with lore "&f[&4&lGun&f-&3&lGame&f]"
  340. if the player's leggings is air:
  341. equip player with leather leggings with lore "&f[&4&lGun&f-&3&lGame&f]"
  342. if level of player is 4:
  343. give player 1 stone sword with lore "&f[&4&lGun&f-&3&lGame&f]"
  344. if the player's leggings is air:
  345. equip player with chain leggings with lore "&f[&4&lGun&f-&3&lGame&f]"
  346. if the player's boots is air:
  347. equip player with chain boots with lore "&f[&4&lGun&f-&3&lGame&f]"
  348. if level of player is 5:
  349. give player 1 stone sword with lore "&f[&4&lGun&f-&3&lGame&f]"
  350. if the player's boots is air:
  351. equip player with golden boots with lore "&f[&4&lGun&f-&3&lGame&f]"
  352. if the player's leggings is air:
  353. equip player with golden leggings with lore "&f[&4&lGun&f-&3&lGame&f]"
  354. give player 1 golden apple
  355. if level of player is 6:
  356. give player 1 stone sword with lore "&f[&4&lGun&f-&3&lGame&f]"
  357. if the player's boots is air:
  358. equip player with golden boots with lore "&f[&4&lGun&f-&3&lGame&f]"
  359. if the player's leggings is air:
  360. equip player with golden leggings with lore "&f[&4&lGun&f-&3&lGame&f]"
  361. if the player's helmet is air:
  362. equip player with leather helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  363. if the player's chestplate is air:
  364. equip player with golden chestplate with lore "&f[&4&lGun&f-&3&lGame&f]"
  365. if level of player is 7:
  366. give player 1 iron sword with lore "&f[&4&lGun&f-&3&lGame&f]"
  367. if the player's chestplate is air:
  368. equip player with golden chestplate with lore "&f[&4&lGun&f-&3&lGame&f]"
  369. if the player's leggings is air:
  370. equip player with golden leggings with lore "&f[&4&lGun&f-&3&lGame&f]"
  371. if the player's boots is air:
  372. equip player with golden boots with lore "&f[&4&lGun&f-&3&lGame&f]"
  373. if the player's helmet is air:
  374. equip player with leather helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  375. if level of player is 8:
  376. give player 1 iron sword with lore "&f[&4&lGun&f-&3&lGame&f]"
  377. if the player's helmet is air:
  378. equip player with leather helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  379. if the player's chestplate is air:
  380. equip player with chain chestplate with lore "&f[&4&lGun&f-&3&lGame&f]"
  381. if the player's leggings is air:
  382. equip player with iron leggings with lore "&f[&4&lGun&f-&3&lGame&f]"
  383. if the player's boots is air:
  384. equip player with iron boots with lore "&f[&4&lGun&f-&3&lGame&f]"
  385. if level of player is 9:
  386. if the player's helmet is air:
  387. equip player with leather helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  388. give player 1 iron sword with lore "&f[&4&lGun&f-&3&lGame&f]"
  389. if the player's chestplate is air:
  390. equip player with iron chestplate with lore "&f[&4&lGun&f-&3&lGame&f]"
  391. if the player's leggings is air:
  392. equip player with golden leggings with lore "&f[&4&lGun&f-&3&lGame&f]"
  393. if the player's boots is air:
  394. equip player with iron boots with lore "&f[&4&lGun&f-&3&lGame&f]"
  395. if level of player is 10:
  396. give player 1 iron sword with lore "&f[&4&lGun&f-&3&lGame&f]"
  397. if the player's helmet is air:
  398. equip player with leather helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  399. if the player's chestplate is air:
  400. equip player with iron chestplate with lore "&f[&4&lGun&f-&3&lGame&f]"
  401. if the player's leggings is air:
  402. equip player with iron leggings with lore "&f[&4&lGun&f-&3&lGame&f]"
  403. if the player's boots is air:
  404. equip player with golden boots with lore "&f[&4&lGun&f-&3&lGame&f]"
  405. if level of player is 11:
  406. give player 1 iron sword with lore "&f[&4&lGun&f-&3&lGame&f]"
  407. give player 1 healing potion
  408. if the player's helmet is air:
  409. equip player with gold helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  410. if the player's chestplate is air:
  411. equip player with iron chestplate with lore "&f[&4&lGun&f-&3&lGame&f]"
  412. if the player's leggings is air:
  413. equip player with iron leggings with lore "&f[&4&lGun&f-&3&lGame&f]"
  414. if the player's boots is air:
  415. equip player with iron boots with lore "&f[&4&lGun&f-&3&lGame&f]"
  416. if level of player is 12:
  417. give player 1 iron sword with lore "&f[&4&lGun&f-&3&lGame&f]"
  418. if the player's helmet is air:
  419. equip player with gold helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  420. if the player's chestplate is air:
  421. equip player with iron chestplate with lore "&f[&4&lGun&f-&3&lGame&f]"
  422. if the player's leggings is air:
  423. equip player with iron leggings with lore "&f[&4&lGun&f-&3&lGame&f]"
  424. if the player's boots is air:
  425. equip player with gold boots with lore "&f[&4&lGun&f-&3&lGame&f]"
  426. if level of player is 13:
  427. give player 1 iron sword with lore "&f[&4&lGun&f-&3&lGame&f]"
  428. if the player's helmet is air:
  429. equip player with gold helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  430. if the player's chestplate is air:
  431. equip player with iron chestplate with lore "&f[&4&lGun&f-&3&lGame&f]"
  432. if the player's leggings is air:
  433. equip player with iron leggings with lore "&f[&4&lGun&f-&3&lGame&f]"
  434. if the player's boots is air:
  435. equip player with iron boots with lore "&f[&4&lGun&f-&3&lGame&f]"
  436. if level of player is 14:
  437. give player 1 iron sword of sharpness 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  438. if the player's helmet is air:
  439. equip player with gold helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  440. if the player's chestplate is air:
  441. equip player with iron chestplate with lore "&f[&4&lGun&f-&3&lGame&f]"
  442. if the player's leggings is air:
  443. equip player with iron leggings with lore "&f[&4&lGun&f-&3&lGame&f]"
  444. if the player's boots is air:
  445. equip player with gold boots with lore "&f[&4&lGun&f-&3&lGame&f]"
  446. if level of player is 15:
  447. give player 1 iron sword of sharpness 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  448. give player 1 iron hoe named "&eIron Shooter" with lore "&f[&4&lGun&f-&3&lGame&f]"
  449. if the player's helmet is air:
  450. equip player with gold helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  451. if the player's chestplate is air:
  452. equip player with iron chestplate with lore "&f[&4&lGun&f-&3&lGame&f]"
  453. if the player's leggings is air:
  454. equip player with iron leggings with lore "&f[&4&lGun&f-&3&lGame&f]"
  455. if the player's boots is air:
  456. equip player with gold boots with lore "&f[&4&lGun&f-&3&lGame&f]"
  457. if level of player is 16:
  458. give player 1 iron sword of sharpness 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  459. give player 1 splash potion of healing with lore "&f[&4&lGun&f-&3&lGame&f]"
  460. if the player's helmet is air:
  461. equip player with iron helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  462. if the player's chestplate is air:
  463. equip player with iron chestplate of protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  464. if the player's leggings is air:
  465. equip player with iron leggings with lore "&f[&4&lGun&f-&3&lGame&f]"
  466. if the player's boots is air:
  467. equip player with gold boots with lore "&f[&4&lGun&f-&3&lGame&f]"
  468. if level of player is 17:
  469. give player 1 iron sword of sharpness 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  470. if the player's helmet is air:
  471. equip player with diamond helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  472. if the player's chestplate is air:
  473. equip player with iron chestplate of protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  474. if the player's leggings is air:
  475. equip player with iron leggings with lore "&f[&4&lGun&f-&3&lGame&f]"
  476. if the player's boots is air:
  477. equip player with iron boots of fire protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  478. if level of player is 18:
  479. give player 1 iron sword of sharpness 1 and knockback 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  480. if the player's helmet is air:
  481. equip player with iron helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  482. if the player's chestplate is air:
  483. equip player with iron chestplate of protection 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  484. if the player's leggings is air:
  485. equip player with iron leggings of protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  486. if the player's boots is air:
  487. equip player with iron boots of fire protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  488. if level of player is 19:
  489. give player 1 iron sword of sharpness 1 and knockback 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  490. if the player's helmet is air:
  491. equip player with iron helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  492. if the player's chestplate is air:
  493. equip player with iron chestplate of protection 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  494. if the player's leggings is air:
  495. equip player with iron leggings of fire protection 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  496. if the player's boots is air:
  497. equip player with iron boots of fire protection 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  498. if level of player is 20:
  499. give player 1 iron sword of sharpness 1 and knockback 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  500. give player 1 iron hoe named "&eIron Shooter" with lore "&f[&4&lGun&f-&3&lGame&f]"
  501. give player 1 ghast tear named "&ePusher" with lore "&f[&4&lGun&f-&3&lGame&f]"
  502. if the player's helmet is air:
  503. equip player with iron helmet of protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  504. if the player's chestplate is air:
  505. equip player with iron chestplate of protection 2 and fire protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  506. if the player's leggings is air:
  507. equip player with iron leggings of protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  508. if the player's boots is air:
  509. equip player with gold boots of fire protection 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  510. if level of player is 21:
  511. give player 1 iron sword of sharpness 1 and knockback 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  512. give player 1 healing potion with lore "&f[&4&lGun&f-&3&lGame&f]"
  513. if the player's helmet is air:
  514. equip player with diamond helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  515. if the player's chestplate is air:
  516. equip player with iron chestplate of protection 2 and fire protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  517. if the player's leggings is air:
  518. equip player with iron leggings of protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  519. if the player's boots is air:
  520. equip player with gold boots of protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  521. if level of player is 22:
  522. apply speed 1 to player for 20 seconds
  523. give player 1 iron sword of sharpness 2 and knockback 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  524. give player 1 golden apple
  525. if the player's helmet is air:
  526. equip player with diamond helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  527. if the player's chestplate is air:
  528. equip player with iron chestplate of protection 2 and fire protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  529. if the player's leggings is air:
  530. equip player with iron leggings of protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  531. if the player's boots is air:
  532. equip player with gold boots of protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  533. if level of player is 23:
  534. give player 1 iron sword of sharpness 1 and knockback 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  535. if the player's helmet is air:
  536. equip player with diamond helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  537. if the player's chestplate is air:
  538. equip player with iron chestplate of protection 2 and fire protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  539. if the player's leggings is air:
  540. equip player with iron leggings of protection 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  541. if the player's boots is air:
  542. equip player with iron boots of protection 1 and fire protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  543. if level of player is 24:
  544. give player 1 iron sword of sharpness 2 and knockback 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  545. if the player's helmet is air:
  546. equip player with diamond helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  547. if the player's chestplate is air:
  548. equip player with iron chestplate of protection 2 and fire protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  549. if the player's leggings is air:
  550. equip player with iron leggings of protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  551. if the player's boots is air:
  552. equip player with iron boots of protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  553. if level of player is 25:
  554. apply regeneration 1 to player for 5 seconds
  555. apply speed 1 to player for 25 seconds
  556. give player 1 iron sword of sharpness 1 and knockback 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  557. if the player's helmet is air:
  558. equip player with diamond helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  559. if the player's chestplate is air:
  560. equip player with iron chestplate of protection 2 and fire protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  561. if the player's leggings is air:
  562. equip player with iron leggings of protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  563. if the player's boots is air:
  564. equip player with iron boots of protection 1 and fire protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  565. if level of player is 26:
  566. give player 1 iron sword of sharpness 2 and knockback 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  567. give player iron hoe named "&eIron Shooter" with lore "&f[&4&lGun&f-&3&lGame&f]"
  568. give player 1 splash potion of healing 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  569. if the player's helmet is air:
  570. equip player with diamond helmet with lore "&f[&4&lGun&f-&3&lGame&f]"
  571. if the player's chestplate is air:
  572. equip player with iron chestplate of protection 2 and fire protection 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  573. if the player's leggings is air:
  574. equip player with iron leggings of protection 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  575. if the player's boots is air:
  576. equip player with iron boots of protection 1 and fire protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  577. if level of player is 27:
  578. give player 1 iron sword of sharpness 2 and knockback 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  579. give player 1 bow of power 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  580. if the player's helmet is air:
  581. equip player with diamond helmet of protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  582. if the player's chestplate is air:
  583. equip player with iron chestplate of protection 2 and fire protection 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  584. if the player's leggings is air:
  585. equip player with iron leggings of protection 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  586. if the player's boots is air:
  587. equip player with iron boots of protection 1 and fire protection 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  588. if level of player is 28:
  589. give player 1 iron sword of sharpness 2 and knockback 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  590. give player 1 golden apple with lore "&f[&4&lGun&f-&3&lGame&f]"
  591. give player 1 bow of power 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  592. if the player's helmet is air:
  593. equip player with diamond helmet of protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  594. if the player's chestplate is air:
  595. equip player with iron chestplate of protection 2 and fire protection 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  596. if the player's leggings is air:
  597. equip player with iron leggings of protection 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  598. if the player's boots is air:
  599. equip player with iron boots of protection 3 and fire protection 3 with lore "&f[&4&lGun&f-&3&lGame&f]"
  600. if level of player is 29:
  601. give player 1 iron sword of sharpness 2 and knockback 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  602. give player 1 bow of power 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  603. if the player's helmet is air:
  604. equip player with diamond helmet of protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  605. if the player's chestplate is air:
  606. equip player with iron chestplate of protection 2 and fire protection 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  607. if the player's leggings is air:
  608. equip player with iron leggings of protection 3 with lore "&f[&4&lGun&f-&3&lGame&f]"
  609. if the player's boots is air:
  610. equip player with iron boots of protection 3 and fire protection 3 with lore "&f[&4&lGun&f-&3&lGame&f]"
  611. if level of player is 30:
  612. give player 1 iron sword of sharpness 2 and knockback 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  613. give player 1 bow of power 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  614. give player 1 healing potion 2
  615. give player 1 golden apple
  616. apply speed 1 to player for 30 seconds
  617. apply regeneration 1 to player for 7 seconds
  618. give player 1 ghast tear named "&ePusher" with lore "&f[&4&lGun&f-&3&lGame&f]"
  619. if the player's helmet is air:
  620. equip player with diamond helmet of protection 1 with lore "&f[&4&lGun&f-&3&lGame&f]"
  621. if the player's chestplate is air:
  622. equip player with iron chestplate of protection 2 and fire protection 2 with lore "&f[&4&lGun&f-&3&lGame&f]"
  623. if the player's leggings is air:
  624. equip player with iron leggings of protection 3 with lore "&f[&4&lGun&f-&3&lGame&f]"
  625. if the player's boots is air:
  626. equip player with iron boots of protection 3 and fire protection 3 with lore "&f[&4&lGun&f-&3&lGame&f]"
  627.  
  628. give player 16 arrow with lore "&f[&4&lGun&f-&3&lGame&f]"
  629. if level of player < 30:
  630. give player bow with lore "&f[&4&lGun&f-&3&lGame&f]"
  631. send "[&4&lGun&f-&3&lGame&f] &6&lYou are now level &c%level of player%" to player
  632.  
  633. on death:
  634. # Other Stuff
  635. clear drops
  636. set death message to ""
  637. //play "GHAST_FIREBALL" to {ns_lastkiller.%victim%} at volume 1
  638. # Attacker Stuff
  639. if attacker is victim:
  640. stop
  641. if {mgc} is 0:
  642. if {ns_lastkiller.%victim%} is set:
  643. set {gaingc} to level of victim+2
  644. make console execute command "gp add %{ns_lastkiller.%victim%}% %{gaingc}%"
  645. send "[&4&lGun&f-&3&lGame&f] &aYou received %{gaingc}% GP" to {ns_lastkiller.%victim%}
  646. send "[&4&lGun&f-&3&lGame&f] &aYou killed: &e%victim%" to {ns_lastkiller.%victim%}
  647. apply regeneration 5 to attacker for 2 seconds
  648. else:
  649. set {gaingc} to level of victim+2*{mgc}
  650. #set {gaingc} to 2*{mgc}
  651. if {ns_lastkiller.%victim%} is set:
  652. make console execute command "gp add %{ns_lastkiller.%victim%}% %{gaingc}%"
  653. send "[&4&lGun&f-&3&lGame&f] &aYou received %{gaingc}% GP" to {ns_lastkiller.%victim%}
  654. send "[&4&lGun&f-&3&lGame&f] &aYou killed: &e%victim%" to {ns_lastkiller.%victim%}
  655. apply regeneration 5 to attacker for 2 seconds
  656.  
  657.  
  658. if victim is a player:
  659. if {ns_lastkiller.%victim%} is set:
  660. increase the attacker's level by 1
  661. set {ns_Deaths.%{ns_lastkiller.%victim%}%} to the first element out of objects in column "deaths" from result of query "SELECT `deaths` FROM `GunGame` WHERE `uuid` = ""%uuid of {ns_lastkiller.%victim%}%""" and close
  662. set {ns_Kills.%{ns_lastkiller.%victim%}%} to the first element out of objects in column "kills" from result of query "SELECT `kills` FROM `GunGame` WHERE `uuid` = ""%uuid of {ns_lastkiller.%victim%}%""" and close
  663. increase {ns_Kills.%{ns_lastkiller.%victim%}%} by 1
  664. make console execute command "kd %{ns_lastkiller.%victim%}% %{ns_Kills.%{ns_lastkiller.%victim%}%}% %{ns_Deaths.%{ns_lastkiller.%victim%}%}%"
  665. delete {ns_Deaths.%{ns_lastkiller.%victim%}%}
  666. delete {ns_Kills.%{ns_lastkiller.%victim%}%}
  667.  
  668. # Victim Stuff
  669. send "[&4&lGun&f-&3&lGame&f] &cYou lost 1 GP" to victim
  670. send "[&4&lGun&f-&3&lGame&f] &cYou got killed by: &e%{ns_lastkiller.%victim%}%" to victim
  671. make console execute command "gp remove %victim% 1"
  672. set {ns_Deaths.%victim%} to the first element out of objects in column "deaths" from result of query "SELECT `deaths` FROM `GunGame` WHERE `uuid` = ""%uuid of victim%""" and close
  673. set {ns_Kills.%victim%} to the first element out of objects in column "kills" from result of query "SELECT `kills` FROM `GunGame` WHERE `uuid` = ""%uuid of victim%""" and close
  674. increase {ns_Deaths.%victim%} by 1
  675. make console execute command "kd %victim% %{ns_Kills.%victim%}% %{ns_Deaths.%victim%}%"
  676. delete {ns_Deaths.%victim%}
  677. delete {ns_Kills.%victim%}
  678. delete {ns_spawnedwolf.%victim%}
  679.  
  680. # Wolf stuff
  681. if victim is wolf:
  682. loop all players:
  683. if name of victim is "%name of loop-player%'s Wolf":
  684. remove 1 from {ns_spawnedwolf.%loop-player%}
  685.  
  686. delete {ns_lastkiller.%victim%}
  687.  
  688. # +------------------------------------------------------+
  689. # | <~ Map System ~> |
  690. # +------------------------------------------------------+
  691.  
  692. command /map <text> [<text>]:
  693. permission: gg.admin
  694. usage: /map <close/open> <map name>
  695. trigger:
  696. if argument-1 is "close":
  697. if argument-2 is set:
  698. loop {GG.%arg-2%::*}:
  699. remove loop-value from {GG.%{ns_Playing.%loop-value%}%::*}
  700. delete {ns_Playing.%loop-value%}
  701. teleport loop-value to {spawn}
  702. delete {GG.%arg-2%::*}
  703. set line 4 of block at {GG::locs::%argument-2%} to "&4|Closed|"
  704. send "[&4&lGun&f-&3&lGame&f] &cMap %arg-2% closed" to player
  705. stop
  706. if argument-1 is "open":
  707. if argument-2 is set:
  708. loop {GG.%arg-2%::*}:
  709. remove loop-value from {GG.%{ns_Playing.%loop-value%}%::*}
  710. delete {ns_Playing.%loop-value%}
  711. teleport loop-value to {spawn}
  712. delete {GG.%arg-2%::*}
  713. set line 4 of block at {GG::locs::%argument-2%} to "&a:Bereit:"
  714. send "[&4&lGun&f-&3&lGame&f] &aMap %arg-2% openned" to player
  715. stop
  716. if argument-1 is "NoDia":
  717. if argument-2 is set:
  718. loop {GG.%arg-2%::*}:
  719. remove loop-value from {GG.%{ns_Playing.%loop-value%}%::*}
  720. delete {ns_Playing.%loop-value%}
  721. teleport loop-value to {spawn}
  722. delete {GG.%arg-2%::*}
  723. set line 4 of block at {GG::locs::%argument-2%} to "&a:NoDia:"
  724. send "[&4&lGun&f-&3&lGame&f] &aMap %arg-2% redefined" to player
  725. stop
  726. if argument-1 is "OP-War":
  727. if argument-2 is set:
  728. loop {GG.%arg-2%::*}:
  729. remove loop-value from {GG.%{ns_Playing.%loop-value%}%::*}
  730. delete {ns_Playing.%loop-value%}
  731. teleport loop-value to {spawn}
  732. delete {GG.%arg-2%::*}
  733. set line 4 of block at {GG::locs::%argument-2%} to "&a:OP-War:"
  734. send "[&4&lGun&f-&3&lGame&f] &aMap %arg-2% redefined" to player
  735. stop
  736.  
  737. command /delsign <text>:
  738. permission: gg.admin
  739. trigger:
  740. set block at {GG::locs::%argument%} to air
  741. delete {GG::locs::%argument%}
  742. send "[&4&lGun&f-&3&lGame&f] &cSign deleted" to player
  743.  
  744. command /setsign <text>:
  745. permission: gg.admin
  746. trigger:
  747. set {GG::locs::%argument%} to location of target block
  748. set line 1 of target block to "&b[Gun-Game]"
  749. set line 2 of target block to "%Argument%"
  750. send "[&4&lGun&f-&3&lGame&f] &aSign created" to player
  751.  
  752. command /tpmap <text>:
  753. permission: gg.mod
  754. trigger:
  755. teleport player to {GG.Maps::%argument%}
  756.  
  757. command /setmspawn <text>:
  758. permission: gg.admin
  759. description: Sets an spawn for an map
  760. usage: /setmspawn <mapname>
  761. trigger:
  762. set {GG.Maps::%argument 1%} to location of player
  763. send "Spawn set" to player
  764.  
  765. command /delmspawn <text>:
  766. permission: gg.admin
  767. trigger:
  768. delete {GG.Maps::%argument 1%}
  769. send "MapSpawn deleted" to player
  770.  
  771. command /clearmap <text>:
  772. permission: gg.admin
  773. trigger:
  774. if arg is "all":
  775. loop {maplist::*}:
  776. loop {GG.%loop-value%::*}:
  777. remove loop-value-2 from {GG.%{ns_Playing.%loop-value-2%}%::*}
  778. delete {ns_Playing.%loop-value-2%}
  779. teleport loop-value-2 to {spawn}
  780. delete {GG.%loop-value-1%::*}
  781. send "[&4&lGun&f-&3&lGame&f] &aMap cleared"
  782. stop
  783. loop {GG.%arg%::*}:
  784. remove loop-value from {GG.%{ns_Playing.%loop-value%}%::*}
  785. delete {ns_Playing.%loop-value%}
  786. teleport loop-value to {spawn}
  787. delete {GG.%arg%::*}
  788. send "[&4&lGun&f-&3&lGame&f] &aMap cleared"
  789.  
  790. command /adddia:
  791. permission: gg.owner
  792. trigger:
  793. add player's tool to {DiaList::*}
  794. send "Added" to player
  795.  
  796. on right click on sign:
  797. if {ns_tempns_god.%player%} is set:
  798. delete {ns_tempns_god.%player%}
  799. if line 1 is "&b[Gun-Game]":
  800. if line 4 is "&4|Closed|":
  801. if player has permission "gg.supp":
  802. send "[&4&lGun&f-&3&lGame&f] &cThis map is closed for players..." to player
  803. teleport player to {GG.Maps::%line 2%}
  804. add player to {GG.%line 2%::*}
  805. set {ns_Playing.%player%} to line 2
  806. else:
  807. send "[&4&lGun&f-&3&lGame&f] &cThis map is closed for players..." to player
  808. stop
  809.  
  810. if line 4 is "&a:NoDia:":
  811. # Check if player has Diamond Items
  812. if player has a diamond sword or diamond shovel or diamond pickaxe or diamond axe or diamond hoe or diamond helmet or diamond chestplate or diamond leggings or diamond boots or diamond:
  813. send "[&4&lGun&f-&3&lGame&f] &cAuf dieser map sind keine Dia-Sachen erlaubt"
  814. stop
  815. if helmet of player is diamond helmet:
  816. send "[&4&lGun&f-&3&lGame&f] &cAuf dieser map sind keine Dia-Sachen erlaubt"
  817. stop
  818. if chestplate of player is diamond chestplate:
  819. send "[&4&lGun&f-&3&lGame&f] &cAuf dieser map sind keine Dia-Sachen erlaubt"
  820. stop
  821. if leggings of player is diamond leggings:
  822. send "[&4&lGun&f-&3&lGame&f] &cAuf dieser map sind keine Dia-Sachen erlaubt"
  823. stop
  824. if boots of player is diamond boots:
  825. send "[&4&lGun&f-&3&lGame&f] &cAuf dieser map sind keine Dia-Sachen erlaubt"
  826. stop
  827. # Send Player to the map
  828. # if player has permission "gg.supp":
  829. # send "[&4&lGun&f-&3&lGame&f] &cDieser Modus ist für normale Spieler gesperrt" to player
  830. #else:
  831. # send "[&4&lGun&f-&3&lGame&f] &cDieser Modus wird noch aufgebaut" to player
  832. # stop
  833.  
  834. if line 4 is "&a:OP-War:":
  835. if player has permission "gg.supp":
  836. send "[&4&lGun&f-&3&lGame&f] &cDieser Modus ist für normale Spieler gesperrt" to player
  837. if {ns_InvStored.%player%} is not set:
  838. run player command "/storeinv" as op
  839. else:
  840. send "[&4&lGun&f-&3&lGame&f] &cDieser Modus wird noch aufgebaut" to player
  841. stop
  842.  
  843. if line 2 is set:
  844. if line 3 is "&f16 / 16":
  845. send "[&4&lGun&f-&3&lGame&f] &cThis map is full" to player
  846. else:
  847. teleport player to {GG.Maps::%line 2%}
  848. add player to {GG.%line 2%::*}
  849. set {ns_Playing.%player%} to line 2
  850.  
  851. every 1 seconds:
  852. loop {GG::locs::*}:
  853. set line 3 of block at loop-value to "&f%size of {GG.%loop-index%::*}% / 16"
  854. if line 3 of block at loop-value is "16 / 16":
  855. if line 4 of block at loop-value is not "&c|Closed|":
  856. set line 4 of block at loop-value to "&c:Full:"
  857. else:
  858. if line 4 of block at loop-value is "&c:Full:":
  859. set line 4 of block at loop-value to "&a:Bereit:"
  860.  
  861.  
  862. # +------------------------------------------------------+
  863. # | <~ Items ~> |
  864. # +------------------------------------------------------+
  865.  
  866.  
  867. on projectile hit:
  868. projectile is arrow:
  869. delete entity
  870.  
  871. on place tnt:
  872. cancel event
  873.  
  874. command /wolf <player>:
  875. trigger:
  876. if {ns_spawnedwolf.%argument%} is 10:
  877. send "[&4&lGun&f-&3&lGame&f] &cYou cant spawn more..." to argument
  878. stop
  879. spawn wolf at location of the argument
  880. set the owner of spawned entity to argument
  881. set name of spawned entity to "%name of argument%'s Wolf"
  882. show mob spawner flames at the argument
  883. remove 1 bone from argument
  884. play raw sound "mob.wolf.bark" at argument with pitch 1 volume 100
  885. add 1 to {ns_spawnedwolf.%argument%}
  886.  
  887. on shoot:
  888. shooter is player:
  889. shooter is holding a golden hoe:
  890. ignite the projectile
  891.  
  892. on right click:
  893. if player is in the region "spawn":
  894. if player is holding a name tag or iron hoe or golden hoe or diamond hoe or bone or ghast tear or wooden hoe or tnt or blaze rod:
  895. send "[&4&lGun&f-&3&lGame&f] &cDu kannst das Item hier nicht nutzen!" to player
  896. stop
  897. if player is in the region "schachbrett_spawn":
  898. if player is holding a name tag or iron hoe or golden hoe or diamond hoe or bone or ghast tear or wooden hoe or tnt or blaze rod:
  899. send "[&4&lGun&f-&3&lGame&f] &cDu kannst das Item hier nicht nutzen!" to player
  900. stop
  901. if player is in the region "ameisenfarm_spawn":
  902. if player is holding a name tag or iron hoe or golden hoe or diamond hoe or bone or ghast tear or wooden hoe or tnt or blaze rod:
  903. send "[&4&lGun&f-&3&lGame&f] &cDu kannst das Item hier nicht nutzen!" to player
  904. stop
  905. if player is in the region "jahreszeiten_spawn":
  906. if player is holding a name tag or iron hoe or golden hoe or diamond hoe or bone or ghast tear or wooden hoe or tnt or blaze rod:
  907. send "[&4&lGun&f-&3&lGame&f] &cDu kannst das Item hier nicht nutzen!" to player
  908. stop
  909. if player is in the region "kreuzung_spawn":
  910. if player is holding a name tag or iron hoe or golden hoe or diamond hoe or bone or ghast tear or wooden hoe or tnt or blaze rod:
  911. send "[&4&lGun&f-&3&lGame&f] &cDu kannst das Item hier nicht nutzen!" to player
  912. stop
  913. if player is in the region "flauschi_spawn":
  914. if player is holding a name tag or iron hoe or golden hoe or diamond hoe or bone or ghast tear or wooden hoe or tnt or blaze rod:
  915. send "[&4&lGun&f-&3&lGame&f] &cDu kannst das Item hier nicht nutzen!" to player
  916. stop
  917. if player is in the region "bauschi_spawn":
  918. if player is holding a name tag or iron hoe or golden hoe or diamond hoe or bone or ghast tear or wooden hoe or tnt or blaze rod:
  919. send "[&4&lGun&f-&3&lGame&f] &cDu kannst das Item hier nicht nutzen!" to player
  920. stop
  921. if player is in the region "krauschi_spawn":
  922. if player is holding a name tag or iron hoe or golden hoe or diamond hoe or bone or ghast tear or wooden hoe or tnt or blaze rod:
  923. send "[&4&lGun&f-&3&lGame&f] &cDu kannst das Item hier nicht nutzen!" to player
  924. stop
  925. if player is in the region "villagespawn":
  926. if player is holding a name tag or iron hoe or golden hoe or diamond hoe or bone or ghast tear or wooden hoe or tnt or blaze rod:
  927. send "[&4&lGun&f-&3&lGame&f] &cDu kannst das Item hier nicht nutzen!" to player
  928. stop
  929. if player is in the region "woolwars_spawn":
  930. if player is holding a name tag or iron hoe or golden hoe or diamond hoe or bone or ghast tear or wooden hoe or tnt or blaze rod:
  931. send "[&4&lGun&f-&3&lGame&f] &cDu kannst das Item hier nicht nutzen!" to player
  932. stop
  933. if player is in the region "woodan_spawn":
  934. if player is holding a name tag or iron hoe or golden hoe or diamond hoe or bone or ghast tear or wooden hoe or tnt or blaze rod:
  935. send "[&4&lGun&f-&3&lGame&f] &cDu kannst das Item hier nicht nutzen!" to player
  936. stop
  937. if player is in the region "kleinerhafen_spawn":
  938. if player is holding a name tag or iron hoe or golden hoe or diamond hoe or bone or ghast tear or wooden hoe or tnt or blaze rod:
  939. send "[&4&lGun&f-&3&lGame&f] &cDu kannst das Item hier nicht nutzen!" to player
  940. stop
  941. if player is in the region "mars_spawn":
  942. if player is holding a name tag or iron hoe or golden hoe or diamond hoe or bone or ghast tear or wooden hoe or tnt or blaze rod:
  943. send "[&4&lGun&f-&3&lGame&f] &cDu kannst das Item hier nicht nutzen!" to player
  944. stop
  945. if player is holding a name tag:
  946. play raw sound "mob.endermen.portal" at player with pitch 1 volume 100
  947. remove player from {GunGame.%{ns_Playing.%player%}%::*}
  948. delete {ns_Playing.%player%}
  949. teleport player to {spawn}
  950. set {ns_tempns_god.%player%} to true
  951. extinguish the player
  952. heal the player
  953. make console execute command "effect %player% clear"
  954. remove 1 name tag from player
  955. wait 5 seconds
  956. delete {ns_tempns_god.%player%}
  957. if player is holding a iron hoe:
  958. if player has arrow:
  959. show mob spawner flames at the player
  960. play raw sound "random.break" at player with pitch 2 volume 100
  961. shoot arrow from the player at speed 5
  962. damage tool of player by 10
  963. remove 1 arrow from player
  964. if player is holding a golden hoe:
  965. if player has arrow:
  966. show mob spawner flames at the player
  967. play raw sound "random.break" at player with pitch 2 volume 100
  968. shoot arrow from the player at speed 5
  969. damage tool of player by 3
  970. remove 1 arrow from player
  971. if player is holding a wooden hoe:
  972. if player has arrow:
  973. show mob spawner flames at the player
  974. play raw sound "random.break" at player with pitch 2 volume 100
  975. shoot arrow from the player at speed 7
  976. damage tool of player by 10
  977. remove 1 arrow from player
  978. if player is holding a diamond hoe:
  979. remove 1 diamond hoe from player
  980. play raw sound "random.break" at player with pitch 1 volume 100
  981. damage the target by 10
  982. loop 2 times:
  983. strike lightning effect at the target
  984. if player is holding a bone:
  985. make console execute command "wolf %player%"
  986. if player is holding a ghast tear:
  987. push all entities within radius 10 of player 1 up
  988. remove 1 ghast tear from player
  989. play raw sound "mob.endermen.portal" at player with pitch 1 volume 100
  990. wait 3 seconds
  991. if player is holding a tnt named "&3&lTNT" with lore "&7-> &eRechtsklick zum benutzen &7<-":
  992. create a fake explosion at the target
  993. remove 1 tnt from player
  994. damage the target by 4
  995. wait 3 seconds
  996. play raw sound "EXPLODE" at player with pitch 1 volume 100
  997. if player is holding a blaze rod named "&6&lFirefly" with lore "&7Zünde deine Gegner an!":
  998. ignite the target for 10 seconds
  999. remove 1 blaze rod from player
  1000. damage the target by 2
  1001. wait 3 seconds
  1002. play "CLICK" to player at volume 0.2
  1003.  
  1004.  
  1005. # +------------------------------------------------------+
  1006. # | <~ Kits ~> |
  1007. # +------------------------------------------------------+
  1008.  
  1009. command /kit <text> [<player>]:
  1010. description: Gives you an premium kit
  1011. usage: /kit <kit>
  1012. #permission: gg.premium
  1013. trigger:
  1014. if argument 2 is not set:
  1015. if argument 1 is "vip":
  1016. if player has permission "gg.admin":
  1017. give player 1 iron sword of sharpness 1 named "&d&lVIP Schwert"
  1018. give player 1 iron boots of protection 1 named "&d&lVIP Schuhe"
  1019. give player 1 iron leggings of protection 1 named "&d&lVIP Hose"
  1020. give player 1 iron chestplate of protection 1 named "&d&lVIP Harnisch"
  1021. give player 1 iron helmet named "&d&lVIP Helm"
  1022. give player 8 experience bottle named "&3&lXP"
  1023. give player 1 sugar named "&3&lZucker"
  1024. stop
  1025. if {kit.%player%.VIPUsed} was less than a day ago:
  1026. send "[&4&lGun&f-&3&lGame&f] &cYou can use this only once a day..." to player
  1027. stop
  1028. if player doesn't have permission "gg.vip":
  1029. send "[&4&lGun&f-&3&lGame&f] &cDu bist leider kein VIP Spieler" to player
  1030. stop
  1031. set {kit.%player%.VIPUsed} to now
  1032. give player 1 iron sword of sharpness 2 named "&d&lVIP Schwert"
  1033. give player 1 iron boots of protection 2 named "&d&lVIP Schuhe"
  1034. give player 1 iron leggings of protection 2 named "&d&lVIP Hose"
  1035. give player 1 iron chestplate of protection 2 named "&d&lVIP Harnisch"
  1036. give player 1 iron helmet of protection 1 named "&d&lVIP Helm"
  1037. give player 8 experience bottle named "&3&lXP"
  1038. give player 1 sugar named "&3&lZucker"
  1039. if argument 1 is "elite":
  1040. if player has permission "gg.admin":
  1041. give player 1 iron sword of sharpness 2 named "&5&lElite Schwert"
  1042. give player 1 iron boots of protection 2 named "&5&lElite Schuhe"
  1043. give player 1 iron leggings of protection 2 named "&5&lElite Hose"
  1044. give player 1 iron chestplate of protection 2 named "&5&lElite Harnisch"
  1045. give player 1 iron helmet of protection 1 named "&5&lElite Helm"
  1046. give player 16 experience bottle named "&3&lXP"
  1047. give player 1 sugar named "&3&lZucker"
  1048. give player 1 iron hoe named "&5&lEisen Hoe"
  1049. stop
  1050. if {kit.%player%.EliteUsed} was less than a day ago:
  1051. send "[&4&lGun&f-&3&lGame&f] &cYou can use this only once a day..." to player
  1052. stop
  1053. if player doesn't have permission "gg.elite":
  1054. send "[&4&lGun&f-&3&lGame&f] &cDu bist leider kein Elite Spieler" to player
  1055. stop
  1056. set {kit.%player%.EliteUsed} to now
  1057. give player 1 iron sword of sharpness 2 named "&5&lElite Schwert"
  1058. give player 1 iron boots of protection 2 named "&5&lElite Schuhe"
  1059. give player 1 iron leggings of protection 2 named "&5&lElite Hose"
  1060. give player 1 iron chestplate of protection 2 named "&5&lElite Harnisch"
  1061. give player 1 iron helmet of protection 1 named "&5&lElite Helm"
  1062. give player 16 experience bottle named "&3&lXP"
  1063. give player 1 sugar named "&3&lZucker"
  1064. give player 1 iron hoe named "&5&lEisen Hoe"
  1065. if argument 1 is "titan":
  1066. if player has permission "gg.admin":
  1067. give player 1 iron sword of sharpness 3 named "&e&lTitan Schwert"
  1068. give player 1 iron boots of protection 3 named "&e&lTitan Schuhe"
  1069. give player 1 iron leggings of protection 3 named "&e&lTitan Hose"
  1070. give player 1 iron chestplate of protection 3 named "&e&lTitan Harnisch"
  1071. give player 1 iron helmet of protection 2 named "&e&lTitan Helm"
  1072. give player 20 experience bottle named "&3&lXP"
  1073. give player 1 sugar named "&3&lZucker"
  1074. give player 1 iron hoe named "&5&lEisen hoe"
  1075. stop
  1076. if {kit.%player%.TitanUsed} was less than a day ago:
  1077. send "[&4&lGun&f-&3&lGame&f] &cYou can use this only once a day..." to player
  1078. stop
  1079. if player doesn't have permission "gg.titan":
  1080. send "[&4&lGun&f-&3&lGame&f] &cDu bist leider kein Titan Spieler" to player
  1081. stop
  1082. set {kit.%player%.TitanUsed} to now
  1083. give player 1 iron sword of sharpness 3 named "&e&lTitan Schwert"
  1084. give player 1 iron boots of protection 3 named "&e&lTitan Schuhe"
  1085. give player 1 iron leggings of protection 3 named "&e&lTitan Hose"
  1086. give player 1 iron chestplate of protection 3 named "&e&lTitan Harnisch"
  1087. give player 1 iron helmet of protection 2 named "&e&lTitan Helm"
  1088. give player 32 experience bottle named "&3&lXP"
  1089. give player 1 sugar named "&3&lZucker"
  1090. give player 1 iron hoe named "&5&lEisen hoe"
  1091. #if argument 1 is "platin":
  1092. # if player has permission "gg.admin":
  1093. # give player 1 iron sword of sharpness 2 named "&3&lPlatin Sword"
  1094. # give player 1 iron boots of protection 3 named "&3&lPlatin Boots"
  1095. # give player 1 iron leggings of protection 3 named "&3&lPlatin Leggings"
  1096. # give player 1 iron chestplate of protection 3 named "&3&lPlatin Chestplate"
  1097. # give player 1 diamond helmet of protection 1 named "&3&lPlatin Helmet"
  1098. # give player 1 stick of knockback 2 named "&3&lPlatin Stick"
  1099. # give player 1 splash potion of healing 2 named "&3&lPlatin Heal"
  1100. # give player 32 experience bottle named "&3&lPlatin XP"
  1101. # give player 1 diamond named "&3&lDiamant"
  1102. # give player 1 splash potion of speed 1 named "&3&lPlatin Speed"
  1103. # give player 1 sugar named "&3&lZucker"
  1104. # give player 1 enchanted golden apple named "&6&lOP Apple" with lore "&7Heals you over time"
  1105. # stop
  1106. # if {kit.%player%.lastused} was less than a day ago:
  1107. # send "[&4&lGun&f-&3&lGame&f] &cYou can use this only once a day..." to player
  1108. # stop
  1109. # if player doesn't have permission "gg.premium":
  1110. # send "[&4&lGun&f-&3&lGame&f] &cDu bist leider kein Platin Spieler" to player
  1111. # stop
  1112. # set {kit.%player%.lastused} to now
  1113. # give player 1 iron sword of sharpness 2 named "&3&lPlatin Sword"
  1114. # give player 1 iron boots of protection 3 named "&3&lPlatin Boots"
  1115. # give player 1 iron leggings of protection 3 named "&3&lPlatin Leggings"
  1116. # give player 1 iron chestplate of protection 2 named "&3&lPlatin Chestplate"
  1117. # give player 1 diamond helmet of protection 1 named "&3&lPlatin Helmet"
  1118. # give player 1 stick of knockback 2 named "&3&lPlatin Stick"
  1119. # give player 1 splash potion of healing 2 named "&3&lPlatin Heal"
  1120. # give player 32 experience bottle named "&3&l XP"
  1121. # give player 1 diamond named "&3&lDiamant"
  1122. # give player 1 splash potion of speed 1 named "&3&lPlatin Speed"
  1123. # give player 2 sugar named "&3&lZucker"
  1124. # give player 1 enchanted golden apple named "&6&lOP Apple" with lore "&7Heals you over time"
  1125. else:
  1126. if argument 1 is "platin":
  1127. if player has permission "gg.admin":
  1128. give arg-2 1 iron sword of sharpness 2 named "&3&lPlatin Sword"
  1129. give arg-2 1 iron boots of protection 3 named "&3&lPlatin Boots"
  1130. give arg-2 1 iron leggings of protection 3 named "&3&lPlatin Leggings"
  1131. give arg-2 1 iron chestplate of protection 2 named "&3&lPlatin Chestplate"
  1132. give arg-2 1 diamond helmet of protection 1 named "&3&lPlatin Helmet"
  1133. give arg-2 1 stick of knockback 2 named "&3&lPlatin Stick"
  1134. give arg-2 1 splash potion of healing 2 named "&3&lPlatin Heal"
  1135. give arg-2 32 experience bottle named "&3&lXP"
  1136. give arg-2 1 diamond named "&3&lDiamant"
  1137. give arg-2 1 splash potion of speed 1 named "&3&lPlatin Speed"
  1138. give arg-2 2 sugar named "&3&lZucker"
  1139. give arg-2 1 enchanted golden apple named "&6&lOP Apple" with lore "&7Heals you over time"
  1140. send "[&4&lGun&f-&3&lGame&f] &aDu hast dein Kit zu %arg-2% gesendet!" to player
  1141. send "[&4&lGun&f-&3&lGame&f] &a%player% hat dir ein Kit gesendet!" to arg-2
  1142. stop
  1143. if {kit.%player%.lastused} was less than a day ago:
  1144. send "[&4&lGun&f-&3&lGame&f] &cYou can use this only once a day..." to player
  1145. stop
  1146. if player doesn't have permission "gg.premium":
  1147. send "[&4&lGun&f-&3&lGame&f] &cDu bist leider kein Platin Spieler" to player
  1148. stop
  1149. set {kit.%player%.lastused} to now
  1150. give arg-2 1 iron sword of sharpness 2 named "&3&lPlatin Sword"
  1151. give arg-2 1 iron boots of protection 3 named "&3&lPlatin Boots"
  1152. give arg-2 1 iron leggings of protection 3 named "&3&lPlatin Leggings"
  1153. give arg-2 1 iron chestplate of protection 2 named "&3&lPlatin Chestplate"
  1154. give arg-2 1 diamond helmet of protection 1 named "&3&lPlatin Helmet"
  1155. give arg-2 1 stick of knockback 2 named "&3&lPlatin Stick"
  1156. give arg-2 1 splash potion of healing 2 named "&3&lPlatin Heal"
  1157. give arg-2 32 experience bottle named "&3&lXP"
  1158. give arg-2 1 diamond named "&3&lDiamant"
  1159. give arg-2 1 splash potion of speed 1 named "&3&lPlatin Speed"
  1160. give arg-2 2 sugar named "&3&lZucker"
  1161. give arg-2 1 enchanted golden apple named "&6&lOP Apple" with lore "&7Heals you over time"
  1162. send "[&4&lGun&f-&3&lGame&f] &aDu hast dein Kit zu %arg-2% gesendet!" to player
  1163. send "[&4&lGun&f-&3&lGame&f] &a%player% hat dir ein Kit gesendet!" to arg-2
  1164. if argument 1 is "titan":
  1165. if player has permission "gg.admin":
  1166. give arg-2 1 iron sword of sharpness 3 named "&e&lTitan Schwert"
  1167. give arg-2 1 iron boots of protection 3 named "&e&lTitan Schuhe"
  1168. give arg-2 1 iron leggings of protection 3 named "&e&lTitan Hose"
  1169. give arg-2 1 iron chestplate of protection 3 named "&e&lTitan Harnisch"
  1170. give arg-2 1 iron helmet of protection 2 named "&e&lTitan Helm"
  1171. stop
  1172. if {kit.%player%.TitanUsed} was less than a day ago:
  1173. send "[&4&lGun&f-&3&lGame&f] &cYou can use this only once a day..." to arg-2
  1174. stop
  1175. if player doesn't have permission "gg.titan":
  1176. send "[&4&lGun&f-&3&lGame&f] &cDu bist leider kein Titan Spieler" to player
  1177. stop
  1178. set {kit.%player%.TitanUsed} to now
  1179. give arg-2 1 iron sword of sharpness 3 named "&e&lTitan Schwert"
  1180. give arg-2 1 iron boots of protection 3 named "&e&lTitan Schuhe"
  1181. give arg-2 1 iron leggings of protection 3 named "&e&lTitan Hose"
  1182. give arg-2 1 iron chestplate of protection 3 named "&e&lTitan Harnisch"
  1183. give arg-2 1 iron helmet of protection 2 named "&e&lTitan Helm"
  1184. send "[&4&lGun&f-&3&lGame&f] &aSended your kit to %arg-2%" to player
  1185. send "[&4&lGun&f-&3&lGame&f] &a%player% sended you a kit..." to arg-2
  1186. if argument 1 is "elite":
  1187. if player has permission "gg.admin":
  1188. give arg-2 1 iron sword of sharpness 2 named "&5&lElite Schwert"
  1189. give arg-2 1 iron boots of protection 2 named "&5&lElite Schuhe"
  1190. give arg-2 1 iron leggings of protection 2 named "&5&lElite Hose"
  1191. give arg-2 1 iron chestplate of protection 2 named "&5&lElite Harnisch"
  1192. give arg-2 1 iron helmet of protection 1 named "&5&lElite Helm"
  1193. stop
  1194. if {kit.%player%.EliteUsed} was less than a day ago:
  1195. send "[&4&lGun&f-&3&lGame&f] &cYou can use this only once a day..." to arg-2
  1196. stop
  1197. if player doesn't have permission "gg.elite":
  1198. send "[&4&lGun&f-&3&lGame&f] &cDu bist leider kein Elite Spieler" to player
  1199. stop
  1200. set {kit.%player%.EliteUsed} to now
  1201. give arg-2 1 iron sword of sharpness 2 named "&5&lElite Schwert"
  1202. give arg-2 1 iron boots of protection 2 named "&5&lElite Schuhe"
  1203. give arg-2 1 iron leggings of protection 2 named "&5&lElite Hose"
  1204. give arg-2 1 iron chestplate of protection 2 named "&5&lElite Harnisch"
  1205. give arg-2 1 iron helmet of protection 1 named "&5&lElite Helm"
  1206. send "[&4&lGun&f-&3&lGame&f] &aDu hast dein Kit zu %arg-2% gesendet!" to player
  1207. send "[&4&lGun&f-&3&lGame&f] &a%player% hat dir ein Kit gesendet!" to arg-2
  1208. if argument 1 is "VIP":
  1209. if player has permission "gg.admin":
  1210. give arg-2 1 iron sword of sharpness 2 named "&b&lVIP Schwert"
  1211. give arg-2 1 iron boots of protection 2 named "&b&lVIP Schuhe"
  1212. give arg-2 1 iron leggings of protection 2 named "&b&lVIP Hose"
  1213. give arg-2 1 iron chestplate of protection 2 named "&b&lVIP Harnisch"
  1214. give arg-2 1 iron helmet of protection 1 named "&b&lVIP Helm"
  1215. stop
  1216. if {kit.%player%.VIPUsed} was less than a day ago:
  1217. send "[&4&lGun&f-&3&lGame&f] &cYou can use this only once a day..." to arg-2
  1218. stop
  1219. if player doesn't have permission "gg.vip":
  1220. send "[&4&lGun&f-&3&lGame&f] &cDu bist leider kein VIP Spieler" to player
  1221. stop
  1222. set {kit.%player%.VIPUsed} to now
  1223. give arg-2 1 iron sword of sharpness 2 named "&b&lVIP Schwert"
  1224. give arg-2 1 iron boots of protection 2 named "&b&lVIP Schuhe"
  1225. give arg-2 1 iron leggings of protection 2 named "&b&lVIP Hose"
  1226. give arg-2 1 iron chestplate of protection 2 named "&b&lVIP Harnisch"
  1227. give arg-2 1 iron helmet of protection 1 named "&b&lVIP Helm"
  1228. send "[&4&lGun&f-&3&lGame&f] &aDu hast dein Kit zu %arg-2% gesendet!" to player
  1229. send "[&4&lGun&f-&3&lGame&f] &a%player% hat dir ein Kit gesendet!" to arg-2
  1230.  
  1231.  
  1232. # +------------------------------------------------------+
  1233. # | <~ Old GG ~> |
  1234. # +------------------------------------------------------+
  1235.  
  1236. command /giveall [<text>] [<int>]:
  1237. permission: gg.admin
  1238. trigger:
  1239. if argument-1 is "LVL":
  1240. broadcast "&f[&4&lGun&f-&3&lGame&f] &b%player% &bhat &a%argument-2% &bLevel an alle Spieler verteilt!"
  1241. loop all players:
  1242. increase the loop-player's level by argument-2
  1243. stop
  1244. broadcast "&f[&4&lGun&f-&3&lGame&f] &b%player% &bhat &a%tool of player% &ban alle Spieler verteilt!"
  1245. set {ns_GiveAllItem} to tool of player
  1246. wait 1 second
  1247. loop all players:
  1248. give loop-player {ns_GiveAllItem}
  1249.  
  1250.  
  1251. command /gutschein <text> <integer>:
  1252. permission: gg.admin
  1253. usage: /gutschein <gc / gp> <amount>
  1254. trigger:
  1255. if argument-1 is not "GC" or "GP":
  1256. send "[&4&lGun&f-&3&lGame&f] &cPlease use GC or GP" to player
  1257. stop
  1258. if argument-1 is "GC":
  1259. give player lead named "&7[&bGC&7-&aGutschein&7]" with lore "&7%arg-2% GC||&7Rechtsklick zum benutzen!"
  1260. send "[&4&lGun&f-&3&lGame&f] &aDu hast ein GC Gutschein erstellt!" to player
  1261. stop
  1262. if argument-1 is "GP":
  1263. give player lead named "&7[&aGP&7-&bGutschein&7]" with lore "&7%arg-2% GP||&7Rechtsklick zum benutzen!"
  1264. send "[&4&lGun&f-&3&lGame&f] &aDu hast ein GP Gutschein erstellt!" to player
  1265.  
  1266. on right click holding lead:
  1267. set {ns_Give} to line 1 of the lore of player's tool
  1268. if {ns_Give} contains "GC":
  1269. if line 1 of the lore of player's tool is "%{ns_Give}%":
  1270. replace "&aGives you " with "" in {ns_Give}
  1271. replace " GP" with "" in {ns_Give}
  1272. replace " GC" with "" in {ns_Give}
  1273. replace "&7Rechtsklick zum benutzen!" with "" in {ns_Give}
  1274. send "[&4&lGun&f-&3&lGame&f] &aDu hast: &6%{ns_Give}% GC bekommen" to player
  1275.  
  1276. make console execute command "gc add %player% %{ns_Give}%"
  1277. remove 1 of player's tool from player
  1278. if {ns_Give} contains "GP":
  1279. if line 1 of the lore of player's tool is "%{ns_Give}%":
  1280. replace "&aGives you " with "" in {ns_Give}
  1281. replace " GP" with "" in {ns_Give}
  1282. replace " GC" with "" in {ns_Give}
  1283. replace "&7Rechtsklick zum benutzen!" with "" in {ns_Give}
  1284. send "[&4&lGun&f-&3&lGame&f] &aDu hast: &6%{ns_Give}% GP bekommen" to player
  1285.  
  1286. make console execute command "gp add %player% %{ns_Give}%"
  1287. remove 1 of player's tool from player
  1288.  
  1289. # +------------------------------------------------------+
  1290. # | <~ Shop ~> |
  1291. # +------------------------------------------------------+
  1292.  
  1293. command /repair <int> <text>:
  1294. permission: gg.admin
  1295. usage: /repair price GP/GC
  1296. trigger:
  1297. set line 1 of target block to "&bRepair"
  1298. set line 2 of target block to "&a%argument-2%"
  1299. set line 3 of target block to "&6%argument-1%"
  1300. set line 4 of target block to "&a| Repair |"
  1301.  
  1302. command /ggshop <text> [<text>] [<int>] [<text>]:
  1303. permission: gg.admin
  1304. usage: /ggshop <create/remove/close/open> <item> <price> <gp/gc>
  1305. trigger:
  1306. if target block is sign:
  1307. if argument-1 is not "create" or "remove" or "close" or "open":
  1308. send "Please use <create/remove/close/open>" to player
  1309. stop
  1310. if argument-1 is "remove":
  1311. if line 1 of target block is "&bGP-Shop" or "&bGC-Shop":
  1312. set target block to air
  1313. stop
  1314. if argument-1 is "close":
  1315. if line 1 of target block is "&bGP-Shop" or "&bGC-Shop":
  1316. set line 4 of target block to "&c| Closed |"
  1317. stop
  1318. if argument-1 is "open":
  1319. if line 1 of target block is "&bGP-Shop" or "&bGC-Shop":
  1320. set line 4 of target block to "&a| Purchase |"
  1321. stop
  1322. if argument-4 is not "gp" or "gc":
  1323. send "Please use GP or GC" to player
  1324. stop
  1325. set line 1 of target block to "&b%argument-4%-Shop"
  1326. set line 2 of target block to "&a%argument-2%"
  1327. set line 3 of target block to "&6%argument-3%"
  1328. set line 4 of target block to "&a| Purchase |"
  1329.  
  1330. on rightclick on sign:
  1331. if line 1 is "&bRepair":
  1332. if line 2 is "&aGP":
  1333. set {_GP} to the first element out of objects in column "gp" from result of query "SELECT `gp` FROM `GunGame` WHERE `uuid` = ""%uuid of player%""" and close
  1334. set {ns_line 3.%player%} to line 3
  1335. replace "&6" with "" in {ns_line 3.%player%}
  1336. set {ns_line 3.%player%} to {ns_line 3.%player%} parsed as number
  1337. if {_GP} < {ns_line 3.%player%}:
  1338. send "[&4&lGun&f-&3&lGame&f] &cDu hast nicht genügend GP... [%{_GP}%/%{ns_line 3.%player%}%]" to player
  1339. stop
  1340. if tool of player is air or enchanted golden apple named "&6&lOP Apple" with lore "&7Heals you over time":
  1341. send "[&4&lGun&f-&3&lGame&f] &cDu kannst deine Hand nicht reparieren..." to player
  1342. stop
  1343. make console execute command "gp remove %player% %{ns_line 3.%player%}%"
  1344. repair tool of the player
  1345. send "[&4&lGun&f-&3&lGame&f] &aDein Item wurde repariert..." to player
  1346. delete {ns_line 3.%player%}
  1347. stop
  1348. if line 2 is "&aGC":
  1349. set {_GC} to the first element out of objects in column "gc" from result of query "SELECT `gc` FROM `GunGame` WHERE `uuid` = ""%uuid of player%""" and close
  1350. set {ns_line 3.%player%} to line 3
  1351. replace "&6" with "" in {ns_line 3.%player%}
  1352. set {ns_line 3.%player%} to {ns_line 3.%player%} parsed as number
  1353. if {_GC} < {ns_line 3.%player%}:
  1354. send "[&4&lGun&f-&3&lGame&f] &cDu hast nicht genügend GC... [%{_GC}%/%{ns_line 3.%player%}%]" to player
  1355. stop
  1356. if tool of player is air:
  1357. send "[&4&lGun&f-&3&lGame&f] &cDu kannst deine Hand nicht reparieren..." to player
  1358. stop
  1359. make console execute command "gc remove %player% %{ns_line 3.%player%}%"
  1360. repair tool of the player
  1361. send "[&4&lGun&f-&3&lGame&f] &aDein Item wurde repariert..." to player
  1362. delete {ns_line 3.%player%}
  1363. stop
  1364. if line 1 is "&bGP-Shop":
  1365. if line 4 is "&a| Purchase |":
  1366. set {_GP} to the first element out of objects in column "gp" from result of query "SELECT `gp` FROM `GunGame` WHERE `uuid` = ""%uuid of player%""" and close
  1367. set {ns_line 2.%player%} to line 2
  1368. set {ns_line 3.%player%} to line 3
  1369. replace "&a" with "" in {ns_line 2.%player%}
  1370. replace "_" with " " in {ns_line 2.%player%}
  1371. replace "&6" with "" in {ns_line 3.%player%}
  1372. set {ns_line 3.%player%} to {ns_line 3.%player%} parsed as number
  1373. if {_GP} < {ns_line 3.%player%}:
  1374. send "[&4&lGun&f-&3&lGame&f] &cYou don't have enough GP... [%{_GP}%/%{ns_line 3.%player%}%]" to player
  1375. stop
  1376. make console execute command "gp remove %player% %{ns_line 3.%player%}%"
  1377. #make console execute command "give %player% %{ns_line 2.%player%}%"
  1378. run player command "/item %player% %{ns_line 2.%player%}%" as op
  1379. delete {ns_line 2.%player%}
  1380. delete {ns_line 3.%player%}
  1381. stop
  1382. if line 1 is "&bGC-Shop":
  1383. if line 4 is "&a| Purchase |":
  1384. set {_GC} to the first element out of objects in column "gc" from result of query "SELECT `gc` FROM `GunGame` WHERE `uuid` = ""%uuid of player%""" and close
  1385. set {ns_line 2.%player%} to line 2
  1386. set {ns_line 3.%player%} to line 3
  1387. replace "&a" with "" in {ns_line 2.%player%}
  1388. replace "_" with " " in {ns_line 2.%player%}
  1389. replace "&6" with "" in {ns_line 3.%player%}
  1390. set {ns_line 3.%player%} to {ns_line 3.%player%} parsed as number
  1391. if {_GC} < {ns_line 3.%player%}:
  1392. send "[&4&lGun&f-&3&lGame&f] &cYou don't have enough GC... [%{_GC}%/%{ns_line 3.%player%}%]" to player
  1393. stop
  1394. run player command "/item %player% %{ns_line 2.%player%}%" as op
  1395. make console execute command "gc remove %player% %{ns_line 3.%player%}%"
  1396. delete {ns_line 2.%player%}
  1397. delete {ns_line 3.%player%}
  1398. stop
  1399.  
  1400. command /item <player> <item>:
  1401. description: Give someone an item
  1402. permission: gg.admin
  1403. trigger:
  1404. give argument-1 argument-2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement