When whe released vistex v2 it was working fine.
Search playerassistant should be in there.
|
|
Hey guys, so my friend needs some help with Vistex v2. He says that when he's trying to train strength, it gives him range xp, BUT it ONLY happens when you're fighting another player, not npc. Where should he be looking into for a fix? Thank you guys!

He mustve messed something up, because it works fine for everyone else!

CombatAssistant problem, check the attackPlayer method or where ever the c.getPA().addSkillXP(#, #); is handled while fighting players.

Code:/** * Adding combat XP **/ public void addCombatXP(int attackType, int damage) { // Attack type is based on the kind of damage that is being done (ranged, mage, melee) c.getPA().addSkillXP((int)(Config.MELEE_EXP_RATE / 3 * damage), 3); switch (attackType) { case 0: // Melee switch (c.fightMode) { case 0: // Accurate c.getPA().addSkillXP(Config.MELEE_EXP_RATE * damage, 0); break; case 1: // Aggressive c.getPA().addSkillXP(Config.MELEE_EXP_RATE * damage, 2); break; case 2: // Block c.getPA().addSkillXP(Config.MELEE_EXP_RATE * damage, 1); break; case 3: // Controlled for (int i = 0; i < 3; i++) c.getPA().addSkillXP((int)(Config.MELEE_EXP_RATE / 3 * damage), i);//1.3 break; } break; case 1: // Ranged switch (c.fightMode) { case 0: // Accurate case 1: // Rapid c.getPA().addSkillXP(Config.RANGE_EXP_RATE * damage, 4); break; case 3: // Block c.getPA().addSkillXP(Config.RANGE_EXP_RATE / 2 * damage, 1); c.getPA().addSkillXP(Config.RANGE_EXP_RATE / 2 * damage, 4); break; } break; case 2: // Magic int magicXP = (Config.MAGIC_EXP_RATE * damage) + Player.MAGIC_SPELLS[c.oldSpellId][7]; c.getPA().addSkillXP(magicXP, 6); break; } }
any ideas?

The skill it's adding xp onto is the 2nd param in addSkillXP so just change it to c.playerAttack or whatever you need to make it easier.

example please? not long got back into server development take the piss all you like, just trying to learn =]

| « [PI] Skills Disconnect you (smelting, Smithing, Fletching) | Fishing Rod doesn't show up? just emote (delta) » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |