[Pol 097 2006 10 29 RC Coregina] repsys bug

Report core bugs regarding the Ultima Online Emulator Core release (version 097). You can attach your Core Dump. One bug per post.

Moderator: POL Developer

Locked
VeNdOr
Apprentice Poster
Posts: 52
Joined: Tue Feb 07, 2006 10:36 am
Location: Rome, Italy

[Pol 097 2006 10 29 RC Coregina] repsys bug

Post by VeNdOr »

In OnAttack hook ( i dont' know if it happens even in the other hooks), if i use attacker.setcriminal(1), after running that istruction, the hook function terminates itself without running the rest of code. Moreover it happens something as the hook returned 0, and the pol uses his reputation system code for hook.
I make an example:

Code: Select all

exported function OnAttack(attacker, defender)
	if ( attacker.serial == defender.serial )
		// Safe to attack.. yourself?
		return 1;
	elseif ( defender.master )
		// Check for the npc's master.
		return OnAttack(attacker, defender.master);
	elseif ( IsInnocentTo(defender, attacker) )
		// Reset the criminal timer for the attacker.
		attacker.SetCriminal(1);
	endif
PrintTextAbovePrivate( defender, "*"+attacker.name+" is attacking you!*" , defender);
endfunction
if attacker.SetCriminal is called the printtextabove is red as pol default repsys...
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

Tested and confirmed. I'll look into it soon.
VeNdOr
Apprentice Poster
Posts: 52
Joined: Tue Feb 07, 2006 10:36 am
Location: Rome, Italy

Post by VeNdOr »

Austin wrote:Tested and confirmed. I'll look into it soon.
what about this bug?

i haven't seen it fixed in the last release.
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

Its a very big project to fix it right now.. and I just haven't had the motivation to do-so.

There are pain-in-the-ass work-arounds anyway by storing criminal and murderer timers in cprops rather than relying on overlapping (there-in is the problem) core threads.
VeNdOr
Apprentice Poster
Posts: 52
Joined: Tue Feb 07, 2006 10:36 am
Location: Rome, Italy

Post by VeNdOr »

Austin wrote:Its a very big project to fix it right now.. and I just haven't had the motivation to do-so.
drink a Red Bull, Red Bull Gives You Wings :D
mr bubbles
Grandmaster Poster
Posts: 120
Joined: Thu Jan 18, 2007 2:34 am

Post by mr bubbles »

Is it currently safe (bug free) to use the highlight/namecolour repsys hooks?
mr bubbles
Grandmaster Poster
Posts: 120
Joined: Thu Jan 18, 2007 2:34 am

Post by mr bubbles »

Is it?
mr bubbles
Grandmaster Poster
Posts: 120
Joined: Thu Jan 18, 2007 2:34 am

Post by mr bubbles »

Three in a row :P Anyone know the answer?
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

Well it is safe as in it won't cause a crash, it never did.
What is not safe is that if you use the SetCriminal(x>0) or SetMurderer(x>0) methods in the hook, it causes it to stop at that point and the core finishes it.

You have to work around that limitation.
mr bubbles
Grandmaster Poster
Posts: 120
Joined: Thu Jan 18, 2007 2:34 am

Post by mr bubbles »

Ah thanks a lot for that Austin, cleared it up :smile:
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

Post by ncrsn »

Sorry if this is totally wrong thread, just didn't see this post worth of its own just yet...

Have you thought of moving the whole reputation system out from the core? I mean, doing system that does not rely on syshooks (and definitely not on packethooks). Lots of work I bet, but it might solve the (coming) issues once and for all AND make it more versatile for shard spesific customizations.

You don't have to be a core developer to be able to modify (, debug and fix!) a scripted system. I'd like to know if there is something critical relying on the reputation system that makes the whole idea impossible? Or just too hard to do.
Locked