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
Thrantor
Senior Member
 
Join Date: Apr 2012
Posts: 105

Old May 7th, 2012, 02:11 PM
I'm trying to duplicate the following item...

This +1 longsword adds +5 to the wielder’s Move Silently checks. Further, anyone dealt a lethal blow by the blade is magically silenced, so that they cannot cry out, making silence an excellent weapon for assassins and others who wish to slay quickly and quietly.
Faint Illusion; CL 5th; Craft Magic Arms and Armor, silence; Price 6,315 gp Cost to Create: 3,315.

So, I've got a gizmo pointing to a longsword. I've got the +1 enhancement. And I'm trying to create a eval script to handle the +5 to stealth(in pathfinder). But I can't figure out how to do an OR in the editor.

I want to do if it's equipped then +5 to the skStealth... But I'm getting an annoying error. Invalid use of a reserved word in script. Script is as follows.

if (field[gIsEquip].value = 1) then
#skillbonus[skStealth] = #skillbonus[skStealth] + 5
endif

if( field[wIs2nd].value = 1) then
#skillbonus[skStealth] = #skillbonus[skStealth] + 5
endif

Please help get me on the right path.
Thrantor is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 7th, 2012, 02:48 PM
Is this for Pathfinder or d20?

You mention both "Move Silently" and "Stealth" - I saw move silently first, so I moved this into the d20 forum, but do you want it in the Pathfinder forum instead? (The answers could differ slightly depending on which game system this is for).
Mathias is online now   #2 Reply With Quote
Thrantor
Senior Member
 
Join Date: Apr 2012
Posts: 105

Old May 8th, 2012, 06:20 AM
Sorry, it's Pathfinder. I'm taking a d20 item and moving it into Pathfinder.
Thrantor is offline   #3 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old May 8th, 2012, 09:16 AM
Quote:
Originally Posted by Thrantor View Post
if( field[wIs2nd].value = 1) then
#skillbonus[skStealth] = #skillbonus[skStealth] + 5
endif
You have a typo in the above code. You need a space after the if.

Also, your script will add 10 if the weapon is wielded in both hands.
Sendric is offline   #4 Reply With Quote
Thrantor
Senior Member
 
Join Date: Apr 2012
Posts: 105

Old May 8th, 2012, 09:29 AM
Quote:
Originally Posted by Sendric View Post
You have a typo in the above code. You need a space after the if.

Also, your script will add 10 if the weapon is wielded in both hands.
I thought there was a separate flag for wielded in both hands?

Also, can you think of a way that says "if it's equiped" do this instead of having to check to see if it's wielded in certain hands?

Course, I'm tempted to make it a specific bonus type so that it won't stack like this currently does.
Thrantor is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 8th, 2012, 09:42 AM
Quote:
Originally Posted by Thrantor View Post
Also, can you think of a way that says "if it's equiped" do this instead of having to check to see if it's wielded in certain hands?
Use only a single if statement to test both hands at the same time:
Code:
 
if (field[grIsEquip].value + field[wIs2nd].value <> 0) then
  #skillbonus[skStealth] += 5
  endif
Mathias is online now   #6 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old May 8th, 2012, 10:17 AM
Quote:
Originally Posted by Mathias View Post
Use only a single if statement to test both hands at the same time:
Code:
 
if (field[grIsEquip].value + field[wIs2nd].value <> 0) then
  #skillbonus[skStealth] += 5
  endif
Should be "gIsEquip" (extra r), but yes, clearly that works.
Sendric is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 8th, 2012, 10:33 AM
Oops, sorry, I've been working on Shadowrun so much lately that I forgot that Shadowrun and Pathfinder have slightly different Ids for that field.
Mathias is online now   #8 Reply With Quote
Thrantor
Senior Member
 
Join Date: Apr 2012
Posts: 105

Old May 8th, 2012, 11:19 AM
Oh... thats a fantastic idea. I don't care if it's 1 or 2... just as long as it's not 0. SWEET!. Thanks guys.

Any idea if we are ever going to get logical operators? And, or, nor etc?
Thrantor is offline   #9 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 8th, 2012, 11:56 AM
That is how to do an OR. = 2 would be an AND. Nor would be = 0. !field[gIsEquip].value is also available.

If you need more complexity, you can nest your if statements:
Code:
 
if (A relationship B) then
  if (C relationship D) then
    ~do something
    endif
  endif
Mathias is online now   #10 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 05:58 PM.


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