• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Not sure if this is a bug, or me not writing the script correctly.

Pezmerga

Well-known member
I am trying to get a trait to work. It works with Chains or Whips.

Spiked chains are 2handers, and Whips can be held in the offhand, so I am trying to check to see if either gIsEquip or wIs2nd is <> 0.

However, it appears that whenever you equip a 2hander, and unequip it, it still flags as your Offhand being equipped, even though when I check the value for wIs2nd it says "0".

So when I equip the Spiked Chain (2hander) it activated the script, and applies the bonus. However it stays even when I unequip it. (Unless I equip and unequip a whip, which is a one hander. This seems to reset it)

It works as intended with a whip when you equip or unequip in either hand.

Here is my code.

Code:
     First 1000 (Tried Prelevels 10000 too, as Taldan Duelist does to check something similar.)

     var Equip as number

    ~ Search for any Chains or Whips on the hero and see if they are equipped in either the main or off hand. If none are go no further.

    foreach pick in hero from BaseWep where "IsWeapon.wChainSpk | IsWeapon.wWhip | IsWeapon.wWhipNine | IsWeapon.wStingWhip | IsWeapon.wPFWhipSco | IsWeapon.wPFUrumi | IsWeapon.wWhipTrain"
     
     if (eachpick.field[gIsEquip].value + eachpick.field[wIs2nd].value <> 0) then
          Equip = 1
     endif

      nexteach

    doneif (Equip <> 1)

    hero.child[manTrip].field[BonTrait].value += 2

    hero.child[manTrip].field[manCMB].value += hero.child[manTrip].field[BonTrait].value


Edit: The following code works.

Code:
     First 1000

     var Equip as number

    ~ Search for any Chains or Whips on the hero and see if they are equipped in either the main or off hand. If none are go no further.

       foreach pick in hero from BaseWep where "IsWeapon.wWhip | IsWeapon.wWhipNine | IsWeapon.wStingWhip | IsWeapon.wPFWhipSco | IsWeapon.wPFUrumi | IsWeapon.wWhipTrain"
     
           if (eachpick.field[gIsEquip].value + eachpick.field[wIs2nd].value <> 0) then
              Equip = 1
           endif

      nexteach

      [COLOR="Blue"]foreach pick in hero from BaseWep where "IsWeapon.wChainSpk"
     
           if (eachpick.field[gIsEquip].value <> 0) then
              Equip = 1
           endif

      nexteach[/COLOR]
 
     doneif (Equip <> 1)

     hero.child[manTrip].field[BonTrait].value += 2

     hero.child[manTrip].field[manCMB].value += hero.child[manTrip].field[BonTrait].value


probably not a huge deal, but it does seem as if something is a bit buggy. Either that or I am missing something.
 
Last edited:
Back
Top