12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166 |
- /*
- Rückgabewerte:
- false .. skill could not be executed
- true ... skill executing with message
- 0 ...... skill executing without message
- 2 ...... skill not existing
- 3 ...... wrong class for that skill
- 4 ...... skill could not be executed: no opponent
- 5 ...... skill-level too low for that skill
- 6 ...... same guild
- 7 ...... please wait. cooldown not reached
- 8 ...... gpvp belagerungsskill. only while gfight
- */
- function executeSkill(player, skillname) {
- temp = canExecuteSkill(player, skillname);
- if(temp == true) {
- label = skill.getLabel(skillname);
- igoto(label);
- return 2;
- }
- return temp;
-
- //-------- Krieger --------
- @Schwerthieb
- status.addTimed(player, 21, 200, skillname);
- data.setTimer(player, label, 200);
- return true;
-
- @Schmerzertragen
- status.addTimed(player, 22, 100, skillname);
- data.setTimer(player, label, 100);
- data.set(player, label, 1);
- new_hp = entity.getHealth(player) + 1.2;
- entity.setHealth(player, new_hp);
- displayHealth(player);
- list.add($schmerzertragen_list, player);
- sgoto(20, "Schmerzertragen_Teil2");
- return true;
-
- @Schildstoß
- ent = getTarget(player, false, 4);
- if(isDouble(ent)) {
- return ent;
- }
- entity.addEffect(ent, "slowness", 30, 7);
- return true;
-
- @Klingenwirbel
- list = player.near(player, 3);
- for(i = 0; i < list.getSize(list); i++) {
- p = list.getIndex(list, i);
- if(!guild.isSame(player, p)) {
- status.addTimed(p, 24, 50, skillname);
- data.set(p, label, 1);
- entityDamage(p, player, 0.4, false);
- list.add($klingenwirbel_list, p);
- map.add($klingenwirbel_map, p, player);
- }
- sgoto(10, "Klingenwirbel_Teil2");
- }
- return true;
-
- @EisernerWille
- status.addTimed(player, 25, 200, skillname);
- data.setTimer(player, label, 200);
- return true;
-
- @Kniezerschmetterer
- ent = getTarget(player, false, 4);
- if(isDouble(ent)) {
- return ent;
- }
- entity.addEffect(ent, "slowness", 60, 7);
- return true;
-
- @Stürmen
- array = entity.getLook(player);
- x = array[0];
- z = array[2];
- entity.throw(player, 3.9*x, 0.5, 3.9*z);
- list.add($stürmen_list, player);
- sgoto(20, "Stürmen_Teil2");
- return true;
-
- @Kriegsruf
- loc = entity.getLocation(player);
- list = players.near(loc, 10);
- for(i = 0; i < list.getSize(list); i++) {
- p = list.getIndex(list, i);
- if(guild.isSame(player, p)) {
- entity.addEffect(p, "strength", 300, 1);
- entity.addEffect(p, "fire_resistance", 300, 1);
- }
- }
- sound.spawn(loc, $sound_entity_ghast_warn, $sound_category_player);
- return true;
-
- @Drachenhaut
- status.addTimed(player, 29, 200, skillname);
- data.setTimer(player, label, 200);
- return true;
-
- @WütenderSchlag
- status.addTimed(player, 30, 200, skillname);
- data.setTimer(player, label, 200);
- return true;
-
- @Schildwall
- loc = entity.getLocation(player);
- list = players.near(loc, 10);
- for(i = 0; i < list.getSize(list); i++) {
- p = list.getIndex(list, i);
- if(guild.isSame(player, p)) {
- status.addTimed(p, 31, 200, skillname);
- data.setTimer(p, label, 200);
- }
- }
- return true;
-
- @Schwertknaufschlag
- p = getTarget(player, true, 4);
- if(isDouble(p)) {
- return p;
- }
- entity.addEffect(p, "nausea", 60, 1);
- status.addTimed(p, 32, 60, skillname);
- data.setTimer(p, label, 60);
- return true;
-
- @Entwaffnen
- p = getTarget(player, true, 4);
- if(isDouble(p)) {
- return p;
- }
- status.addTimed(p, 33, 120, skillname);
- data.setTimer(p, label, 120);
- return true;
-
- @Dornenpanzer
- status.addTimed(player, 34, 200, skillname);
- data.setTimer(player, label, 200);
- return true;
-
- @Unbeugsam
- set.add($skill_immunity, player.getUuid(player));
- status.addTimed(player, 35, 300, skillname);
- data.setTimer(player, label, 300);
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Verspotten
- list = player.near(player, 6);
- player_loc = entity.getLocation(player);
- for(i = 0; i < list.getSize(list); i++) {
- p = list.getIndex(list, i);
- if(!guild.isSame(player, p)) {
- entity.teleport(p, player_loc);
- }
- }
- return true;
-
- @Belagerungsleiter
- target_loc = player.getTarget(player, 5, false);
- if(!block.isSolid(target_loc)) {
- player.action(player, "§rNicht solider Block");
- return false;
- }
- ladder_loc = target_loc;
- radius = loc.distance(target_loc, entity.getLocation(player));
- while(target_loc == ladder_loc) {
- ladder_loc = player.getTarget(player, radius, false);
- ladder_loc = getBlockLocation(ladder_loc);
- radius -= 0.1;
- }
- if(block.isAir(ladder_loc)) {
- //Unsolider Block davor
- player.action(player, "§rLeiter konnte nicht platziert werden");
- return false;
- }
- y_distance = loc.getY(target_loc) - loc.getY(ladder_loc);
- if(y_distance != 0) {
- //Keine Wand erkannt
- player.action(player, "§rLeiter konnte nicht platziert werden");
- return false;
- }
- x_distance = loc.getX(target_loc) - loc.getX(ladder_loc);
- z_distance = loc.getZ(target_loc) - loc.getZ(ladder_loc);
- if(x_distance == 0) {
- if(z_distance == -1) {
- facing = "south";
- } elseif(z_distance == 1) {
- facing = "north";
- }
- } elseif(z_distance == 0) {
- if(x_distance == -1) {
- facing = "east";
- }
- if(x_distance == 1) {
- facing = "west";
- }
- }
- block.set(ladder_loc, concat("minecraft:ladder[facing=", facing, "]"));
- list.add($belagerungsleiter_up_facing_list, facing);
- list.add($belagerungsleiter_down_facing_list, facing);
- list.add($belagerungsleiter_up_loc_list, loc.mod(ladder_loc, 0, 1, 0));
- list.add($belagerungsleiter_down_loc_list, loc.mod(ladder_loc, 0, -1, 0));
- player_uuid = player.getUuid(player);
- list.add($belagerungsleiter_remove_list, player_uuid);
- remove_list = list.new();
- list.add(remove_list, ladder_loc);
- map.add($belagerungsleiter_remove_map, player_uuid, remove_list);
- map.add($belagerungsleiter_counter_up_map, player_uuid, 0);
- map.add($belagerungsleiter_counter_down_map, player_uuid, 0);
- sgoto(10, "Belagerungsleiter_Up");
- sgoto(10, "Belagerungsleiter_Down");
- sgoto(1200, "Belagerungsleiter_Remove");
- return true;
-
- //-------- Schurke --------
-
- @Dolchangriff
- status.addTimed(player, 21, 200, skillname);
- data.setTimer(player, label, 200);
- return true;
-
- @Bandagieren
- new_hp = entity.getHealth(player) + 6;
- entity.setHealth(player, new_hp);
- displayHealth(player);
- return true;
-
- @Schattenhieb
- status.addTimed(player, 23, 200, skillname);
- data.setTimer(player, label, 200);
- return true;
-
- @Trittnägel
- //Trittnägel auslegen
- trap_loc = getBlockLocation(entity.getLocation(player));
- move_id = event.addMoveData(loc.mod(trap_loc, -2, 0, -2), loc.mod(trap_loc, 3, 1, 3), 5, 1200);
- data.setTimer(player, concat("Trittnägel_Pre_", move_id), 1200);
- data.set(player, concat("Trittnägel_Loc_", move_id), trap_loc);
- map.add($pre_nail_traps, move_id, $player_name);
- return true;
-
- @Rauchbombe
- entity.shootProjectile(player, "net.minecraft.entity.projectile.FireballEntity", 1, null);
- return true;
-
- @Schattenform
- status.addTimed(player, 26, 400, skillname);
- data.setTimer(player, label, 400);
- entity.addEffect(player, "invisibility", 400, 1);
- return true;
-
- @Festnageln
- ent = getTarget(player, false, 4);
- if(isDouble(ent)) {
- return ent;
- }
- entity.addEffect(ent, "slowness", 60, 7);
- return true;
-
- @Todesblüte
- p = getTarget(player, true, 4);
- if(isDouble(p)) {
- return p;
- }
- entity.addEffect(p, "blindness", 60, 1);
- entity.addEffect(p, "hunger", 80, 4);
- return true;
-
- @Giftklinge
- status.addTimed(player, 29, 200, skillname);
- data.setTimer(player, label, 200);
- return true;
-
- @Schattenschritt
- if(data.getTimer(player, "Schattenform") > 0) {
- ent = getTarget(player, false, 8);
- } else {
- ent = getTarget(player, false, 4);
- }
- if(isDouble(ent)) {
- return ent;
- }
- array = entity.getLook(player);
- x = array[0];
- z = array[2];
- entity.teleport(player, loc.mod(entity.getLocation(ent), x, 0, z));
- return true;
-
- @Herzsucher
- ent = getTarget(player, false, 4);
- if(isDouble(ent)) {
- return ent;
- }
- schaden = 2 * (20 / entity.getHealth(ent));
- if(isPlayer(ent)) {
- entityDamage(ent, player, schaden, false);
- } else {
- entity.damage(ent, schaden);
- }
- return true;
-
- @Kehlschnitt
- p = getTarget(player, true, 4);
- if(isDouble(p)) {
- return p;
- }
- status.addTimed(p, 32, 50, skillname);
- data.setTimer(p, label, 50);
- return true;
-
- @Assassinensiegel
- status.addTimed(player, 33, 300, skillname);
- data.setTimer(player, label, 300);
- return true;
-
- @Rückruf
- location = data.get(player, label);
- if(location == null) {
- data.set(player, label, entity.getLocation(player));
- status.addTimed(player, 34, 200, skillname);
- data.setTimer(player, label, 200);
- return true;
- } else {
- if(data.getTimer(player, label) > 0) {
- status.remove(player, 34);
- data.setTimer(player, label, -1);
- data.set(player, label, null);
- entity.teleport(player, location);
- return 0;
- }
- }
-
- @Widerhaken
- status.addTimed(player, 35, 200, skillname);
- data.setTimer(player, label, 200);
- return true;
-
- @Todgeweiht
- ent = getTarget(player, false, 4);
- if(isDouble(ent)) {
- return ent;
- }
- //Anwender zum Spieler teleportieren
- entity.teleport(player, entity.getLocation(ent));
- //Timer auf 5 Sekunden setzen
- if(isPlayer(ent)) {
- status.addTimed(ent, 35, 100, skillname);
- }
- data.setTimer(player, label, 100);
- //Anvisierten Gegner notieren und Schadenscounter auf 0 setzen
- data.set(player, "Todgeweiht-Ziel", ent);
- data.set(player, "Todgeweiht-Count", 0);
- //nach 5 Sekunden: physischer Schaden = max_leben/20 UND magischer Schaden = 10% des innerhalb der letzten 5 sek ausgeteilten physischen schadens
- return true;
-
- @Dietrich
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
-
- //-------- Barbar --------
-
- @Axthieb
- status.addTimed(player, 21, 200, skillname);
- data.setTimer(player, label, 200);
- return true;
-
- @Blutrausch
- status.addTimed(player, 22, 100, skillname);
- data.setTimer(player, label, 100);
- data.set(player, label, 1);
- new_hp = entity.getHealth(player) + 1.2;
- entity.setHealth(player, new_hp);
- displayHealth(player);
- list.add($blutrausch_list, player);
- sgoto(20, "Blutrausch_Teil2");
- return true;
-
- @Wuchtschlag
- status.addTimed(player, 23, 200, skillname);
- data.setTimer(player, label, 200);
- return true;
-
- @AggressiverAusbruch
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @InnereWut
- status.addTimed(player, 25, 140, skillname);
- data.setTimer(player, label, 140);
- return true;
-
- @Axtwurf
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Knochenbrecher
- p = getTarget(player, true, 4);
- if(isDouble(p)) {
- return p;
- }
- entityDamage(p, player, 2.8, false);
- entity.addEffect(p, "nausea", 60, 1);
- return true;
-
- @Schlachtruf
- loc = entity.getLocation(player);
- list = players.near(loc, 10);
- for(i = 0; i < list.getSize(list); i++) {
- p = list.getIndex(list, i);
- if(guild.isSame(player, p)) {
- entity.addEffect(p, "fire_resistance", 300, 1);
- }
- }
- sound.spawn(loc, $sound_entity_ghast_warn, $sound_category_player);
- return true;
-
- @Zertrümmern
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @PfadderNarben
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Ausweiden
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Kampfeslust
- p = getTarget(player, true, 4);
- if(isDouble(p)) {
- return p;
- }
- entity.teleport(player, entity.getLocation(p));
- entity.addEffect(p, "slowness", 40, 1);
- entity.addEffect(p, "blindness", 40, 1);
- return true;
-
- @Verkrüppeln
- p = getTarget(player, true, 4);
- if(isDouble(p)) {
- return p;
- }
- entity.teleport(player, entity.getLocation(p));
- entity.addEffect(p, "slowness", 60, 5);
- entity.addEffect(p, "nausea", 60, 1);
- return true;
-
- @HungerndeKlinge
- p = getTarget(player, true, 4);
- if(isDouble(p)) {
- return p;
- }
- entityDamage(p, player, 2.8, false);
- own_hp = entity.getHealth(player);
- if(own_hp > 10) {
- entity.addEffect(p, "hunger", 80, 4);
- }
- return true;
-
- @Aufstampfen
- list = player.near(player, 5);
- for(i = 0; i < list.getSize(list); i++) {
- p = list.getIndex(list, i);
- if(!guild.isSame(player, p)) {
- entity.throw(p, 0, 4, 0);
- }
- }
- return true;
-
- @Lebensbrecher
- p = getTarget(player, true, 4);
- if(isDouble(p)) {
- return p;
- }
- entity.teleport(player, entity.getLocation(p));
- hp = entity.getHealth(p);
- if(hp < 4) {
- entity.addEffect(p, "slowness", 40, 7);
- }
- return true;
-
- @Rammbock
- if(!block.isDoor(block_loc)) {
- return false;
- }
- block_loc = player.getTarget(player, 5, true);
- player.action(player, "Türe geöffnet");
- if(block.isDoor(block_loc)) {
- state_open = block.getState(block_loc, $door_prop);
- if(state_open) {
- return false;
- } else {
- block.setDoorStatus(block_loc, true);
- list.add($rammbock_list, block_loc);
- sgoto(1200, "Rammbock_Teil2");
- }
- }
- return true;
-
- //-------- Jäger --------
-
- @Schnellschuss
- entity.setNoPickup(entity.shootProjectile(player, "net.minecraft.entity.projectile.ArrowEntity", 1, read.item("{id:\"minecraft:arrow\",Count:1b,tag:{pickup:0b}}")));
- return true;
-
- @Trollsalbe
- status.addTimed(player, 22, 100, skillname);
- new_hp = entity.getHealth(player) + 1.2;
- entity.setHealth(player, new_hp);
- displayHealth(player);
- data.setTimer(player, "Trollsalbe1", 20);
- data.setTimer(player, "Trollsalbe2", 40);
- data.setTimer(player, "Trollsalbe3", 60);
- data.setTimer(player, "Trollsalbe4", 80);
- return true;
-
- @Stachelpfeil
- status.addTimed(player, 23, 200, skillname);
- data.setTimer(player, label, 200);
- return true;
-
- @Sprung
- array = entity.getLook(player);
- x = array[0];
- z = array[2];
- entity.throw(player, x, 1, z);
- entity.addEffect(player, "jump_boost", 35, 5);
- return true;
-
- @Magentritt
- ent = getTarget(player, false, 4);
- if(isDouble(ent)) {
- return ent;
- }
- array = entity.getLook(player);
- x = array[0] * 2;
- z = array[2] * 2;
- entity.throw(ent, x, 1, z);
- entity.addEffect(ent, "nausea", 60, 1);
- return true;
-
- @Trägheitspfeil
- status.addTimed(player, 26, 200, skillname);
- data.setTimer(player, label, 200);
- return true;
-
- @Netzfalle
- trap_loc = getBlockLocation(entity.getLocation(player));
- move_id = event.addMoveData(loc.mod(trap_loc, -2, -1, -2), loc.mod(trap_loc, 3, 1, 3), 5, -1);
- data.setTimer(player, concat("Netzfalle1_", move_id), 600);
- gilden_id = guild.getId(player);
- map.add($net_traps, move_id, gilden_id);
- return true;
-
- @Giftsalve
- arrow = entity.shootProjectile(player, "net.minecraft.entity.projectile.ArrowEntity", 1, null);
- entity.setNoPickup(arrow);
- map.add($arrow_to_skill, arrow, "Giftsalve");
- data.setTimer(player, "Giftsalve1", 10);
- data.setTimer(player, "Giftsalve2", 20);
- data.setTimer(player, "Giftsalve3", 30);
- data.setTimer(player, "Giftsalve4", 40);
- return true;
-
- @Brandpfeil
- status.addTimed(player, 29, 200, skillname);
- data.setTimer(player, label, 200);
- return true;
-
- @Waldhorn
- list = player.near(player, 5);
- entity.addEffect(player, "speed", 100, 6);
- for(i = 0; i < list.getSize(list); i++) {
- p = list.getIndex(list, i);
- if(guild.isSame(player, p)) {
- entity.addEffect(p, "speed", 100, 6);
- }
- }
- return true;
-
- @ArkanerSchuss
- status.addTimed(player, 31, 200, skillname);
- data.setTimer(player, label, 200);
- return true;
-
- @Blendpfeil
- status.addTimed(player, 32, 200, skillname);
- data.setTimer(player, label, 200);
- return true;
-
- @Schnellfeuer
- arrow = entity.shootProjectile(player, "net.minecraft.entity.projectile.ArrowEntity", 1, null);
- entity.setNoPickup(arrow);
- map.add($arrow_to_skill, arrow, "Schnellfeuer");
- data.setTimer(player, "Schnellfeuer1", 10);
- data.setTimer(player, "Schnellfeuer2", 20);
- data.setTimer(player, "Schnellfeuer3", 30);
- data.setTimer(player, "Schnellfeuer4", 40);
- return true;
-
- @Splitterbombe
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Dornenranken
- player_loc = entity.getLocation(player);
- bx = loc.getCoord(player_loc, "bx") + 0.5;
- by = loc.getCoord(player_loc, "by");
- bz = loc.getCoord(player_loc, "bz") + 0.5;
- middle_loc = loc.new($gpvpworld, bx, by, bz);
- move_id = event.addMoveData(loc.mod(middle_loc, -5, -1, -5), loc.mod(middle_loc, 6, 7, 6), 5, 600);
- data.setTimer(player, concat("Dornenranken_", move_id), 600);
- gilden_id = guild.getId(player);
- map.add($vine_traps, move_id, gilden_id);
- //Ranken setzen
- counter = 0;
- temp_list = list.new();
- temp_loc = loc.mod(player_loc, 0, 0, 0);
- if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
- list.add(temp_list, temp_loc);
- counter++;
- }
- temp_loc = loc.mod(player_loc, 0, 1, 0);
- if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
- list.add(temp_list, temp_loc);
- counter++;
- }
- temp_loc = loc.mod(player_loc, 0, 2, 0);
- if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
- list.add(temp_list, temp_loc);
- counter++;
- }
- temp_loc = loc.mod(player_loc, 0, 3, 0);
- if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
- list.add(temp_list, temp_loc);
- counter++;
- }
- temp_loc = loc.mod(player_loc, 0, 4, 0);
- if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
- list.add(temp_list, temp_loc);
- counter++;
- }
- temp_loc = loc.mod(player_loc, 2, 0, 2);
- if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
- list.add(temp_list, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 2, 0, -2);
- if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
- list.add(temp_list, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 2, 1, -2);
- if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
- list.add(temp_list, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 2, 2, -2);
- if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
- list.add(temp_list, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 2, 3, -2);
- if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
- list.add(temp_list, temp_loc);
- }
- temp_loc = loc.mod(player_loc, -2, 0, -1);
- if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
- list.add(temp_list, temp_loc);
- }
- temp_loc = loc.mod(player_loc, -2, 1, -1);
- if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
- list.add(temp_list, temp_loc);
- }
- temp_loc = loc.mod(player_loc, -1, 0, 2);
- if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
- list.add(temp_list, temp_loc);
- }
- temp_loc = loc.mod(player_loc, -1, 1, 2);
- if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
- list.add(temp_list, temp_loc);
- }
- temp_loc = loc.mod(player_loc, -1, 2, 2);
- if(setBlockIfNotAir(temp_loc, $vine_type_all)) {
- list.add(temp_list, temp_loc);
- }
- map.add($vines_map, player.getId(player), temp_list);
- if(counter == 5) {
- entity.teleport(player, loc.mod(player_loc, 0, 3, 0));
- }
- return true;
-
- @Blätterkokon
- //Timer für Unverwundbarkeit und Blätterkokon-Entfernung
- status.addTimed(player, 36, 100, skillname);
- data.setTimer(player, label, 100);
- //Regeneration
- entity.addEffect(player, "regeneration", 100, 3);
- //Spieler mittig in den Blätterkokon teleportieren
- player_loc = entity.getLocation(player);
- bx = loc.getCoord(player_loc, "bx") + 0.5;
- by = loc.getCoord(player_loc, "by");
- bz = loc.getCoord(player_loc, "bz") + 0.5;
- middle_loc = loc.new($gpvpworld, bx, by, bz);
- entity.teleport(player, middle_loc);
- //Blätterkokon setzen
- temp_list = list.new();
- temp_loc = loc.mod(player_loc, 1, 0, 0);
- if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
- list.add(temp_list, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 1, 1, 0);
- if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
- list.add(temp_list, temp_loc);
- }
- temp_loc = loc.mod(player_loc, -1, 0, 0);
- if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
- list.add(temp_list, temp_loc);
- }
- temp_loc = loc.mod(player_loc, -1, 1, 0);
- if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
- list.add(temp_list, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 0, 0, 1);
- if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
- list.add(temp_list, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 0, 1, 1);
- if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
- list.add(temp_list, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 0, 0, -1);
- if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
- list.add(temp_list, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 0, 1, -1);
- if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
- list.add(temp_list, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 0, 2, 0);
- if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
- list.add(temp_list, temp_loc);
- }
- temp_loc = loc.mod(player_loc, 0, -1, 0);
- if(setBlockIfNotAir(temp_loc, $oak_leaves_type)) {
- list.add(temp_list, temp_loc);
- }
- map.add($concon_map, player.getId(player), temp_list);
- return true;
-
- @ExplosiverPfeil
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- //-------- Magier --------
-
- @Feuergeschoss
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Wiederherstellung
- status.addTimed(player, 22, 100, skillname);
- data.setTimer(player, label, 100);
- data.set(player, label, 1);
- new_hp = entity.getHealth(player) + 0.8;
- entity.setHealth(player, new_hp);
- displayHealth(player);
- list.add($wiederherstellung_list, player);
- sgoto(20, "Wiederherstellung_Teil2");
- return true;
-
- @Eisgeschoss
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Flammensäule
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Manabarriere
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Partikelimplosion
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Teleportation
- loc = player.getTarget(player, 9, true);
- entity.teleport(player, loc);
- return true;
-
- @korrosiveGiftwolke
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Eisstrahl
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Blitzschlag
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Tornado
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Eisgefängnis
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Hexenwerk
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Blizzard
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Gewittersturm
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Urzeitknall
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Phosphorbombe
- msg(player, "Skill noch ohne Wirkung");
- return true;
- //-------- Mönch --------
-
- @harmonischerHieb
- status.addTimed(player, 21, 200, skillname);
- data.setTimer(player, label, 200);
- return true;
-
- @Heilen
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Verbannung
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @KreisderHeilung
- list = player.near(player, 5);
- entity.setHealth(player, entity.getHealth(player) + 4);
- for(i = 0; i < list.getSize(list); i++) {
- p = list.getIndex(list, i);
- if(guild.isSame(player, p)) {
- entity.setHealth(p, entity.getHealth(p) + 4);
- }
- }
- return true;
-
- @Lichtschild
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @HeiligeEile
- list = player.near(player, 5);
- entity.addEffect(player, "speed", 100, 3);
- entity.addEffect(player, "haste", 100, 2);
- for(i = 0; i < list.getSize(list); i++) {
- p = list.getIndex(list, i);
- if(guild.isSame(player, p)) {
- entity.addEffect(p, "speed", 100, 3);
- entity.addEffect(p, "haste", 100, 2);
- }
- }
- return true;
-
- @Segensprechen
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Glaubensexplosion
- list = player.near(player, 5);
- entity.setHealth(player, entity.getHealth(player) + 4);
- for(i = 0; i < list.getSize(list); i++) {
- p = list.getIndex(list, i);
- if(guild.isSame(player, p)) {
- entity.setHealth(p, entity.getHealth(p) + 4);
- } else {
- entityDamage(p, player, 4, false);
- }
- }
- return true;
-
- @HimmlischeGabe
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @HelfendeHand
- p = getTarget(player, true, 4);
- if(isDouble(p)) {
- return p;
- }
- entity.teleport(player, entity.getLocation(p));
- entity.addEffect(player, "speed", 100, 4);
- entity.addEffect(p, "speed", 100, 4);
- return true;
-
- @unnachgiebigeAura
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Mondgewalt
- list = player.near(player, 5);
- entity.addEffect(player, "jump_boost", 100, 3);
- for(i = 0; i < list.getSize(list); i++) {
- p = list.getIndex(list, i);
- if(guild.isSame(player, p)) {
- entity.addEffect(p, "jump_boost", 100, 3);
- }
- }
- return true;
-
- @Trugschluss
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Engelsfeder
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Voodoo
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @HeiligerSchein
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- @Obsidianbrecher
- msg(player, "Skill noch ohne Wirkung");
- return true;
-
- }
- @Rammbock_Teil2
- doorloc = list.getIndex(rammbock_list, 0);
- list.removeIndex(rammbock_list, 0);
- if(block.isDoor(doorloc)) {
- if(block.getDoorStatus(doorloc)) {
- block.setDoorStatus(doorloc, false);
- }
- }
- goto("wait");
- @Schmerzertragen_Teil2
- try {
- player = list.getIndex(schmerzertragen_list, 0);
- list.remove(schmerzertragen_list, player);
- counter = data.get(player, "Schmerzertragen");
- if(counter < 5) {
- data.set(player, "Schmerzertragen", ++counter);
- new_hp = entity.getHealth(player) + 1.2;
- entity.setHealth(player, new_hp);
- displayHealth(player);
- list.add(schmerzertragen_list, player);
- sgoto(20, "Schmerzertragen_Teil2");
- }
- } catch {
- nothing();
- }
- goto("wait");
- @Belagerungsleiter_Up
- try {
- up_loc = list.getIndex($belagerungsleiter_up_loc_list, 0);
- facing = list.getIndex($belagerungsleiter_up_facing_list, 0);
- list.removeIndex($belagerungsleiter_up_loc_list, 0);
- list.removeIndex($belagerungsleiter_up_facing_list, 0);
- //Ist die Location frei?
- if(block.isAir(up_loc)) {
- //Ist der Grundblock solide?
- if(facing == "east") {
- ground_loc = loc.mod(up_loc, -1, 0, 0);
- } elseif(facing == "west") {
- ground_loc = loc.mod(up_loc, 1, 0, 0);
- } elseif(facing == "south") {
- ground_loc = loc.mod(up_loc, 0, 0, -1);
- } else {
- ground_loc = loc.mod(up_loc, 0, 0, 1);
- }
- //if(block.isSolid(ground_loc)) {
- block.set(up_loc, concat("minecraft:ladder[facing=", facing, "]"));
- list.add($belagerungsleiter_up_facing_list, facing);
- list.add($belagerungsleiter_up_loc_list, loc.mod(up_loc, 0, 1, 0));
- player_uuid = player.getUuid(player);
- remove_list = map.get($belagerungsleiter_remove_map, player_uuid);
- list.add(remove_list, up_loc);
- map.add($belagerungsleiter_remove_map, player_uuid, remove_list);
- //Counter
- counter = map.get($belagerungsleiter_counter_up_map, player_uuid) + 1;
- if(counter != 100) {
- sgoto(10, "Belagerungsleiter_Up");
- }
- map.add($belagerungsleiter_counter_up_map, player_uuid, counter);
- //}
- }
- } catch {
- nothing();
- }
- goto("wait");
- @Belagerungsleiter_Down
- try {
- down_loc = list.getIndex($belagerungsleiter_down_loc_list, 0);
- facing = list.getIndex($belagerungsleiter_down_facing_list, 0);
- list.removeIndex($belagerungsleiter_down_loc_list, 0);
- list.removeIndex($belagerungsleiter_down_facing_list, 0);
- //Ist die Location frei?
- if(block.isAir(down_loc)) {
- //Ist der Grundblock solide?
- if(facing == "east") {
- ground_loc = loc.mod(down_loc, -1, 0, 0);
- } elseif(facing == "west") {
- ground_loc = loc.mod(down_loc, 1, 0, 0);
- } elseif(facing == "south") {
- ground_loc = loc.mod(down_loc, 0, 0, -1);
- } else {
- ground_loc = loc.mod(down_loc, 0, 0, 1);
- }
- //if(block.isSolid(ground_loc)) {
- block.set(down_loc, concat("minecraft:ladder[facing=", facing, "]"));
- list.add($belagerungsleiter_down_facing_list, facing);
- list.add($belagerungsleiter_down_loc_list, loc.mod(down_loc, 0, -1, 0));
- player_uuid = player.getUuid(player);
- remove_list = map.get($belagerungsleiter_remove_map, player_uuid);
- list.add(remove_list, down_loc);
- map.add($belagerungsleiter_remove_map, player_uuid, remove_list);
- //Counter
- counter = map.get($belagerungsleiter_counter_down_map, player_uuid) + 1;
- if(counter != 100) {
- sgoto(10, "Belagerungsleiter_Down");
- }
- map.add($belagerungsleiter_counter_down_map, player_uuid, counter);
- //}
- }
- } catch {
- nothing();
- }
- goto("wait");
- @Belagerungsleiter_Remove
- player_uuid = list.getIndex($belagerungsleiter_remove_list, 0);
- list.remove($belagerungsleiter_remove_list, 0);
- remove_list = map.get($belagerungsleiter_remove_map, player_uuid);
- map.remove($belagerungsleiter_remove_map, player_uuid);
- for(i = 0; i < list.getSize(remove_list); i++) {
- loc = list.getIndex(remove_list, i);
- block.set(loc, "minecraft:air");
- }
- goto("wait");
- @Blutrausch_Teil2
- try {
- player = list.getIndex(blutrausch_list, 0);
- list.remove(blutrausch_list, player);
- counter = data.get(player, "Blutrausch");
- if(counter < 5) {
- data.set(player, "Blutrausch", ++counter);
- new_hp = entity.getHealth(player) + 1.2;
- entity.setHealth(player, new_hp);
- displayHealth(player);
- list.add(blutrausch_list, player);
- sgoto(20, "Blutrausch_Teil2");
- }
- } catch {
- nothing();
- }
- goto("wait");
- @Wiederherstellung_Teil2
- try {
- player = list.getIndex(wiederherstellung_list, 0);
- list.remove(wiederherstellung_list, player);
- counter = data.get(player, "Wiederherstellung");
- if(counter < 5) {
- data.set(player, "Wiederherstellung", ++counter);
- new_hp = entity.getHealth(player) + 1.2;
- entity.setHealth(player, new_hp);
- displayHealth(player);
- list.add(wiederherstellung_list, player);
- sgoto(20, "Wiederherstellung_Teil2");
- }
- } catch {
- nothing();
- }
- goto("wait");
- @Klingenwirbel_Teil2
- try {
- player = list.getIndex(klingenwirbel_list, 0);
- damager = map.get(klingenwirbel_map, player);
- list.remove(klingenwirbel_list, player);
- counter = data.get(player, "Klingenwirbel");
- if(counter < 5) {
- data.set(player, "Klingenwirbel", ++counter);
- entityDamage(player, damager, 0.4, false);
- list.add(klingenwirbel_list, player);
- sgoto(10, "Klingenwirbel_Teil2");
- } else {
- map.remove(klingenwirbel_map, player);
- }
- } catch {
- nothing();
- }
- goto("wait");
- @Stürmen_Teil2
- try {
- player = list.getIndex(stürmen_list, 0);
- list = player.near(player, 5);
- if(list.getSize(list) != 0) {
- p = list.getIndex(list, 0);
- entity.addEffect(p, "slowness", 30, 2);
- }
- } catch {
- nothing();
- }
- goto("wait");
- function entityDamage(entity, damager_entity, value, isMagic) {
- damageSource = damage.get(damager_entity, false, true, false, false, false, isMagic, false);
- entity.damage(entity, value, damageSource);
- return;
- }
- function hasSkillImmunity(player) {
- if(set.contains($skill_immunity, player.getUuid(player))) {
- return true;
- }
- return false;
- }
- function getTarget(player, onlyPlayers, radius) {
- ent = player.getTargetEntity(player, radius, "net.minecraft.entity.player.PlayerEntity");
- if(ent == null) {
- if(onlyPlayers) {
- return 4;
- } else {
- ent = player.getTargetEntity(player, radius, "net.minecraft.entity.LivingEntity");
- if(ent == null) {
- return 4;
- }
- }
- } else {
- if(guild.isSame(player, ent)) {
- player.action(player, "§rSpieler in derselben Gilde");
- return 6;
- }
- }
- return ent;
- }
|