01-24-2003, 04:15 PM | #1 |
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. |
01-24-2003, 04:34 PM | #2 |
Elminster
Join Date: May 8, 2002
Location: Leeds, West Yorkshire
Posts: 470
|
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. |
01-25-2003, 04:14 AM | #3 | |
Zartan
Join Date: July 18, 2001
Location: America, On The Beautiful Earth
Age: 50
Posts: 5,373
|
Quote:
[ 01-25-2003, 04:15 AM: Message edited by: Chewbacca ]
__________________
Support Local Music and Record Stores! Got Liberty? |
|
01-25-2003, 04:17 AM | #4 |
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 |
01-25-2003, 08:36 AM | #5 |
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 |
01-25-2003, 10:02 AM | #6 |
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 |
01-25-2003, 11:05 AM | #7 |
Elminster
Join Date: May 8, 2002
Location: Leeds, West Yorkshire
Posts: 470
|
The lock script doesnt seem to be locking it again
|
01-25-2003, 11:53 AM | #8 |
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. |
01-25-2003, 02:24 PM | #9 | |
Zartan
Join Date: July 18, 2001
Location: America, On The Beautiful Earth
Age: 50
Posts: 5,373
|
Quote:
__________________
Support Local Music and Record Stores! Got Liberty? |
|
01-25-2003, 02:44 PM | #10 | |
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:
__________________
Support Local Music and Record Stores! Got Liberty? |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
|
|
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 |