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. |
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. |
Quote:
[ 01-25-2003, 04:15 AM: Message edited by: Chewbacca ] |
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 |
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 |
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 |
The lock script doesnt seem to be locking it again
|
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. |
Quote:
|
Aha! I found this at the NW Lexicon:
http://www.reapers.org/nwn/reference/ Quote:
|
All times are GMT -4. The time now is 04:44 PM. |
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