Magic Weapons Script

Need help with your JScripts? Got questions concerning the DFNs? Come forward, step inside :)
Post Reply
RandallFlagg26
UOX3 Newbie
Posts: 16
Joined: Wed May 18, 2011 1:25 am
Has thanked: 0
Been thanked: 0

Magic Weapons Script

Post by RandallFlagg26 »

1. In the onCombatDamageCalc function is it possible to access the name2 property of the item/weapon that is equiped by the attacker? The main reason for this is that I was using the the name2 property of the magic item/weapon to identify whether or not the magic item/weapon is Ruin, Force, Might, Power or Vanquishing. Then I can add the bonus damage increase using either the ApplyDamageBonuses function or just adding it to the return variable for onCombatDamageCalc function.

2. Does anyone have any idea as to how rare Silver, Accurate, Durable and Damage bonuses for weapons?

3. Does anyone know how rare combinations of the bonuses should be for combinations of the weapon bonuses?

I was just wondering if anyone knew what the usual statistics are so that I could base mine off of something similar to that.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

1) Should be possible. Here's a quick (untested) example:
    // First check one hand
    var tempItem = attacker.FindItemLayer( 1 );
   
    // If nothing was found, check other hand
    if( tempItem == null )
        tempItem = attacker.FindItemLayer( 2 );
   
    if( tempItem != null )
    {
        var magicName = tempItem.name2;
        //Do stuff with magicName string here
    }
2 + 3) No idea, sorry
-= Ho Eyo He Hum =-
Post Reply