Make sure you aren't on a dev/owner account.
|
anyone know the fix to the spec bar on vencillio its not draining
Make sure you aren't on a dev/owner account.
its dark-aslyum source bruh and ill give u the spec file now
special attack handler
i
public class SpecialAttackHandler {
private static Map<Integer, Special> specials = new HashMap<Integer, Special>();
private static Map<Integer, CombatEffect> effects = new HashMap<Integer, CombatEffect>();
private static void add(int weaponId, CombatEffect effect) {
effects.put(Integer.valueOf(weaponId), effect);
}
private static void add(int weaponId, Special special) {
specials.put(Integer.valueOf(weaponId), special);
}
public static void declare() {
//add(20074, new StaffOfDeadSpecialAttack());
//add(20076, new StaffOfDeadSpecialAttack());
/* Magic Shortbow */
add(12788, new MagicShortbowInfusedSpecialAttack());
/* Zamorakian Hasta */
add(11889, new ZamorakianHastaSpecialAttack());
add(11889, new ZamorakianHastaEffect());
/* Zamorakian Spear */
add(11824, new ZamorakianSpearSpecialAttack());
add(11824, new ZamorakianSpearEffect());
/* Armadyl Crossbow */
add(11785, new ArmadylCrossbowSpecialAttack());
/* Blowpipe */
add(12926, new ToxicBlowpipeSpecialAttack());
add(12926, new ToxicBlowpipeEffect());
add(19675, new ToxicBlowpipeEffect());
/* Saradomin Sword */
add(11838, new SaradominSwordSpecialAttack());
add(12809, new SaradominSwordSpecialAttack());
/* Arclight */
//add(19675, new ArclightSpecial());
/* Armadyl Godsword */
add(11802, new ArmadylGodswordSpecialAttack());
/* Bandos Godsword */
add(11804, new BandosGodswordSpecialAttack());
add(11804, new BandosGodswordEffect());
/* Saradomin Godsword */
add(11806, new SaradominGodswordSpecialAttack());
add(11806, new SaradominGodswordEffect());
/* Zamorak Godsword */
add(11808, new ZamorakGodswordSpecialAttack());
/* VykorOS Bow */
add(11235, new DarkBowSpecialAttack());
add(12765, new DarkBowSpecialAttack());
add(12766, new DarkBowSpecialAttack());
add(12767, new DarkBowSpecialAttack());
add(12768, new DarkBowSpecialAttack());
add(19481, new DarkBowSpecialAttack());
/* Barrelchest Anchor */
add(10887, new BarrelchestAnchorEffect());
add(10887, new AnchorSpecialAttack());
/* Dragon Claws */
add(13188, new DragonClawsSpecialAttack());
/* Dragon Spear */
add(1249, new DragonSpearSpecialAttack());
add(1249, new DragonSpearEffect());
/* Dragon Dagger */
add(13265, new AbyssalDaggerSpecialAttack());
add(13271, new AbyssalDaggerSpecialAttack());
add(1215, new DragonDaggerSpecialAttack());
add(1231, new DragonDaggerSpecialAttack());
add(5680, new DragonDaggerSpecialAttack());
add(5698, new DragonDaggerSpecialAttack());
/* Dragon Scimitar */
add(4587, new DragonScimitarSpecialAttack());
//add(4587, new DragonScimitarEffect());
/* Dragon Longsword */
add(1305, new DragonLongswordSpecialAttack());
/* Dragon Mace */
add(1434, new DragonMaceSpecialAttack());
/* Dragon Warhammer */
add(13576, new DragonWarhammerSpecialAttack());
/* Dragon Halbard */
add(3204, new DragonHalberdSpecialAttack());
add(13092, new DragonHalberdSpecialAttack());
/* Magic Shortbow */
add(861, new MagicShortbowSpecialAttack());
add(859, new MagicShortbowSpecialAttack());
/* Granite Maul */
add(4153, new GraniteMaulSpecialAttack());
add(13263, new AbyssalBludgeonSpecialAttack());
/* Abyssal Whip */
add(4151, new AbyssalWhipSpecialAttack());
add(4151, new AbyssalWhipEffect());
add(4178, new AbyssalWhipSpecialAttack());
add(4178, new AbyssalWhipEffect());
add(12773, new AbyssalWhipSpecialAttack());
add(12773, new AbyssalWhipEffect());
add(12774, new AbyssalWhipSpecialAttack());
add(12774, new AbyssalWhipEffect());
/* Tentacle Whip */
add(12006, new AbyssalTentacleSpecialAttack());
//add(12006, new AbyssalTentacleEffect());
}
public static void executeSpecialEffect(Player player, Entity attacked) {
Item weapon = player.getEquipment().getItems()[3];
if (weapon == null) {
return;
}
CombatEffect effect = effects.get(Integer.valueOf(weapon.getId()));
if (effect == null) {
return;
}
effect.execute(player, attacked);
}
public static void handleSpecialAttack(Player player) {
Item weapon = player.getEquipment().getItems()[3];
if (weapon == null) {
return;
}
Special special = specials.get(Integer.valueOf(weapon.getId()));
if (special == null) {
return;
}
if (special.checkRequirements(player)) {
special.handleAttack(player);
if (!PlayerConstants.isOwner(player))
player.getSpecialAttack().deduct(special.getSpecia lAmountRequired());
}
}
public static boolean hasSpecialAmount(Player player) {
Item weapon = player.getEquipment().getItems()[3];
if (weapon == null) {
return true;
}
Special special = specials.get(Integer.valueOf(weapon.getId()));
if (special == null) {
return true;
}
if (player.getSpecialAttack().getAmount() < special.getSpecialAmountRequired()) {
player.getClient().queueOutgoingPacket(new SendMessage("You do not have enough special attack to do that."));
return false;
}
return true;
}
public static void updateSpecialAmount(Player p, int id, int amount) {
int specialCheck = 100;
for (int i = 0; i < 10; i++) {
id--;
p.getClient().queueOutgoingPacket(new SendUpdateSpecialBar(amount >= specialCheck ? 500 : 0, id));
specialCheck -= 10;
}
}
public static void updateSpecialBarText(Player p, int id, int amount, boolean init) {
if (init)
p.getClient().queueOutgoingPacket(new SendString("@yel@Special Attack - "+p.getSpecialAttack().getAmount()+"%", id));
else
p.getClient().queueOutgoingPacket(new SendString("@bla@Special Attack - "+p.getSpecialAttack().getAmount()+"%", id));
}
}
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |