I'm trying to add spells to a weapon.
I set type # to 15
morex to spell circle
morey to spell #
morez to spell charge
I click on the sword and it says "what do you wish to carve"
frusterated, I create a new DFN for a longsword and OMIT the script tag.
I then repeate the above, and it says, "What do you wish to carve?"
Apperently, even though we have the carving abilities in the JS scripts, they are overwritten by a piece of hardcoded (old?) code. I wonder if it could be tracked down and omitted?
[FIXED] "Carve" settings hardcoded!?
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
Are you sure it says "what do you wish to carve"? I can't find that phrase, or any similar in neither the scripts nor the source.
In any case, your problem might be that in jse_objectassociations.scp, all bladed weapons are setup with JS script 5009 by their ID - which is the same whether or not you create a new DFN section for your weapon or not.
One way you can handle this without removing the "carve" function from non-magical weapons of the same ID, would be to modify the onUse() functions of sword.js and axe.js in the following way so UOX3 would bypass the carve stuff for items of type 15 (or other ones you might want to add):
In any case, your problem might be that in jse_objectassociations.scp, all bladed weapons are setup with JS script 5009 by their ID - which is the same whether or not you create a new DFN section for your weapon or not.
One way you can handle this without removing the "carve" function from non-magical weapons of the same ID, would be to modify the onUse() functions of sword.js and axe.js in the following way so UOX3 would bypass the carve stuff for items of type 15 (or other ones you might want to add):
Code: Select all
function onUse( pUser, iUsed )
{
var socket = pUser.socket;
if( socket && iUsed && iUsed.isItem )
{
var itemOwner = GetPackOwner( iUsed, 0 );
if( itemOwner == null || itemOwner.serial != pUser.serial )
{
pUser.SysMessage( "This must be in your backpack or equipped before it can be used." );
return false;
}
[color=red]else if( iUsed.type != 15 )
{[/color]
var targMsg = GetDictionaryEntry( 462, socket.Language );
socket.CustomTarget( 1, targMsg );
[color=red]}
else
return true;[/color]
}
return false;
}
-= Ho Eyo He Hum =-
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
Oops. Added
to my initial post. 
Code: Select all
[color=red]else
return true;[/color]-= Ho Eyo He Hum =-
Thanks Xuri, I'll try to implement that as soon as I can.
(I did remove the 5009 script from the DFN, but I guess if it bypasses it....hahaha.)
Oh, the elven sword you added from Mondain's Legacy, it is NOT updated on the jse_objectassociations.scp. The only way to carve stuff with that is to put the 5009 script in the .dfn.
Also, my text is "what do you wish to use this on"....not "carve". Sorry. I have to post from a different computer than I test on.
(I did remove the 5009 script from the DFN, but I guess if it bypasses it....hahaha.)
Oh, the elven sword you added from Mondain's Legacy, it is NOT updated on the jse_objectassociations.scp. The only way to carve stuff with that is to put the 5009 script in the .dfn.
Also, my text is "what do you wish to use this on"....not "carve". Sorry. I have to post from a different computer than I test on.