It is currently Wed Oct 15, 2008 11:13 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Pushthrough System Hook
PostPosted: Thu Aug 30, 2007 12:51 am 
Offline

Joined: Thu Aug 30, 2007 12:43 am
Posts: 4
Morning.

I've recently developed a script that I have hooked to the system, for Pushthrough. I'm using the 097 core, and t all seems to be working fine, with one exception: the system is still checking for the character's full stamina (as in the default pushthrough) before executing my pushthrough script. Which is the same as saying, only when the character is at full stamina does my script get run.

I thought (maybe incorrectly) that if I returned 1 on the script's main program the script would entirely handle pushthrough. Is there a way to do this?

The main program is:

Code:
program pushthroughhook()
   // 0: deactivate hook
   // 1: activate hook
   return 1;
endprogram


The syshook.cfg on :pushthrough:, the package that I've created to handle this hook, is:

Code:
SystemHookScript pushhook.ecl
{
    Pushthrough Pushthrough
}


The exported function Pushthrough is long, but it returns 1 when I want to allow the person to push through the obstacle, and 0 when I don't want to allow them.

Any thoughts to make my script override the default requirement for full stamina to push through?

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 30, 2007 1:03 am 
Offline

Joined: Sat Feb 04, 2006 6:26 pm
Posts: 561
Pushthrough was the reason I moved my shard to britannia_alt. There, the pushthrough hook works.

If I recall correctly:

If the server prevents pushthrough, you get a rubberband effect and you bounce back to the original posiition because the server denies the movement and the client responds by going back.

If the client prevents pushthough then you don't even get to move. I see this in the britannia realm where I don't even get to pushthrough a sheep blocking my way to a door unless my stamina is at 100%

If there was any way possible around this client limitation I would love to know it too. I had thought vaguely of temporarily boosting my stamina but that negated the point of being overweight and losing stamina.

I'd love to be on britannia because of the warning against doing a criminal act,


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 30, 2007 3:38 am 
Offline

Joined: Thu Aug 30, 2007 12:43 am
Posts: 4
OldnGrey wrote:
Pushthrough was the reason I moved my shard to britannia_alt. There, the pushthrough hook works.

If I recall correctly:

If the server prevents pushthrough, you get a rubberband effect and you bounce back to the original posiition because the server denies the movement and the client responds by going back.

If the client prevents pushthough then you don't even get to move. I see this in the britannia realm where I don't even get to pushthrough a sheep blocking my way to a door unless my stamina is at 100%


Exactly! That's something I noticed too, I just didn't know the reason for it. Thanks for clearing it up!

The realm my POL is built on is Britannia, and we use an entirely custom map. I'm kind of a n00b in that particular aspect of POL and UO, but... is there anywhere I can read, or can you tell me, what the implications are of rebuilding my realm for britannia_alt instead of keeping it built on britannia?

Thank you!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 30, 2007 4:20 am 
Offline

Joined: Sat Feb 04, 2006 6:26 pm
Posts: 561
Rebuilding on britannia_alt is pretty simple in concept and I have done it several times with total success.

1. Edit UO.EM. (yes do it, you haven't become evil editing this file!)
Find the line that says
const _DEFAULT_REALM := "britannia";
and change it to
const _DEFAULT_REALM := "britannia_alt";

That way all your realm default stuff will occur in Trammel.
Mind you, every time you update the core with new UO.EM remember what you did here!


2. Generate the britannia_alt realm. You need to always have britannia realm running on the server, so this is in addition. This works with custom maps just fine.

3. Edit all your scripts where they specify the realm directly. If it is _DEFAULT_REALM it will be ok, but if it says "britannia" then you need to change it to "britannia_alt". Depends how you did your 096/7 scripts - this could take 1 second or an hour.

4. Take the shard offline.
Use an editor capable of finding and replacing text in multiple files, (eg Ultraedit), and the do a global replace on the DATA directory.

replace britannia with britannia_alt
replace britannia_alt_alt with britannia_alt

5. Recompile all your scripts. You are working off a backup set aren't you?

Restart and logon. Your pushthrough hook will work but players will get no warning if they are about to commit a criminal act even if their client ticks the warning box in options gump.

Just the same, I'd rather someone had a nice way to force Trammel rules on Felucca in the client!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 30, 2007 5:18 am 
Offline

Joined: Thu Aug 30, 2007 12:43 am
Posts: 4
Thank you SO much, I'm going to try it on as soon as I get rid of all the work I have to do today. The "no warning for criminal actions" thing is the only consequence of moving to britannia_alt? If so, I think we can perfectly live with it. Cheers! :grin:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 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