Senior Member
Join Date: Apr 2012
Posts: 105
|
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. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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). |
#2 |
Senior Member
Join Date: Apr 2012
Posts: 105
|
Sorry, it's Pathfinder. I'm taking a d20 item and moving it into Pathfinder.
|
#3 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
|
#4 |
Senior Member
Join Date: Apr 2012
Posts: 105
|
Quote:
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. |
|
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Quote:
Code:
if (field[grIsEquip].value + field[wIs2nd].value <> 0) then #skillbonus[skStealth] += 5 endif |
|
#6 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
|
#7 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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.
|
#8 |
Senior Member
Join Date: Apr 2012
Posts: 105
|
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? |
#9 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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 |
#10 |
|
|