skills.txt 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. //Hier werden alle Events abgefangen und beeinflusst, je nachdem ob ein Skill aktiv ist oder nicht
  2. event.load("custom_command");
  3. event.load("function_key");
  4. event.load("living_hurt");
  5. event.load("living_pre_hurt");
  6. event.load("player_move");
  7. event.load("player_data_tick");
  8. event.load("item_hit");
  9. event.load("projectile_hit");
  10. classes = getScriptVar("gpvp_classes");
  11. map.new(arrow_to_skill);
  12. map.new(nail_traps);
  13. map.new(pre_nail_traps);
  14. map.new(net_traps);
  15. map.new(vine_traps);
  16. map.new(vines_map);
  17. map.new(cobweb_map);
  18. map.new(concon_map);
  19. map.new(platform_map);
  20. list.new(stürmen_list);
  21. list.new(klingenwirbel_list);
  22. map.new(klingenwirbel_map);
  23. list.new(schmerzertragen_list);
  24. list.new(rammbock_list);
  25. list.new(blutrausch_list);
  26. list.new(wiederherstellung_list);
  27. list.new(belagerungsleiter_down_facing_list);
  28. list.new(belagerungsleiter_up_facing_list);
  29. list.new(belagerungsleiter_up_loc_list);
  30. list.new(belagerungsleiter_down_loc_list);
  31. list.new(belagerungsleiter_remove_list);
  32. map.new(belagerungsleiter_counter_up_map);
  33. map.new(belagerungsleiter_counter_down_map);
  34. map.new(belagerungsleiter_remove_map);
  35. set.new(skill_immunity);
  36. set.new(schnellfeuer_set);
  37. air_item_type = "minecraft:air";
  38. air_item = read.item(air_item_type);
  39. cobweb_type = "minecraft:cobweb";
  40. vine_type_all = "minecraft:vine[north=true,east=true,south=true,west=true]";
  41. glass_type = "minecraft:glass";
  42. oak_leaves_type = "minecraft:oak_leaves";
  43. sound_entity_ghast_warn = sound.get("entity.ghast.warn");
  44. sound_category_player = sound.getCategory("player");
  45. door_prop = block.getproperty("open");
  46. spawn_plot_id = 63;
  47. gpvpworld = world.get("gpvp_spawn");
  48. initSkills();
  49. msg("dev", "§bSkillSystem §rwurde geladen");
  50. @wait
  51. wait();
  52. if(player != null) {
  53. if(loc.getWorld(entity.getLocation(player)) == gpvpworld) {
  54. igoto(event);
  55. }
  56. }
  57. goto("wait");
  58. @player_move
  59. player_id = player.getId(player);
  60. //Trittnägel Pre wurde ausgelöst
  61. if(map.contains(pre_nail_traps, id)) {
  62. trap_player_name = map.get(pre_nail_traps, id);
  63. trap_player_id = player.getId(player.getUuid(trap_player_name));
  64. trap_gilden_id = guild.getIdFromDatabase(trap_player_id);
  65. own_gilden_id = guild.getId(player);
  66. if(trap_gilden_id == own_gilden_id) {
  67. cancel = true;
  68. goto("wait");
  69. }
  70. trap_player = read.player(trap_player_name);
  71. map.remove(pre_nail_traps, id);
  72. event.removeMoveData(id);
  73. trap_loc = data.get(trap_player, concat("Trittnägel_Loc_", id));
  74. move_id = event.addMoveData(loc.mod(trap_loc, -2, 0, -2), loc.mod(trap_loc, 3, 1, 3), 20, 100);
  75. data.setTimer(trap_player, concat("Trittnägel_Post_", move_id), 100);
  76. map.add(nail_traps, move_id, trap_player_name);
  77. goto("wait");
  78. }
  79. //Trittnägel
  80. if(map.contains(nail_traps, id)) {
  81. trap_player_name = map.get(nail_traps, id);
  82. trap_player_id = player.getId(player.getUuid(trap_player_name));
  83. trap_gilden_id = guild.getIdFromDatabase(trap_player_id);
  84. own_gilden_id = guild.getId(player);
  85. if(trap_gilden_id == own_gilden_id) {
  86. cancel = true;
  87. goto("wait");
  88. }
  89. entity.addEffect(player, "slowness", 40, 5);
  90. trap_player = read.player(trap_player_name);
  91. if(trap_player == null) {
  92. entityDamage(player, player, 3, false);
  93. } else {
  94. entityDamage(player, trap_player, 3, false);
  95. }
  96. goto("wait");
  97. }
  98. //Netzfalle
  99. if(map.contains(net_traps, id)) {
  100. trap_gilden_id = map.get(net_traps, id);
  101. own_gilden_id = guild.getId(player);
  102. if(trap_gilden_id == own_gilden_id) {
  103. cancel = true;
  104. goto("wait");
  105. }
  106. event.removeMoveData(id);
  107. map.remove(net_traps, id);
  108. player_loc = entity.getLocation(player);
  109. data.setTimer(player, concat("Netzfalle2_", id), 100);
  110. temp_list = list.new();
  111. for(y = 0; y <= 2; y++) {
  112. for(z = -3; z <= 3; z++) {
  113. for(x = -3; x <= 3; x++) {
  114. temp_loc = loc.mod(player_loc, x, y, z);
  115. if(block.getType(temp_loc) == air_item_type) {
  116. block.set(temp_loc, cobweb_type);
  117. list.add(temp_list, temp_loc);
  118. }
  119. }
  120. }
  121. }
  122. map.add(cobweb_map, id, temp_list);
  123. goto("wait");
  124. }
  125. //Dornenranken
  126. if(map.contains(vine_traps, id)) {
  127. trap_gilden_id = map.get(vine_traps, id);
  128. own_gilden_id = guild.getId(player);
  129. if(trap_gilden_id == own_gilden_id) {
  130. cancel = true;
  131. goto("wait");
  132. }
  133. entity.addEffect(player , "poison", 100, 2);
  134. entity.addEffect(player , "hunger", 100, 2);
  135. goto("wait");
  136. }
  137. goto("wait");
  138. @projectile_hit
  139. if(text.class(projectile) != "ArrowEntity") {
  140. goto("wait");
  141. }
  142. if(!isPlayer(shooter)) {
  143. goto("wait");
  144. }
  145. player = shooter;
  146. if(loc_hit == null) {
  147. loc = entity.getLocation(entity_hit);
  148. } else {
  149. loc = loc_hit;
  150. }
  151. skill_name = map.get(arrow_to_skill, projectile);
  152. map.remove(arrow_to_skill, projectile);
  153. if(entity_hit != null) {
  154. if(isPlayer(entity_hit)) {
  155. if(guild.isSame(entity_hit, player)) {
  156. goto("wait");
  157. }
  158. if(data.getTimer(entity_hit, "Blätterkokon") > 0) {
  159. entity.setBurning(entity_hit, 0);
  160. goto("wait");
  161. }
  162. }
  163. if(skill_name != null) {
  164. //Giftsalve
  165. if(skill_name == "Giftsalve") {
  166. entity.addEffect(entity_hit, "poison", 40, 1);
  167. }
  168. if(isPlayer(entity_hit)) {
  169. //Schnellfeuer
  170. if(skill_name == "Schnellfeuer") {
  171. set.add(schnellfeuer_set, player.getUuid(entity_hit));
  172. }
  173. }
  174. }
  175. //Blendpfeil
  176. if(data.getTimer(player, "Blendpfeil") > 0) {
  177. entity.addEffect(entity_hit, "blindness", 100, 1);
  178. data.setTimer(player, "Blendpfeil", -1);
  179. }
  180. //Brandpfeil
  181. if(data.getTimer(player, "Brandpfeil") > 0) {
  182. entity.setBurning(entity_hit, 5);
  183. data.setTimer(player, "Brandpfeil", -1);
  184. status.remove(player, 29);
  185. }
  186. //Stachelpfeil
  187. if(data.getTimer(player, "Stachelpfeil") > 0) {
  188. entity.addEffect(entity_hit , "slowness", 60, 1);
  189. data.setTimer(player, "Stachelpfeil", -1);
  190. status.remove(player, 23);
  191. }
  192. //Trägheitspfeil
  193. if(data.getTimer(player, "Trägheitspfeil") > 0) {
  194. entity.addEffect(entity_hit, "slowness", 100, 7);
  195. entity.addEffect(entity_hit, "jump_boost", 100, 128);
  196. data.setTimer(player, "Trägheitspfeil", -1);
  197. }
  198. //ArkanerSchuss
  199. if(data.getTimer(player, "ArkanerSchuss") > 0) {
  200. entity.teleport(entity_hit, entity.getLocation(player));
  201. data.setTimer(player, "ArkanerSchuss", -1);
  202. }
  203. }
  204. //Widerhaken
  205. if(data.getTimer(player, "Widerhaken") > 0) {
  206. //TP zum Aufprallort
  207. bx = loc.getCoord(loc, "bx") + 0.5;
  208. by = loc.getCoord(loc, "by") + 1;
  209. bz = loc.getCoord(loc, "bz") + 0.5;
  210. middle_loc = loc.new(gpvpworld, bx, by, bz);
  211. entity.teleport(player, middle_loc);
  212. //Plattform
  213. temp_list = list.new();
  214. temp_loc = loc.mod(loc, 0, 0, 0);
  215. if(setBlockIfNotAir(temp_loc, glass_type)) {
  216. list.add(temp_list, temp_loc);
  217. }
  218. temp_loc = loc.mod(loc, 1, 0, 0);
  219. if(setBlockIfNotAir(temp_loc, glass_type)) {
  220. list.add(temp_list, temp_loc);
  221. }
  222. temp_loc = loc.mod(loc, 1, 0, 1);
  223. if(setBlockIfNotAir(temp_loc, glass_type)) {
  224. list.add(temp_list, temp_loc);
  225. }
  226. temp_loc = loc.mod(loc, 0, 0, 1);
  227. if(setBlockIfNotAir(temp_loc, glass_type)) {
  228. list.add(temp_list, temp_loc);
  229. }
  230. temp_loc = loc.mod(loc, -1, 0, 1);
  231. if(setBlockIfNotAir(temp_loc, glass_type)) {
  232. list.add(temp_list, temp_loc);
  233. }
  234. temp_loc = loc.mod(loc, -1, 0, 0);
  235. if(setBlockIfNotAir(temp_loc, glass_type)) {
  236. list.add(temp_list, temp_loc);
  237. }
  238. temp_loc = loc.mod(loc, -1, 0, -1);
  239. if(setBlockIfNotAir(temp_loc, glass_type)) {
  240. list.add(temp_list, temp_loc);
  241. }
  242. temp_loc = loc.mod(loc, 0, 0, -1);
  243. if(setBlockIfNotAir(temp_loc, glass_type)) {
  244. list.add(temp_list, temp_loc);
  245. }
  246. temp_loc = loc.mod(loc, 1, 0, -1);
  247. if(setBlockIfNotAir(temp_loc, glass_type)) {
  248. list.add(temp_list, temp_loc);
  249. }
  250. player_id = player.getId(player);
  251. map.add(platform_map, player_id, temp_list);
  252. data.setTimer(player, "Widerhaken", -1);
  253. data.setTimer(player, "Widerhaken_Remove", 200);
  254. status.remove(player, 35);
  255. }
  256. goto("wait");
  257. @item_hit
  258. if(!isPlayer(shooter)) {
  259. goto("wait");
  260. }
  261. player = shooter;
  262. //Rauchbombe
  263. if(entity.getType(projectile) == "FireballEntity") {
  264. if(loc_hit == null) {
  265. loc = entity.getLocation(entity_hit);
  266. } else {
  267. loc = loc_hit;
  268. }
  269. //AOE Radius 3
  270. list = players.near(loc, 3);
  271. for(i = 0; i < list.getSize(list); i++) {
  272. p = list.getIndex(list, i);
  273. if(!guild.isSame(player, p)) {
  274. entityDamage(p, player, 2, true);
  275. entity.addEffect(p, "blindness", 80, 1);
  276. }
  277. }
  278. }
  279. goto("wait");
  280. @player_data_tick
  281. player_id = player.getId(player);
  282. if(text.startsWith(var, "Netzfalle1_", 0)) {
  283. //Ausgelegte Netzfalle entfernen, weil sie niemand ausgelöst hat
  284. move_id = read.number(text.replace(var, "Netzfalle1_", ""));
  285. event.removeMoveData(move_id);
  286. map.remove(net_traps, move_id);
  287. goto("wait");
  288. }
  289. if(text.startsWith(var, "Netzfalle2_", 0)) {
  290. //Ausgelöste Netzfalle entfernen
  291. move_id = read.number(text.replace(var, "Netzfalle2_", ""));
  292. temp_list = map.get(cobweb_map, move_id);
  293. for(i = 0; i < list.getSize(temp_list); i++) {
  294. temp_loc = list.getIndex(temp_list, i);
  295. block.set(temp_loc, air_item_type);
  296. }
  297. map.remove(cobweb_map, move_id);
  298. goto("wait");
  299. }
  300. if(text.startsWith(var, "Dornenranken_", 0)) {
  301. move_id = read.number(text.replace(var, "Dornenranken_", ""));
  302. event.removeMoveData(move_id);
  303. map.remove(vine_traps, move_id);
  304. //Dornenranken entfernen
  305. temp_list = map.get(vines_map, player_id);
  306. for(i = 0; i < list.getSize(temp_list); i++) {
  307. temp_loc = list.getIndex(temp_list, i);
  308. block.set(temp_loc, air_item_type);
  309. }
  310. map.remove(vines_map, player_id);
  311. goto("wait");
  312. }
  313. if(text.startsWith(var, "Trittnägel_Pre_", 0)) {
  314. //Trittnägel entfernen, weil niemand hineingelaufen ist
  315. move_id = read.number(text.replace(var, "Trittnägel_Pre_", ""));
  316. event.removeMoveData(move_id);
  317. map.remove(pre_nail_traps, move_id);
  318. goto("wait");
  319. }
  320. if(text.startsWith(var, "Trittnägel_Post_", 0)) {
  321. //Trittnägel entfernen, weil Falle ausgelaufen ist
  322. move_id = read.number(text.replace(var, "Trittnägel_Post_", ""));
  323. map.remove(nail_traps, move_id);
  324. goto("wait");
  325. }
  326. if(text.startsWith(var, "Trollsalbe", 0)) {
  327. new_hp = entity.getHealth(player) + 1.2;
  328. entity.setHealth(player, new_hp);
  329. displayHealth(player);
  330. goto("wait");
  331. }
  332. if(text.startsWith(var, "Giftsalve", 0)) {
  333. arrow = entity.shootProjectile(player, "net.minecraft.entity.projectile.ArrowEntity", 1, null);
  334. entity.setNoPickup(arrow);
  335. map.add(arrow_to_skill, arrow, "Giftsalve");
  336. goto("wait");
  337. }
  338. if(text.startsWith(var, "Schnellfeuer", 0)) {
  339. arrow = entity.shootProjectile(player, "net.minecraft.entity.projectile.ArrowEntity", 1, null);
  340. entity.setNoPickup(arrow);
  341. map.add(arrow_to_skill, arrow, "Schnellfeuer");
  342. goto("wait");
  343. }
  344. if(var == "Widerhaken_Remove") {
  345. //Plattform entfernen
  346. temp_list = map.get(platform_map, player_id);
  347. for(i = 0; i < list.getSize(temp_list); i++) {
  348. temp_loc = list.getIndex(temp_list, i);
  349. block.set(temp_loc, air_item_type);
  350. }
  351. map.remove(platform_map, player_id);
  352. goto("wait");
  353. }
  354. if(var == "Blätterkokon") {
  355. //Blätterkokon entfernen
  356. temp_list = map.get(concon_map, player_id);
  357. for(i = 0; i < list.getSize(temp_list); i++) {
  358. temp_loc = list.getIndex(temp_list, i);
  359. block.set(temp_loc, air_item_type);
  360. }
  361. map.remove(concon_map, player_id);
  362. goto("wait");
  363. }
  364. if(var == "Todgeweiht") {
  365. schaden = data.get(player, "Todgeweiht-Count");
  366. ent = data.get(player, "Todgeweiht-Ziel");
  367. try {
  368. if(isPlayer(ent)) {
  369. entityDamage(ent, player, schaden, true);
  370. } else {
  371. entity.damage(ent, schaden);
  372. }
  373. } catch {
  374. nothing();
  375. }
  376. goto("wait");
  377. }
  378. if(var == "Rückruf") {
  379. data.set(player, var, null);
  380. goto("wait");
  381. }
  382. if(var == "Schmerzertragen") {
  383. list.remove(schmerzertragen_list, player);
  384. goto("wait");
  385. }
  386. if(var == "Blutrausch") {
  387. list.remove(blutrausch_list, player);
  388. goto("wait");
  389. }
  390. if(var == "Unbeugsam") {
  391. set.remove(skill_immunity, player.getUuid(player));
  392. goto("wait");
  393. }
  394. if(var == "Wiederherstellung") {
  395. list.remove(wiederherstellung_list, player);
  396. goto("wait");
  397. }
  398. goto("wait");
  399. @living_pre_hurt
  400. sec_player = player.getFromDamageSource(damage_source);
  401. if(isPlayer(living_entity)) {
  402. player = living_entity;
  403. //Blätterkokon
  404. if(data.getTimer(player, "Blätterkokon") > 0) {
  405. cancel = true;
  406. }
  407. if(isPlayer(sec_player)) {
  408. if(guild.isSame(player, sec_player)) {
  409. cancel = true;
  410. goto("wait");
  411. }
  412. //Entwaffnen
  413. if(data.getTimer(sec_player, "Entwaffnen") > 0) {
  414. cancel = true;
  415. goto("wait");
  416. }
  417. }
  418. if(damage.isProjectile(damage_source)) {
  419. //Drachenhaut
  420. if(data.getTimer(player, "Drachenhaut") > 0) {
  421. cancel = true;
  422. }
  423. //Schnellfeuer
  424. player_uuid = player.getUuid(player);
  425. if(set.contains(schnellfeuer_set, player_uuid)) {
  426. set.remove(schnellfeuer_set, player_uuid);
  427. new_hp = entity.getHealth(sec_player) + damage_amount * 1.2;
  428. entity.setHealth(sec_player, new_hp);
  429. displayHealth(sec_player);
  430. }
  431. }
  432. }
  433. goto("wait");
  434. @living_hurt
  435. player = null;
  436. sec_player = player.getFromDamageSource(damage_source);
  437. if(isPlayer(living_entity)) {
  438. player = living_entity;
  439. damage_type = damage.getType(damage_source);
  440. if(damage_type == "fall") {
  441. //Assassinensiegel
  442. if(data.getTimer(player, "Assassinensiegel") > 0) {
  443. cancel = true;
  444. }
  445. }
  446. if(!damage.isMagic(damage_source)) {
  447. //EisernerWille
  448. if(data.getTimer(player, "Eiserner Wille") > 0) {
  449. damage_amount *= 0.8;
  450. }
  451. //Schildwall
  452. if(data.getTimer(player, "Schildwall") > 0) {
  453. damage_amount *= 0.8;
  454. }
  455. }
  456. }
  457. if(isPlayer(sec_player)) {
  458. if(isPlayer(living_entity)) {
  459. player = living_entity;
  460. if(guild.isSame(player, sec_player)) {
  461. cancel = true;
  462. return;
  463. }
  464. //Giftklinge
  465. if(data.getTimer(sec_player, "Giftklinge") > 0) {
  466. entity.addEffect(player, "poison", 80, 1);
  467. }
  468. if(!damage.isMagic(damage_source)) {
  469. if(data.getTimer(sec_player, "Todgeweiht") > 0) {
  470. if(data.get(sec_player, "Todgeweiht-Ziel") == living_entity) {
  471. schaden = data.get(sec_player, "Todgeweiht-Count");
  472. data.set(sec_player, "Todgeweiht-Count", schaden + damage_amount);
  473. }
  474. }
  475. //Dornenpanzer
  476. if(data.getTimer(player, "Dornenpanzer") > 0) {
  477. entityDamage(sec_player, player, damage_amount * 0.3, true);
  478. damage_amount *= 0.7;
  479. }
  480. //Wuchtschlag
  481. if(data.getTimer(sec_player, "Wuchtschlag") > 0) {
  482. damage_amount *= 2;
  483. entity.addEffect(player, "slowness", 40, 2);
  484. status.remove(sec_player, 23);
  485. data.setTimer(sec_player, "Wuchtschlag", -1);
  486. }
  487. }
  488. //InnereWut
  489. if(data.getTimer(sec_player, "Innere Wut") > 0) {
  490. damage_amount *= 1.3;
  491. }
  492. //Schattenhieb
  493. if(data.getTimer(sec_player, "Schattenhieb") > 0) {
  494. entity.addEffect(sec_player, "invisibility", 40, 1);
  495. entity.addEffect(sec_player, "speed", 40, 2);
  496. status.remove(sec_player, 23);
  497. data.setTimer(sec_player, "Schattenhieb", -1);
  498. }
  499. //Schwerthieb
  500. if(data.getTimer(sec_player, "Schwerthieb") > 0) {
  501. damage_amount *= 1.5;
  502. status.remove(sec_player, 21);
  503. data.setTimer(sec_player, "Schwerthieb", -1);
  504. }
  505. //harmonischerHieb
  506. if(data.getTimer(sec_player, "harmonischerHieb") > 0) {
  507. damage_amount *= 2.5;
  508. status.remove(sec_player, 21);
  509. data.setTimer(sec_player, "harmonischerHieb", -1);
  510. }
  511. //Axthieb
  512. if(data.getTimer(sec_player, "Axthieb") > 0) {
  513. damage_amount *= 1.5;
  514. status.remove(sec_player, 21);
  515. data.setTimer(sec_player, "Axthieb", -1);
  516. }
  517. //Dolchangriff
  518. if(data.getTimer(sec_player, "Dolchangriff") > 0) {
  519. damage_amount *= 1.5;
  520. status.remove(sec_player, 21);
  521. data.setTimer(sec_player, "Dolchangriff", -1);
  522. }
  523. //WütenderSchlag
  524. if(data.getTimer(sec_player, "Wütender Schlag") > 0) {
  525. damage_amount += 1 - entity.getHealth(sec_player) / 20;
  526. status.remove(sec_player, 30);
  527. data.setTimer(sec_player, "Wütender Schlag", -1);
  528. }
  529. //Entwaffnen
  530. if(data.getTimer(sec_player, "Entwaffnen") > 0) {
  531. cancel = true;
  532. }
  533. }
  534. }
  535. goto("wait");
  536. @function_key
  537. class = guild.getClass(player);
  538. if(class == "") {
  539. player.speak(player, "§cFehler", "§rDu besitzt keine Klasse");
  540. goto("wait");
  541. }
  542. plot_id = plot.getIdFromLocation(entity.getLocation(player));
  543. if(plot_id == spawn_plot_id) {
  544. player.action(player, "§rAm Spawn nicht einsetzbar");
  545. goto("wait");
  546. }
  547. //Schwertknaufschlag
  548. if(data.getTimer(player, "Schwertknaufschlag") > 0) {
  549. goto("wait");
  550. }
  551. //Kehlschnitt
  552. if(data.getTimer(player, "Kehlschnitt") > 0) {
  553. goto("wait");
  554. }
  555. tempskill = hotkey.get(player, class, --key);
  556. if(tempskill != null) {
  557. temp = executeSkill(player, tempskill);
  558. if(temp == true) {
  559. skill.speak(player, player_name, tempskill);
  560. skill.setLastExeTime(player, tempskill);
  561. } elseif(temp == 2) {
  562. player.action(player, "§rDieser Skill existiert nicht");
  563. } elseif(temp == 3) {
  564. player.action(player, "§rFalsche Klasse für diesen Skill");
  565. } elseif(temp == 4) {
  566. player.action(player, "§rKein Gegner im Visier");
  567. } elseif(temp == 5) {
  568. player.action(player, "§rDein Skill-Level ist zu niedrig");
  569. } elseif(temp == 8) {
  570. player.action(player, "§rBelagerungsskill nur während Gildenkämpfen");
  571. }
  572. }
  573. goto("wait");
  574. @custom_command
  575. if(command == "skill") {
  576. size = list.getSize(args);
  577. if(size == 0) {
  578. player.speak(player, "§6Commands", "/skill <skillname>");
  579. goto("wait");
  580. }
  581. skillname = text.concatList(args, " ", 0, size - 1);
  582. class = guild.getClass(player);
  583. if(class == "") {
  584. player.speak(player, "§cFehler", "§rDu besitzt keine Klasse");
  585. goto("wait");
  586. }
  587. plot_id = plot.getIdFromLocation(entity.getLocation(player));
  588. if(plot_id == spawn_plot_id) {
  589. player.action(player, "§rAm Spawn nicht einsetzbar");
  590. goto("wait");
  591. }
  592. //Schwertknaufschlag
  593. if(data.getTimer(player, "Schwertknaufschlag") > 0) {
  594. goto("wait");
  595. }
  596. //Kehlschnitt
  597. if(data.getTimer(player, "Kehlschnitt") > 0) {
  598. goto("wait");
  599. }
  600. if(skillname != null) {
  601. temp = executeSkill(player, skillname);
  602. if(temp == true) {
  603. skill.speak(player, player_name, skillname);
  604. skill.setLastExeTime(player, skillname);
  605. } elseif(temp == 2) {
  606. player.action(player, "§rDieser Skill existiert nicht");
  607. } elseif(temp == 3) {
  608. player.action(player, "§rFalsche Klasse für diesen Skill");
  609. } elseif(temp == 4) {
  610. player.action(player, "§rKein Gegner im Visier");
  611. } elseif(temp == 5) {
  612. player.action(player, "§rDein Skill-Level ist zu niedrig");
  613. } elseif(temp == 8) {
  614. player.action(player, "§rBelagerungsskill nur während Gildenkämpfen");
  615. }
  616. }
  617. }
  618. goto("wait");