Page 1 of 1
Cure potions: Not working?
Posted: Fri Mar 16, 2007 6:21 am
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?
Posted: Fri Mar 16, 2007 10:29 am
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!
Posted: Mon Jul 02, 2007 3:48 pm
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!
Posted: Thu Jul 12, 2007 5:19 pm
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

Posted: Thu Jul 12, 2007 8:24 pm
by Xuri
I don't know which TempEffect _should_ be used under the healing potions though, if any. Hrm.
Posted: Thu Jul 12, 2007 9:23 pm
by Grimson
The only one that might fit is number 26, because it sets the UsingPotion var.
Posted: Sat Jul 14, 2007 4:32 am
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.
Posted: Sat Jul 14, 2007 4:58 am
by Xuri
Hmm is there no "potion drinking"-timer, other than general timer for using objects?
Posted: Sat Jul 14, 2007 9:20 am
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.
Posted: Tue Jul 17, 2007 3:49 am
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.
