Question about repsys hooklist

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 097.
Note: Core 097 is no longer officially supported.
Post Reply
VeNdOr
Apprentice Poster
Posts: 52
Joined: Tue Feb 07, 2006 10:36 am

Question about repsys hooklist

Post by VeNdOr »

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?
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

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.
VeNdOr
Apprentice Poster
Posts: 52
Joined: Tue Feb 07, 2006 10:36 am

Post by VeNdOr »

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 :)
Shinigami
Former Developer
Posts: 308
Joined: Mon Jan 30, 2006 9:28 am

Post by Shinigami »

Code: Select all

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
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

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."
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post by CWO »

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.
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

and if two npcs were set so they were each other's masters, you got a freeze :-P
Post Reply