• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Wanderer's Diplomacy

Arthurrw

Active member
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 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
 
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 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
 
Back
Top