Initial Commit
Initial Commit
This commit is contained in:
25
_module/nss/craft_getvalue2.nss
Normal file
25
_module/nss/craft_getvalue2.nss
Normal file
@@ -0,0 +1,25 @@
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
object oItem = GetFirstItemInInventory(oPC);
|
||||
int nValue;
|
||||
string sValue;
|
||||
string sCost;
|
||||
while (GetIsObjectValid(oItem))
|
||||
{
|
||||
if (GetLocalInt(oItem, "Prototype") == TRUE)
|
||||
{
|
||||
nValue = GetGoldPieceValue(oItem);
|
||||
if (GetLocalString(oItem, "Type") == "Ammo") nValue = 99*nValue;
|
||||
if (GetLocalString(oItem, "Type") == "Throwing" || GetLocalString(oItem, "Type") == "MightyThrowing") nValue = 50*nValue;
|
||||
sValue = IntToString(nValue);
|
||||
SetCustomToken(799, sValue);
|
||||
sCost = IntToString(3*nValue/4);
|
||||
SetCustomToken(800, sCost);
|
||||
return TRUE;
|
||||
}
|
||||
oItem = GetNextItemInInventory(oPC);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
Reference in New Issue
Block a user