[FIXED] Cure potions: Not working?

Here we stuff all the bugs we've managed to squash/squish/squelch.
Locked
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Cure potions: Not working?

Post by stranf »

I was playing around the dragon dungeon, and naturally got poisioned a few times. I had 3 "lesser cure" potions, all three of them when drunk failed to cure the poision.

So to check, I loaded the add menu and used a normal cure potion.
that "failed to cure the poision"

So I added a "greater cure potion" and that too, failed to cure the poision.

Are there some poisions that you can't cure? Maybe their is a bug in the cure potion script?
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Try a few more potions of the greater variety and see if you always fail. I think the potions-script is setup so there's always a chance they'll fail, but in theory it should be possible (albeit very rarely!) to cure a level 4 poison with a lesser cure potion!
-= Ho Eyo He Hum =-
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

Xuri, I still could never get cure potions to work, nor could anyone on my shard.


So I went through your script and replaced myUser.poisoned=0

to:

myUser.SetPoisoned(0,0);

and sure enough, it cures now.


Oh, and by the way, my heal poitions ALSO cast night sight. Is this how OSI does it? Or is the heal potion case also going to the nightsight case? And easy way to check is to be in a dungeon pitch black with a mage, drink a potion, and the mage will see for quite some time.

Thanks!
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

To fix the night-sight on healing potions, open the potions.js script and remove the entry saying

Code: Select all

DoTempEffect( 0, pUser, pUser, 2, 0, 0, 0 );
under case 4 (Heal Potion).

Thanks for the fix to the cure potions, btw :)
-= Ho Eyo He Hum =-
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

I don't know which TempEffect _should_ be used under the healing potions though, if any. Hrm.
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

The only one that might fit is number 26, because it sets the UsingPotion var.
Maarc
Developer
Posts: 576
Joined: Sat Mar 27, 2004 6:22 am
Location: Fleet, UK
Has thanked: 0
Been thanked: 0
Contact:

Post by Maarc »

Except I don't think heal potions are TempEffect based. They happen instantly don't they? Not durationally based?

I would expect that a healing potion would use it up straight away and add whatever health benefits that it bestows.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Hmm is there no "potion drinking"-timer, other than general timer for using objects?
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

On the first lines of the potion.js we have:

Code: Select all

		if( pUser.isUsingPotion )
		{
			socket.SysMessage( GetDictionaryEntry( 430, socket.Language ) ); //You must wait a while before using another potion.
			return false;
		}
The pUser.isUsingPotion will be set and unset by the tempeffect number 26, so I guess it was planned to have a a specific no "potion drinking"-timer.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

I added the following to each case in the script, to avoid players downing potions like there's no tomorrow:

Code: Select all

				pUser.isUsingPotion = true;
				DoTempEffect( 0, pUser, pUser, 26, 0, 0, 0 );
Seems to do the trick. :)
-= Ho Eyo He Hum =-
Locked