mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
Added missing sound effects and animations for lunar spells
Stat restore spell now includes a wider range of potions
This commit is contained in:
parent
b3f17b249d
commit
0b0fc5271d
16 changed files with 66 additions and 12 deletions
|
|
@ -7,6 +7,7 @@ import core.game.node.Node;
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.combat.equipment.SpellType;
|
import core.game.node.entity.combat.equipment.SpellType;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
import core.game.node.entity.player.link.audio.Audio;
|
||||||
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
||||||
import core.game.node.entity.state.EntityState;
|
import core.game.node.entity.state.EntityState;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
|
|
@ -15,6 +16,7 @@ import core.game.world.update.flag.context.Animation;
|
||||||
import core.game.world.update.flag.context.Graphics;
|
import core.game.world.update.flag.context.Graphics;
|
||||||
import core.plugin.Plugin;
|
import core.plugin.Plugin;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The cure group spell.
|
* The cure group spell.
|
||||||
* @author 'Vexia
|
* @author 'Vexia
|
||||||
|
|
@ -54,6 +56,7 @@ public final class CureGroupSpell extends MagicSpell {
|
||||||
}
|
}
|
||||||
p.animate(ANIMATION);
|
p.animate(ANIMATION);
|
||||||
p.graphics(GRAPHIC);
|
p.graphics(GRAPHIC);
|
||||||
|
p.getAudioManager().send(new Audio (2882), true);
|
||||||
p.getStateManager().remove(EntityState.POISONED);
|
p.getStateManager().remove(EntityState.POISONED);
|
||||||
for (Player players : RegionManager.getLocalPlayers(p, 1)) {
|
for (Player players : RegionManager.getLocalPlayers(p, 1)) {
|
||||||
Player o = (Player) players;
|
Player o = (Player) players;
|
||||||
|
|
@ -64,6 +67,7 @@ public final class CureGroupSpell extends MagicSpell {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
o.getStateManager().remove(EntityState.POISONED);
|
o.getStateManager().remove(EntityState.POISONED);
|
||||||
|
o.getAudioManager().send(new Audio(2889), true);
|
||||||
o.graphics(GRAPHIC);
|
o.graphics(GRAPHIC);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import core.game.node.Node;
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.combat.equipment.SpellType;
|
import core.game.node.entity.combat.equipment.SpellType;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
import core.game.node.entity.player.link.audio.Audio;
|
||||||
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
||||||
import core.game.node.entity.state.EntityState;
|
import core.game.node.entity.state.EntityState;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
|
|
@ -55,9 +56,11 @@ public final class CureMeSpell extends MagicSpell {
|
||||||
if (!meetsRequirements(entity, true, true)) {
|
if (!meetsRequirements(entity, true, true)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
p.getAudioManager().send(2880);
|
||||||
p.animate(ANIMATION);
|
p.animate(ANIMATION);
|
||||||
p.graphics(GRAPHIC);
|
p.graphics(GRAPHIC);
|
||||||
p.getStateManager().remove(EntityState.POISONED);
|
p.getStateManager().remove(EntityState.POISONED);
|
||||||
|
p.getAudioManager().send(2900);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import core.game.node.Node;
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.combat.equipment.SpellType;
|
import core.game.node.entity.combat.equipment.SpellType;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
import core.game.node.entity.player.link.audio.Audio;
|
||||||
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
||||||
import core.game.node.entity.state.EntityState;
|
import core.game.node.entity.state.EntityState;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
|
|
@ -69,8 +70,10 @@ public final class CureOtherSpell extends MagicSpell {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
p.face(o);
|
p.face(o);
|
||||||
|
p.getAudioManager().send(new Audio (2886), true);
|
||||||
p.animate(ANIMATION);
|
p.animate(ANIMATION);
|
||||||
o.graphics(GRAPHIC);
|
o.graphics(GRAPHIC);
|
||||||
|
o.getAudioManager().send(new Audio(2889), true);
|
||||||
o.getStateManager().remove(EntityState.POISONED);
|
o.getStateManager().remove(EntityState.POISONED);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ public final class DreamSpell extends MagicSpell {
|
||||||
public boolean cast(Entity entity, Node target) {
|
public boolean cast(Entity entity, Node target) {
|
||||||
final Player p = (Player) entity;
|
final Player p = (Player) entity;
|
||||||
if (p.getSkills().getLifepoints() == p.getSkills().getStaticLevel(Skills.HITPOINTS)) {
|
if (p.getSkills().getLifepoints() == p.getSkills().getStaticLevel(Skills.HITPOINTS)) {
|
||||||
p.getPacketDispatch().sendMessage("You already have full hitpoints.");
|
p.getPacketDispatch().sendMessage("You have no need to cast this spell since your hitpoints are already full.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!meetsRequirements(entity, true, true)) {
|
if (!meetsRequirements(entity, true, true)) {
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.combat.ImpactHandler.HitsplatType;
|
import core.game.node.entity.combat.ImpactHandler.HitsplatType;
|
||||||
import core.game.node.entity.combat.equipment.SpellType;
|
import core.game.node.entity.combat.equipment.SpellType;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
import core.game.node.entity.player.link.audio.Audio;
|
||||||
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.game.world.update.flag.context.Animation;
|
import core.game.world.update.flag.context.Animation;
|
||||||
|
|
@ -76,6 +77,7 @@ public final class EnergyTransferSpell extends MagicSpell {
|
||||||
o.getSettings().setSpecialEnergy(o.getSettings().getSpecialEnergy() + energy);
|
o.getSettings().setSpecialEnergy(o.getSettings().getSpecialEnergy() + energy);
|
||||||
player.getSettings().setSpecialEnergy(player.getSettings().getSpecialEnergy() - energy);
|
player.getSettings().setSpecialEnergy(player.getSettings().getSpecialEnergy() - energy);
|
||||||
player.animate(ANIMATION);
|
player.animate(ANIMATION);
|
||||||
|
player.getAudioManager().send(new Audio (2885), true);
|
||||||
o.graphics(GRAPHICS);
|
o.graphics(GRAPHICS);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import core.game.node.Node;
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.combat.equipment.SpellType;
|
import core.game.node.entity.combat.equipment.SpellType;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
import core.game.node.entity.player.link.audio.Audio;
|
||||||
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
||||||
import core.game.node.entity.skill.magic.MagicSpell;
|
import core.game.node.entity.skill.magic.MagicSpell;
|
||||||
import core.game.node.entity.skill.magic.Runes;
|
import core.game.node.entity.skill.magic.Runes;
|
||||||
|
|
@ -33,7 +34,7 @@ public final class FertileSoilSpell extends MagicSpell {
|
||||||
/**
|
/**
|
||||||
* Represents the animaton to use.
|
* Represents the animaton to use.
|
||||||
*/
|
*/
|
||||||
private static final Animation ANIMATION = new Animation(722);
|
private static final Animation ANIMATION = new Animation(724);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a new {@code FertileSoilSpell} {@code Object}.
|
* Constructs a new {@code FertileSoilSpell} {@code Object}.
|
||||||
|
|
@ -69,6 +70,7 @@ public final class FertileSoilSpell extends MagicSpell {
|
||||||
player.sendMessage("You fertilize the soil.");
|
player.sendMessage("You fertilize the soil.");
|
||||||
player.graphics(GRAPHIC);
|
player.graphics(GRAPHIC);
|
||||||
player.animate(ANIMATION);
|
player.animate(ANIMATION);
|
||||||
|
player.getAudioManager().send(2891, 1, 1);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.combat.ImpactHandler.HitsplatType;
|
import core.game.node.entity.combat.ImpactHandler.HitsplatType;
|
||||||
import core.game.node.entity.combat.equipment.SpellType;
|
import core.game.node.entity.combat.equipment.SpellType;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
import core.game.node.entity.player.link.audio.Audio;
|
||||||
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.game.world.map.RegionManager;
|
import core.game.world.map.RegionManager;
|
||||||
|
|
@ -104,6 +105,8 @@ public final class HealSpell extends MagicSpell {
|
||||||
player.getImpactHandler().manualHit(player, transfer, null);
|
player.getImpactHandler().manualHit(player, transfer, null);
|
||||||
o.getSkills().heal(transfer);
|
o.getSkills().heal(transfer);
|
||||||
player.animate(ANIMATION);
|
player.animate(ANIMATION);
|
||||||
|
player.getAudioManager().send(new Audio(2895), true);
|
||||||
|
o.getAudioManager().send(new Audio(2892), true);
|
||||||
o.graphics(GRAPHICS);
|
o.graphics(GRAPHICS);
|
||||||
} else {
|
} else {
|
||||||
List<Player> players = RegionManager.getLocalPlayers(player, 1);
|
List<Player> players = RegionManager.getLocalPlayers(player, 1);
|
||||||
|
|
@ -127,7 +130,9 @@ public final class HealSpell extends MagicSpell {
|
||||||
}
|
}
|
||||||
player.getImpactHandler().manualHit(player, percentage, HitsplatType.NORMAL);
|
player.getImpactHandler().manualHit(player, percentage, HitsplatType.NORMAL);
|
||||||
player.animate(ANIMATION_G);
|
player.animate(ANIMATION_G);
|
||||||
|
player.getAudioManager().send(new Audio(2894), true);
|
||||||
for (Player p : players) {
|
for (Player p : players) {
|
||||||
|
p.getAudioManager().send(new Audio(2892), true);
|
||||||
p.graphics(GRAPHICS_G);
|
p.graphics(GRAPHICS_G);
|
||||||
p.getSkills().heal(percentage);
|
p.getSkills().heal(percentage);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import core.game.node.Node;
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.combat.equipment.SpellType;
|
import core.game.node.entity.combat.equipment.SpellType;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
import core.game.node.entity.player.link.audio.Audio;
|
||||||
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.game.world.update.flag.context.Animation;
|
import core.game.world.update.flag.context.Animation;
|
||||||
|
|
@ -89,6 +90,7 @@ public final class HunterKitSpell extends MagicSpell {
|
||||||
p.lock(5);
|
p.lock(5);
|
||||||
p.animate(ANIMATION);
|
p.animate(ANIMATION);
|
||||||
p.graphics(GRAPHIC);
|
p.graphics(GRAPHIC);
|
||||||
|
p.getAudioManager().send(3615, 1, 1);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import core.game.node.Node;
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.combat.equipment.SpellType;
|
import core.game.node.entity.combat.equipment.SpellType;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
import core.game.node.entity.player.link.audio.Audio;
|
||||||
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import rs09.game.world.GameWorld;
|
import rs09.game.world.GameWorld;
|
||||||
|
|
@ -61,6 +62,7 @@ public class MagicImbueSpell extends MagicSpell {
|
||||||
player.lock(ANIMATION.getDuration() + 1);
|
player.lock(ANIMATION.getDuration() + 1);
|
||||||
player.graphics(GRAPHIC);
|
player.graphics(GRAPHIC);
|
||||||
player.animate(ANIMATION);
|
player.animate(ANIMATION);
|
||||||
|
player.getAudioManager().send(2888, 1, 1);
|
||||||
player.getPacketDispatch().sendMessage("You are charged to combine runes!");
|
player.getPacketDispatch().sendMessage("You are charged to combine runes!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import core.game.node.Node;
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.combat.equipment.SpellType;
|
import core.game.node.entity.combat.equipment.SpellType;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
import core.game.node.entity.player.link.audio.Audio;
|
||||||
import rs09.game.ai.AIPlayer;
|
import rs09.game.ai.AIPlayer;
|
||||||
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
|
|
@ -42,7 +43,7 @@ public final class StatBoostSpell extends MagicSpell {
|
||||||
final Potion potion = (Potion) Consumables.getConsumableById(item.getId());
|
final Potion potion = (Potion) Consumables.getConsumableById(item.getId());
|
||||||
player.getInterfaceManager().setViewedTab(6);
|
player.getInterfaceManager().setViewedTab(6);
|
||||||
if (potion == null) {
|
if (potion == null) {
|
||||||
player.getPacketDispatch().sendMessage("For use of this spell use only one a potion.");
|
player.getPacketDispatch().sendMessage("You can only cast this spell on a potion.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!item.getDefinition().isTradeable() || item.getName().toLowerCase().contains("restore") || item.getName().toLowerCase().contains("zamorak") || item.getName().toLowerCase().contains("saradomin") || item.getName().toLowerCase().contains("combat")) {
|
if (!item.getDefinition().isTradeable() || item.getName().toLowerCase().contains("restore") || item.getName().toLowerCase().contains("zamorak") || item.getName().toLowerCase().contains("saradomin") || item.getName().toLowerCase().contains("combat")) {
|
||||||
|
|
@ -75,6 +76,7 @@ public final class StatBoostSpell extends MagicSpell {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
o.graphics(GRAPHICS);
|
o.graphics(GRAPHICS);
|
||||||
|
o.getAudioManager().send(new Audio (2902), true);
|
||||||
potion.getEffect().activate(o);
|
potion.getEffect().activate(o);
|
||||||
size++;
|
size++;
|
||||||
}
|
}
|
||||||
|
|
@ -84,6 +86,7 @@ public final class StatBoostSpell extends MagicSpell {
|
||||||
}
|
}
|
||||||
super.meetsRequirements(player, true, true);
|
super.meetsRequirements(player, true, true);
|
||||||
potion.getEffect().activate(player);
|
potion.getEffect().activate(player);
|
||||||
|
player.getAudioManager().send(new Audio (2901), true);
|
||||||
player.animate(ANIMATION);
|
player.animate(ANIMATION);
|
||||||
player.graphics(GRAPHICS);
|
player.graphics(GRAPHICS);
|
||||||
player.getInventory().remove(item);
|
player.getInventory().remove(item);
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import core.game.node.Node;
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.combat.equipment.SpellType;
|
import core.game.node.entity.combat.equipment.SpellType;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
import core.game.node.entity.player.link.audio.Audio;
|
||||||
import rs09.game.ai.AIPlayer;
|
import rs09.game.ai.AIPlayer;
|
||||||
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
|
|
@ -25,7 +26,7 @@ public class StatRestoreSpell extends MagicSpell {
|
||||||
private static final Animation ANIMATION = new Animation(4413);
|
private static final Animation ANIMATION = new Animation(4413);
|
||||||
private static final Graphics GRAPHICS = new Graphics(733, 130);
|
private static final Graphics GRAPHICS = new Graphics(733, 130);
|
||||||
|
|
||||||
private static final int[] IDS = new int[] { 2430, 127, 129, 131, 3024, 3026, 3028, 3030 };
|
private static final int[] IDS = new int[] { 2434, 139, 141, 143, 2430, 127, 129, 131, 3024, 3026, 3028, 3030 };
|
||||||
|
|
||||||
public StatRestoreSpell() {
|
public StatRestoreSpell() {
|
||||||
super(SpellBook.LUNAR, 81, 84, null, null, null, new Item[] { new Item(Runes.ASTRAL_RUNE.getId(), 2), new Item(Runes.EARTH_RUNE.getId(), 10), new Item(Runes.WATER_RUNE.getId(), 10) });
|
super(SpellBook.LUNAR, 81, 84, null, null, null, new Item[] { new Item(Runes.ASTRAL_RUNE.getId(), 2), new Item(Runes.EARTH_RUNE.getId(), 10), new Item(Runes.WATER_RUNE.getId(), 10) });
|
||||||
|
|
@ -44,7 +45,7 @@ public class StatRestoreSpell extends MagicSpell {
|
||||||
final Potion potion = (Potion) Consumables.getConsumableById(item.getId());
|
final Potion potion = (Potion) Consumables.getConsumableById(item.getId());
|
||||||
player.getInterfaceManager().setViewedTab(6);
|
player.getInterfaceManager().setViewedTab(6);
|
||||||
if (potion == null) {
|
if (potion == null) {
|
||||||
player.getPacketDispatch().sendMessage("For use of this spell use only one a potion.");
|
player.getPacketDispatch().sendMessage("You can only cast this spell on a potion.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!item.getDefinition().isTradeable() || !isRestore(item.getId())) {
|
if (!item.getDefinition().isTradeable() || !isRestore(item.getId())) {
|
||||||
|
|
@ -77,6 +78,7 @@ public class StatRestoreSpell extends MagicSpell {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
o.graphics(GRAPHICS);
|
o.graphics(GRAPHICS);
|
||||||
|
player.getPacketDispatch().sendMessage("You can only cast this spell on a potion.");
|
||||||
potion.getEffect().activate(o);
|
potion.getEffect().activate(o);
|
||||||
size++;
|
size++;
|
||||||
}
|
}
|
||||||
|
|
@ -86,6 +88,7 @@ public class StatRestoreSpell extends MagicSpell {
|
||||||
}
|
}
|
||||||
super.meetsRequirements(player, true, true);
|
super.meetsRequirements(player, true, true);
|
||||||
potion.getEffect().activate(player);
|
potion.getEffect().activate(player);
|
||||||
|
player.getAudioManager().send(new Audio (2899), true);
|
||||||
player.animate(ANIMATION);
|
player.animate(ANIMATION);
|
||||||
player.graphics(GRAPHICS);
|
player.graphics(GRAPHICS);
|
||||||
player.getInventory().remove(item);
|
player.getInventory().remove(item);
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,7 @@ public final class StatSpySpell extends MagicSpell {
|
||||||
});
|
});
|
||||||
player.graphics(EYE);
|
player.graphics(EYE);
|
||||||
o.graphics(GRAPHIC);
|
o.graphics(GRAPHIC);
|
||||||
|
player.getAudioManager().send(3621);
|
||||||
for (int[] element : SKILLS) {
|
for (int[] element : SKILLS) {
|
||||||
player.getPacketDispatch().sendString("" + o.getSkills().getLevel(element[0]) + "", 523, element[1]);
|
player.getPacketDispatch().sendString("" + o.getSkills().getLevel(element[0]) + "", 523, element[1]);
|
||||||
player.getPacketDispatch().sendString("" + o.getSkills().getStaticLevel(element[0]) + "", 523, element[2]);
|
player.getPacketDispatch().sendString("" + o.getSkills().getStaticLevel(element[0]) + "", 523, element[2]);
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import core.game.node.Node;
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.combat.equipment.SpellType;
|
import core.game.node.entity.combat.equipment.SpellType;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
import core.game.node.entity.player.link.audio.Audio;
|
||||||
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.game.world.update.flag.context.Animation;
|
import core.game.world.update.flag.context.Animation;
|
||||||
|
|
@ -116,6 +117,7 @@ public final class StringJewellerySpell extends MagicSpell {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (meetsRequirements(player, true, true) && player.getInventory().remove(node)) {
|
if (meetsRequirements(player, true, true) && player.getInventory().remove(node)) {
|
||||||
|
player.getAudioManager().send(2903, 1, 1);
|
||||||
player.getInventory().add(new Item(STRUNG[getIndex()]));
|
player.getInventory().add(new Item(STRUNG[getIndex()]));
|
||||||
player.getSkills().addExperience(Skills.CRAFTING, 4, true);
|
player.getSkills().addExperience(Skills.CRAFTING, 4, true);
|
||||||
player.getSkills().addExperience(Skills.MAGIC, 83, true);
|
player.getSkills().addExperience(Skills.MAGIC, 83, true);
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import core.game.node.Node;
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.combat.equipment.SpellType;
|
import core.game.node.entity.combat.equipment.SpellType;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
import core.game.node.entity.player.link.audio.Audio;
|
||||||
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.game.world.update.flag.context.Animation;
|
import core.game.world.update.flag.context.Animation;
|
||||||
|
|
@ -76,6 +77,7 @@ public class SuperglassMakeSpell extends MagicSpell {
|
||||||
player.lock(4);
|
player.lock(4);
|
||||||
player.graphics(GRAPHIC);
|
player.graphics(GRAPHIC);
|
||||||
player.animate(ANIMATION);
|
player.animate(ANIMATION);
|
||||||
|
player.getAudioManager().send(2896, 1, 1);
|
||||||
for (int i = 0; i < sand; i++) {
|
for (int i = 0; i < sand; i++) {
|
||||||
if (hasSet(player, setIndex)) {
|
if (hasSet(player, setIndex)) {
|
||||||
if (player.getInventory().remove(BUCKET_OF_SAND, SETS[setIndex])) {
|
if (player.getInventory().remove(BUCKET_OF_SAND, SETS[setIndex])) {
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ public final class VengeanceSpell extends MagicSpell {
|
||||||
visualize(entity, p);
|
visualize(entity, p);
|
||||||
entity.setAttribute("vengeance_delay", ticks + 50);
|
entity.setAttribute("vengeance_delay", ticks + 50);
|
||||||
p.setAttribute("vengeance", true);
|
p.setAttribute("vengeance", true);
|
||||||
p.getAudioManager().send(vengOther ? 2907 : 2908);
|
p.getAudioManager().send(vengOther ? 2908 : 2907);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import core.game.node.Node
|
||||||
import core.game.node.scenery.Scenery
|
import core.game.node.scenery.Scenery
|
||||||
import core.game.node.entity.npc.NPC
|
import core.game.node.entity.npc.NPC
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
|
import core.game.node.entity.player.link.audio.Audio
|
||||||
import core.game.node.entity.player.link.TeleportManager
|
import core.game.node.entity.player.link.TeleportManager
|
||||||
import core.game.node.entity.skill.Skills
|
import core.game.node.entity.skill.Skills
|
||||||
import core.game.node.entity.skill.cooking.CookableItems
|
import core.game.node.entity.skill.cooking.CookableItems
|
||||||
|
|
@ -42,76 +43,91 @@ class LunarListeners : SpellListener("lunar") {
|
||||||
|
|
||||||
onCast(Lunar.MOONCLAN_TELEPORT, NONE){player, _ ->
|
onCast(Lunar.MOONCLAN_TELEPORT, NONE){player, _ ->
|
||||||
requires(player,69, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,1), Item(Items.EARTH_RUNE_557,2)))
|
requires(player,69, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,1), Item(Items.EARTH_RUNE_557,2)))
|
||||||
|
player.getAudioManager().send(Audio(200), true)
|
||||||
sendTeleport(player,66.0, Location.create(2111, 3916, 0))
|
sendTeleport(player,66.0, Location.create(2111, 3916, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
onCast(Lunar.MOONCLAN_GR_TELEPORT, NONE){player, _ ->
|
onCast(Lunar.MOONCLAN_GR_TELEPORT, NONE){player, _ ->
|
||||||
requires(player,70, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,1), Item(Items.EARTH_RUNE_557,4)))
|
requires(player,70, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,1), Item(Items.EARTH_RUNE_557,4)))
|
||||||
|
player.getAudioManager().send(Audio(200), true)
|
||||||
sendGroupTeleport(player,67.0,"Moonclan Island",Location.create(2111, 3916, 0))
|
sendGroupTeleport(player,67.0,"Moonclan Island",Location.create(2111, 3916, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
onCast(Lunar.OURANIA_TELEPORT, NONE){player,_ ->
|
onCast(Lunar.OURANIA_TELEPORT, NONE){player,_ ->
|
||||||
requires(player,71, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,1), Item(Items.EARTH_RUNE_557,6)))
|
requires(player,71, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,1), Item(Items.EARTH_RUNE_557,6)))
|
||||||
|
player.getAudioManager().send(Audio(200), true)
|
||||||
sendTeleport(player,69.0, Location.create(2469, 3247, 0))
|
sendTeleport(player,69.0, Location.create(2469, 3247, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
onCast(Lunar.WATERBIRTH_TELEPORT, NONE){player, _ ->
|
onCast(Lunar.WATERBIRTH_TELEPORT, NONE){player, _ ->
|
||||||
requires(player,72, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563), Item(Items.WATER_RUNE_555)))
|
requires(player,72, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563), Item(Items.WATER_RUNE_555)))
|
||||||
|
player.getAudioManager().send(Audio(200), true)
|
||||||
sendTeleport(player,71.0, Location.create(2527, 3739, 0))
|
sendTeleport(player,71.0, Location.create(2527, 3739, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
onCast(Lunar.WATERBIRTH_GR_TELEPORT, NONE){player,_ ->
|
onCast(Lunar.WATERBIRTH_GR_TELEPORT, NONE){player,_ ->
|
||||||
requires(player,73, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563), Item(Items.WATER_RUNE_555,5)))
|
requires(player,73, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563), Item(Items.WATER_RUNE_555,5)))
|
||||||
|
player.getAudioManager().send(Audio(200), true)
|
||||||
sendGroupTeleport(player,72.0,"Waterbirth Island", Location.create(2527, 3739, 0))
|
sendGroupTeleport(player,72.0,"Waterbirth Island", Location.create(2527, 3739, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
onCast(Lunar.BARBARIAN_TELEPORT, NONE){player,_ ->
|
onCast(Lunar.BARBARIAN_TELEPORT, NONE){player,_ ->
|
||||||
requires(player,75, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,2), Item(Items.FIRE_RUNE_554,3)))
|
requires(player,75, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,2), Item(Items.FIRE_RUNE_554,3)))
|
||||||
|
player.getAudioManager().send(Audio(200), true)
|
||||||
sendTeleport(player,76.0, Location.create(2544, 3572, 0))
|
sendTeleport(player,76.0, Location.create(2544, 3572, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
onCast(Lunar.BARBARIAN_GR_TELEPORT, NONE){player,_ ->
|
onCast(Lunar.BARBARIAN_GR_TELEPORT, NONE){player,_ ->
|
||||||
requires(player,77, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,2), Item(Items.FIRE_RUNE_554,6)))
|
requires(player,77, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,2), Item(Items.FIRE_RUNE_554,6)))
|
||||||
|
player.getAudioManager().send(Audio(200), true)
|
||||||
sendGroupTeleport(player,77.0,"Barbarian Outpost", Location.create(2544, 3572, 0))
|
sendGroupTeleport(player,77.0,"Barbarian Outpost", Location.create(2544, 3572, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
onCast(Lunar.KHAZARD_TELEPORT, NONE){player,_ ->
|
onCast(Lunar.KHAZARD_TELEPORT, NONE){player,_ ->
|
||||||
requires(player,78, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,2), Item(Items.WATER_RUNE_555,4)))
|
requires(player,78, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,2), Item(Items.WATER_RUNE_555,4)))
|
||||||
|
player.getAudioManager().send(Audio(200), true)
|
||||||
sendTeleport(player,80.0, Location.create(2656, 3157, 0))
|
sendTeleport(player,80.0, Location.create(2656, 3157, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
onCast(Lunar.KHAZARD_GR_TELEPORT, NONE){player,_ ->
|
onCast(Lunar.KHAZARD_GR_TELEPORT, NONE){player,_ ->
|
||||||
requires(player,79, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,2), Item(Items.WATER_RUNE_555,8)))
|
requires(player,79, arrayOf(Item(Items.ASTRAL_RUNE_9075,2), Item(Items.LAW_RUNE_563,2), Item(Items.WATER_RUNE_555,8)))
|
||||||
|
player.getAudioManager().send(Audio(200), true)
|
||||||
sendGroupTeleport(player,81.0, "Port Khazard", Location.create(2656, 3157, 0))
|
sendGroupTeleport(player,81.0, "Port Khazard", Location.create(2656, 3157, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
onCast(Lunar.FISHING_GUILD_TELEPORT, NONE){player,_ ->
|
onCast(Lunar.FISHING_GUILD_TELEPORT, NONE){player,_ ->
|
||||||
requires(player,85, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,10)))
|
requires(player,85, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,10)))
|
||||||
|
player.getAudioManager().send(Audio(200), true)
|
||||||
sendTeleport(player,89.0, Location.create(2611, 3393, 0))
|
sendTeleport(player,89.0, Location.create(2611, 3393, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
onCast(Lunar.FISHING_GUILD_GR_TELEPORT, NONE){player,_ ->
|
onCast(Lunar.FISHING_GUILD_GR_TELEPORT, NONE){player,_ ->
|
||||||
requires(player,86, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,14)))
|
requires(player,86, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,14)))
|
||||||
|
player.getAudioManager().send(Audio(200), true)
|
||||||
sendGroupTeleport(player,90.0,"Fishing Guild", Location.create(2611, 3393, 0))
|
sendGroupTeleport(player,90.0,"Fishing Guild", Location.create(2611, 3393, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
onCast(Lunar.CATHERBY_TELEPORT, NONE){player,_ ->
|
onCast(Lunar.CATHERBY_TELEPORT, NONE){player,_ ->
|
||||||
requires(player,87, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,10)))
|
requires(player,87, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,10)))
|
||||||
|
player.getAudioManager().send(Audio(200), true)
|
||||||
sendTeleport(player,92.0, Location.create(2804, 3433, 0))
|
sendTeleport(player,92.0, Location.create(2804, 3433, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
onCast(Lunar.CATHERBY_GR_TELEPORT, NONE){player,_ ->
|
onCast(Lunar.CATHERBY_GR_TELEPORT, NONE){player,_ ->
|
||||||
requires(player,88, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,15)))
|
requires(player,88, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,15)))
|
||||||
|
player.getAudioManager().send(Audio(200), true)
|
||||||
sendGroupTeleport(player,93.0,"Catherby", Location.create(2804, 3433, 0))
|
sendGroupTeleport(player,93.0,"Catherby", Location.create(2804, 3433, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
onCast(Lunar.ICE_PLATEAU_TELEPORT, NONE){player,_ ->
|
onCast(Lunar.ICE_PLATEAU_TELEPORT, NONE){player,_ ->
|
||||||
requires(player,89, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,8)))
|
requires(player,89, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,8)))
|
||||||
|
player.getAudioManager().send(Audio(200), true)
|
||||||
sendTeleport(player,96.0, Location.create(2972, 3873, 0))
|
sendTeleport(player,96.0, Location.create(2972, 3873, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
onCast(Lunar.ICE_PLATEAU_GR_TELEPORT, NONE){player,_ ->
|
onCast(Lunar.ICE_PLATEAU_GR_TELEPORT, NONE){player,_ ->
|
||||||
requires(player,90, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,16)))
|
requires(player,90, arrayOf(Item(Items.ASTRAL_RUNE_9075,3), Item(Items.LAW_RUNE_563,3), Item(Items.WATER_RUNE_555,16)))
|
||||||
|
player.getAudioManager().send(Audio(200), true)
|
||||||
sendGroupTeleport(player,99.0, "Ice Plateau", Location.create(2972, 3873, 0))
|
sendGroupTeleport(player,99.0, "Ice Plateau", Location.create(2972, 3873, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -137,7 +153,7 @@ class LunarListeners : SpellListener("lunar") {
|
||||||
removeRunes(player)
|
removeRunes(player)
|
||||||
addXP(player,63.0)
|
addXP(player,63.0)
|
||||||
setDelay(player,false)
|
setDelay(player,false)
|
||||||
visualizeSpell(player,NPC_CONTACT_ANIM,NPC_CONTACT_GFX)
|
visualizeSpell(player,NPC_CONTACT_ANIM,NPC_CONTACT_GFX,3618)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -188,22 +204,26 @@ class LunarListeners : SpellListener("lunar") {
|
||||||
val fPatch = FarmingPatch.forObject(obj)
|
val fPatch = FarmingPatch.forObject(obj)
|
||||||
if(fPatch == null){
|
if(fPatch == null){
|
||||||
player.sendMessage("You attempt to cast Cure Plant on ${obj.definition.name}!")
|
player.sendMessage("You attempt to cast Cure Plant on ${obj.definition.name}!")
|
||||||
player.sendMessage("It's not very effective....")
|
player.sendMessage("Nothing interesting happens.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
val patch = fPatch.getPatchFor(player)
|
val patch = fPatch.getPatchFor(player)
|
||||||
if(!patch.isDiseased && !patch.isWeedy()){
|
if(!patch.isDiseased && !patch.isWeedy()){
|
||||||
player.sendMessage("This patch is already growing fine.")
|
player.sendMessage("It is growing just fine.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(patch.isWeedy()){
|
if(patch.isWeedy()){
|
||||||
player.sendMessage("Trust me lad, the weeds are healthy enough as is.")
|
player.sendMessage("The weeds are healthy enough already.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(patch.isDead){
|
if(patch.isDead){
|
||||||
player.sendMessage("It says 'Cure' not 'Resurrect'. Although death may arise from disease, it is not in itself a disease and hence cannot be cured. So there.")
|
player.sendMessage("It says 'Cure' not 'Resurrect'. Although death may arise from disease, it is not in itself a disease and hence cannot be cured. So there.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if(patch.isGrown()){
|
||||||
|
player.sendMessage("That's not diseased.")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
patch.cureDisease()
|
patch.cureDisease()
|
||||||
removeRunes(player)
|
removeRunes(player)
|
||||||
|
|
@ -219,7 +239,7 @@ class LunarListeners : SpellListener("lunar") {
|
||||||
}
|
}
|
||||||
|
|
||||||
player.faceLocation(npc.location)
|
player.faceLocation(npc.location)
|
||||||
visualizeSpell(player,STATSPY_ANIM,STATSPY_GFX)
|
visualizeSpell(player,STATSPY_ANIM,STATSPY_GFX,3620)
|
||||||
removeRunes(player)
|
removeRunes(player)
|
||||||
addXP(player,66.0)
|
addXP(player,66.0)
|
||||||
setDelay(player,false)
|
setDelay(player,false)
|
||||||
|
|
@ -260,7 +280,7 @@ class LunarListeners : SpellListener("lunar") {
|
||||||
if(counter == 0) delay = BAKE_PIE_ANIM.definition.durationTicks + 1
|
if(counter == 0) delay = BAKE_PIE_ANIM.definition.durationTicks + 1
|
||||||
val item = playerPies.get(0)
|
val item = playerPies.get(0)
|
||||||
val pie = CookableItems.forId(item.id)
|
val pie = CookableItems.forId(item.id)
|
||||||
player.visualize(BAKE_PIE_ANIM,BAKE_PIE_GFX)
|
visualizeSpell(player, BAKE_PIE_ANIM, BAKE_PIE_GFX, 2879)
|
||||||
addXP(player,60.0)
|
addXP(player,60.0)
|
||||||
player.skills.addExperience(Skills.COOKING,pie.experience)
|
player.skills.addExperience(Skills.COOKING,pie.experience)
|
||||||
setDelay(player,false)
|
setDelay(player,false)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue