Aller au contenu

Photo

Neverending Ale Keg


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
Barazinbar

Barazinbar
  • Members
  • 4 messages
I need a script that places an "ale" in a characters inventory when the PC clicks on an ale keg.  I had this once but I've lost it.  It was a simple script if I remember right but I can't for the life of me remember it.  I've modified it in the past to work with wine or whatever tag I wanted to enter into the script. 

Thanks for the help!

#2
Guest_ElfinMad_*

Guest_ElfinMad_*
  • Guests

void main()

{

object oPC = GetLastUsedBy();

CreateItemOnObject("BARAZINBARS_ITEM");

}



#3
Barazinbar

Barazinbar
  • Members
  • 4 messages
Ok, I guess I'm more rusty than I thought.  I made a keg useable and placed this script in the On Used

void main()
{
object oPC = GetLastUsedBy();
CreateItemOnObject("nw_it_mpotion021");
}

The nw_it_mpotion021 is the resref for a mug of ale.  When I test the mod and use the keg nothing happens.  What am I doing wrong?

#4
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
You are not declaring who to give the item too. Without that it defaults to OBJECT_SELF (so the keg is giving the mug to itself). Try this:

void main()

{

object oPC = GetLastUsedBy();

CreateItemOnObject("nw_it_mpotion021", oPC);

}


#5
Barazinbar

Barazinbar
  • Members
  • 4 messages
That worked perfectly, TYVM!