Files
HeroesStone_PRC8/_module/nss/myportal1.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

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));
}