Aschbourne_PRC8/_module/nss/_use_waterwell.nss

37 lines
1002 B
Plaintext
Raw Normal View History

2024-06-14 10:48:20 -04:00
void ItemCreate(object oPC);
#include "nw_i0_plot"
void main()
{
if (GetLocalInt(OBJECT_SELF,"iAmInUse") != 0) return;
object oPC = GetLastUsedBy();
object oBucket = OBJECT_INVALID;
oBucket = GetItemPossessedBy(oPC,"ITEM_EMPTYBUCKET");
if (oBucket == OBJECT_INVALID)
{
FloatingTextStringOnCreature("You must have an empty bucket in order to fill it with water.",oPC,FALSE);
return;
}
SetLocalInt(OBJECT_SELF,"iAmInUse",99);
DestroyObject(oBucket);
FloatingTextStringOnCreature("You fill the bucket with fresh water.",oPC,FALSE);
PlaySound("as_cv_ropepully2");
DelayCommand(2.0,PlaySound("as_na_splash1"));
DelayCommand(4.0,PlaySound("as_cv_ropepully2"));
DelayCommand(6.0,SetLocalInt(OBJECT_SELF,"iAmInUse",0));
DelayCommand(6.0,ItemCreate(oPC));
AssignCommand(oPC,ActionPlayAnimation(ANIMATION_LOOPING_GET_MID,1.0,6.0));
}
void ItemCreate(object oPC)
{
object oWater = CreateItemOnObject("item002",oPC,1);
SetLocalInt(oPC,"iWaterFull",5);
2024-06-14 10:48:20 -04:00
return;
}