///////////////////////// Award Winnings - Arena // By Deva Bryson Winblood ///////////////////////////////////////////////// void main() { object oPC=GetPCSpeaker(); object oOb=GetNearestObjectByTag("ARENA_EventMaster",oPC,1); int nPay=GetLocalInt(oOb,"nPay"); int nType=GetLocalInt(oOb,"nType"); int nN=GetLocalInt(oPC,"nArenaTimes"); GiveGoldToCreature(oPC,nPay); DeleteLocalInt(oOb,"nPay"); nN++; SetLocalInt(oPC,"nArenaTimes",nN); if (nType==1) { // novice nN=GetLocalInt(oPC,"nArenaNovice"); nN++; SetLocalInt(oPC,"nArenaNovice",nN); } // novice else if (nType==2) { // intermediate nN=GetLocalInt(oPC,"nArenaIntermed"); nN++; SetLocalInt(oPC,"nArenaIntermed",nN); } // intermediate else if (nType==3) { // master nN=GetLocalInt(oPC,"nArenaMaster"); nN++; SetLocalInt(oPC,"nArenaMaster",nN); } // master else if (nType==4) { // champion nN=GetLocalInt(oPC,"nArenaChamp"); nN++; SetLocalInt(oPC,"nArenaChamp",nN); } // champion DeleteLocalInt(oOb,"nType"); DeleteLocalObject(oOb,"oContestant"); DeleteLocalObject(oOb,"oGladiator"); DeleteLocalInt(oOb,"nState"); ExecuteScript("arena_placebar",OBJECT_SELF); oOb=GetNearestObjectByTag("ARENA_OppositionDoor",OBJECT_SELF,1); if (oOb!=OBJECT_INVALID) AssignCommand(oOb,ActionPlayAnimation(ANIMATION_PLACEABLE_CLOSE,1.0,3.0)); }