View previous topic :: View next topic |
Author |
Message |
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Mon Apr 13, 2009 22:22 Post subject: |
|
|
Huh, np Blocking pause by dms works for me. For players? don't know.
Hook for "setlikesme" is included in these sources, so you can catch changes, but
i've removed bypass, that simple may require hooking different function or more complex work, maybe beyond my abilities.
-----------------
EVENT_TYPE_PVP_LIKESME
SubEvent stands for 1 - likes | 0 - dislikes |
|
Back to top |
|
|
scarface
Joined: 12 Jun 2005 Posts: 94 Location: Sweden
|
Posted: Mon Apr 13, 2009 22:28 Post subject: |
|
|
axs wrote: | Huh, np Blocking pause by dms works for me. For players? don't know.
Hook for "setlikesme" is included in these sources, so you can catch changes, but
i've removed bypass, that simple may require hooking different function or more complex work, maybe beyond my abilities.
-----------------
EVENT_TYPE_PVP_LIKESME
SubEvent stands for 1 - likes | 0 - dislikes |
Cool, I need bypass working for that event though :p See what you can do, it's quite important for me this event.
About pausing bypass, it doesn't work, this is the code I'm using for invite and pausing:
Code: | case EVENT_TYPE_TOGGLE_PAUSE:
{
SendMessageToAllDMs("Pause is disabled!");
BypassEvent();
break;
}
case EVENT_TYPE_PARTY_INVITE:
{
if (GetIsInCombat(oTarget))
{
SendMessageToPC(oPC, "You cannot invite a player who is in active combat!");
BypassEvent();
}
break;
} |
Invite is blocked, but pause isn't, as you can see the code is fine, I don't get any DM messages, and the game will still pause, so the event is not firing, I've tested and retsted this, it's definantly no error on my part this time. |
|
Back to top |
|
|
kucik
Joined: 11 Feb 2009 Posts: 19 Location: Czech Republic
|
Posted: Tue Jun 16, 2009 21:32 Post subject: |
|
|
I'm looking for some controll, what players can and what cannot put into items with container (magic bags etc.).
So, Is there any possibility to fire event, when player put some item into bag?
Of course I can write a heartbeat script, that checks items in bag, but it will spent a lot of cpu time for many players with many containers.
Do You think it's possible? |
|
Back to top |
|
|
Cafall
Joined: 15 Jul 2009 Posts: 1 Location: Tried to get a job,
|
Posted: Wed Jul 15, 2009 3:23 Post subject: |
|
|
Hey. Does anyone know if ToggleMode has ever been fixed to include when a player drops out of a mode automatically (ex. dropping stealth when attacked) rather than just when a player pushes a button?
I've got some systems in the works, and not being able to control what happens when a PC gets attacked will leave a pretty major exploit open. It'd be nice to know if I can fix it, or work around it. |
|
Back to top |
|
|
ExileStrife
Joined: 14 Mar 2008 Posts: 21
|
Posted: Thu Jul 30, 2009 5:18 Post subject: |
|
|
hey axs, your party override link is dead. |
|
Back to top |
|
|
axs
Joined: 11 Feb 2005 Posts: 76
|
|
Back to top |
|
|
ExileStrife
Joined: 14 Mar 2008 Posts: 21
|
Posted: Fri Jul 31, 2009 5:17 Post subject: |
|
|
Code: |
$ make
g++ -I../ -c -o HookFunc.o HookFunc.cpp
HookFunc.cpp: In function 'int HookFunctions()':
HookFunc.cpp:892: error: 'org_SrvToPC_PlayerListAdd' was not declared in this scope
HookFunc.cpp:892: error: 'SrvToPC_PlayerListAddHookProc' was not declared in this scope
HookFunc.cpp:893: error: 'org_SrvToPC_PlayerListDel' was not declared in this scope
HookFunc.cpp:893: error: 'SrvToPC_PlayerListDelHookProc' was not declared in this scope
HookFunc.cpp:894: error: 'org_SrvToPC_PlayerListAll' was not declared in this scope
HookFunc.cpp:894: error: 'SrvToPC_PlayerListAllHookProc' was not declared in this scope
make: *** [HookFunc.o] Error 1 |
Having some troubles compiling this. Seeing what I can do for now....
---
Uugh, commented those out, but now I have a bunch of other compile errors...just looks like something is messed up with my nwnxbase stuff. Also, looking at the party invite part, it appears as though you've got a lot commented out in there. Kinda looks like it's not going to work. Is this really a working version?
Reference: Code: | void PartyHookProc(void *pFaction, dword nTargetObjID, dword nSenderObjID) {
/*
if (!scriptRun)
{
events.oTarget = nTargetObjID;
if(nSenderObjID) {
bBypass_b = events.FireEvent(nSenderObjID, EVENT_TYPE_PARTY_INVITE);
}
}
*/
asm ("leave");
//if(bBypass_b)
//{
asm("mov $0, %eax");
asm("ret");
//}
asm ("mov $d_ret_code_pi, %eax");
asm ("jmp *%eax");
} |
---
Well, maybe I spoke to soon. This seems to work, though we're having problems giving a feedback message when the event is bypassed. That might just be an error in our implementation...
Anyway, awesome work! I hope this gets into the trunk soon. There's a lot of other events in there that are worth it. |
|
Back to top |
|
|
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Fri Jul 31, 2009 9:04 Post subject: |
|
|
Ouch, sorry, I forgot to clean out my local sources.
Please redownload, should work now. |
|
Back to top |
|
|
ExileStrife
Joined: 14 Mar 2008 Posts: 21
|
Posted: Sat Aug 01, 2009 2:58 Post subject: |
|
|
Sweet! This looks like it'll work. You have a printf() in the spell section that will spam up somebody's console, but the party stuff looks good! |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Tue Aug 25, 2009 10:56 Post subject: Anyone? |
|
|
Is anyone able to create a windows binary of this, which has even at least the pause bypass?
Would love to get admin only pausing, and dm no pausing. |
|
Back to top |
|
|
scarface
Joined: 12 Jun 2005 Posts: 94 Location: Sweden
|
Posted: Fri Aug 28, 2009 15:53 Post subject: Re: Anyone? |
|
|
Baaleos wrote: | Is anyone able to create a windows binary of this, which has even at least the pause bypass?
Would love to get admin only pausing, and dm no pausing. |
The pause bypass doesn't even work on the Linux version so it's unlikely that someone would have a windows port. |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Fri Aug 28, 2009 16:39 Post subject: |
|
|
When did it break?
Im a windows user, so not in the know about what works or does not work on linux. |
|
Back to top |
|
|
scarface
Joined: 12 Jun 2005 Posts: 94 Location: Sweden
|
Posted: Sat Aug 29, 2009 23:17 Post subject: |
|
|
Baaleos wrote: | When did it break?
Im a windows user, so not in the know about what works or does not work on linux. |
It's never worked for me ever as I mentioned in an earlier post. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Wed May 05, 2010 18:46 Post subject: |
|
|
Coming soon in NWNX Events: ValidateCharacter (ELC) hook. _________________ In Soviet Russia, NWN plays you! |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
|
Back to top |
|
|
|