Initial upload

Initial upload
This commit is contained in:
Jaysyn904
2023-09-21 20:25:34 -04:00
parent 530aa08f94
commit e0ec0015e6
839 changed files with 442077 additions and 0 deletions

31
_module/nss/torchburn.nss Normal file
View File

@@ -0,0 +1,31 @@
void main()
{
object oMod = GetModule();
object oPlayer = OBJECT_SELF;
if(GetLocalInt(oMod,"BURNTORCH"))
{
if ( !GetIsDM(oPlayer) )
{
object oTorch = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oPlayer);
string sTag=GetTag(oTorch);
if (sTag == "NW_IT_TORCH001")
{
int nC;
if ( (nC=(GetLocalInt(oTorch,"BURNCOUNT")+1)) >=
GetLocalInt(oMod,"BURNTORCH")*(FloatToInt(HoursToSeconds(1)/6.0)))
{
if(sTag=="NW_IT_TORCH001" ||
sTag=="hc_torch")
{
DestroyObject(oTorch);
SendMessageToPC(oPlayer,"Your torch has burned out");
}
}
else
SetLocalInt(oTorch,"BURNCOUNT", nC);
}
}
}
}