Aschbourne_PRC8/_module/nss/ldf_calc.nss

16 lines
628 B
Plaintext
Raw Normal View History

2024-06-14 10:48:20 -04:00
#include "ld_forge"
void main()
{
AssignCommand(GetPCSpeaker(),ActionPauseConversation());
DelayCommand(3.0,AssignCommand(GetPCSpeaker(),ActionResumeConversation()));
int iCost = GetModCost(GetFirstItemInInventory(GetLocalObject(OBJECT_SELF,"Forge")),
GetLocalObject(OBJECT_SELF,"Forge"),
GetLocalObject(OBJECT_SELF,"Anvil"),
GetLocalString(OBJECT_SELF,"Mods"));
if(iCost < 0){SetLocalInt(OBJECT_SELF,"Refund",TRUE);}
if(GetLocalInt(OBJECT_SELF,"Visual")){iCost = 15;}
SetLocalInt(OBJECT_SELF,"Cost",iCost);
SetCustomToken(4500,IntToString(iCost));
}