u_skills.txt 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166
  1. /*
  2. Rückgabewerte:
  3. false .. skill could not be executed
  4. true ... skill executing with message
  5. 0 ...... skill executing without message
  6. 2 ...... skill not existing
  7. 3 ...... wrong class for that skill
  8. 4 ...... skill could not be executed: no opponent
  9. 5 ...... skill-level too low for that skill
  10. 6 ...... same guild
  11. 7 ...... please wait. cooldown not reached
  12. 8 ...... gpvp belagerungsskill. only while gfight
  13. */
  14. function executeSkill(player, skillname) {
  15. temp = canExecuteSkill(player, skillname);
  16. if(temp == true) {
  17. label = skill.getLabel(skillname);
  18. igoto(label);
  19. return 2;
  20. }
  21. return temp;
  22. //-------- Krieger --------
  23. @Schwerthieb
  24. status.addTimed(player, 21, 200, skillname);
  25. data.setTimer(player, label, 200);
  26. return true;
  27. @Schmerzertragen
  28. status.addTimed(player, 22, 100, skillname);
  29. data.setTimer(player, label, 100);
  30. data.set(player, label, 1);
  31. new_hp = entity.getHealth(player) + 1.2;
  32. entity.setHealth(player, new_hp);
  33. displayHealth(player);
  34. list.add($schmerzertragen_list, player);
  35. sgoto(20, "Schmerzertragen_Teil2");
  36. return true;
  37. @Schildstoß
  38. ent = getTarget(player, false, 4);
  39. if(isDouble(ent)) {
  40. return ent;
  41. }
  42. entity.addEffect(ent, "slowness", 30, 7);
  43. return true;
  44. @Klingenwirbel
  45. list = player.near(player, 3);
  46. for(i = 0; i < list.getSize(list); i++) {
  47. p = list.getIndex(list, i);
  48. if(!guild.isSame(player, p)) {
  49. status.addTimed(p, 24, 50, skillname);
  50. data.set(p, label, 1);
  51. entityDamage(p, player, 0.4, false);
  52. list.add($klingenwirbel_list, p);
  53. map.add($klingenwirbel_map, p, player);
  54. }
  55. sgoto(10, "Klingenwirbel_Teil2");
  56. }
  57. return true;
  58. @EisernerWille
  59. status.addTimed(player, 25, 200, skillname);
  60. data.setTimer(player, label, 200);
  61. return true;
  62. @Kniezerschmetterer
  63. ent = getTarget(player, false, 4);
  64. if(isDouble(ent)) {
  65. return ent;
  66. }
  67. entity.addEffect(ent, "slowness", 60, 7);
  68. return true;
  69. @Stürmen
  70. array = entity.getLook(player);
  71. x = array[0];
  72. z = array[2];
  73. entity.throw(player, 3.9*x, 0.5, 3.9*z);
  74. list.add($stürmen_list, player);
  75. sgoto(20, "Stürmen_Teil2");
  76. return true;
  77. @Kriegsruf
  78. loc = entity.getLocation(player);
  79. list = players.near(loc, 10);
  80. for(i = 0; i < list.getSize(list); i++) {
  81. p = list.getIndex(list, i);
  82. if(guild.isSame(player, p)) {
  83. entity.addEffect(p, "strength", 300, 1);
  84. entity.addEffect(p, "fire_resistance", 300, 1);
  85. }
  86. }
  87. sound.spawn(loc, $sound_entity_ghast_warn, $sound_category_player);
  88. return true;
  89. @Drachenhaut
  90. status.addTimed(player, 29, 200, skillname);
  91. data.setTimer(player, label, 200);
  92. return true;
  93. @WütenderSchlag
  94. status.addTimed(player, 30, 200, skillname);
  95. data.setTimer(player, label, 200);
  96. return true;
  97. @Schildwall
  98. loc = entity.getLocation(player);
  99. list = players.near(loc, 10);
  100. for(i = 0; i < list.getSize(list); i++) {
  101. p = list.getIndex(list, i);
  102. if(guild.isSame(player, p)) {
  103. status.addTimed(p, 31, 200, skillname);
  104. data.setTimer(p, label, 200);
  105. }
  106. }
  107. return true;
  108. @Schwertknaufschlag
  109. p = getTarget(player, true, 4);
  110. if(isDouble(p)) {
  111. return p;
  112. }
  113. entity.addEffect(p, "nausea", 60, 1);
  114. status.addTimed(p, 32, 60, skillname);
  115. data.setTimer(p, label, 60);
  116. return true;
  117. @Entwaffnen
  118. p = getTarget(player, true, 4);
  119. if(isDouble(p)) {
  120. return p;
  121. }
  122. status.addTimed(p, 33, 120, skillname);
  123. data.setTimer(p, label, 120);
  124. return true;
  125. @Dornenpanzer
  126. status.addTimed(player, 34, 200, skillname);
  127. data.setTimer(player, label, 200);
  128. return true;
  129. @Unbeugsam
  130. set.add($skill_immunity, player.getUuid(player));
  131. status.addTimed(player, 35, 300, skillname);
  132. data.setTimer(player, label, 300);
  133. msg(player, "Skill noch ohne Wirkung");
  134. return true;
  135. @Verspotten
  136. list = player.near(player, 6);
  137. player_loc = entity.getLocation(player);
  138. for(i = 0; i < list.getSize(list); i++) {
  139. p = list.getIndex(list, i);
  140. if(!guild.isSame(player, p)) {
  141. entity.teleport(p, player_loc);
  142. }
  143. }
  144. return true;
  145. @Belagerungsleiter
  146. target_loc = player.getTarget(player, 5, false);
  147. if(!block.isSolid(target_loc)) {
  148. player.action(player, "§rNicht solider Block");
  149. return false;
  150. }
  151. ladder_loc = target_loc;
  152. radius = loc.distance(target_loc, entity.getLocation(player));
  153. while(target_loc == ladder_loc) {
  154. ladder_loc = player.getTarget(player, radius, false);
  155. ladder_loc = getBlockLocation(ladder_loc);
  156. radius -= 0.1;
  157. }
  158. if(block.isAir(ladder_loc)) {
  159. //Unsolider Block davor
  160. player.action(player, "§rLeiter konnte nicht platziert werden");
  161. return false;
  162. }
  163. y_distance = loc.getY(target_loc) - loc.getY(ladder_loc);
  164. if(y_distance != 0) {
  165. //Keine Wand erkannt
  166. player.action(player, "§rLeiter konnte nicht platziert werden");
  167. return false;
  168. }
  169. x_distance = loc.getX(target_loc) - loc.getX(ladder_loc);
  170. z_distance = loc.getZ(target_loc) - loc.getZ(ladder_loc);
  171. if(x_distance == 0) {
  172. if(z_distance == -1) {
  173. facing = "south";
  174. } elseif(z_distance == 1) {
  175. facing = "north";
  176. }
  177. } elseif(z_distance == 0) {
  178. if(x_distance == -1) {
  179. facing = "east";
  180. }
  181. if(x_distance == 1) {
  182. facing = "west";
  183. }
  184. }
  185. block.set(ladder_loc, concat("minecraft:ladder[facing=", facing, "]"));
  186. list.add($belagerungsleiter_up_facing_list, facing);
  187. list.add($belagerungsleiter_down_facing_list, facing);
  188. list.add($belagerungsleiter_up_loc_list, loc.mod(ladder_loc, 0, 1, 0));
  189. list.add($belagerungsleiter_down_loc_list, loc.mod(ladder_loc, 0, -1, 0));
  190. player_uuid = player.getUuid(player);
  191. list.add($belagerungsleiter_remove_list, player_uuid);
  192. remove_list = list.new();
  193. list.add(remove_list, ladder_loc);
  194. map.add($belagerungsleiter_remove_map, player_uuid, remove_list);
  195. map.add($belagerungsleiter_counter_up_map, player_uuid, 0);
  196. map.add($belagerungsleiter_counter_down_map, player_uuid, 0);
  197. sgoto(10, "Belagerungsleiter_Up");
  198. sgoto(10, "Belagerungsleiter_Down");
  199. sgoto(1200, "Belagerungsleiter_Remove");
  200. return true;
  201. //-------- Schurke --------
  202. @Dolchangriff
  203. status.addTimed(player, 21, 200, skillname);
  204. data.setTimer(player, label, 200);
  205. return true;
  206. @Bandagieren
  207. new_hp = entity.getHealth(player) + 6;
  208. entity.setHealth(player, new_hp);
  209. displayHealth(player);
  210. return true;
  211. @Schattenhieb
  212. status.addTimed(player, 23, 200, skillname);
  213. data.setTimer(player, label, 200);
  214. return true;
  215. @Trittnägel
  216. //Trittnägel auslegen
  217. trap_loc = getBlockLocation(entity.getLocation(player));
  218. move_id = event.addMoveData(loc.mod(trap_loc, -2, 0, -2), loc.mod(trap_loc, 3, 1, 3), 5, 1200);
  219. data.setTimer(player, concat("Trittnägel_Pre_", move_id), 1200);
  220. data.set(player, concat("Trittnägel_Loc_", move_id), trap_loc);
  221. map.add($pre_nail_traps, move_id, $player_name);
  222. return true;
  223. @Rauchbombe
  224. entity.shootProjectile(player, "net.minecraft.entity.projectile.FireballEntity", 1, null);
  225. return true;
  226. @Schattenform
  227. status.addTimed(player, 26, 400, skillname);
  228. data.setTimer(player, label, 400);
  229. entity.addEffect(player, "invisibility", 400, 1);
  230. return true;
  231. @Festnageln
  232. ent = getTarget(player, false, 4);
  233. if(isDouble(ent)) {
  234. return ent;
  235. }
  236. entity.addEffect(ent, "slowness", 60, 7);
  237. return true;
  238. @Todesblüte
  239. p = getTarget(player, true, 4);
  240. if(isDouble(p)) {
  241. return p;
  242. }
  243. entity.addEffect(p, "blindness", 60, 1);
  244. entity.addEffect(p, "hunger", 80, 4);
  245. return true;
  246. @Giftklinge
  247. status.addTimed(player, 29, 200, skillname);
  248. data.setTimer(player, label, 200);
  249. return true;
  250. @Schattenschritt
  251. if(data.getTimer(player, "Schattenform") > 0) {
  252. ent = getTarget(player, false, 8);
  253. } else {
  254. ent = getTarget(player, false, 4);
  255. }
  256. if(isDouble(ent)) {
  257. return ent;
  258. }
  259. array = entity.getLook(player);
  260. x = array[0];
  261. z = array[2];
  262. entity.teleport(player, loc.mod(entity.getLocation(ent), x, 0, z));
  263. return true;
  264. @Herzsucher
  265. ent = getTarget(player, false, 4);
  266. if(isDouble(ent)) {
  267. return ent;
  268. }
  269. schaden = 2 * (20 / entity.getHealth(ent));
  270. if(isPlayer(ent)) {
  271. entityDamage(ent, player, schaden, false);
  272. } else {
  273. entity.damage(ent, schaden);
  274. }
  275. return true;
  276. @Kehlschnitt
  277. p = getTarget(player, true, 4);
  278. if(isDouble(p)) {
  279. return p;
  280. }
  281. status.addTimed(p, 32, 50, skillname);
  282. data.setTimer(p, label, 50);
  283. return true;
  284. @Assassinensiegel
  285. status.addTimed(player, 33, 300, skillname);
  286. data.setTimer(player, label, 300);
  287. return true;
  288. @Rückruf
  289. location = data.get(player, label);
  290. if(location == null) {
  291. data.set(player, label, entity.getLocation(player));
  292. status.addTimed(player, 34, 200, skillname);
  293. data.setTimer(player, label, 200);
  294. return true;
  295. } else {
  296. if(data.getTimer(player, label) > 0) {
  297. status.remove(player, 34);
  298. data.setTimer(player, label, -1);
  299. data.set(player, label, null);
  300. entity.teleport(player, location);
  301. return 0;
  302. }
  303. }
  304. @Widerhaken
  305. status.addTimed(player, 35, 200, skillname);
  306. data.setTimer(player, label, 200);
  307. return true;
  308. @Todgeweiht
  309. ent = getTarget(player, false, 4);
  310. if(isDouble(ent)) {
  311. return ent;
  312. }
  313. //Anwender zum Spieler teleportieren
  314. entity.teleport(player, entity.getLocation(ent));
  315. //Timer auf 5 Sekunden setzen
  316. if(isPlayer(ent)) {
  317. status.addTimed(ent, 35, 100, skillname);
  318. }
  319. data.setTimer(player, label, 100);
  320. //Anvisierten Gegner notieren und Schadenscounter auf 0 setzen
  321. data.set(player, "Todgeweiht-Ziel", ent);
  322. data.set(player, "Todgeweiht-Count", 0);
  323. //nach 5 Sekunden: physischer Schaden = max_leben/20 UND magischer Schaden = 10% des innerhalb der letzten 5 sek ausgeteilten physischen schadens
  324. return true;
  325. @Dietrich
  326. msg(player, "Skill noch ohne Wirkung");
  327. return true;
  328. //-------- Barbar --------
  329. @Axthieb
  330. status.addTimed(player, 21, 200, skillname);
  331. data.setTimer(player, label, 200);
  332. return true;
  333. @Blutrausch
  334. status.addTimed(player, 22, 100, skillname);
  335. data.setTimer(player, label, 100);
  336. data.set(player, label, 1);
  337. new_hp = entity.getHealth(player) + 1.2;
  338. entity.setHealth(player, new_hp);
  339. displayHealth(player);
  340. list.add($blutrausch_list, player);
  341. sgoto(20, "Blutrausch_Teil2");
  342. return true;
  343. @Wuchtschlag
  344. status.addTimed(player, 23, 200, skillname);
  345. data.setTimer(player, label, 200);
  346. return true;
  347. @AggressiverAusbruch
  348. msg(player, "Skill noch ohne Wirkung");
  349. return true;
  350. @InnereWut
  351. status.addTimed(player, 25, 140, skillname);
  352. data.setTimer(player, label, 140);
  353. return true;
  354. @Axtwurf
  355. msg(player, "Skill noch ohne Wirkung");
  356. return true;
  357. @Knochenbrecher
  358. p = getTarget(player, true, 4);
  359. if(isDouble(p)) {
  360. return p;
  361. }
  362. entityDamage(p, player, 2.8, false);
  363. entity.addEffect(p, "nausea", 60, 1);
  364. return true;
  365. @Schlachtruf
  366. loc = entity.getLocation(player);
  367. list = players.near(loc, 10);
  368. for(i = 0; i < list.getSize(list); i++) {
  369. p = list.getIndex(list, i);
  370. if(guild.isSame(player, p)) {
  371. entity.addEffect(p, "fire_resistance", 300, 1);
  372. }
  373. }
  374. sound.spawn(loc, $sound_entity_ghast_warn, $sound_category_player);
  375. return true;
  376. @Zertrümmern
  377. msg(player, "Skill noch ohne Wirkung");
  378. return true;
  379. @PfadderNarben
  380. msg(player, "Skill noch ohne Wirkung");
  381. return true;
  382. @Ausweiden
  383. msg(player, "Skill noch ohne Wirkung");
  384. return true;
  385. @Kampfeslust
  386. p = getTarget(player, true, 4);
  387. if(isDouble(p)) {
  388. return p;
  389. }
  390. entity.teleport(player, entity.getLocation(p));
  391. entity.addEffect(p, "slowness", 40, 1);
  392. entity.addEffect(p, "blindness", 40, 1);
  393. return true;
  394. @Verkrüppeln
  395. p = getTarget(player, true, 4);
  396. if(isDouble(p)) {
  397. return p;
  398. }
  399. entity.teleport(player, entity.getLocation(p));
  400. entity.addEffect(p, "slowness", 60, 5);
  401. entity.addEffect(p, "nausea", 60, 1);
  402. return true;
  403. @HungerndeKlinge
  404. p = getTarget(player, true, 4);
  405. if(isDouble(p)) {
  406. return p;
  407. }
  408. entityDamage(p, player, 2.8, false);
  409. own_hp = entity.getHealth(player);
  410. if(own_hp > 10) {
  411. entity.addEffect(p, "hunger", 80, 4);
  412. }
  413. return true;
  414. @Aufstampfen
  415. list = player.near(player, 5);
  416. for(i = 0; i < list.getSize(list); i++) {
  417. p = list.getIndex(list, i);
  418. if(!guild.isSame(player, p)) {
  419. entity.throw(p, 0, 4, 0);
  420. }
  421. }
  422. return true;
  423. @Lebensbrecher
  424. p = getTarget(player, true, 4);
  425. if(isDouble(p)) {
  426. return p;
  427. }
  428. entity.teleport(player, entity.getLocation(p));
  429. hp = entity.getHealth(p);
  430. if(hp < 4) {
  431. entity.addEffect(p, "slowness", 40, 7);
  432. }
  433. return true;
  434. @Rammbock
  435. if(!block.isDoor(block_loc)) {
  436. return false;
  437. }
  438. block_loc = player.getTarget(player, 5, true);
  439. player.action(player, "Türe geöffnet");
  440. if(block.isDoor(block_loc)) {
  441. state_open = block.getState(block_loc, $door_prop);
  442. if(state_open) {
  443. return false;
  444. } else {
  445. block.setDoorStatus(block_loc, true);
  446. list.add($rammbock_list, block_loc);
  447. sgoto(1200, "Rammbock_Teil2");
  448. }
  449. }
  450. return true;
  451. //-------- Jäger --------
  452. @Schnellschuss
  453. entity.setNoPickup(entity.shootProjectile(player, "net.minecraft.entity.projectile.ArrowEntity", 1, read.item("{id:\"minecraft:arrow\",Count:1b,tag:{pickup:0b}}")));
  454. return true;
  455. @Trollsalbe
  456. status.addTimed(player, 22, 100, skillname);
  457. new_hp = entity.getHealth(player) + 1.2;
  458. entity.setHealth(player, new_hp);
  459. displayHealth(player);
  460. data.setTimer(player, "Trollsalbe1", 20);
  461. data.setTimer(player, "Trollsalbe2", 40);
  462. data.setTimer(player, "Trollsalbe3", 60);
  463. data.setTimer(player, "Trollsalbe4", 80);
  464. return true;
  465. @Stachelpfeil
  466. status.addTimed(player, 23, 200, skillname);
  467. data.setTimer(player, label, 200);
  468. return true;
  469. @Sprung
  470. array = entity.getLook(player);
  471. x = array[0];
  472. z = array[2];
  473. entity.throw(player, x, 1, z);
  474. entity.addEffect(player, "jump_boost", 35, 5);
  475. return true;
  476. @Magentritt
  477. ent = getTarget(player, false, 4);
  478. if(isDouble(ent)) {
  479. return ent;
  480. }
  481. array = entity.getLook(player);
  482. x = array[0] * 2;
  483. z = array[2] * 2;
  484. entity.throw(ent, x, 1, z);
  485. entity.addEffect(ent, "nausea", 60, 1);
  486. return true;
  487. @Trägheitspfeil
  488. status.addTimed(player, 26, 200, skillname);
  489. data.setTimer(player, label, 200);
  490. return true;
  491. @Netzfalle
  492. trap_loc = getBlockLocation(entity.getLocation(player));
  493. move_id = event.addMoveData(loc.mod(trap_loc, -2, -1, -2), loc.mod(trap_loc, 3, 1, 3), 5, -1);
  494. data.setTimer(player, concat("Netzfalle1_", move_id), 600);
  495. gilden_id = guild.getId(player);
  496. map.add($net_traps, move_id, gilden_id);
  497. return true;
  498. @Giftsalve
  499. arrow = entity.shootProjectile(player, "net.minecraft.entity.projectile.ArrowEntity", 1, null);
  500. entity.setNoPickup(arrow);
  501. map.add($arrow_to_skill, arrow, "Giftsalve");
  502. data.setTimer(player, "Giftsalve1", 10);
  503. data.setTimer(player, "Giftsalve2", 20);
  504. data.setTimer(player, "Giftsalve3", 30);
  505. data.setTimer(player, "Giftsalve4", 40);
  506. return true;
  507. @Brandpfeil
  508. status.addTimed(player, 29, 200, skillname);
  509. data.setTimer(player, label, 200);
  510. return true;
  511. @Waldhorn
  512. list = player.near(player, 5);
  513. entity.addEffect(player, "speed", 100, 6);
  514. for(i = 0; i < list.getSize(list); i++) {
  515. p = list.getIndex(list, i);
  516. if(guild.isSame(player, p)) {
  517. entity.addEffect(p, "speed", 100, 6);
  518. }
  519. }
  520. return true;
  521. @ArkanerSchuss
  522. status.addTimed(player, 31, 200, skillname);
  523. data.setTimer(player, label, 200);
  524. return true;
  525. @Blendpfeil
  526. status.addTimed(player, 32, 200, skillname);
  527. data.setTimer(player, label, 200);
  528. return true;
  529. @Schnellfeuer
  530. arrow = entity.shootProjectile(player, "net.minecraft.entity.projectile.ArrowEntity", 1, null);
  531. entity.setNoPickup(arrow);
  532. map.add($arrow_to_skill, arrow, "Schnellfeuer");
  533. data.setTimer(player, "Schnellfeuer1", 10);
  534. data.setTimer(player, "Schnellfeuer2", 20);
  535. data.setTimer(player, "Schnellfeuer3", 30);
  536. data.setTimer(player, "Schnellfeuer4", 40);
  537. return true;
  538. @Splitterbombe
  539. msg(player, "Skill noch ohne Wirkung");
  540. return true;
  541. @Dornenranken
  542. player_loc = entity.getLocation(player);
  543. bx = loc.getCoord(player_loc, "bx") + 0.5;
  544. by = loc.getCoord(player_loc, "by");
  545. bz = loc.getCoord(player_loc, "bz") + 0.5;
  546. middle_loc = loc.new($gpvpworld, bx, by, bz);
  547. move_id = event.addMoveData(loc.mod(middle_loc, -5, -1, -5), loc.mod(middle_loc, 6, 7, 6), 5, 600);
  548. data.setTimer(player, concat("Dornenranken_", move_id), 600);
  549. gilden_id = guild.getId(player);
  550. map.add($vine_traps, move_id, gilden_id);
  551. //Ranken setzen
  552. counter = 0;
  553. temp_list = list.new();
  554. temp_loc = loc.mod(player_loc, 0, 0, 0);
  555. if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
  556. list.add(temp_list, temp_loc);
  557. counter++;
  558. }
  559. temp_loc = loc.mod(player_loc, 0, 1, 0);
  560. if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
  561. list.add(temp_list, temp_loc);
  562. counter++;
  563. }
  564. temp_loc = loc.mod(player_loc, 0, 2, 0);
  565. if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
  566. list.add(temp_list, temp_loc);
  567. counter++;
  568. }
  569. temp_loc = loc.mod(player_loc, 0, 3, 0);
  570. if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
  571. list.add(temp_list, temp_loc);
  572. counter++;
  573. }
  574. temp_loc = loc.mod(player_loc, 0, 4, 0);
  575. if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
  576. list.add(temp_list, temp_loc);
  577. counter++;
  578. }
  579. temp_loc = loc.mod(player_loc, 2, 0, 2);
  580. if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
  581. list.add(temp_list, temp_loc);
  582. }
  583. temp_loc = loc.mod(player_loc, 2, 0, -2);
  584. if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
  585. list.add(temp_list, temp_loc);
  586. }
  587. temp_loc = loc.mod(player_loc, 2, 1, -2);
  588. if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
  589. list.add(temp_list, temp_loc);
  590. }
  591. temp_loc = loc.mod(player_loc, 2, 2, -2);
  592. if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
  593. list.add(temp_list, temp_loc);
  594. }
  595. temp_loc = loc.mod(player_loc, 2, 3, -2);
  596. if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
  597. list.add(temp_list, temp_loc);
  598. }
  599. temp_loc = loc.mod(player_loc, -2, 0, -1);
  600. if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
  601. list.add(temp_list, temp_loc);
  602. }
  603. temp_loc = loc.mod(player_loc, -2, 1, -1);
  604. if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
  605. list.add(temp_list, temp_loc);
  606. }
  607. temp_loc = loc.mod(player_loc, -1, 0, 2);
  608. if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
  609. list.add(temp_list, temp_loc);
  610. }
  611. temp_loc = loc.mod(player_loc, -1, 1, 2);
  612. if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
  613. list.add(temp_list, temp_loc);
  614. }
  615. temp_loc = loc.mod(player_loc, -1, 2, 2);
  616. if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
  617. list.add(temp_list, temp_loc);
  618. }
  619. map.add($vines_map, player.getId(player), temp_list);
  620. if(counter == 5) {
  621. entity.teleport(player, loc.mod(player_loc, 0, 3, 0));
  622. }
  623. return true;
  624. @Blätterkokon
  625. //Timer für Unverwundbarkeit und Blätterkokon-Entfernung
  626. status.addTimed(player, 36, 100, skillname);
  627. data.setTimer(player, label, 100);
  628. //Regeneration
  629. entity.addEffect(player, "regeneration", 100, 3);
  630. //Spieler mittig in den Blätterkokon teleportieren
  631. player_loc = entity.getLocation(player);
  632. bx = loc.getCoord(player_loc, "bx") + 0.5;
  633. by = loc.getCoord(player_loc, "by");
  634. bz = loc.getCoord(player_loc, "bz") + 0.5;
  635. middle_loc = loc.new($gpvpworld, bx, by, bz);
  636. entity.teleport(player, middle_loc);
  637. //Blätterkokon setzen
  638. temp_list = list.new();
  639. temp_loc = loc.mod(player_loc, 1, 0, 0);
  640. if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
  641. list.add(temp_list, temp_loc);
  642. }
  643. temp_loc = loc.mod(player_loc, 1, 1, 0);
  644. if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
  645. list.add(temp_list, temp_loc);
  646. }
  647. temp_loc = loc.mod(player_loc, -1, 0, 0);
  648. if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
  649. list.add(temp_list, temp_loc);
  650. }
  651. temp_loc = loc.mod(player_loc, -1, 1, 0);
  652. if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
  653. list.add(temp_list, temp_loc);
  654. }
  655. temp_loc = loc.mod(player_loc, 0, 0, 1);
  656. if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
  657. list.add(temp_list, temp_loc);
  658. }
  659. temp_loc = loc.mod(player_loc, 0, 1, 1);
  660. if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
  661. list.add(temp_list, temp_loc);
  662. }
  663. temp_loc = loc.mod(player_loc, 0, 0, -1);
  664. if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
  665. list.add(temp_list, temp_loc);
  666. }
  667. temp_loc = loc.mod(player_loc, 0, 1, -1);
  668. if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
  669. list.add(temp_list, temp_loc);
  670. }
  671. temp_loc = loc.mod(player_loc, 0, 2, 0);
  672. if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
  673. list.add(temp_list, temp_loc);
  674. }
  675. temp_loc = loc.mod(player_loc, 0, -1, 0);
  676. if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
  677. list.add(temp_list, temp_loc);
  678. }
  679. map.add($concon_map, player.getId(player), temp_list);
  680. return true;
  681. @ExplosiverPfeil
  682. msg(player, "Skill noch ohne Wirkung");
  683. return true;
  684. //-------- Magier --------
  685. @Feuergeschoss
  686. msg(player, "Skill noch ohne Wirkung");
  687. return true;
  688. @Wiederherstellung
  689. status.addTimed(player, 22, 100, skillname);
  690. data.setTimer(player, label, 100);
  691. data.set(player, label, 1);
  692. new_hp = entity.getHealth(player) + 0.8;
  693. entity.setHealth(player, new_hp);
  694. displayHealth(player);
  695. list.add($wiederherstellung_list, player);
  696. sgoto(20, "Wiederherstellung_Teil2");
  697. return true;
  698. @Eisgeschoss
  699. msg(player, "Skill noch ohne Wirkung");
  700. return true;
  701. @Flammensäule
  702. msg(player, "Skill noch ohne Wirkung");
  703. return true;
  704. @Manabarriere
  705. msg(player, "Skill noch ohne Wirkung");
  706. return true;
  707. @Partikelimplosion
  708. msg(player, "Skill noch ohne Wirkung");
  709. return true;
  710. @Teleportation
  711. loc = player.getTarget(player, 9, true);
  712. entity.teleport(player, loc);
  713. return true;
  714. @korrosiveGiftwolke
  715. msg(player, "Skill noch ohne Wirkung");
  716. return true;
  717. @Eisstrahl
  718. msg(player, "Skill noch ohne Wirkung");
  719. return true;
  720. @Blitzschlag
  721. msg(player, "Skill noch ohne Wirkung");
  722. return true;
  723. @Tornado
  724. msg(player, "Skill noch ohne Wirkung");
  725. return true;
  726. @Eisgefängnis
  727. msg(player, "Skill noch ohne Wirkung");
  728. return true;
  729. @Hexenwerk
  730. msg(player, "Skill noch ohne Wirkung");
  731. return true;
  732. @Blizzard
  733. msg(player, "Skill noch ohne Wirkung");
  734. return true;
  735. @Gewittersturm
  736. msg(player, "Skill noch ohne Wirkung");
  737. return true;
  738. @Urzeitknall
  739. msg(player, "Skill noch ohne Wirkung");
  740. return true;
  741. @Phosphorbombe
  742. msg(player, "Skill noch ohne Wirkung");
  743. return true;
  744. //-------- Mönch --------
  745. @harmonischerHieb
  746. status.addTimed(player, 21, 200, skillname);
  747. data.setTimer(player, label, 200);
  748. return true;
  749. @Heilen
  750. msg(player, "Skill noch ohne Wirkung");
  751. return true;
  752. @Verbannung
  753. msg(player, "Skill noch ohne Wirkung");
  754. return true;
  755. @KreisderHeilung
  756. list = player.near(player, 5);
  757. entity.setHealth(player, entity.getHealth(player) + 4);
  758. for(i = 0; i < list.getSize(list); i++) {
  759. p = list.getIndex(list, i);
  760. if(guild.isSame(player, p)) {
  761. entity.setHealth(p, entity.getHealth(p) + 4);
  762. }
  763. }
  764. return true;
  765. @Lichtschild
  766. msg(player, "Skill noch ohne Wirkung");
  767. return true;
  768. @HeiligeEile
  769. list = player.near(player, 5);
  770. entity.addEffect(player, "speed", 100, 3);
  771. entity.addEffect(player, "haste", 100, 2);
  772. for(i = 0; i < list.getSize(list); i++) {
  773. p = list.getIndex(list, i);
  774. if(guild.isSame(player, p)) {
  775. entity.addEffect(p, "speed", 100, 3);
  776. entity.addEffect(p, "haste", 100, 2);
  777. }
  778. }
  779. return true;
  780. @Segensprechen
  781. msg(player, "Skill noch ohne Wirkung");
  782. return true;
  783. @Glaubensexplosion
  784. list = player.near(player, 5);
  785. entity.setHealth(player, entity.getHealth(player) + 4);
  786. for(i = 0; i < list.getSize(list); i++) {
  787. p = list.getIndex(list, i);
  788. if(guild.isSame(player, p)) {
  789. entity.setHealth(p, entity.getHealth(p) + 4);
  790. } else {
  791. entityDamage(p, player, 4, false);
  792. }
  793. }
  794. return true;
  795. @HimmlischeGabe
  796. msg(player, "Skill noch ohne Wirkung");
  797. return true;
  798. @HelfendeHand
  799. p = getTarget(player, true, 4);
  800. if(isDouble(p)) {
  801. return p;
  802. }
  803. entity.teleport(player, entity.getLocation(p));
  804. entity.addEffect(player, "speed", 100, 4);
  805. entity.addEffect(p, "speed", 100, 4);
  806. return true;
  807. @unnachgiebigeAura
  808. msg(player, "Skill noch ohne Wirkung");
  809. return true;
  810. @Mondgewalt
  811. list = player.near(player, 5);
  812. entity.addEffect(player, "jump_boost", 100, 3);
  813. for(i = 0; i < list.getSize(list); i++) {
  814. p = list.getIndex(list, i);
  815. if(guild.isSame(player, p)) {
  816. entity.addEffect(p, "jump_boost", 100, 3);
  817. }
  818. }
  819. return true;
  820. @Trugschluss
  821. msg(player, "Skill noch ohne Wirkung");
  822. return true;
  823. @Engelsfeder
  824. msg(player, "Skill noch ohne Wirkung");
  825. return true;
  826. @Voodoo
  827. msg(player, "Skill noch ohne Wirkung");
  828. return true;
  829. @HeiligerSchein
  830. msg(player, "Skill noch ohne Wirkung");
  831. return true;
  832. @Obsidianbrecher
  833. msg(player, "Skill noch ohne Wirkung");
  834. return true;
  835. }
  836. @Rammbock_Teil2
  837. doorloc = list.getIndex(rammbock_list, 0);
  838. list.removeIndex(rammbock_list, 0);
  839. if(block.isDoor(doorloc)) {
  840. if(block.getDoorStatus(doorloc)) {
  841. block.setDoorStatus(doorloc, false);
  842. }
  843. }
  844. goto("wait");
  845. @Schmerzertragen_Teil2
  846. try {
  847. player = list.getIndex(schmerzertragen_list, 0);
  848. list.remove(schmerzertragen_list, player);
  849. counter = data.get(player, "Schmerzertragen");
  850. if(counter < 5) {
  851. data.set(player, "Schmerzertragen", ++counter);
  852. new_hp = entity.getHealth(player) + 1.2;
  853. entity.setHealth(player, new_hp);
  854. displayHealth(player);
  855. list.add(schmerzertragen_list, player);
  856. sgoto(20, "Schmerzertragen_Teil2");
  857. }
  858. } catch {
  859. nothing();
  860. }
  861. goto("wait");
  862. @Belagerungsleiter_Up
  863. try {
  864. up_loc = list.getIndex($belagerungsleiter_up_loc_list, 0);
  865. facing = list.getIndex($belagerungsleiter_up_facing_list, 0);
  866. list.removeIndex($belagerungsleiter_up_loc_list, 0);
  867. list.removeIndex($belagerungsleiter_up_facing_list, 0);
  868. //Ist die Location frei?
  869. if(block.isAir(up_loc)) {
  870. //Ist der Grundblock solide?
  871. if(facing == "east") {
  872. ground_loc = loc.mod(up_loc, -1, 0, 0);
  873. } elseif(facing == "west") {
  874. ground_loc = loc.mod(up_loc, 1, 0, 0);
  875. } elseif(facing == "south") {
  876. ground_loc = loc.mod(up_loc, 0, 0, -1);
  877. } else {
  878. ground_loc = loc.mod(up_loc, 0, 0, 1);
  879. }
  880. //if(block.isSolid(ground_loc)) {
  881. block.set(up_loc, concat("minecraft:ladder[facing=", facing, "]"));
  882. list.add($belagerungsleiter_up_facing_list, facing);
  883. list.add($belagerungsleiter_up_loc_list, loc.mod(up_loc, 0, 1, 0));
  884. player_uuid = player.getUuid(player);
  885. remove_list = map.get($belagerungsleiter_remove_map, player_uuid);
  886. list.add(remove_list, up_loc);
  887. map.add($belagerungsleiter_remove_map, player_uuid, remove_list);
  888. //Counter
  889. counter = map.get($belagerungsleiter_counter_up_map, player_uuid) + 1;
  890. if(counter != 100) {
  891. sgoto(10, "Belagerungsleiter_Up");
  892. }
  893. map.add($belagerungsleiter_counter_up_map, player_uuid, counter);
  894. //}
  895. }
  896. } catch {
  897. nothing();
  898. }
  899. goto("wait");
  900. @Belagerungsleiter_Down
  901. try {
  902. down_loc = list.getIndex($belagerungsleiter_down_loc_list, 0);
  903. facing = list.getIndex($belagerungsleiter_down_facing_list, 0);
  904. list.removeIndex($belagerungsleiter_down_loc_list, 0);
  905. list.removeIndex($belagerungsleiter_down_facing_list, 0);
  906. //Ist die Location frei?
  907. if(block.isAir(down_loc)) {
  908. //Ist der Grundblock solide?
  909. if(facing == "east") {
  910. ground_loc = loc.mod(down_loc, -1, 0, 0);
  911. } elseif(facing == "west") {
  912. ground_loc = loc.mod(down_loc, 1, 0, 0);
  913. } elseif(facing == "south") {
  914. ground_loc = loc.mod(down_loc, 0, 0, -1);
  915. } else {
  916. ground_loc = loc.mod(down_loc, 0, 0, 1);
  917. }
  918. //if(block.isSolid(ground_loc)) {
  919. block.set(down_loc, concat("minecraft:ladder[facing=", facing, "]"));
  920. list.add($belagerungsleiter_down_facing_list, facing);
  921. list.add($belagerungsleiter_down_loc_list, loc.mod(down_loc, 0, -1, 0));
  922. player_uuid = player.getUuid(player);
  923. remove_list = map.get($belagerungsleiter_remove_map, player_uuid);
  924. list.add(remove_list, down_loc);
  925. map.add($belagerungsleiter_remove_map, player_uuid, remove_list);
  926. //Counter
  927. counter = map.get($belagerungsleiter_counter_down_map, player_uuid) + 1;
  928. if(counter != 100) {
  929. sgoto(10, "Belagerungsleiter_Down");
  930. }
  931. map.add($belagerungsleiter_counter_down_map, player_uuid, counter);
  932. //}
  933. }
  934. } catch {
  935. nothing();
  936. }
  937. goto("wait");
  938. @Belagerungsleiter_Remove
  939. player_uuid = list.getIndex($belagerungsleiter_remove_list, 0);
  940. list.remove($belagerungsleiter_remove_list, 0);
  941. remove_list = map.get($belagerungsleiter_remove_map, player_uuid);
  942. map.remove($belagerungsleiter_remove_map, player_uuid);
  943. for(i = 0; i < list.getSize(remove_list); i++) {
  944. loc = list.getIndex(remove_list, i);
  945. block.set(loc, "minecraft:air");
  946. }
  947. goto("wait");
  948. @Blutrausch_Teil2
  949. try {
  950. player = list.getIndex(blutrausch_list, 0);
  951. list.remove(blutrausch_list, player);
  952. counter = data.get(player, "Blutrausch");
  953. if(counter < 5) {
  954. data.set(player, "Blutrausch", ++counter);
  955. new_hp = entity.getHealth(player) + 1.2;
  956. entity.setHealth(player, new_hp);
  957. displayHealth(player);
  958. list.add(blutrausch_list, player);
  959. sgoto(20, "Blutrausch_Teil2");
  960. }
  961. } catch {
  962. nothing();
  963. }
  964. goto("wait");
  965. @Wiederherstellung_Teil2
  966. try {
  967. player = list.getIndex(wiederherstellung_list, 0);
  968. list.remove(wiederherstellung_list, player);
  969. counter = data.get(player, "Wiederherstellung");
  970. if(counter < 5) {
  971. data.set(player, "Wiederherstellung", ++counter);
  972. new_hp = entity.getHealth(player) + 1.2;
  973. entity.setHealth(player, new_hp);
  974. displayHealth(player);
  975. list.add(wiederherstellung_list, player);
  976. sgoto(20, "Wiederherstellung_Teil2");
  977. }
  978. } catch {
  979. nothing();
  980. }
  981. goto("wait");
  982. @Klingenwirbel_Teil2
  983. try {
  984. player = list.getIndex(klingenwirbel_list, 0);
  985. damager = map.get(klingenwirbel_map, player);
  986. list.remove(klingenwirbel_list, player);
  987. counter = data.get(player, "Klingenwirbel");
  988. if(counter < 5) {
  989. data.set(player, "Klingenwirbel", ++counter);
  990. entityDamage(player, damager, 0.4, false);
  991. list.add(klingenwirbel_list, player);
  992. sgoto(10, "Klingenwirbel_Teil2");
  993. } else {
  994. map.remove(klingenwirbel_map, player);
  995. }
  996. } catch {
  997. nothing();
  998. }
  999. goto("wait");
  1000. @Stürmen_Teil2
  1001. try {
  1002. player = list.getIndex(stürmen_list, 0);
  1003. list = player.near(player, 5);
  1004. if(list.getSize(list) != 0) {
  1005. p = list.getIndex(list, 0);
  1006. entity.addEffect(p, "slowness", 30, 2);
  1007. }
  1008. } catch {
  1009. nothing();
  1010. }
  1011. goto("wait");
  1012. function entityDamage(entity, damager_entity, value, isMagic) {
  1013. damageSource = damage.get(damager_entity, false, true, false, false, false, isMagic, false);
  1014. entity.damage(entity, value, damageSource);
  1015. return;
  1016. }
  1017. function hasSkillImmunity(player) {
  1018. if(set.contains($skill_immunity, player.getUuid(player))) {
  1019. return true;
  1020. }
  1021. return false;
  1022. }
  1023. function getTarget(player, onlyPlayers, radius) {
  1024. ent = player.getTargetEntity(player, radius, "net.minecraft.entity.player.PlayerEntity");
  1025. if(ent == null) {
  1026. if(onlyPlayers) {
  1027. return 4;
  1028. } else {
  1029. ent = player.getTargetEntity(player, radius, "net.minecraft.entity.LivingEntity");
  1030. if(ent == null) {
  1031. return 4;
  1032. }
  1033. }
  1034. } else {
  1035. if(guild.isSame(player, ent)) {
  1036. player.action(player, "§rSpieler in derselben Gilde");
  1037. return 6;
  1038. }
  1039. }
  1040. return ent;
  1041. }