PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
[Pol 097 2006 10 29 RC Coregina] repsys bug

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Bug Reports 097
Display posts from previous:   

Author Message
VeNdOr



Joined: 07 Feb 2006
Posts: 52
Location: Rome, Italy

PostPosted: Wed Nov 08, 2006 8:30 am    Post subject: [Pol 097 2006 10 29 RC Coregina] repsys bug Reply with quote

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:

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...

Author Message
Austin
POL Developer


Joined: 30 Jan 2006
Posts: 354
Location: San Diego, California

PostPosted: Thu Nov 09, 2006 1:18 am    Post subject: Reply with quote

Tested and confirmed. I'll look into it soon.

Author Message
VeNdOr



Joined: 07 Feb 2006
Posts: 52
Location: Rome, Italy

PostPosted: Thu Jan 18, 2007 12:27 pm    Post subject: Reply with quote

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.

Author Message
Austin
POL Developer


Joined: 30 Jan 2006
Posts: 354
Location: San Diego, California

PostPosted: Thu Jan 18, 2007 1:21 pm    Post subject: Reply with quote

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.

Author Message
VeNdOr



Joined: 07 Feb 2006
Posts: 52
Location: Rome, Italy

PostPosted: Fri Jan 19, 2007 3:00 pm    Post subject: Reply with quote

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 Very Happy

Author Message
mr bubbles



Joined: 18 Jan 2007
Posts: 91

PostPosted: Thu May 10, 2007 11:11 pm    Post subject: Reply with quote

Is it currently safe (bug free) to use the highlight/namecolour repsys hooks?

Author Message
mr bubbles



Joined: 18 Jan 2007
Posts: 91

PostPosted: Thu May 24, 2007 4:06 am    Post subject: Reply with quote

Is it?

Author Message
mr bubbles



Joined: 18 Jan 2007
Posts: 91

PostPosted: Fri Jun 01, 2007 8:19 pm    Post subject: Reply with quote

Three in a row Razz Anyone know the answer?

Author Message
Austin
POL Developer


Joined: 30 Jan 2006
Posts: 354
Location: San Diego, California

PostPosted: Mon Jun 04, 2007 9:04 am    Post subject: Reply with quote

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.

Author Message
mr bubbles



Joined: 18 Jan 2007
Posts: 91

PostPosted: Mon Jun 04, 2007 6:31 pm    Post subject: Reply with quote

Ah thanks a lot for that Austin, cleared it up Smile

Author Message
ncrsn



Joined: 10 Feb 2006
Posts: 173

PostPosted: Mon May 19, 2008 3:10 pm    Post subject: Reply with quote

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.

Post new topic   Reply to topic    PenUltima Online Forum Index -> Bug Reports 097 All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty