Amon_PRC8/_module/nss/cq_makehead.nss

44 lines
931 B
Plaintext
Raw Normal View History

2025-04-03 19:00:46 -04:00
void main()
{
string sTag2 = GetTag(OBJECT_SELF);
string sTag1 = GetStringRight(sTag2, 4);
string sTag = GetStringLeft (sTag1, 1);
if (sTag == "1")
{
object oItemToTake1;
oItemToTake1 = GetItemPossessedBy(OBJECT_SELF, "cq_head_01");
DestroyObject(oItemToTake1);
CreateItemOnObject("cq_head_01", OBJECT_SELF, 1);
}
if (GetStringRight(sTag, 1) == "2")
{
object oItemToTake1;
oItemToTake1 = GetItemPossessedBy(OBJECT_SELF, "cq_head_02");
DestroyObject(oItemToTake1);
CreateItemOnObject("cq_head_02", OBJECT_SELF, 1);
}
if (GetStringRight(sTag, 1) == "3")
{
object oItemToTake1;
oItemToTake1 = GetItemPossessedBy(OBJECT_SELF, "cq_head_03");
DestroyObject(oItemToTake1);
CreateItemOnObject("cq_head_03", OBJECT_SELF, 1);
}
if (GetStringRight(sTag, 1) == "4")
{
object oItemToTake1;
oItemToTake1 = GetItemPossessedBy(OBJECT_SELF, "cq_head_04");
DestroyObject(oItemToTake1);
CreateItemOnObject("cq_head_04", OBJECT_SELF, 1);
}
}