• 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

Setting prerequistes for item powers

I'm trying to create an item power that has another item power as a prerequiste. In this case, "Ghost Strike" (Magic Item Compedium) requires Ghost Touch ability.

Does anyone have the piece of code I need to make this work?

Thanks
 
Wolf_Larsen wrote:
>
>
> I'm trying to create an item power that has another item power as a
> prerequiste. In this case, "Ghost Strike" (Magic Item Compedium)
> requires Ghost Touch ability.
>
> Does anyone have the piece of code I need to make this work?


I don't recall the Ghost Touch ability - what classes / races /
anythings get it?


--
Colen McAlister, colen@wolflair.com
Chief Engineer, Lone Wolf Development
 
The only requirements to have a weapon with the Ghost Strike Ability are: 1) must have Ghost Touch on Weapon 2) the weapon must be a melee weapon.
The ability is located on page 35 of the "Magic Item Compendium".
Hope this helps.
Thanks
 
Wolf_Larsen wrote:
>
>
> The only requirements to have a weapon with the Ghost Strike Ability
> are: 1) must have Ghost Touch on Weapon 2) the weapon must be a melee
> weapon.
> The ability is located on page 35 of the "Magic Item Compendium".


The ghost touch ability already requires you to be a melee weapon, so if
you have Ghost Touch you automatically comply with the "melee weapon"
thing as well. So the requirement should just be "Requires the Ghost
Touch ability".

I think the pre-requisite code should be something like:

~ If we have the Ghost Touch power, we're valid
@valid = 0
if (pickexists]iGhostTch] <> 0) then
@valid = 1
endif


Hope this helps,

--
Colen McAlister, colen@wolflair.com
Chief Engineer, Lone Wolf Development
 
When I add the above code into the Pre-reqs field of my Ghost Strike Item Power and I run the script, it gives me the following error message:

Compilation was forced to stop after the following errors were detected: Syntax error in 'pre-requisite rule' scriippt for Thing 'ispGhstStr' on line 2 --> Reference to undeclared variable 'pickexists'

(ispGhsStr is the unique code I gave my Ghost Strike item power)

What is the correct variable to use in this case? Also, where do I find a list of variables that the program recognizes?
 
If you did a direct copy/paste it wouldn't work because Colen has a typo in his code, if you notice the "]" after "pickexists", that should be a "[" instead. Maybe that's what it doesn't like?
 
That's it!
For the record, the coding necessary to make require a Item Power to have another Item Power as a pre-requisite is:
@valid = 0
if (pickexists[iGhostTch] <> 0) then
@valid = 1
endif

Thanks a bunch,
Wolf
 
huntercc wrote:
>
>
> If you did a direct copy/paste it wouldn't work because Colen has a typo
> in his code, if you notice the "]" after "pickexists", that should be a
> "[" instead. Maybe that's what it doesn't like?


My bad! Thanks for the correction.


--
Colen McAlister, colen@wolflair.com
Chief Engineer, Lone Wolf Development
 
Back
Top