Builders: Script Requests
-
- Wiki Editor
- Posts: 208
- Joined: Thu Feb 17, 2005 7:06 pm
- Contact:
Builders: Script Requests
If you have a script request just leave it down here and I will post it back with the proper script.
Guild Master of <LoD>
-
- Wiki Editor
- Posts: 208
- Joined: Thu Feb 17, 2005 7:06 pm
- Contact:
Q) How do I close a door automatically after it has been opened?
A) Closing a door automatically is quite simple. However there is one thing to keep in mind. Closing doors can become very annoying to the players, I suggest only closing doors that are Area Transitions or lead into a large area. Also you will want to make the delay before it closes reasonable. This way PCs aren’t constantly opening the same door so they can fight a creature that is on the other side.
Put this script in the doors OnOpen script handle. Change the number 15.0f to whatever. This is the delay in seconds before the door closes. OBJECT_SELF represents the object that the script is attached to. In this case, the door.
NWScript:
/////////////////////////////////////////////////////////
// Auto-Close Door
/////////////////////////////////////////////////////////
void main()
{
DelayCommand(15.0f,ActionCloseDoor(OBJECT_SELF));
}
// End
Q) How do I make my doors Close and lock?
A) This can be done with the script above with just on added line of code. Keep in mind that the door can’t lock until after it is closed, so the Lock command must be delayed as well.
Put this script in the doors OnOpen script handle. Change the number 15.0f to whatever. This is the delay in seconds before the door closes. The Word TRUE will lock the door. FALSE will Unlock the door. OBJECT_SELF represents the object that the script is attached to. In this case, the door.
NWScript:
/////////////////////////////////////////////////////////
// Auto-Close Door / Lock Door
/////////////////////////////////////////////////////////
void main()
{
DelayCommand(15.0f,ActionCloseDoor(OBJECT_SELF));
DelayCommand(15.5f,SetLocked(OBJECT_SELF,TRUE));
}
// End
Q) How do I make my NPC Open / Close a Door?
A) If this is done through a Conversation then is just a matter of applying the script in the “Actions Taken” script handle.
NOTE: Remove the nw_walk_wp script from the End Conversation Normally script handle in the convo node. More on this later.
Place this script in the Actions Taken handle on the text node that you want the NPC to open / close a door. Replace the Word "DOOR_TAG" with the actual TAG of the door you want him to open, include the quotes "". The SetLocked function is included in case the door is locked. Your NPC will walk to the door and Open it. The script to close the Door is very similar, however we must reverse the order of the SetLocked and Action.
NWScript:
/////////////////////////////////////////////////////////////
// NPC Open Door
/////////////////////////////////////////////////////////////
void main()
{
object oDoor = GetObjectByTag("DOOR_TAG");
SetLocked(oDoor,FALSE);
ActionOpenDoor(oDoor);
}
NWScript:
/////////////////////////////////////////////////////////////
// NPC Close Door
/////////////////////////////////////////////////////////////
void main()
{
object oDoor = GetObjectByTag("DOOR_TAG");
ActionCloseDoor(oDoor);
SetLocked(oDoor,TRUE);
}
A) Closing a door automatically is quite simple. However there is one thing to keep in mind. Closing doors can become very annoying to the players, I suggest only closing doors that are Area Transitions or lead into a large area. Also you will want to make the delay before it closes reasonable. This way PCs aren’t constantly opening the same door so they can fight a creature that is on the other side.
Put this script in the doors OnOpen script handle. Change the number 15.0f to whatever. This is the delay in seconds before the door closes. OBJECT_SELF represents the object that the script is attached to. In this case, the door.
NWScript:
/////////////////////////////////////////////////////////
// Auto-Close Door
/////////////////////////////////////////////////////////
void main()
{
DelayCommand(15.0f,ActionCloseDoor(OBJECT_SELF));
}
// End
Q) How do I make my doors Close and lock?
A) This can be done with the script above with just on added line of code. Keep in mind that the door can’t lock until after it is closed, so the Lock command must be delayed as well.
Put this script in the doors OnOpen script handle. Change the number 15.0f to whatever. This is the delay in seconds before the door closes. The Word TRUE will lock the door. FALSE will Unlock the door. OBJECT_SELF represents the object that the script is attached to. In this case, the door.
NWScript:
/////////////////////////////////////////////////////////
// Auto-Close Door / Lock Door
/////////////////////////////////////////////////////////
void main()
{
DelayCommand(15.0f,ActionCloseDoor(OBJECT_SELF));
DelayCommand(15.5f,SetLocked(OBJECT_SELF,TRUE));
}
// End
Q) How do I make my NPC Open / Close a Door?
A) If this is done through a Conversation then is just a matter of applying the script in the “Actions Taken” script handle.
NOTE: Remove the nw_walk_wp script from the End Conversation Normally script handle in the convo node. More on this later.
Place this script in the Actions Taken handle on the text node that you want the NPC to open / close a door. Replace the Word "DOOR_TAG" with the actual TAG of the door you want him to open, include the quotes "". The SetLocked function is included in case the door is locked. Your NPC will walk to the door and Open it. The script to close the Door is very similar, however we must reverse the order of the SetLocked and Action.
NWScript:
/////////////////////////////////////////////////////////////
// NPC Open Door
/////////////////////////////////////////////////////////////
void main()
{
object oDoor = GetObjectByTag("DOOR_TAG");
SetLocked(oDoor,FALSE);
ActionOpenDoor(oDoor);
}
NWScript:
/////////////////////////////////////////////////////////////
// NPC Close Door
/////////////////////////////////////////////////////////////
void main()
{
object oDoor = GetObjectByTag("DOOR_TAG");
ActionCloseDoor(oDoor);
SetLocked(oDoor,TRUE);
}
Guild Master of <LoD>
-
- Noob
- Posts: 1
- Joined: Fri Dec 16, 2005 1:17 pm
-
- Arrogant Snob
- Posts: 4239
- Joined: Thu Jan 02, 2003 7:25 pm
Lukkas wrote:I noticed in Neversummer, the +12 mod cap on stats is disabled. I was wondering how that's done.
It's quite simple: It isn't.
"Some people might say love merely has a learning disorder, but no. Love is just stupid. After all, millions of angst-ridden teen poems can't possibly be wrong." -- R.K.Milholland
All Hail the Mighty Pettsson!
"So cheap and juicy!"
All Hail the Mighty Pettsson!
"So cheap and juicy!"
So, what is this thread for. Is this where you requests scripts and you may return with the script for us to look at?
If so, I have made another post in another part of the thread requesting to look at the script that you have on the Paladin Ammy that only paladins can have. Could you please post the script for that item?
If so, I have made another post in another part of the thread requesting to look at the script that you have on the Paladin Ammy that only paladins can have. Could you please post the script for that item?
"You there, fetch me that jewel from that gem encrusted skull," - Robillard to his half-ogre henchman
"Duh, okay," - last words of Grogg, Son of Grogg, as he reached for the Demi-Liches skull.
"Duh, okay," - last words of Grogg, Son of Grogg, as he reached for the Demi-Liches skull.
-
- Wiki Editor
- Posts: 208
- Joined: Thu Feb 17, 2005 7:06 pm
- Contact:
Rocco wrote:So, what is this thread for. Is this where you requests scripts and you may return with the script for us to look at?
If so, I have made another post in another part of the thread requesting to look at the script that you have on the Paladin Ammy that only paladins can have. Could you please post the script for that item?
So it seems your request is to make an Item only Paladins could use?
Guild Master of <LoD>
Moonstone Mischief wrote:Rocco wrote:So, what is this thread for. Is this where you requests scripts and you may return with the script for us to look at?
If so, I have made another post in another part of the thread requesting to look at the script that you have on the Paladin Ammy that only paladins can have. Could you please post the script for that item?
So it seems your request is to make an Item only Paladins could use?
No, there is already an item in the NS module that only paladins can use. It is in the temple where you respawn after death. It is an ammy that the paladin in the temple gives you if you are a paladin. I would like to look at that script if you have access to it.
Hmm, can I make requests for other scripts here. Non NS scripts?
"You there, fetch me that jewel from that gem encrusted skull," - Robillard to his half-ogre henchman
"Duh, okay," - last words of Grogg, Son of Grogg, as he reached for the Demi-Liches skull.
"Duh, okay," - last words of Grogg, Son of Grogg, as he reached for the Demi-Liches skull.
-
- Wiki Editor
- Posts: 208
- Joined: Thu Feb 17, 2005 7:06 pm
- Contact:
-
- Looking for group
- Posts: 144
- Joined: Tue Sep 30, 2003 6:52 pm
- Contact:
ok i got 1 ive seen elsewherebut still cannot replicate... i would like a scp that would make a class ability recharge after a certain amount of time...
for example.
Lets say i want hail of arrows to recharge automatcally once every 2 minutes without need for rest....
pull this off and biggstown might appreciate a bit more regular help...
Midnight
for example.
Lets say i want hail of arrows to recharge automatcally once every 2 minutes without need for rest....
pull this off and biggstown might appreciate a bit more regular help...
Midnight
-
- Wiki Editor
- Posts: 208
- Joined: Thu Feb 17, 2005 7:06 pm
- Contact:
void IncrementRemainingFeatUses(
object oCreature,
int nFeat
);
This feat increases a players/creatures feat by 1 but can not go up any higher then 1.
For Example:
void IncrecmentRemainingFeatUses(
object oCreature,
int FEAT_DEATHLESS_MASTER_TOUCH
You can use this on the Pale Master Death Touch and give the player 2 of them instead of a single use.
If you want a list of the feats that you could do then I will give them on next message.
Your Welcome, If it doesn't work for the Player instead it works for the creature then replace the oCreature with oPC.
Try it and see if it works.
object oCreature,
int nFeat
);
This feat increases a players/creatures feat by 1 but can not go up any higher then 1.
For Example:
void IncrecmentRemainingFeatUses(
object oCreature,
int FEAT_DEATHLESS_MASTER_TOUCH
You can use this on the Pale Master Death Touch and give the player 2 of them instead of a single use.
If you want a list of the feats that you could do then I will give them on next message.
Your Welcome, If it doesn't work for the Player instead it works for the creature then replace the oCreature with oPC.
Try it and see if it works.
Guild Master of <LoD>
-
- Wiki Editor
- Posts: 208
- Joined: Thu Feb 17, 2005 7:06 pm
- Contact:
/Goes OnPlayerDeath of the module properties
void main()
{
object oPC = GetLastPlayerDied();
if (!GetIsPC(oPC)) return;
object oTarget;
oTarget = oPC;
effect eEffect;
eEffect = EffectDeath();
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
}
New scripts will be generated on request for builders!
void main()
{
object oPC = GetLastPlayerDied();
if (!GetIsPC(oPC)) return;
object oTarget;
oTarget = oPC;
effect eEffect;
eEffect = EffectDeath();
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
}
New scripts will be generated on request for builders!
Guild Master of <LoD>
-
- Wiki Editor
- Posts: 208
- Joined: Thu Feb 17, 2005 7:06 pm
- Contact: