Jump to content
  • 0
scorpion832

Need help finding a file on 637 thats on 317

Question

Hi, I need help finding a file on 637 thats on 317
The file on 317 is called wearitem.java
and I cant find the file on 637,
heres the code I need to specifically find :[B] if (c.playerIndex > 0 || c.npcIndex > 0) {[/B] 《--( Need to find that on 637 )

Share this post


Link to post
Share on other sites

50 answers to this question

Recommended Posts

  • 0
combatDefinitions.setInstantAttack(true); - basically means you will immediately attack, so find that method in your 639
combatDefinitions.switchUsingSpecialAttack(); - highlights your special attack bar and and basically does the special attack
Entity target = (Entity) getAttributes().get("last_target"); - finds the target you were last fighting
if (target != null && target.getAttributes().get("last_attacker") == this) { - makes sure you have a target and your target isn't invalid (safezone, logged out etc.)
if (!(getActionManager().getAction() instanceof PlayerCombat) || ((PlayerCombat) getActionManager().getAction()).getTarget() != target) { - if you're not in combat
getActionManager().setAction(new PlayerCombat(target)); - do the instant attack

You just need to find these methods and do it yourself. No one is spoonfeeding your godsend crap.

Share this post


Link to post
Share on other sites
  • 0
player.reverseSpecialActive();
SpecialAttack spec = SpecialAttackContainer.get(player
.getEquipment().getSlot(3));
if (spec instanceof QuickSmash) {
if (player.getCombatExecutor().getVictim() == null
|| Math.floor(player.getLocation().distance(
player.getCombatExecutor().getVictim()
.getLocation())) > 1) {

player.reverseSpecialActive();
return;
}



Got this, is it good enough? I might modify it a little.

Share this post


Link to post
Share on other sites
  • 0
if (spec instanceof QuickSmash) {
if (player.getCombatExecutor().getVictim() == null
|| Math.floor(player.getLocation().distance(
player.getCombatExecutor().getVictim()
.getLocation())) > player.getCombatExecutor().getVictim().size()) {
player.sendMessage("Warning: Since the maul's special is an instant attack, it will be wasted when used ");
player.sendMessage("on a first strike.");
player.reverseSpecialActive();
return;
}

made some modifications. -will make some more

Share this post


Link to post
Share on other sites
  • 0
Okay I got it



Entity target = (Entity) getAttribute().get("last_target");
SpecialAttack spec = SpecialAttackContainer.get(player
.getEquipment().getSlot(3));
if (spec instanceof QuickSmash) {
if (player.getCombatExecutor().getVictim() == null
|| Math.floor(player.getLocation().distance(
player.getCombatExecutor().getVictim()
.getLocation())) > player.getCombatExecutor().getVictim().size()) {
player.sendMessage("Warning: Since the maul's special is an instant attack, it will be wasted when used ");
player.sendMessage("on a first strike.");
player.reverseSpecialActive();
return;
}

Share this post


Link to post
Share on other sites
  • 0
[MENTION=15855]Over[/MENTION]ride
public boolean commenceSpecialAttack(Interaction interaction) {
interaction.setDamage(Damage.getDamage(interaction.getSource(),
interaction.getVictim(), CombatType.MELEE,
MeleeFormulae.getDamage(interaction.getSource(),
interaction.getVictim())));
interaction.getDamage().setMaximum(MeleeFormulae.getMeleeDamage(interaction.getSource(), 1.0));
if (interaction.getVictim().isPlayer()) {
interaction.setDeflected(interaction.getVictim().getPlayer().getPrayer().usingPrayer(1, 9));
}
interaction.getSource().animate(ANIMATION);
interaction.getSource().graphics(GRAPHICS);
interaction.getSource().getPlayer().setSpecialAmount(interaction.getSource().getPlayer().getSpecialAmount() - 500);
interaction.getVictim().animate(interaction.isDeflected() ? 12573 : interaction.getVictim().getDefenceAnimation());
if (interaction.isDeflected()) {
interaction.getVictim().graphics(2230);
}
endSpecialAttack(interaction);
return false;
}


this is the quicksmash file, i think it needs some fixing for this to work... i will try to fix it

Share this post


Link to post
Share on other sites
  • 0
Please stop with this thread.

Share this post


Link to post
Share on other sites
  • 0
I think I got it now : (80-90%?)


[MENTION=15855]Over[/MENTION]ride
public boolean commenceSpecialAttack(Interaction interaction) {
if (interaction.getAttribute().get("last_target")) {
interaction.setDamage(Damage.getDamage(interaction.getSource(),
interaction.getVictim(), CombatType.MELEE,
MeleeFormulae.getDamage(interaction.getSource(),
interaction.getVictim())));
interaction.getDamage().setMaximum(MeleeFormulae.getMeleeDamage(interaction.getSource(), 1.0));
if (interaction.getVictim().isPlayer()) {
Entity target = (Entity) getAttribute().get("last_target");
interaction.setDeflected(interaction.getVictim().getPlayer().getPrayer().usingPrayer(1, 9));
}

interaction.getSource().animate(ANIMATION);
interaction.getSource().graphics(GRAPHICS);
interaction.getSource().getPlayer().setSpecialAmount(interaction.getSource().getPlayer().getSpecialAmount() - 500);
interaction.getVictim().animate(interaction.isDeflected() ? 12573 : interaction.getVictim().getDefenceAnimation());
if (interaction.isDeflected()) {
interaction.getVictim().graphics(2230);
}
endSpecialAttack(interaction);
return false;
}
}

Share this post


Link to post
Share on other sites
  • 0
[quote name='scorpion832']I think I got it now : (80-90%?)


[MENTION=15855]Over[/MENTION]ride
public boolean commenceSpecialAttack(Interaction interaction) {
if (interaction.getAttribute().get("last_target")) {
interaction.setDamage(Damage.getDamage(interaction.getSource(),
interaction.getVictim(), CombatType.MELEE,
MeleeFormulae.getDamage(interaction.getSource(),
interaction.getVictim())));
interaction.getDamage().setMaximum(MeleeFormulae.getMeleeDamage(interaction.getSource(), 1.0));
if (interaction.getVictim().isPlayer()) {
Entity target = (Entity) getAttribute().get("last_target");
interaction.setDeflected(interaction.getVictim().getPlayer().getPrayer().usingPrayer(1, 9));
}

interaction.getSource().animate(ANIMATION);
interaction.getSource().graphics(GRAPHICS);
interaction.getSource().getPlayer().setSpecialAmount(interaction.getSource().getPlayer().getSpecialAmount() - 500);
interaction.getVictim().animate(interaction.isDeflected() ? 12573 : interaction.getVictim().getDefenceAnimation());
if (interaction.isDeflected()) {
interaction.getVictim().graphics(2230);
}
endSpecialAttack(interaction);
return false;
}
}[/QUOTE]

What? How did your old code go to this L0L? I'm done with this.

Share this post


Link to post
Share on other sites
  • 0
no, this is the actual quicksmash file, it's a different file...

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×