Please note that new user registrations disabled at this time.

Scripting - How do you use potions?

This forum is to be used for all discussions pertaining to BioWare's Baldur's Gate II: Shadows of Amn.
Post Reply
User avatar
glenfar
Posts: 261
Joined: Mon Apr 19, 2004 9:58 am
Contact:

Scripting - How do you use potions?

Post by glenfar »

I'm trying to setup a script so that if I become severly injured while in combat, I'll automatically drink a healing potion. So I'm trying to do something like this (with more triggers obviously!):

IF
HasItem("Potion of Healing",Myself)
THEN
RESPONSE #100
UseItem("Potion of Healing",Myself)
END

Now the HasItem call always returns False. And the UseItem doesn't do anything. What am I doing wrong? I'm guessing I'm not specifying the potion correctly - but if that's the case, then how should I be specifying it?
User avatar
glenfar
Posts: 261
Joined: Mon Apr 19, 2004 9:58 am
Contact:

Post by glenfar »

OK, I figured it out. If anyone else is interested, here's how you'd use a potion of healing:

IF
HasItem("POTN08",Myself)
THEN
RESPONSE #100
UseItem("POTN08",Myself)
END

Of course you'll want to fill in some more triggers (like HPPercentLT) or you'll just drink up all your healing potions!

To use a potion of extra healing, replace "POTN08" with "POTN52".

For a full list of items, go here
User avatar
Ekental
Posts: 614
Joined: Mon Nov 10, 2003 12:14 am
Location: Sigil
Contact:

Post by Ekental »

hmm... this is fairly interesting, thks
Tact is for people not witty enough to be sarcastic
Post Reply