Neverwinter Vault

Expand AllContract All -Site -My Profile -Features

Neverwinter Nights 2

-NWN2 Files -NWN2 Game Info -NWN2 Resources -NWN2 Community

Neverwinter Nights

-NWN Files -NWN Game Info -NWN Resources -NWN Community

Vault Network
RPG Vault
VN Boards
IGN Vault
Vault Wiki
· Age of Conan
· Anarchy Online
· Asheron's Call
· Dark Age of Camelot
· City of Heroes
· D&D
· EVE Online
· EverQuest
· EverQuest 2
· Final Fantasy
· Guild Wars
· Lineage 2
· Lord of the Rings Online
· Middle Earth
· Neverwinter Nights
· Pirates of the Burning Sea
· Rise of the Argonauts
· Star Wars Galaxies
· Tabula Rasa
· The Matrix Online
· The Witcher
· Titan Quest
· Two Worlds
· Vanguard
· Warhammer
· World of Warcraft

Planet Network
Planet Hub

IGN
Games
Cheats
Entertainment

The Web   The Site  



NWN SCRIPTS

- Jump to comments -
Title  Weapon Check Guard
Author  David Corrales
Submitted / Updated  08-20-2002 / 11-22-2006
Category  Creature Related
Expansions  Works on all versions
Format  Code Only
Type  Type - Other
Includes  BioWare Standard
Description
Guard will warn player with weapon in hand to put it away. After a few warnings the guard will attack the offending player.

Files

NameTypeSizeDownloads
wpnchkguardv1.zipwpnchkguardv1.zip
Submitted: 08-20-2002 / Last Updated: 08-20-2002
zip15.48Kb2898
--
SCORE OUT OF 10
9.38
2 votes
View Stats
Cast Your Vote!

PORTFOLIO
Add this entry to your portfolio so you can track it
Manage your existing portfolios or create a new one.
SCREENS





You Must Be Logged In to Participate.
Comments (25):

Posted by scepter2012 at 2008-01-09 11:10:08    Voted 9.75 on 01/09/08
Great script, but can you get it to work for NWN2?

Posted by Old_Scores_Transfered at 2004-02-20 10:29:14    Voted 9.00 on 02/20/04
This is a compilation of the old system into a single score. There were 10 that made this score of 8.79 then rounded to 9.

Posted by MookSTOMPER ( ..xxx.xxx ) at 2004-01-31 14:02:00    
This script is GREAT!!!

Very straightforward, plug it into your onHeartbeat and you're good to go!

AWESOME!!!

Posted by David C. ( ..xxx.xxx ) at 2003-09-03 09:30:00    
Hello guys, sorry I haven't been keeping up with the boards. The Guards are only angry was long as time you set in the ANGER_DUR. If you want more functionality from the guards I advise you check my anti-theft script which deals with opening locks, bashing, and pickpocketing.

BTW make sure you recompile all your scripts when you edit the constants, so they can take effect.

I shouldn't be hard to add the extra code to search for stolen items.

Posted by NineFires ( ..xxx.xxx ) at 2003-08-13 00:50:00    
Could this be set up to also detect for objects in the PC's inventory? Like stolen objects?

Posted by n00b ( ..xxx.xxx ) at 2003-08-01 05:45:00    
Sweet!

Posted by Sickman ( ..xxx.xxx ) at 2003-07-04 19:27:00    
If this does like it says, it's JUST what I have been needing for my mp module. Thanks man.

Posted by cyberglum ( ..xxx.xxx ) at 2003-06-12 05:57:00    
cheers for the response eric. I'd tried that one already, reduced it to 60.00.

I'll play test it a little more, but it didn't seem to eliminate the problem. As far as I can tell the duration doen't really matter once the hostility has been activated.Any one of the same faction continues to be hostile.

I like the idea of a fine 'though. Was going to impliment it so that if you're killed by a City Guard you actually re-spawn in the city jail (they didn't really kill you, just knocked you out and put you in the clink). To get out you'd have to play a fine.

Just have to work out how you script it now... :)

Posted by eric ( ..xxx.xxx ) at 2003-06-09 23:26:00    
cyberglum, i think you can edit the 120.00 on this line, to a shorter duration.

