Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old November 22nd, 2017, 03:26 AM
I need to know if I am on the right track here

I am coding a custom ability that causes 1 handed weapons in your offhand to be treated as light weapons

My logic looks like this

Final/1000
Code:
      ~ If we're disabled, do nothing
      doneif (tagis[Helper.SpcDisable] <> 0)

    ~If there is nothing in the offhand, get out now
        doneif (hero.tagis[Hero.EquipOff] <> 1)

      foreach pick in hero from BaseWep where "wClass.OneHanded | Hero.EquipOff"
            perform delete[wClass.OneHanded]
            perform assign[wClass.Light]
       nexteach
Am I even on the right track here?
ErinRigh is offline   #1 Reply With Quote
frumple
Senior Member
 
Join Date: Nov 2011
Location: South Riding, VA
Posts: 841

Old November 22nd, 2017, 03:40 AM
I would modify this as follows:

Code:
      ~ If we're disabled, do nothing
      doneif (tagis[Helper.SpcDisable] <> 0)

    ~If there is nothing in the offhand, get out now
        doneif (hero.tagis[Hero.EquipOff] = 0)

      foreach pick in hero from BaseWep where "wClass.OneHanded & Hero.EquipOff"
            perform eachpick.tagreplace[wClass.OneHanded,wClass.Light]
       nexteach
Reasons as follows:

tagis returns 0 or 1

In the loop, you want things that are one-handed weapons and equipped in the off hand. Thus changing the | to &.

You were missing the eachpick in your foreach loop. Otherwise you perform statements would run on whatever pick this script is on.

tagreplace is basically the same as the calling delete then assign, but it is easier to understand what you are doing in my opinion.

Note: I am not sure if this will do what you want so you will have to test it. If it doesn't work play with the timings. If you have debugging enabled, right-click on whatever weapon you are testing this with and look at the task list to see if there are scripts that do things with the wClass tags. You will want to have this script run before that.
frumple is offline   #2 Reply With Quote
Minous
Senior Member
 
Join Date: May 2015
Posts: 830

Old November 22nd, 2017, 04:20 AM
Yeah, final 1000 might be too late for some things.
Minous is offline   #3 Reply With Quote
Reply

Thread Tools
Display Modes

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 04:42 PM.


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