44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Name hen_chose1_at
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
"Use the <CUSTOM7701>."
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: nereng
|
|
//:: Created On: 03.05.06
|
|
//:://////////////////////////////////////////////
|
|
void main()
|
|
{
|
|
object oChosenTrap = GetLocalObject(OBJECT_SELF, "TRAP1");
|
|
|
|
SetLocalObject(OBJECT_SELF, "TRAP_TO_SET", oChosenTrap);
|
|
|
|
// Figuring out the base trap number is a bit tricky. It is
|
|
// the end number of the tag minus 1, EXCEPT for acid splash
|
|
// and negative traps which have changed places somewhere.
|
|
string sTagR2 = GetStringRight(GetTag(oChosenTrap), 2);
|
|
int nTagR2 = StringToInt(sTagR2);
|
|
nTagR2 --;
|
|
|
|
// Switching acid splash and negative trap numbers
|
|
switch (nTagR2)
|
|
{
|
|
case 32:
|
|
case 33:
|
|
case 34:
|
|
case 35:
|
|
nTagR2 = nTagR2 + 8;
|
|
break;
|
|
case 40:
|
|
case 41:
|
|
case 42:
|
|
case 43:
|
|
nTagR2 = nTagR2 - 8;
|
|
break;
|
|
}
|
|
|
|
SetLocalInt(OBJECT_SELF, "TRAP_BASE_NUMBER", nTagR2);
|
|
}
|