Page 1 of 1

A number of issues with the Healing skill

Posted: Fri Apr 15, 2005 1:35 am
by Xuri
1) There is no range check between the healer and the damaged/dead target after the healing-timer has elapsed, before the actual healing/resurrection takes place. This allows the damaged character and/or ghost to run far from the healer, and for instance allows for house break-ins since the ghost can get targeted for resurrection outside the house, then run inside the house before the healing timer ends and get resurrected there.

2) There is no LoS-checking possible in the JS-engine, so there are no LoS-checks when targeting a dead/damaged character for healing. Since the range of healing is two tiles, this means it's possible to heal dead people on the other side of locked doors, allowing them to break in.

I'm updating the healing-script to do checks if either the healer or target owns the multi the target is in, and will disallow resurrecting if neither owns the multi - but it still doesn't stop the "resurrect on other side of door"-trick in static houses, nor does it stop the target ghost from running through these doors after a valid resurrection process has started, but before the timer has run out (since the actual resurrection occurs in the source code, I can't do similar checks right before resurrecting the ghost). Any doors that GMs lock to keep players out will in essence be void.

Posted: Fri Apr 15, 2005 1:39 am
by giwo
Nod, LoS is still being thought-out (as to how we want it implemented in the JS).

As for the End timer on healing, I'll go ahead and fix that as soon as I get a moment. We also could just have the JS handle the whole thing (using an onTimer event).

Posted: Fri Apr 15, 2005 1:42 am
by Xuri
JS handling it works for me. I find it slightly confusing when half the script is in JS and half is in the code anyway :P

Posted: Fri Apr 15, 2005 2:09 am
by Xuri
Ah, this just popped into my head right now:

The same problem is probably an issue with NPC healers, since they resurrect people without any "LoS"-checks as well, and without checking if the characters are in a house they own or not.

Not sure about the Resurrection spell, since that requires instant targeting and thus probably does LoS-check, but worth checking into that one as well.

Posted: Mon Jan 09, 2006 4:00 am
by stranf
I thought I'd bring up this past post on healing issues.

On our games lately we've noticed that healing always increases the hide skill. I'm not sure which script to look to fix this.

Thanks. I'm using:

5.0.1h client
Uox3 = all in one package with individual components installed as of 1/5/05 (not sure what version)

Posted: Mon Jan 09, 2006 6:50 am
by Xuri
That would be because skillNum = 21; in uox3/js/skill/healing.js should be skillNum = 17. Find and fix that (line number 35 or so), and you'll use and gain healing skill instead of hiding skill. :P *fixes for next version*

Posted: Sat Jan 28, 2006 6:39 pm
by giwo
I'm looking at the tempeffect handling for healing currently, and everything seems to be as it should.

There is a distance check and an LoS check immediately before healing/resurrecting/curing another player.

I will test this to make sure it is the case, but for the moment, it seems like it should be working.

Posted: Sat Jan 28, 2006 6:50 pm
by giwo
As a side note, on looking into things a bit more, I have found a line-of-sight function for JS. it is CBase_CanSee() which supports 1 or 3 parameters. IE

socket.CanSee( mChar );

or


mChar.CanSee( x, y, z );

Posted: Sat Jan 28, 2006 6:58 pm
by Xuri
Yeah Maarc added that function recently, but we're having issues with it, so it doesn't currently work as it should.

Posted: Sat Jan 28, 2006 7:02 pm
by giwo
Ahh, ok, so I wasn't just blind previously.... what sort of problems?

Posted: Sat Jan 28, 2006 7:10 pm
by Xuri
Well, problems such as the LoS-check returning true even though there's a wall (static or dynamic, doesn't seem to matter) between you and the other object.

Easy way of checking, is applying the following to any item, then placing it at different locations before trying to use it.

Code: Select all

function onUse( pUser, iUsed )
{
	if( pUser.CanSee( iUsed ) )
		pUser.TextMessage( "I can see the item!" );
	else
		pUser.TextMessage( "I can't see the item!" );
	return false;
}
It does seem to work correctly between floors though, in those cases it seems to return false :P

Posted: Sat Jan 28, 2006 7:12 pm
by giwo
Ahh, ok, so LoS itself has a problem....

I could have predicted that, it hasn't really been touched in years. :)

Posted: Sat Jan 28, 2006 7:17 pm
by giwo
Notably if some walls are being missed by the LoS function, it is likely happening here.

if( ( ( itemids[toCheck] >= 6 ) && ( itemids[toCheck] <= 748 ) ) || ( ( itemids[toCheck] >= 761 ) && ( itemids[toCheck] <= 881 ) ) ||
( ( itemids[toCheck] >= 895 ) && ( itemids[toCheck] <= 1006 ) ) || ( ( itemids[toCheck] >= 1057 ) && ( itemids[toCheck] <= 1061 ) ) ||
( itemids[toCheck] == 1072 ) || ( itemids[toCheck] == 1073 ) || ( ( itemids[toCheck] >= 1080 ) && ( itemids[toCheck] <= 1166 ) ) ||
( ( itemids[toCheck] >= 2347 ) && ( itemids[toCheck] <= 2412 ) ) || ( ( itemids[toCheck] >= 16114 ) && ( itemids[toCheck] <= 16134 ) ) ||
( ( itemids[toCheck] >= 8538 ) && ( itemids[toCheck] <= 8553 ) ) || ( ( itemids[toCheck] >= 9535 ) && ( itemids[toCheck] <= 9555 ) ) ||
( itemids[toCheck] == 12583 ) ||
( ( itemids[toCheck] >= 1801 ) && ( itemids[toCheck] <= 2000 ) ) ) //stairs

Quite the chunk of nasty code, ehh? :)

Anyway, it could be worthwhile to check the ID's and see if they are in that range next time you notice one getting missed.

Posted: Sat Jan 28, 2006 7:20 pm
by Xuri
Well, the wall in question has hex id 0x0133, and since the code checks for decimals, that'd be number 307, which falls under the very first check as above 6 and below 748.

And just to be certain, just tested with non-JS los-check, and as a normal player I could open a container on the other side of a static wall, so yeah, it's not the js-function that's the problem =)

Posted: Tue Feb 21, 2006 5:17 am
by giwo
I have updated healing.js to be handled entirely in the JavaScript, no longer relying on DoTempEffect(). This should (hopefully) fix any remaining issues with the skill.