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