Explosion Potion. Help!

Need help with your JScripts? Got questions concerning the DFNs? Come forward, step inside :)
Post Reply
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Explosion Potion. Help!

Post by stranf »

I noticed that "explosion potion" and "greater explosion potion" were missing from the DFN. Is this how UO originally was?

In any case, the lesser explosion potion is worthless with its 4 second timer and 8-10 damage done.

I was thinking of upping the damage of lesser explosion and adding and even greater "explosion" and "greater explosion".

It'd make alchemy a bit more interesting anyway.

So I opened the script for potions. The type of potion is govered by "morey". Explosion potions are set at morey ==3. Here is what we have:

Code: Select all

case 3:		// Explosion Potion
				var pRegion = pUser.region;
				if( pRegion.isGuarded )
				{
					socket.SysMessage( GetDictionaryEntry( 1347, socket.Language ) ); //You can't use that in town!
					return false;
				}
				else
				{
					socket.tempObj = iUsed;
					DoTempEffect( 0, pUser, pUser, 16, 0, 1, 3 );
					DoTempEffect( 0, pUser, pUser, 16, 0, 2, 2 );
					DoTempEffect( 0, pUser, pUser, 16, 0, 3, 1 );
					DoTempEffect( 1, pUser, iUsed, 17, 0, 4, 0 );
					socket.CustomTarget( 0, GetDictionaryEntry( 1348, socket.Language ) ); //Now would be a good time to throw it!
				}
				break;

I can't see anything in the swtich or the rest of the script (potion.js) that governs the damage being done. (For an example, the healing potions seem to do 5, 10, and 15 + a random 5, 10, 20 roll afterwords.)

If anyone can tell me how the explosion potions work, that would be awesome.

And thanks again for everyones help!
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

Post by dragon slayer »

check this part i think it has to o with tempeffect

DoTempEffect( 0, pUser, pUser, 16, 0, 1, 3 );
DoTempEffect( 0, pUser, pUser, 16, 0, 2, 2 );
DoTempEffect( 0, pUser, pUser, 16, 0, 3, 1 );
DoTempEffect( 1, pUser, iUsed, 17, 0, 4, 0 );
socket.CustomTarget( 0, GetDictionaryEntry( 1348
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

I actually did get a reply.... a long time ago, hehehe.

I could be wrong, but I think the DoTempEffect is the printing of the countdown clock on the user's client.

So is the damage done by an explosion potion hardcoded? Is there anyway to adjust it? We'd like to make explosion potions worth something on our shard, but by only doing 1-8 points damager, or whatever it is, they are kind of useless. :wink:
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

dragon slayer wrote:DoTempEffect( 1, pUser, iUsed, 17, 0, 4, 0 );
That one is the timer for the explosion. The explosion range is based on the MOREX value of the item, the damage in the MOREZ value. Here are the lines of code concerning this:

Code: Select all

UI32 len = nItem->GetTempVar( CITV_MOREX ) / 250; //4 square max damage at 100 alchemy
dmg = RandomNum( nItem->GetTempVar( CITV_MOREZ ) * 5, nItem->GetTempVar( CITV_MOREZ ) * 10 );
So play with the MOREZ value of the potions to make em stronger.
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

Awesome, thanks Grimson.

Hopefully I can give it a shot this weekend.

I should probably upgrade my UOX3 executable while I'm at it. Haven't touched it for a long time....
Post Reply