Visit the Ironworks Gaming Website Email the Webmaster Graphics Library Rules and Regulations Help Support Ironworks Forum with a Donation to Keep us Online - We rely totally on Donations from members Donation goal Meter

Ironworks Gaming Radio

Ironworks Gaming Forum

Go Back   Ironworks Gaming Forum > Ironworks Gaming Forums > Neverwinter Nights 1 & 2 Also SoU & HotU Forum

Reply
 
Thread Tools Search this Thread
Old 01-24-2003, 04:15 PM   #1
Obsidian the Black
Elminster
 

Join Date: May 8, 2002
Location: Leeds, West Yorkshire
Posts: 470
Ok, a few script questions. Could anyone tell me the EXACT (if possible) things to write down to make a script that when you open a locked door it closes and locks itself again, after about 12 seconds.

How could I add a 'stone of recall' kind of script to an Emote, DM wand, and FX wand script for the on used tab?

Could you give me the script that triggers something when you walk over an area so it strips all immune items, resistance items?

Thanks for the help.
Obsidian the Black is offline   Reply With Quote
Old 01-24-2003, 04:34 PM   #2
Obsidian the Black
Elminster
 

Join Date: May 8, 2002
Location: Leeds, West Yorkshire
Posts: 470
Question Mark

Heh, one more. How could I make it that if a PC casts a spell or activates a magically charged item, that some people would appear and give them a good telling off. Then if they do it a second time, the people would appear and take them to jail. And solution is fine, even if you can only make a script that works when they only cast a spell, not use an item. Also, if they hold an item on their person it cancels out the jail and stuff for them.

You see im making an Athkatla mod (nothing to do with BG2), and i want the cowled wizards to appear when spells are cast by PC's too many times, appart from when they hold an item on themselves.
Obsidian the Black is offline   Reply With Quote
Old 01-25-2003, 04:14 AM   #3
Chewbacca
Zartan
 

Join Date: July 18, 2001
Location: America, On The Beautiful Earth
Age: 50
Posts: 5,373
Quote:
void main()
{
DelayCommand(12.0, ActionCloseDoor(OBJECT_SELF));
DelayCommand(12.5, ActionLockObject(OBJECT_SELF));
}
Paste this script in a door's OnOpen script slot and it will close and lock itself 12.5 seconds after being opened.

[ 01-25-2003, 04:15 AM: Message edited by: Chewbacca ]
__________________
Support Local Music and Record Stores!
Got Liberty?
Chewbacca is offline   Reply With Quote
Old 01-25-2003, 04:17 AM   #4
philip
Galvatron
 

Join Date: June 24, 2002
Location: aa
Posts: 2,101
first, i don't have the toolset on this computer so i can only give some general answers to some of your questions.

about the spell casting i think this would do something like it:

object oPC = GetLastSpellCaster();
object oCowledWizardWarning = GetObjectByTag("include tag here");
object oCowledWizardJail = GetObjectByTag("tag");
int nSpellsCast = GetLocalInt(OBJECT_SELF, "SPELLSCAST");
int nTimesWarned = GetLocalInt(OBJECT_SELF, "TIMESWARNED");
object WPJail = GetObjectByTag("the waypoint in your jail");

