String ObjectToUse()
Returns the name of the current selected object in inventory.
function GrandadUse()
{
if(ObjectToUse()=="BarrelWater")
{
if(!SearchParameter("WateronGrandad"))
{
RemoveInventoryObject();
AddInventory("Barrel");
CreateParameter("WateronGrandad");
Grandad.Say("Tea!... hmmm... tea!");
}
}else if(ObjectToUse()=="BarrelTea")
{
if(!SearchParameter("TalkedwithGrandad"))
{
RemoveInventoryObject();
AddInventory("Barrel");
CreateParameter("TalkedwithGrandad");
Grandad.status="weak";
Grandad.Say("Spells, ");
}
}else{
Player.Say("It doesn't work with him.");
}
}
Get the latest version here.