Server Totals
Deglos - (1)
Le'Or - (1)
Elysia - (1)
Ferrell - (0)
M'Chek - (0)
Mikona - (0)
Wilderness - (0)
Visimontium - (0)
Underdark - (0)
Total players: 3
Gallery
  • Search for the Spiritkin Thistle
    Album name: DM Events
    Uploaded by: Ronan
    Uploaded: Wed Aug 20, 2014 12:07 am

Links Menu

Scripting help

Moderators: Nighthawk4, Dungeon Masters

Scripting help

PostAuthor: Anniko » Wed Aug 31, 2005 4:47 am

I'm trying to make a basic fedex quest, but i cant figure out how to make it so some conversation options only come up when the PC has a certain item

Thanks

~Evangel
<Fuzz> thankfully, no one quotes me

<GairusWHO> I think so... but don't quote me on that.

<NWDuneAuron> in other news, study proves studies don't prove anything!

Anniko
Scholar of Fools
 
Posts: 313
Joined: Mon May 24, 2004 10:50 am
Location: Australia, Brisbane (GMT +10)

Re: Scripting help

PostAuthor: Final Shinryuu » Wed Aug 31, 2005 4:51 am

Anniko wrote:I'm trying to make a basic fedex quest, but i cant figure out how to make it so some conversation options only come up when the PC has a certain item

Thanks

~Evangel


In the conversation editor, there's an option on the bottom-right side where you can put in a script to govern when the selected conversation option appears.
There's also a button for the Script Wizard there. Click that, let it do the work for you. ;) It gives you a menu of things to select, and checking for an item is one of them.
User avatar
Final Shinryuu
Sage
 
Posts: 2060
Joined: Thu Jun 24, 2004 3:20 am
Location: http://hades.mercuric.net/

PostAuthor: Aloro » Wed Aug 31, 2005 5:56 am

In short, you're looking for a conditional script.

Here's a sample script that checks to see if the PC has 100 gold:

Code: Select all
int StartingConditional()
{
    int iResult;
    object oPC = GetPCSpeaker();

    if (GetGold(oPC) >= 100)
    return TRUE;

    return FALSE;
}

This would go in the "Text Appears When" area for the conversation line in question. Replace the script with your own StartingConditional, and it should work fine.

- Aloro
Aleksandr Solzhenitsyn wrote:The meaning of earthly existence lies, not as we have grown used to thinking, in prosperity, but in the development of the soul.
User avatar
Aloro
Team Member; Retired with Honors
 
Posts: 12810
Joined: Sat Dec 28, 2002 5:11 am
Location: Rainbow's End


Return to NWN Scripting

Who is online

Registered users: Bing [Bot], Google [Bot], Trigger