Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Pezmerga
Senior Member
 
Join Date: Oct 2010
Location: Cincinnati, OH
Posts: 328

Old June 15th, 2013, 06:44 AM
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

      foreach pick in hero from BaseWep where "IsWeapon.wChainSpk"
     
           if (eachpick.field[gIsEquip].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

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 by Pezmerga; June 15th, 2013 at 06:53 AM. Reason: Code update
Pezmerga is offline   #1 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 03:10 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.