void main()
{
if (GetIsPC(oPC))
{
SetLocalLocation(oPC, (GetLocation(oPC)));

CreateObjectAtLocation(oCowledWizardWarning, (GetLocalLocation(oPC)));

ActionSpeakString("You're warned once") // or a dialogue start

SetLocalInt(oPC, "nTimesWarned", 1);

DeleteLocalLocation(); //not sure if you have to give a name for this
}

if ((GetIsPC(oPC))&&(nTimesWarned == 1))
{
SetLocalLocation(oPC, (GetLocalLocation(oPC));

CreateObjectAtLocation(oCowledWizardJail, (GetLocalLocation(oPC));

ActionSpeakString("you go to jail now");

ActionJumpToObject("WPJail); // maybe you have to give the creature which
//jumps to that location

DeleteLocalLocation();

SetLocalInt(OBJECT_SELF, "nTimesWarned", 0); // so the pc can start casting
//again and still be arrested

}
}

Maybe i made some errors so it could be not working but if you use the commands in the list you can see what things you have to add inside the '(' and ')'
this is for the spells cast, i don't know how to do it for magic items since i don't know if there's an option which looks which items are magical and which items it'll select as magic then

for the stone of recall wand you have to put lines in the onactivatedscript in the module properties with what to do when the unique power self is used. stone of recall uses more than 1 script (to make the script less large or for ease of use). the scripts are triggered with an ExecuteScript() command

i think you have to paint a trigger region and then add a script which strips the items. I thinkit'll be quite hard to strip only the resistance items
philip is offline   Reply With Quote
Old 01-25-2003, 08:36 AM   #5
philip
Galvatron
 

Join Date: June 24, 2002
Location: aa
Posts: 2,101
BTW you can leave the ActionSpeakString out of the script above since using 2 different cowled wizards is much easier with 2 dialogues. it could be there must be a ActionMoveTo command in the cowled wizard script becasue i don't know if it's possible to start the dialogue if the PC walks away.

you could use this script in the OnHeartbeat of the PC (in module properties) but it's very laggy
philip is offline   Reply With Quote
Old 01-25-2003, 10:02 AM   #6
Obsidian the Black
Elminster
 

Join Date: May 8, 2002
Location: Leeds, West Yorkshire
Posts: 470
Thankye ever so much guys. Just a few questions. That lock door script, when it locks will it set it up so it needs a key to open it again? Because the door will be key locked.

And the spell script, I will give you the tags for each of the things, so could you just put them where they would be needed. Cowled Wizard=cowledwizard
Magic Permit=magicpermit Waypoint for Jail=WP_jail and it is every spell cast, so how would I make it that every spell cast triggers it? And do I have to place the script in the OnHeartbeat in module properties? Thanks
Obsidian the Black is offline   Reply With Quote
Old 01-25-2003, 11:05 AM   #7
Obsidian the Black
Elminster
 

Join Date: May 8, 2002
Location: Leeds, West Yorkshire
Posts: 470
The lock script doesnt seem to be locking it again
Obsidian the Black is offline   Reply With Quote
Old 01-25-2003, 11:53 AM   #8
Dreamer128
Dracolisk
 

Join Date: March 21, 2001
Location: Europe
Age: 39
Posts: 6,136
I'm currently using this script for re-locking doors;

void main()
{
DelayCommand (3.0,ActionCloseDoor(OBJECT_SELF) );
DelayCommand (3.0,SetLocked(OBJECT_SELF, TRUE);

}

Be sure to place is in the OnOpen slot of the door.
Dreamer128 is offline   Reply With Quote
Old 01-25-2003, 02:24 PM   #9
Chewbacca
Zartan
 

Join Date: July 18, 2001
Location: America, On The Beautiful Earth
Age: 50
Posts: 5,373
Quote:
Originally posted by Obsidian the Black:
The lock script doesnt seem to be locking it again
Hmmm odd, I wonder if it has anything to do with the fact that I used this script on doors that were not locked to begin with and only lock and reclose after being opened. I will do some testing and get back to you.
__________________
Support Local Music and Record Stores!
Got Liberty?
Chewbacca is offline   Reply With Quote
Old 01-25-2003, 02:44 PM   #10
Chewbacca
Zartan
 

Join Date: July 18, 2001
Location: America, On The Beautiful Earth
Age: 50
Posts: 5,373
Aha! I found this at the NW Lexicon:

http://www.reapers.org/nwn/reference/
Quote:
ActionLockObject(object)
An action that will cause a creature to lock a door or other unlocked object.

void ActionLockObject(object oTarget);

Parameters
oTarget Door or placeable object that will be the target of the lock attempt.

Description
The action subject will lock oTarget, which can be a door or a placeable object.

Used in the script of a creature (or assigned to a creature) it will move that creature to the door and use its Open Locks skill to attempt to lock the door (or placeable).

Known Bugs
This action must be given to a creature. A crash will occur if you make a door lock itself by assigning this action to it. Use SetLocked() instead.

Ensure that the door has the 're-lockable' property set.


Version
1.22

See Also
functions: ActionCloseDoor | ActionOpenDoor | ActionUnlockObject | SetLocked
categories: Action on Object Functions
So it appears that Dreamer128 has the better script for closing and locking doors.
__________________
Support Local Music and Record Stores!
Got Liberty?
Chewbacca is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Scripts!!! Sukodin Baldurs Gate II: Shadows of Amn & Throne of Bhaal 3 10-13-2003 01:14 PM
A.I Scripts? GideonRaine Baldurs Gate II Archives 1 11-22-2000 09:42 PM
scripts Dark Baldurs Gate II Archives 0 10-25-2000 11:20 PM
Scripts? Dark Baldurs Gate II Archives 0 10-24-2000 01:30 AM
Scripts... Ablecken Icewind Dale | Heart of Winter | Icewind Dale II Forum 0 09-12-2000 02:54 AM


All times are GMT -4. The time now is 05:06 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved