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
Question about repsys hooklist

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

Author Message
VeNdOr



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

PostPosted: Thu Sep 21, 2006 7:33 am    Post subject: Question about repsys hooklist Reply with quote

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?

Author Message
Austin
POL Developer


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

PostPosted: Thu Sep 21, 2006 10:35 am    Post subject: Reply with quote

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-distro/releases/097/Distro/pkg/mobiles/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.

Author Message
VeNdOr



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

PostPosted: Thu Sep 21, 2006 11:29 am    Post subject: Reply with quote

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-distro/releases/097/Distro/pkg/mobiles/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 Smile

Author Message
Shinigami
POL Core Developer


Joined: 30 Jan 2006
Posts: 292
Location: Germany, Bavaria

PostPosted: Fri Sep 22, 2006 8:50 pm    Post subject: Reply with quote

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

Author Message
Austin
POL Developer


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

PostPosted: Sat Sep 23, 2006 2:27 pm    Post subject: Reply with quote

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

Author Message
CWO



Joined: 04 Feb 2006
Posts: 684
Location: Chicago, IL USA

PostPosted: Sat Sep 23, 2006 3:29 pm    Post subject: Reply with quote

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.

Author Message
Austin
POL Developer


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

PostPosted: Sat Sep 23, 2006 3:39 pm    Post subject: Reply with quote

and if two npcs were set so they were each other's masters, you got a freeze Razz

Post new topic   Reply to topic    PenUltima Online Forum Index -> Development Discussion 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