Drakosnah

Member
ServUO Version
Publish 57
Ultima Expansion
Endless Journey
Hi All, I am hoping to get some help. I am trying to find a way so that a Mage Weapon and a Mystic Weapon which are both supposed to convert Magery Skill or Mysticism Skill to the required Weapon Skill. But if you try to use either the primary or secondary ability (even with required Tactics) it says you need weapon skill for the attack. I want mage weapon to use the Magery and Eval skill and Mystic Weapon to use Mysticism and Focus for the primary or secondary weapon ability. Can someone point me in the right direction?
 
If you look at
/Scripts/Abilities/WeaponAbility.cs
around line 123

CheckWeaponSkill(Mobile from)
{
...
Skill skill = from.Skills[weapon.Skill];
...
}

the used skill is always the weapon skill:
so returns the error on mage/mystic weapons when you havent also got weapon skill
change it to:

#region Mage/Mystic skill set
//Skill skill = from.Skills[weapon.Skill];
Skill skill = from.Skills[weapon.GetUsedSkill(from, true)];
#endregion

Which uses the function in BaseWeapon that returns the used skill (weapon skill, mage weap, mystic weap etc)
just add tactics
 
If you look at
/Scripts/Abilities/WeaponAbility.cs
around line 123

CheckWeaponSkill(Mobile from)
{
...
Skill skill = from.Skills[weapon.Skill];
...
}

the used skill is always the weapon skill:
so returns the error on mage/mystic weapons when you havent also got weapon skill
change it to:

#region Mage/Mystic skill set
//Skill skill = from.Skills[weapon.Skill];
Skill skill = from.Skills[weapon.GetUsedSkill(from, true)];
#endregion

Which uses the function in BaseWeapon that returns the used skill (weapon skill, mage weap, mystic weap etc)
just add tactics
I replaced the line you pointed to with the code you provided and started up the server, but I am using a mage weapon -0 with 120 magery but it still says I need 90 weapon skill to perform that attack. Any other suggestions?
 
Im not sure what you are asking
This image has a char with 100 magery, 61 tactics, 0 swords and a broadsword with props AosWeaponAttributes.MageWeapon set to 30 (so OPL reports -0) and you can see it has the ability activated
ExtendedWeaponAttributes.MysticWeapon does the same thing with Mysticism

1772372089145.png
 
I replaced the line you pointed to with the code you provided and started up the server, but I am using a mage weapon -0 with 120 magery but it still says I need 90 weapon skill to perform that attack. Any other suggestions?
What you need to do is create a new Base weapon script like the BaseSwords.cs so you can designate the weapon skill for the weapon. Using this line in the script.

public override SkillName DefSkill => SkillName.Swords;

Change it to this.

public override SkillName DefSkill => SkillName.Magery;

Then your weapon will check the magery skill for the abilities and use of the weapon instead of swords. You will need to do this for Mysticism also.
 
Im not sure what you are asking
This image has a char with 100 magery, 61 tactics, 0 swords and a broadsword with props AosWeaponAttributes.MageWeapon set to 30 (so OPL reports -0) and you can see it has the ability activated
ExtendedWeaponAttributes.MysticWeapon does the same thing with Mysticism

View attachment 27398
Thank you, I had restarted the server but forgot to compile it again after the changes. It is working perfectly with the code you provided.
 

Donations

Total amount
$80.00
Goal
$500.00

Shards

Back