31 lines
984 B
Plaintext
31 lines
984 B
Plaintext
|
/// /// /// /// /// /// /// /// /// /// /// ///
|
||
|
/// pipe
|
||
|
/// OnActivateItem script for a pipe.
|
||
|
///
|
||
|
/// Created by Gilgon Avalrock
|
||
|
/// /// /// /// /// /// /// /// /// /// /// ///
|
||
|
#include "lib_witchgrass"
|
||
|
void main()
|
||
|
{
|
||
|
// Declare major variables
|
||
|
object oMaster = GetItemActivator();
|
||
|
object oItem = GetItemActivated();
|
||
|
location lLoc;
|
||
|
if(GetIsObjectValid(oItem))
|
||
|
{
|
||
|
//they need something to smoke in it...
|
||
|
object oBud = GetItemPossessedBy(oMaster,"witchbud");
|
||
|
AssignCommand(oMaster,ClearAllActions());
|
||
|
if( oBud != OBJECT_INVALID ){
|
||
|
//apply effects
|
||
|
AssignCommand(oMaster,ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK));
|
||
|
GetHigh(oMaster);
|
||
|
DelayCommand(1.0f,GenerateSmoke(oMaster,TRUE));
|
||
|
//destroy the smoked bud
|
||
|
DestroyObject(oBud);
|
||
|
}else{
|
||
|
AssignCommand(oMaster,ActionSpeakString("I don't have anything to smoke in it!"));
|
||
|
}
|
||
|
}
|
||
|
}
|