onUnEquip bugged?

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

onUnEquip bugged?

Post by stranf »

I have a script attached to armor that looks like this:

Code: Select all

function onEquip(mChar, ourObj)
{
 mChar.skills.hiding=(mChar.skills.hiding + 10);
 mChar.skills.stealth=(mChar.skills.stealth + 10);
 
}
function onUnEquip(mChar, ourObj)
{
 mChar.skills.hiding=(mChar.skills.hiding -10);
 mChar.skills.stealth=(mChar.skills.stealth -10);
}

When I put the armor on, the hiding and stealth is increased by 1; however,

nothing happens when the armor is removed.

Is this a UOx3 bug, or am I no using the script properly? Thanks.
stranf
UOX3 Guru
Posts: 939
Joined: Wed Jan 04, 2006 3:59 pm
Has thanked: 0
Been thanked: 0

Post by stranf »

Ok, there is not UOx3 bug, it was a user error.

I named the function "onUnEquip" instead of "onUnequip". And it never threw an error.

So you can delete this post, or at least move it into "scripting department" as it is more a scripting issue than a Uox3 bug.
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 »

Roger that :D
-= Ho Eyo He Hum =-
Post Reply