View previous topic :: View next topic |
Author |
Message |
scarface
Joined: 12 Jun 2005 Posts: 94 Location: Sweden
|
Posted: Sun Apr 12, 2009 12:18 Post subject: ACTION_MODE_COUNTERSPELL isn't hooked |
|
|
ACTION_MODE_COUNTERSPELL isn't hooked.
We caught a player using counterspell to execute an exploit that casts a spell multiple times in one shot, in this case it was hellball.
Heres a snippet of what we use:
Code: | case EVENT_TOGGLE_MODE:
oPC = OBJECT_SELF;
nSubID = GetEventSubType(); //ACTION_MODE_*
switch (nSubID)
{
case ACTION_MODE_STEALTH:
{
if (GetHasFeat(FEAT_HIDE_IN_PLAIN_SIGHT, oPC))
{
if (GetStealthMode(oPC) == STEALTH_MODE_DISABLED)
SF_CheckCoolDown(oPC, 12, HIPS_VAR, sCurrentTime);
}
else
{
if (GetStealthMode(oPC) == STEALTH_MODE_DISABLED)
SF_CheckCoolDown(oPC, 6, STEALTH_VAR, sCurrentTime);
}
break;
}
case ACTION_MODE_COUNTERSPELL:
{
SendMessageToPC(oPC, "This action has been disabled due to known exploit.");
BypassEvent ( );
break;
}
}
break;
} |
Stealth is hooked just fine, countrspell isn't.
We use the latest SVN build of the events plugin. |
|
Back to top |
|
|
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Sun Apr 12, 2009 13:36 Post subject: |
|
|
Obviously there is some issue in bypassing counter spell toggle mode.
I've hooked AddCounterSpellActions, bypass works fine with it.
Also you can get CounterSpell Target creature if you need.
New event type = 13
Please test it well before use, i'm really noob in this stuff and just copied and modified other events functions for new hook
Updated: http://www.nwnx.org/phpBB2/viewtopic.php?p=10742#10742
Last edited by axs on Mon Apr 13, 2009 0:01; edited 1 time in total |
|
Back to top |
|
|
Nob
Joined: 16 Apr 2005 Posts: 21
|
Posted: Sun Apr 12, 2009 21:18 Post subject: |
|
|
Is this on a mode activated event or when the actual counterspelling fires?
And if the only the former, any chance we can get the latter?
Either way though, great work. |
|
Back to top |
|
|
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Sun Apr 12, 2009 23:30 Post subject: |
|
|
Added LearnScroll event (with bypassing)
GetEventTarget will return scroll object.
To get SpellId you need to lookup ips.
Actualy trying to get InviteToParty event not segfaulting. Little problem with args types.
Nob wrote: | Is this on a mode activated event or when the actual counterspelling fires?
And if the only the former, any chance we can get the latter?
Either way though, great work. | No, it's almost exactly as ToggleMode.
Hm, I think there is little chance to do that but this may be little more complex
maybe i'll get into it later.
Last edited by axs on Mon Apr 13, 2009 0:48; edited 1 time in total |
|
Back to top |
|
|
scarface
Joined: 12 Jun 2005 Posts: 94 Location: Sweden
|
Posted: Mon Apr 13, 2009 0:19 Post subject: |
|
|
axs wrote: | Added LearnScroll event (with bypassing)
GetEventTarget will return scroll object.
To get SpellId you need to lookup ips.
http://www.sendspace.com/file/g1gf0h
Actualy trying to get InviteToParty event not segfaulting. Little problem with args types.
Nob wrote: | Is this on a mode activated event or when the actual counterspelling fires?
And if the only the former, any chance we can get the latter?
Either way though, great work. | No, it's almost exactly as ToggleMode.
Hm, I think there is little chance to do that but this may be little more complex
maybe i'll get into it later. |
Set like/dislike event, and invite party event would be my dream come true, can you do it? |
|
Back to top |
|
|
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Mon Apr 13, 2009 0:47 Post subject: |
|
|
I'll try
Actualy Invite to Party (with bypass of course) is alive
Last edited by axs on Thu Jul 30, 2009 10:53; edited 1 time in total |
|
Back to top |
|
|
scarface
Joined: 12 Jun 2005 Posts: 94 Location: Sweden
|
Posted: Mon Apr 13, 2009 0:52 Post subject: |
|
|
Sweet, that's good, I hope you can with like/dislike because theres 2 exploits I know of with those functions, that's why I want it for my server, to block it. |
|
Back to top |
|
|
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Mon Apr 13, 2009 0:54 Post subject: |
|
|
scarface wrote: |
Sweet, that's good, I hope you can with like/dislike because theres 2 exploits I know of with those functions, that's why I want it for my server, to block it. | Ouch, can you send me little details about it? |
|
Back to top |
|
|
scarface
Joined: 12 Jun 2005 Posts: 94 Location: Sweden
|
Posted: Mon Apr 13, 2009 1:13 Post subject: |
|
|
axs wrote: | scarface wrote: |
Sweet, that's good, I hope you can with like/dislike because theres 2 exploits I know of with those functions, that's why I want it for my server, to block it. | Ouch, can you send me little details about it? |
I sent you pm about them. |
|
Back to top |
|
|
Asparius
Joined: 18 Sep 2007 Posts: 52
|
Posted: Mon Apr 13, 2009 9:57 Post subject: |
|
|
Aside from discussion about hooking ToggleMode with counterspell (that should be useful for other reasons - for instance lich NPC uses item when player counterspell him) - personally I think it would be more player-friendly to fix this exploit instead of removing counterspell mode (there are people that are using it for ... counterspelling ).
I dont know exactly how this exploit works - but if all "packed" spells are casted in one second, then spellhook should be able to detect it (previous spell casted 0.2 seconds ago, not with item (to exclude sequencers) - and either disable casting for 2-3 seconds(soft way) or auto-ban exploiting player(hardcore )). |
|
Back to top |
|
|
scarface
Joined: 12 Jun 2005 Posts: 94 Location: Sweden
|
Posted: Mon Apr 13, 2009 17:18 Post subject: |
|
|
Ok this is where we're at:
Party invite block works great, but you've screwed up toggle mode completely, now my stealth timers are not being bypassed, but SF_CheckCoolDown() is being called which means the event fires, it's just not working with BypassEvent(), and it definantly was working fine yesterday and for the last 6+ months we've been using it, until I updated the plug with the version you posted, so something you've done has broken it.
The stealth timer is 100% necessary on my server, as Hide in Plain Sight is one of the most exploited functions in NWN, I hope you can fix this, otherwise I have to go back to the old plugin and foget about party invite bypass.
Toggle pause mode doesn't work either, I didn't even get a message so I expect the event didn't even fire:
Code: | case EVENT_TYPE_TOGGLE_PAUSE:
{
SendMessageToPC(oPC, "Pause is disabled!");
BypassEvent();
} |
|
|
Back to top |
|
|
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Mon Apr 13, 2009 18:15 Post subject: |
|
|
Are you sure? For me is everything fine.
Maybe it's gcc version issue. I've added * for asm jmp and call to get rid of warnings.
btw, TOGGLE_PAUSE is called on module object, not PC, so you can't send message.
Last edited by axs on Thu Jul 30, 2009 10:53; edited 1 time in total |
|
Back to top |
|
|
scarface
Joined: 12 Jun 2005 Posts: 94 Location: Sweden
|
Posted: Mon Apr 13, 2009 18:40 Post subject: |
|
|
Quote: | btw, TOGGLE_PAUSE is called on module object, not PC, so you can't send message. |
I was still able to pause the game with the above code.
axs wrote: | Are you sure? For me is everything fine.
Maybe it's gcc version issue. I've added * for asm jmp and call to get rid of warnings.
btw, TOGGLE_PAUSE is called on module object, not PC, so you can't send message.
Try to compile with this sources:
http://www.sendspace.com/file/hfwo2p |
Still doesn't work. |
|
Back to top |
|
|
axs
Joined: 11 Feb 2005 Posts: 76
|
Posted: Mon Apr 13, 2009 21:20 Post subject: |
|
|
Hm... no idea... Works fine on my two machines...
But maybe you compiling not cleaned sources? Have you try `make clean` first ? |
|
Back to top |
|
|
scarface
Joined: 12 Jun 2005 Posts: 94 Location: Sweden
|
Posted: Mon Apr 13, 2009 21:55 Post subject: |
|
|
axs wrote: | Hm... no idea... Works fine on my two machines...
But maybe you compiling not cleaned sources? Have you try `make clean` first ? |
Sorry bud it was an error on my part, so all is well with everything, except for player pause, it won't doesn't appear to work.
And any update on player like/dislike hook? |
|
Back to top |
|
|
|
|
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 vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|