NPC SHOPS REQUIRE TOKEN

View previous topic View next topic Go down

NPC SHOPS REQUIRE TOKEN

Post  DM Ramen on Sat Dec 13, 2008 1:30 pm

NPC Shop Requires Token to Buy From

**this would allow certain village shops to sell to only certain folk.

Quoted from Perkko

Ok, I’ll use the Fist store as an example:

In the conversation file there is something called “Text Appears When…” to the bottom right. There you can add scripts so that part of the conversation pops up only if certain criteria is met. Most store are set up with the “cchk_outlaw” script:

Fist store, first line:

*Spits at your feet* Fool, until ye get yer law troubles taken care of, I won't 'elp ya.
(having this line in the conversation marked you add the outlaw script to the “Text Appears When…” field.

Next line:

Aye? Ye're botherin' me fer a reason or are ye just bein' a pain in me rear?
(This only pops up when someone with the guild token speaks to him so a similar script has been added to the above mentioned field.)

The next NPC line is:

Ye ain't one of me brudders. Ye'd better scurry off before I sick em guards on ye.
(So you have to set the conversation up that the checks come first due to how the system works. Each failed check moves it down to the next and it finishes with the conversation being ended if all checks fails.)

The script I’ve used for the guild token check is as shown below:

//::///////////////////////////////////////////////
//:: FileName amory_merch
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 5/14/2005 9:30:07 AM
//:://////////////////////////////////////////////
#include "nw_i0_tool"

int StartingConditional()
{

// Make sure the PC speaker has these items in their inventory
if(!HasItem(GetPCSpeaker(), "MFkey1"))
return FALSE;

return TRUE;
}

You just replace MFkey1 for the tag (not resref) that your guild item have. So you can copy that script and just save it under another name. I hope that helps.

Cheers
avatar
DM Ramen
Admin

Male Number of posts : 354
Registration date : 2008-12-04

View user profile http://nwnnaruto.forumotion.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum