123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- event.load("item_air_click");
- Explosion_Power = 0;
- blaze_shoot_sound = sound.get("entity.blaze.shoot");
- sound_category_master = sound.getCategory("master");
- Scepter_map = map.new();
- map.add(Scepter_map, "km:wooden_scepter", 0.1);
- map.add(Scepter_map, "km:stone_scepter", 0.2);
- map.add(Scepter_map, "km:copper_scepter", 0.3);
- map.add(Scepter_map, "km:bronze_scepter", 0.4);
- map.add(Scepter_map, "km:iron_scepter", 0.5);
- map.add(Scepter_map, "km:golden_scepter", 0.75);
- map.add(Scepter_map, "km:diamond_scepter", 1);
- @wait
- wait();
- if(player.getName(player) == "SirTerence7" || player.getName(player) == "Mareeeen" || player.getName(player) == "marvinius"){
- if(event == "item_air_click"){
- player_hand = living.getEquip(player, "hand");
- player_hand_item_type = item.getType(player_hand);
- if(map.contains(Scepter_map, player_hand_item_type)){
- Lore_List = item.getLore(player_hand);
- //if(list.getSize(Lore_List) > 0){
- //Lore_List_1 = list.getIndex(Lore_List, 0);
- //if(Lore_List_1 == "Magic Item"){
- Shooting_Power = map.get(Scepter_map, player_hand_item_type);
- Look_array = entity.getLook(player);
- Motion_array = entity.getMotion(player);
- new_health = living.getHealth(player)-math.round(Shooting_Power*5);
- if(new_health > 0.5){
- living.setHealth(player, new_health);
- x = Look_array[0] * Shooting_Power + Motion_array[0] * 0.75;
- y = Look_array[1] * Shooting_Power + Motion_array[1] * 0.75 + 0.05;
- z = Look_array[2] * Shooting_Power + Motion_array[2] * 0.75;
- tag = text.concat("{ExplosionPower:", Explosion_Power, ",Motion:[",x,",",y,",",z,"],power:[",x/10,",",y/10,",",z/10,"]"/*,Invulnerable:1*/,",Owner:",player.getUuid(player),"}");
- entity.spawn("fireball", loc.mod(entity.getLocation(player),x,y+0.5,z), tag);
- sound.spawnForPlayer(player, blaze_shoot_sound, sound_category_master, 1, 1);
- entity.throw(player, Motion_array[0] - Look_array[0] * Shooting_Power * 0.5, Motion_array[1] - Look_array[1] * Shooting_Power * 0.125 ,Motion_array[2] - Look_array[2] * Shooting_Power * 0.5);
- //fireball = entity.spawn("fireball", entity.getLocation(player));
- //living.damage(player, math.round(Shooting_Power*5), damage.get(false,true,true,true,true,true,true,false));
- //entity.throw(fireball, x, y ,z);
- }
- //}
- //}
- }
- }
- }
- goto("wait");
|