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!
Neverending Ale Keg
Débuté par
Barazinbar
, août 27 2010 06:22
#1
Posté 27 août 2010 - 06:22
#2
Guest_ElfinMad_*
Posté 27 août 2010 - 08:02
Guest_ElfinMad_*
void main()
{
object oPC = GetLastUsedBy();
CreateItemOnObject("BARAZINBARS_ITEM");
}
#3
Posté 27 août 2010 - 03:53
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?
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
Posté 27 août 2010 - 04:03
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);
}
void main()
{
object oPC = GetLastUsedBy();
CreateItemOnObject("nw_it_mpotion021", oPC);
}
#5
Posté 27 août 2010 - 06:02
That worked perfectly, TYVM!





Retour en haut






