#include "rd_questinc" void ArenaLevelUp(object oCreature, int iLevelUp); void main() { object oPC; object oCreature; int iLevel; int iRandom; int iLevelUp; location lLoc; string sTag; oPC = GetPCSpeaker(); iLevel = Random(3) + GetHitDice(oPC) - 1; iRandom = Random(3)+1; sTag = "HTCA_Spawn" + IntToString(iRandom); lLoc = GetLocation(GetObjectByTag(sTag)); iRandom = Random(6)+1; iLevelUp = TRUE; switch (iRandom) { case 1: sTag = "en4_hostilefig2"; break; case 2: sTag = "en4_hostilemonk2"; break; case 3: sTag = "en4_hostileclr2"; break; case 4: sTag = "en4_hostilewiz2"; break; case 5: sTag = "en4_hostilefig2"; break; case 6: sTag = "en4_hostilemonk2"; break; } oCreature=CreateObject(OBJECT_TYPE_CREATURE,sTag,lLoc,FALSE); if (iLevelUp == TRUE && iLevel-1 >1) ArenaLevelUp(oCreature,iLevel-1); lLoc = GetLocation(GetObjectByTag("HTCA_Enter")); AssignCommand(oPC,JumpToLocation(lLoc)); } void ArenaLevelUp(object oCreature, int iLevelUp) { LevelMob(oCreature,iLevelUp); EquipMob(oCreature); }