generated from Jaysyn/ModuleTemplate
24 lines
561 B
Plaintext
24 lines
561 B
Plaintext
// NWscript:
|
|
#include"nw_i0_plot"
|
|
int CanAffordIt()
|
|
{
|
|
int nCost=50;
|
|
//*remove the gold from the player
|
|
//*I'm having the player remove it from himself
|
|
//*but since I'm also destroying it, this will work
|
|
if (GetGold(GetPCSpeaker())>=nCost)
|
|
{
|
|
TakeGold(nCost, GetPCSpeaker());
|
|
return TRUE;
|
|
}
|
|
return FALSE;
|
|
}
|
|
void main()
|
|
{
|
|
CanAffordIt();
|
|
location lLoc=GetLocalLocation(GetPCSpeaker(),"ls_stored_loc");
|
|
DelayCommand(2.0,ApplyEffectAtLocation(DURATION_TYPE_PERMANENT,
|
|
EffectVisualEffect(VFX_IMP_UNSUMMON),lLoc));
|
|
AssignCommand(GetPCSpeaker(),JumpToLocation(lLoc));
|
|
}
|