so... not to be rude... but to get back to my question...
from what i get out of what belowthebelt says i need to do something like this:
string GetRandomCreature (int iList)
{
String sResref;
Switch (iList}
{
Case 1:
{
Switch (Random(3))
{
Case 0: sResref= "rst_sytar"; break;
Break;
Case 1: sResref= "rst_sytar2"; break;
Break;
Case 2: sResref= "rst_sytar3"; break;
Break;
}
return Resref;
}
Case 2:
{
Switch (Random(3))
{
Case 0: sResref= "rst_blackhand"; break;
Break;
Case 1: sResref= "rst_blackhand2"; break;
Break;
Case 2: sResref= "rst_blackhand3"; break;
Break;
}
return Resref;
}
Case 3:
{
Switch (Random(3))
{
Case 0: sResref= "rst_ork"; break;
Break;
Case 1: sResref= "rst_ork2"; break;
Break;
Case 2: sResref= "rst_ork3"; break;
Break;
}
return Resref;
}
Case 4:
{
Switch (Random(3))
{
Case 0: sResref= "rst_brood"; break;
Break;
Case 1: sResref= "rst_brood2"; break;
Break;
Case 2: sResref= "rst_brood3"; break;
Break;
}
return Resref;
}
}
}
and incorporate it in to this:
void main()
{
ExecuteScript("horse_delete",OBJECT_SELF);
object oPC = GetLastPCRested();
ExecuteScript("sh_res",oPC);
object oMount;
object oArea = GetArea(oPC);
location lPCLoc = GetLocation(oPC);
if (GetLastRestEventType()==REST_EVENTTYPE_REST_STARTED)
{
int nChanceOfEncounter = GetLocalInt(oArea,"chance_encounter");
if (d100() <= nChanceOfEncounter)
{
int nNumMonsterTypes = GetLocalInt(oArea,"num_monster_types");
int nMaxAmountMonsters = GetLocalInt(oArea, "max_amount_monsters");
int nRandMonsterType = Random(nNumMonsterTypes) + 1;
int nMonsters = Random(nMaxAmountMonsters) + 1;
string sMonsterType = GetLocalString(oArea, "monster_num" + IntToString(nRandMonsterType));
for (nMonsters; nMonsters > 0; nMonsters--)
{
object oEnemy = CreateObject(OBJECT_TYPE_CREATURE, sMonsterType, lPCLoc, FALSE);
AssignCommand(oEnemy, ActionAttack(oPC));
}
AssignCommand(oPC, ActionSpeakString("Wake Up!!! We're under attack!!!", TALKVOLUME_TALK));
}
}
object oItem, oArea2;
vector v;
float fFacing;
switch(GetLastRestEventType())
{
case REST_EVENTTYPE_REST_STARTED:
oItem = GetItemPossessedBy(oPC,"memorybox");
oArea2 = GetArea(oPC);
v = GetPosition(oPC);
fFacing = GetFacing(oPC);
SetLocalString(oItem,"LOC_A",GetTag(oArea));
SetLocalFloat(oItem,"LOC_X",v.x);
SetLocalFloat(oItem,"LOC_Y",v.y);
SetLocalFloat(oItem,"LOC_Z",v.z);
SetLocalFloat(oItem,"LOC_F",fFacing);
break;
case REST_EVENTTYPE_REST_CANCELLED:
case REST_EVENTTYPE_REST_FINISHED:
ExportSingleCharacter(oPC);
FloatingTextStringOnCreature("** Character Saved **",oPC,FALSE);
break;
}
}
is this right? if so, and keeping in mind i'm only a novice scripter, where and how would this be done?
thanks again