logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Plugin & Script Request: OnAttack
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules
View previous topic :: View next topic  
Author Message
scarface



Joined: 12 Jun 2005
Posts: 94
Location: Sweden

PostPosted: Sun Mar 11, 2007 11:00    Post subject: Reply with quote

Hmmm, I can't get it to work, is there a missing plugin? I can't see any .dll files, and what are these .so files and where do I put them? I tried putting them into my installation dir but I still can't get it working.

Slightly off-topic a second, virusman, is it possible to hook DM used controls like heal, or give gold xp from both the command console and/or radial menu?
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sun Mar 11, 2007 12:40    Post subject: Reply with quote

scarface wrote:
Hmmm, I can't get it to work, is there a missing plugin? I can't see any .dll files, and what are these .so files and where do I put them? I tried putting them into my installation dir but I still can't get it working.
You've downloaded the Linux version. Smile
scarface wrote:
Slightly off-topic a second, virusman, is it possible to hook DM used controls like heal, or give gold xp from both the command console and/or radial menu?
Yep.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
scarface



Joined: 12 Jun 2005
Posts: 94
Location: Sweden

PostPosted: Sun Mar 11, 2007 13:00    Post subject: Reply with quote

virusman wrote:
scarface wrote:
Hmmm, I can't get it to work, is there a missing plugin? I can't see any .dll files, and what are these .so files and where do I put them? I tried putting them into my installation dir but I still can't get it working.
You've downloaded the Linux version. Smile
scarface wrote:
Slightly off-topic a second, virusman, is it possible to hook DM used controls like heal, or give gold xp from both the command console and/or radial menu?
Yep.


Meh, you cheated, you re-uploaded the correct version as the windows version now :p

And, any chance of adding those hooks for us, would be great to suss out bad DMs and i've had my fair share of em lately. Also, does this attack event fire when a Pc is spell cast at? Because that would be needed for sure.

Edit:

I can't get the attack to hook, this is the log file:
Code:
NWNX Events 1.0-beta for Windows
(c) 2006-2007 by virusman (virusman@virusman.ru)
! SaveChar hooked at 435be0.
! ActPickPocket hooked at 493be0.
X Could not find ActAttack function or hook failed: 0
! RunProc located at 5bdd90.
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sun Mar 11, 2007 13:26    Post subject: Reply with quote

scarface wrote:
Meh, you cheated, you re-uploaded the correct version as the windows version now :p
Don't justify yourself. Smile
scarface wrote:
I can't get the attack to hook, this is the log file:
Code:
NWNX Events 1.0-beta for Windows
(c) 2006-2007 by virusman (virusman@virusman.ru)
! SaveChar hooked at 435be0.
! ActPickPocket hooked at 493be0.
X Could not find ActAttack function or hook failed: 0
! RunProc located at 5bdd90.
Hmm.. maybe the function changed a bit in 1.68.. I'll fix it.

scarface wrote:
Also, does this attack event fire when a Pc is spell cast at? Because that would be needed for sure.
No, just physical attack (including special attacks). Use spellhook script for spells.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
scarface



Joined: 12 Jun 2005
Posts: 94
Location: Sweden

PostPosted: Sun Mar 11, 2007 13:35    Post subject: Reply with quote

virusman wrote:
scarface wrote:
Meh, you cheated, you re-uploaded the correct version as the windows version now :p
Don't justify yourself. Smile
scarface wrote:
I can't get the attack to hook, this is the log file:
Code:
NWNX Events 1.0-beta for Windows
(c) 2006-2007 by virusman (virusman@virusman.ru)
! SaveChar hooked at 435be0.
! ActPickPocket hooked at 493be0.
X Could not find ActAttack function or hook failed: 0
! RunProc located at 5bdd90.
Hmm.. maybe the function changed a bit in 1.68.. I'll fix it.

scarface wrote:
Also, does this attack event fire when a Pc is spell cast at? Because that would be needed for sure.
No, just physical attack (including special attacks). Use spellhook script for spells.


Good idea, cheers.
Back to top
View user's profile Send private message
Toad



Joined: 16 Mar 2007
Posts: 2

PostPosted: Fri Mar 16, 2007 8:50    Post subject: Re: Plugin & Script Request: OnAttack Reply with quote

milliorn wrote:
2. Be able to determine who initated a PvP event, such as who attacked first, when, an who where they attacking.


The default.nss can be used to determine that.
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Tue Mar 20, 2007 12:10    Post subject: Reply with quote

Fixed 1.68 compatibility issue
http://data.virusman.ru/nwn/nwnx_events-1.0beta-win32.rar
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
scarface



Joined: 12 Jun 2005
Posts: 94
Location: Sweden

PostPosted: Wed Mar 21, 2007 20:58    Post subject: Re: Plugin & Script Request: OnAttack Reply with quote

Toad wrote:
milliorn wrote:
2. Be able to determine who initated a PvP event, such as who attacked first, when, an who where they attacking.


The default.nss can be used to determine that.


No it can't, the default.nss fires only for the PC heartbeat event, otherwise we wouldn't have bothered asking for these event hooks.
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Thu Mar 22, 2007 1:51    Post subject: Re: Plugin & Script Request: OnAttack Reply with quote

scarface wrote:
Toad wrote:
milliorn wrote:
2. Be able to determine who initated a PvP event, such as who attacked first, when, an who where they attacking.


The default.nss can be used to determine that.


No it can't, the default.nss fires only for the PC heartbeat event, otherwise we wouldn't have bothered asking for these event hooks.
Heartbeat, OnDeath and OnConversation, to be specific. (But there is no way to know which event has fired)
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Toad



Joined: 16 Mar 2007
Posts: 2

PostPosted: Thu Mar 22, 2007 5:55    Post subject: Reply with quote

Sure, it works like a heartbeat, so yeah it wouldn't be spot-on, but enough to determine who was attacked and/or damaged, and by whom.

Don’t mean any harm, just thought I'd bring it up. Smile

void main()
{
object oAttacker = GetLastAttacker();
object oDamager = GetLastDamager();

if (GetIsObjectValid(oAttacker) && GetAttackTarget(oAttacker)== OBJECT_SELF)
{
SendMessageToPC(OBJECT_SELF,"You were attacked by "+GetName(oAttacker)+"" );
}

if (oAttacker == oDamager && GetAttackTarget(oAttacker)== OBJECT_SELF)
{
if(GetTotalDamageDealt() > 0)
{
SendMessageToPC(OBJECT_SELF,"You were damaged by "+GetName(oDamager)+"" );
}
}
Back to top
View user's profile Send private message
scarface



Joined: 12 Jun 2005
Posts: 94
Location: Sweden

PostPosted: Fri Mar 23, 2007 8:39    Post subject: Reply with quote

Toad wrote:
Sure, it works like a heartbeat, so yeah it wouldn't be spot-on, but enough to determine who was attacked and/or damaged, and by whom.

Don’t mean any harm, just thought I'd bring it up. Smile

void main()
{
object oAttacker = GetLastAttacker();
object oDamager = GetLastDamager();

if (GetIsObjectValid(oAttacker) && GetAttackTarget(oAttacker)== OBJECT_SELF)
{
SendMessageToPC(OBJECT_SELF,"You were attacked by "+GetName(oAttacker)+"" );
}

if (oAttacker == oDamager && GetAttackTarget(oAttacker)== OBJECT_SELF)
{
if(GetTotalDamageDealt() > 0)
{
SendMessageToPC(OBJECT_SELF,"You were damaged by "+GetName(oDamager)+"" );
}
}


How is that going to determine the first attacker from a heartbeat event? The heartbeat even fires every 6 seconds, by that time, both Pcs will be attacking each other how would you know who was first?, just because one does more damage, it doesn't mean he was the first attacker, not to mention, because a PC is being attacked when his default script fires, it also doesn't mean he was the first attacker, so no it wouldn't be spot on, in fact it would be way off and wouldn;t work 95% of the time, your code is moot and pretty much worthless for what we are trying to do. Virusman has been good enough to hook the events for us, and now it works great, cheers virusman.

Oh and btw virusman, the default script only fires for heartbeat on PCs mate, it fires for all events on a cloned PC, but not a real PC.


Last edited by scarface on Fri Mar 23, 2007 8:46; edited 3 times in total
Back to top
View user's profile Send private message
milliorn



Joined: 03 Jun 2006
Posts: 29

PostPosted: Fri Mar 23, 2007 8:43    Post subject: Reply with quote

very simple, trying to get who initated pvp action. there is no event to do so. so what we need is something to signal it when it does happen. plugin will allow this. if it was so simple, it would have been done already(onattack) for pc's many years ago. there are workarounds, but nothing that proves exactly who was first in initiating a pvp action Very Happy
Back to top
View user's profile Send private message
Gryphyn



Joined: 20 Jan 2005
Posts: 431

PostPosted: Fri Mar 23, 2007 23:10    Post subject: Reply with quote

milliorn wrote:
very simple, trying to get who initated pvp action. there is no event to do so. so what we need is something to signal it when it does happen. plugin will allow this. if it was so simple, it would have been done already(onattack) for pc's many years ago. there are workarounds, but nothing that proves exactly who was first in initiating a pvp action Very Happy


Twisted Evil And if it was a verbal that started it?

Your best bet is to record BOTH parties, and any nearby witnesses (PC's)
and hold 'court'. You'll soon see who the griefers are...

Cheers
Gryphyn
Back to top
View user's profile Send private message
milliorn



Joined: 03 Jun 2006
Posts: 29

PostPosted: Sat Mar 24, 2007 8:03    Post subject: Reply with quote

Gryphyn wrote:
milliorn wrote:
very simple, trying to get who initated pvp action. there is no event to do so. so what we need is something to signal it when it does happen. plugin will allow this. if it was so simple, it would have been done already(onattack) for pc's many years ago. there are workarounds, but nothing that proves exactly who was first in initiating a pvp action Very Happy


Twisted Evil And if it was a verbal that started it?

Your best bet is to record BOTH parties, and any nearby witnesses (PC's)
and hold 'court'. You'll soon see who the griefers are...

Cheers
Gryphyn


take this as sarcasm but funny heh
Back to top
View user's profile Send private message
Gryphyn



Joined: 20 Jan 2005
Posts: 431

PostPosted: Sun Mar 25, 2007 0:51    Post subject: Reply with quote

milliorn wrote:
take this as sarcasm but funny heh

Yep, but just pointing out that it's a lot of effort for something that will still only produce circumstantial evidence, at best.
If you want the Police-State to this extent turn PvP off, and only allow PvP in a special 'arena'. - It's a flag on an AREA, as well as the MOD, and they can be different.

Cheers
Gryphyn
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules All times are GMT + 2 Hours
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 4 of 6

 
Jump to:  
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