//////////////////////////////////////////////////////////////////////////////// // cv_a_donatecity - Donate to the city guards // By Deva B. Winblood. November 11th, 2008 //////////////////////////////////////////////////////////////////////////////// void main() { object oMod=GetModule(); object oPC=GetPCSpeaker(); int nGuardFund=GetLocalInt(oMod,"nGuardFund"); int nParm=GetLocalInt(oPC,"nParm"); int nAS=0; int nGold=1; // 1000, 500, 100, 50, 5 , 1 if (nParm==1) { nAS=4; nGold=1000; } else if (nParm==2) { nAS=3; nGold=500; } else if (nParm==3) { nAS=2; nGold=100; } else if (nParm==4) { nAS=1; nGold=50; } else if (nParm==5) { nGold=5; } AssignCommand(oPC,TakeGoldFromCreature(nGold,oPC,TRUE)); nGuardFund=nGuardFund+nGold; SetLocalInt(oMod,"nGuardFund",nGuardFund); if (nAS>0) AdjustAlignment(oPC,ALIGNMENT_LAWFUL,nAS,FALSE); }