PenUltima Online

It is currently Thu Aug 28, 2008 6:32 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Question about repsys hooklist
PostPosted: Thu Sep 21, 2006 3:33 am 
Offline

Joined: Tue Feb 07, 2006 10:36 am
Posts: 52
Location: Rome, Italy
The new hooks (OnAttack,OnHelp) are useful, but they could be very very useful if we can prevent that a player become gray by double click or a target harmful/helpful (by returning different values).

Can you add in the next core?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 21, 2006 6:35 am 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 397
Location: San Diego, California
This functionality already exists with these hooks...
Look at the 097 distro for an example. It uses the highlight color hook.

http://svn.sourceforge.net/viewvc/pol-d ... es/repSys/

You would control it when OnHelp, OnAttack or OnDamage get triggered, then when the client pulls up the HighLightColor you would read the info set by one of those.. the above link shows a fully scripted reputation system that matches how the core's works.

_________________
-Austin


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 21, 2006 7:29 am 
Offline

Joined: Tue Feb 07, 2006 10:36 am
Posts: 52
Location: Rome, Italy
Austin wrote:
This functionality already exists with these hooks...
Look at the 097 distro for an example. It uses the highlight color hook.

http://svn.sourceforge.net/viewvc/pol-d ... es/repSys/

You would control it when OnHelp, OnAttack or OnDamage get triggered, then when the client pulls up the HighLightColor you would read the info set by one of those.. the above link shows a fully scripted reputation system that matches how the core's works.


ok the example was helpful, because i didn't read on changelog that onattack and onhelp hooks will check on a return value.

thx for the info :)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 22, 2006 4:50 pm 
Offline
POL Core Developer

Joined: Mon Jan 30, 2006 9:28 am
Posts: 292
Location: Germany, Bavaria
Austin wrote:
http://svn.sourceforge.net/viewvc/pol-distro/releases/097/Distro/pkg/mobiles/repSys/


Code:
exported function NameColor(mobile, seen_by)
   var color := 0;

   if ( mobile.master )
      return NameColor(mobile.master, seen_by);

...if someone creates a chain of master and slaves it could become critical ;oP

I'm sure, there are Shards having this problem in future

Shinigami, loving Pizza


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 23, 2006 10:27 am 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 397
Location: San Diego, California
The hook example script matches (mostly) how it worked in the core..
So if someone chained them, it woulda become critical in the old way and new way.

I noticed that when I worked on the hook and was like "Welp, if someone DOES do it, he will learn pretty quick not-to."

_________________
-Austin


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 23, 2006 11:29 am 
Offline

Joined: Sat Feb 04, 2006 5:49 pm
Posts: 744
Location: Chicago, IL USA
well I knew from spellcasting to avoid using a hook... I had to set most of it critical just to stop lag before the casting actually began. My spellcasting script does about 1000 instructions/cast too so it should have been quick but it apparently wasnt.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 23, 2006 11:39 am 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 397
Location: San Diego, California
and if two npcs were set so they were each other's masters, you got a freeze :-P

_________________
-Austin


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl