HiddenTradition_PRC8/_module/nss/alqaida_perc.nss
2024-06-20 15:47:42 -04:00

28 lines
957 B
Plaintext

// perception event script for genji's Al-Qaida script.
// Genji genji@thegenji.com 9-26-02
void main()
{
int fbInt = GetLocalInt(OBJECT_SELF,"firebomb");
if (fbInt < 2)
{
if (GetIsPC(GetLastPerceived()))
{
object firebomb;
if ((firebomb = GetItemPossessedBy(OBJECT_SELF,"FireBomb")) != OBJECT_INVALID && fbInt != 1)
{
talent tUse = GetCreatureTalentRandom(TALENT_CATEGORY_BENEFICIAL_HEALING_POTION);
if(GetIsTalentValid(tUse))
{
ClearAllActions();
SetLocalInt(OBJECT_SELF,"firebomb",1);
ActionUseTalentOnObject(tUse, OBJECT_SELF);
DelayCommand(0.5,SignalEvent(OBJECT_SELF,EventUserDefined(1200)));
}
}
}
} else {
ExecuteScript("NW_C2_DEFAULT2",OBJECT_SELF); // or whatever your default perception script is
}
}