99 lines
3.6 KiB
Plaintext
99 lines
3.6 KiB
Plaintext
// GlovesoftheFalco
|
|
|
|
void main()
|
|
{
|
|
// Define Participants
|
|
object oPC = GetItemActivator();
|
|
object oTarget = GetItemActivatedTarget();
|
|
object oItemToTake1 = GetItemPossessedBy(oPC, "Taulite");
|
|
location lTarget = GetLocation(oTarget);
|
|
// Check for
|
|
if(GetIsObjectValid(GetItemPossessedBy(oPC, "Taulite")))
|
|
{
|
|
if (GetItemStackSize(oItemToTake1) > 1)
|
|
{
|
|
SetItemStackSize(oItemToTake1, GetItemStackSize(oItemToTake1)-1);
|
|
}
|
|
|
|
else if (GetItemStackSize(oItemToTake1) == 1)
|
|
{
|
|
DestroyObject(oItemToTake1);
|
|
}
|
|
|
|
if (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 30)
|
|
{
|
|
if(GetIsObjectValid(GetItemPossessedBy(oPC, "Taulite")))
|
|
{
|
|
if (GetItemStackSize(oItemToTake1) > 1)
|
|
{
|
|
SetItemStackSize(oItemToTake1, GetItemStackSize(oItemToTake1)-1);
|
|
}
|
|
else
|
|
{
|
|
DestroyObject(oItemToTake1);
|
|
}
|
|
|
|
AssignCommand(OBJECT_SELF, PlaySound("as_an_birdflap2"));
|
|
AssignCommand(OBJECT_SELF, PlaySound("as_an_hawk1"));
|
|
CreateObject(OBJECT_TYPE_CREATURE, "Falcon3", lTarget, TRUE);
|
|
CreateObject(OBJECT_TYPE_CREATURE, "Falcon3", lTarget, TRUE);
|
|
CreateObject(OBJECT_TYPE_CREATURE, "Falcon3", lTarget, TRUE);
|
|
CreateObject(OBJECT_TYPE_CREATURE, "Falcon3", lTarget, TRUE); }
|
|
else
|
|
{
|
|
SendMessageToPC(oPC, "You must have a Taulite to use this function.");
|
|
}
|
|
}
|
|
|
|
else if (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 20)
|
|
{
|
|
if(GetIsObjectValid(GetItemPossessedBy(oPC, "Taulite")))
|
|
{
|
|
if (GetItemStackSize(oItemToTake1) > 1)
|
|
{
|
|
SetItemStackSize(oItemToTake1, GetItemStackSize(oItemToTake1)-1);
|
|
}
|
|
else
|
|
{
|
|
DestroyObject(oItemToTake1);
|
|
}
|
|
AssignCommand(OBJECT_SELF, PlaySound("as_an_birdflap2"));
|
|
AssignCommand(OBJECT_SELF, PlaySound("as_an_hawk1"));
|
|
CreateObject(OBJECT_TYPE_CREATURE, "Falcon2", lTarget, TRUE);
|
|
CreateObject(OBJECT_TYPE_CREATURE, "Falcon2", lTarget, TRUE);
|
|
CreateObject(OBJECT_TYPE_CREATURE, "Falcon2", lTarget, TRUE);
|
|
CreateObject(OBJECT_TYPE_CREATURE, "Falcon2", lTarget, TRUE); }
|
|
else
|
|
{
|
|
SendMessageToPC(oPC, "You must have a Taulite to use this function.");
|
|
}
|
|
}
|
|
|
|
else if (GetLevelByClass(CLASS_TYPE_RANGER, oPC) >= 10)
|
|
{
|
|
if(GetIsObjectValid(GetItemPossessedBy(oPC, "Taulite")))
|
|
{
|
|
if (GetItemStackSize(oItemToTake1) > 1)
|
|
{
|
|
SetItemStackSize(oItemToTake1, GetItemStackSize(oItemToTake1)-1);
|
|
}
|
|
else
|
|
{
|
|
DestroyObject(oItemToTake1);
|
|
}
|
|
AssignCommand(OBJECT_SELF, PlaySound("as_an_birdflap2"));
|
|
AssignCommand(OBJECT_SELF, PlaySound("as_an_hawk1"));
|
|
CreateObject(OBJECT_TYPE_CREATURE, "Falcon1", lTarget, TRUE);
|
|
CreateObject(OBJECT_TYPE_CREATURE, "Falcon1", lTarget, TRUE);
|
|
CreateObject(OBJECT_TYPE_CREATURE, "Falcon1", lTarget, TRUE);
|
|
CreateObject(OBJECT_TYPE_CREATURE, "Falcon1", lTarget, TRUE);
|
|
}
|
|
else
|
|
{
|
|
SendMessageToPC(oPC, "You must have a Taulite to use this function.");
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|