Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Arthurrw
Junior Member
 
Join Date: Aug 2007
Posts: 26

Old September 11th, 2007, 01:23 PM
I am inputting this feat and it has the following requirements, how can I write a script for this. I tried using AND/OR statements and I got errors.

I need a script that checks for the following

the Race is halfling OR 4 ranks in Bluff, Diplomacy AND Sense Motive.

thanks in advance!
Arthurrw is offline   #1 Reply With Quote
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old September 13th, 2007, 11:15 AM
Arthurrw wrote:
>
>
> I am inputting this feat and it has the following requirements, how can
> I write a script for this. I tried using AND/OR statements and I got errors.
>
> I need a script that checks for the following
>
> the Race is halfling OR 4 ranks in Bluff, Diplomacy AND Sense Motive.
>
> thanks in advance!

If statements don't support AND and OR notation. So what you have to do
is restate the problem:

The feat is valid if the user is a halfling.
Otherwise, if we don't have Bluff 4, it's NOT valid.
Otherwise, if we don't have Diplomacy 4, it's NOT valid.
Otherwise, if we don't have Sense Motive 4, it's NOT valid.
Otherwise, it's valid.

For example:

------

~ The feat is valid if the user is a halfling.
if (hero.tagis[Race.Halfling] <> 0) then
@valid = 1
done
endif

~ Otherwise, if we don't have Bluff 4, it'NOT valid.
if (#skillranks[kBluff] < 4) then
@valid = 0
done
endif


~ Otherwise, if we don't have Diplomacy 4, it's NOT valid.
if (#skillranks[kDiplomacy] < 4) then
@valid = 0
done
endif

~ Otherwise, if we don't have Sense Motive 4, it's NOT valid.
if (#skillranks[kSenseMot] < 4) then
@valid = 0
done
endif

~ Otherwise, it's valid
@valid = 1

----------


That should solve your problem.



--
Colen McAlister, colen@wolflair.com
Chief Engineer, Lone Wolf Development
Colen is offline   #2 Reply With Quote
Arthurrw
Junior Member
 
Join Date: Aug 2007
Posts: 26

Old September 13th, 2007, 01:54 PM
Ok thanks that makes a little more sense, but now I am still having the problem that I dont understand where to put the scripting and I dont seem to see it in the tutorials, so can you tell me where I would put this?
Arthurrw is offline   #3 Reply With Quote
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old September 14th, 2007, 10:34 AM
Arthurrw wrote:
>
>
> Ok thanks that makes a little more sense, but now I am still having the
> problem that I dont understand where to put the scripting and I dont
> seem to see it in the tutorials, so can you tell me where I would put this?


You want to restrict the feat from being taken, so you need to add a
pre-requisite. Select the feat in the editor, and click the pre-reqs
button. Click to add a new pre-requisite. You'll then be given the
opportunity to specify the script and an error message to be reported
when the pre-req isn't valid.


Hope this helps,

--
Colen McAlister, colen@wolflair.com
Chief Engineer, Lone Wolf Development
Colen is offline   #4 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 06:07 PM.


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