28 lines
957 B
Plaintext
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
|
||
|
}
|
||
|
}
|