Added Mine & Caverns raise & lower functionality. Revamped Level 1 events to match PnP. Updated Level 1: Core. Added new Footcatcher trap type. Added Underwater heartbeat to Glop Lake Underwater. Full compile.
52 lines
914 B
Plaintext
52 lines
914 B
Plaintext
void main()
|
|
{
|
|
//:: Get the placeable object that triggers the script.
|
|
object oPlaceable = OBJECT_SELF;
|
|
|
|
string sTexture;
|
|
|
|
//:: Check if a custom local variable has been set to indicate that the script has run.
|
|
int bHasRun = GetLocalInt(oPlaceable, "HasRun");
|
|
|
|
if (!bHasRun)
|
|
{
|
|
switch (d4(1))
|
|
{
|
|
case 1:
|
|
{
|
|
sTexture = "tdm01_rock01";
|
|
break;
|
|
}
|
|
|
|
case 2:
|
|
{
|
|
sTexture = "tdm01_rock02";
|
|
break;
|
|
}
|
|
|
|
case 3:
|
|
{
|
|
sTexture = "tdm01_rock03";
|
|
break;
|
|
}
|
|
|
|
case 4:
|
|
{
|
|
sTexture = "tdm01_rock04";
|
|
break;
|
|
}
|
|
|
|
}
|
|
|
|
ReplaceObjectTexture(oPlaceable, "tx_rough_006g", sTexture);
|
|
|
|
//:: Set the local variable to indicate that the script has run.
|
|
SetLocalInt(oPlaceable, "HasRun", 1);
|
|
|
|
//:: Removed HB script from event to save resources
|
|
SetEventScript(oPlaceable, EVENT_SCRIPT_PLACEABLE_ON_HEARTBEAT, "");
|
|
|
|
}
|
|
}
|
|
|