" float ANGER_DUR = 120.0; //Length of time (sec) that will remain angry at the pc "

is there any way to script it so that instead of attacking the PC, the guard starts up a conversation, like in the "rusty constabulary" script/module? i'm a newbie scripter and am looking to give the player the option to pay a fine, go to jail, or try to escape...

Posted by cyberglum ( ..xxx.xxx ) at 2003-06-06 05:42:00    
Great work david, very useful script for my Crosswater city Mod.

One question...

Lets say the PC has made a guard hostile by not putting away their weapon. If the PC leaves the current area and trans. into another one any Guards there still activate as Hostile towards the PC. Should the script at some point clear the Hostility towards the PC? If not, once the PC has P***ed-of the City Guard once they'll always attack him from that point onwards, even after PC death and re-spawn, which seems a little unfortunate.

I know this scripting lark is a head ache, but ironing out this would make the script perfect!

cyberglum - Watch for Crosswater soon!

Unless I'm missing something with the script

Posted by David ( ..xxx.xxx ) at 2003-05-06 08:52:00    
Well no it doesn't work for the henchmen, but it can be easily done. The only problem is in normal NWN you can't tell your henchmen to disarm. You use the GetHenchman function and follow the same steps as if it were for the pc. Or you can change the GetNearestCreature and use different parameters for other npcs.

Posted by zCyberSaint ( ..xxx.xxx ) at 2003-04-16 13:26:00    
OK OK OK I got it to work now .. only question is is it supposed to work also for NPCs? I mean the guards will ask me to put my weapon away and yet they will tottaly ignore my henchmen who have their weapons drawn? Anyway to make the guards tell everyone including other NPCs??

I mean some does actually read these postings :)

Posted by zCyberSaint ( ..xxx.xxx ) at 2003-04-15 19:24:00    
Hi,

Sounds like a grrrreat script but ... where does it go exactly? I have imported it into my module and wondering where it would go script wise? hearbeat?

I am new to NWN and any help is greatly appreciated!

Posted by Tony ( ..xxx.xxx ) at 2003-04-03 06:02:00    
Great Job ! Based on your script, do you know how to not allow PC having their summon animals/liche & co out... I'v Tried to modify a bit your script but without success.

Thanks

Posted by Dissident ( ..xxx.xxx ) at 2003-03-14 21:19:00    
Works great with the NwnSpawn System. I have it on guards
everywhere, along with speak random one-line text. Gives
guards a new feel of realism, great for promoteing RP in my
PW. Thanks for the great script!

Posted by David Corrales ( ..xxx.xxx ) at 2002-10-16 13:24:00    
Sorry, apparently I used a special charater.
Use the name WP_GUARD1, where you replace GUARD1 with the
name of your guard.

Posted by David Corrales ( ..xxx.xxx ) at 2002-10-16 13:22:00    
Hello CyMist

When a good way to check if the waypoint is linked to the
guard is to select the guard and see if a line is drawn to
the Waypoint. You can also try making a waypoint, then
right click on it and then select Create Set. Enter
WP_ for the name (ignore the ). It then should link to the your guard.

Posted by CyMiSt ( ..xxx.xxx ) at 2002-10-08 09:11:00    
Excellent work.. one thing bugs the life out of me.. first
off im no coder/scripter myself, so this is inno way a
flame of any sort :)

i looked trough the comments stated here by all you folks
here, and it does say how to get the guard to RETURN to his
post.. alas.. my guard wont budge an inch after he comes
running over to punish my players for the insolent whelps
that they are.. hehe

i tried the, Quote: " As for the POST problem. I got
around it by placing a
single waypoint to act as a post for the guard. I set the
guard's tag to "GUARD1" and made a waypoint with a tag
of "WP_GUARD1". After the guard ran to me and I put away
my sword, he proceeded to walked back to his waypoint. "
UnQuote. Alas it wont work.. Am i missing something or am i
just stoopid..(dont answer that.. move along *G*)

any help you guys can give me is welcome..

Posted by David Corrales ( ..xxx.xxx ) at 2002-08-29 10:32:00    
Be sure to check out my Anti-Theft Script which allows the
guards and commoners to detect theft.

