generated from Jaysyn/ModuleTemplate
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			498 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			498 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
int StartingConditional()
 | 
						|
{
 | 
						|
    object oPC = GetPCSpeaker();
 | 
						|
    object oItem = GetLocalObject(oPC, "MODIFY_ITEM");
 | 
						|
 | 
						|
    int iCurrentValue = GetGoldPieceValue(oItem);
 | 
						|
    int iCurrentCharges = GetItemCharges(oItem);
 | 
						|
    int iCost = ((iCurrentValue * 99)/iCurrentCharges) - iCurrentValue;
 | 
						|
    int iChargesToAdd = 99 - iCurrentCharges;
 | 
						|
 | 
						|
    SetLocalInt(oPC, "iModifyCost", iCost);
 | 
						|
 | 
						|
    SetCustomToken(101, IntToString(iCost));
 | 
						|
    SetCustomToken(103, IntToString(iChargesToAdd));
 | 
						|
 | 
						|
    return TRUE;
 | 
						|
}
 |