Posted by David Corrales ( ..xxx.xxx ) at 2002-08-29 10:29:00    
There is a few ways you can add more messages.

First way is the make a copy of the script(with different
name) and change the messages. This way you can have
different messages for different guards.

The other way is to add random messages as Chris
suggested. You can do this by adding something like this:

int rand = random(3);
if(rand ==0)
SpeakString("message1");
else if(rand==1)
SpeakString("message2");
else
SpeakString("message3");

As for the POST problem. I got around it by placing a
single waypoint to act as a post for the guard. I set the
guard's tag to "GUARD1" and made a waypoint with a tag
of "WP_GUARD1". After the guard ran to me and I put away
my sword, he proceeded to walked back to his waypoint.

Posted by Christopher ( ..xxx.xxx ) at 2002-08-28 10:33:00    
This script is really great! Script needs rev. for
guards to fall back to their POST waypoint after persuit of
character. They give the three warnings and if the PC
sheaths their weapon the guard stops and just stands their
doing nothing.
Another idea would be to have a couple possible
random, but identical lines so that all the guards in the
area are not singing in a chorus.
Sadly, I am but a user. No scripting talents here. But
I will use this script hence forth!

Thanks!

Posted by The Dungeon Master ( ..xxx.xxx ) at 2002-08-27 20:09:00    
Please hurry. I think Im being followed!

Good Script!.

The Dungeon Master

Posted by David Corrales ( ..xxx.xxx ) at 2002-08-22 17:23:00    
Glad you guys like it. Right now adding more to the script
to protect against theft.

Posted by batgnome ( ..xxx.xxx ) at 2002-08-21 07:32:00    
This is great, I was looking for something like this for my
constable

Posted by BloodKnight ( ..xxx.xxx ) at 2002-08-21 05:20:00    
I like this script, going to use it in my future projects
since it wouldn't be 100% useful in a dungeon crawl.

You must be Logged In to post comments in this section.

 
Most recent posts on the MMO General Boards
Analyst: Star Wars: The Old Republic Could...Analyst: Star Wars: The Old Republic Could Sell 3M: more numbers
- last reply by Acao on Aug 15, 2011 06:15 PM
which class will your first character be
- last reply by Blisteringballs on Aug 15, 2011 05:50 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 05:00 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 04:00 PM
NWN Idea Database Update
- posted by Vault_News on Aug 15, 2011 03:46 PM
Missing Votes for NWN2 Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:40 PM
Missing Votes for NWN Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:39 PM
Random Questions and game altering suggest...Random Questions and game altering suggestions!!!
- last reply by ArkadyTepes on Aug 15, 2011 03:22 PM
State of the game?
- last reply by LyricOpera on Aug 15, 2011 01:37 PM
Yesterday streaming, now demanding downloa...Yesterday streaming, now demanding download :(
- last reply by Sinane-tk on Aug 15, 2011 10:23 AM
 

   


IGN Entertainment
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the User Agreement.
Copyright 1996-2011, IGN Entertainment, Inc. | Support | Privacy Policy | User Agreement | RSS Feeds
IGN’s enterprise databases running Oracle, SQL and MySQL are professionally monitored and managed by Pythian Remote DBA.


NWN2 Hall of Fame

HOF NWN2 Tutorials


View all Hall of Fame entries


Neverwinter Nights 2

TOP NWN2 Modules

NEW Modules

NEW Reviews

NEW INTL. Modules

TOP Hakpaks

TOP Gameworlds

TOP Tutorials

TOP Prefab:Areas

TOP Blueprints

TOP Plugins

TOP UI

TOP Other

TOP Visual Effects

TOP Scripts

TOP Tools

TOP Movies

TOP Models

TOP Characters





Hall of Fame

HOF NWN Modules


View all Hall of Fame entries


TOP NWN Modules

NEW NWN Modules

NEW Reviews

TOP Intl. Modules

TOP NWN Hakpaks

TOP NWN Gameworlds

TOP NWN Models

TOP NWN Portraits

TOP NWN Scripts

TOP NWN Prefabs

TOP NWN Other

TOP NWN Movies

TOP Sounds

TOP NWN Textures

TOP NWN Creatures

TOP NWN Characters