if(GetTag(oItem) == "creature")
{
StartNewConversaion == "creaturesummon"
}
}
NOTE: this is going under all the other activate things. That's why there is no VoidMain (I am not as stupid as some people may thing!) The error is if(GetTag(oItem) == "creature")
{
ActionStartConversation(oPC,"creaturesummon");
}
I probably didn't understand everything Mo said... I dunno.
Okay that didn't work for some reason all the tags seem to be right though. Maybe I am as stupid as everyone thinks. Here's the thing it compiled but when I tested in the module there was no conversation. Anyways here's the code updated:Code: [Select]if(GetTag(oItem) == "creature")
I probably didn't understand everything Mo said... I dunno.
{
ActionStartConversation(oPC,"creaturesummon");
}[snapback]22077[/snapback]
Well there are obviously bug/s in your scripts. When you want help debugging scripts you need to offer up many more details other than "it doesn't work" here are my two lines of code.
In any case you should first refer to the Lexicon for help. When you read the remarks of ActionStartConversation() you will noticed that items can not start conversations with a PC. I'm figuring this info will help you discover your bugs.[snapback]22078[/snapback]
Speak to yourself.[snapback]22081[/snapback]
Okay it's working now. Thank you all. :) I may post here again if I can't get the other scripts to work in the converstion...I was right! I do need help on the scripts in the conversation. The main thing right now is how do I get it to summon two of the same creature say the resref is "icedragon" how would I get it to summon 2 or even 4, I can get it to summon 1 easily, but it doesn't seem to work with 2-4 well the way I tried anyways I was wondering if there was a certain way and if so what? Thank you. :)
signed,
Brior[snapback]22112[/snapback]
object oPC = GetPCSpeaker();
object oCreature;
location ILoc;
ILoc = GetLocation(oPC);
oCreature = CreateObject(OBJECT_TYPE_CREATURE, "Tag", lLoc);
I can get it to summon 1 easily, but it doesn't seem to work with 2-4 well the way I tried anyways I was wondering if there was a certain way and if so what?[snapback]22188[/snapback]
When you say "summon" I'm guessing you mean your using CreateObjectAtLocation function and not EffectSummon. If you are using EffectSummon, each player can only have 1 summon at a time.Yeah that's what I meant sorry. :P
-420[snapback]22199[/snapback]
void main()
{
object oPC = GetPCSpeaker();
object oTarget;
object oSpawn;
location lTarget;
oTarget = oPC;
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "icedragon", lTarget);
}
void main()
{
object oPC = GetPCSpeaker();
object oTarget;
object oSpawn;
location lTarget;
oTarget = oPC;
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "icedragon", lTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "icedragon", lTarget);
}
void main()
{
object oPC = GetPCSpeaker();
object oTarget;
object oSpawn;
location lTarget;
oTarget = oPC;
lTarget = GetLocation(oTarget);
CreateObject(OBJECT_TYPE_CREATURE, "icedragon", lTarget);
CreateObject(OBJECT_TYPE_CREATURE, "icedragon", lTarget);
}
Code: [Select]void main()
{
object oPC = GetPCSpeaker();
object oTarget;
object oSpawn;
location lTarget;
oTarget = oPC;
lTarget = GetLocation(oTarget);
CreateObject(OBJECT_TYPE_CREATURE, "icedragon", lTarget);
CreateObject(OBJECT_TYPE_CREATURE, "icedragon", lTarget);
}
Try this, without declaring the oSpawn.
-420[snapback]22263[/snapback]
Thank you. :)
signed,
Brior[snapback]22328[/snapback]
//::////////////////////////////////////////////////////:://
//:: Invizible420's Alternate Time Stop Spell //:://
//:: //:://
//:: By: Invizible420 //:://
//:: (Created 12/20/02 updated 06/13/04 (v 1.75) //:://
//::////////////////////////////////////////////////////:://
//:: //:://
//:: Persistent World Workaround for Bioware's //:://
//:: Default Time Stop Spell. This will //:://
//:: CutSceneDominate creatures within a radius //:://
//:: of the caster. //:://
//:: //:://
//:: This version will not Time Stop the caster's //:://
//:: familiar, summons, animal companion, and only //:://
//:: the caster's first henchman (Does not support //:://
//:: multiple henchmens. Has been thoroughly tested //:://
//:: and will Time Stop creature's with Immunity to //:://
//:: Mind Affecting spells. //:://
//:: //:://
//:: Contact info/Bug Reports: Digiddy777@yahoo.com //:://
//::////////////////////////////////////////////////////:://
#include "NW_I0_GENERIC"
// Customize User Defined Variables
//float fDur = 15.0; // Duration in seconds -- Change this to however long you want Time Stop to last Uncomment and Comment out 3rd ed duration
// This is the formula for accurate 3rd ed. Duration
float fDur = IntToFloat(d4(1)+1)*6.0; // Least duration is 12 seconds, maximum duration is 30 seconds
float fDist = 20.0; // Radius in meters -- for a wider area of affect increase this float
// Function to resume creature(s) previous actions wrapped for Delay
void ResumeLast(object oResumee, object oIntruder)
{
// Delay DetermineCombatRound
DelayCommand(fDur+0.25,AssignCommand(oResumee,DetermineCombatRound(oIntruder)));
}
// Function to control Time Stop effects
void TSEffects(object oEffector, object oCaster)
{
// Check if stopped creature is a hostile
if (GetIsReactionTypeHostile(oCaster,oEffector) == TRUE)
{
// Start the resume combat round after Time Stop
ResumeLast(oEffector, oCaster);
}
// Clear the creature(s) action que
AssignCommand(oEffector,ClearAllActions(TRUE));
// Make module dominate the creature(s) for fDur seconds & Freeze the Animation to look like time stopped
AssignCommand(GetModule(),ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectCutsceneDominated(),oEffector,fDur));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_DUR_FREEZE_ANIMATION),oEffector,fDur);
}
// Function to get creature(s) within radius and apply the alternate Time Stop
void TimeStop(object oTarget)
{
object oNearestC; // Define nearest creature
// Begin loop to find all creatures within the fDist meter radius
oNearestC = GetFirstObjectInShape(SHAPE_SPHERE, fDist, GetSpellTargetLocation(), FALSE, OBJECT_TYPE_CREATURE);
while(GetIsObjectValid(oNearestC))
{
// To make sure it doesn't stop the caster or caster's familiar, first henchman, or summons
if ((oNearestC != oTarget) &&
(GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oTarget) != oNearestC) &&
(GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oTarget) != oNearestC) &&
(GetAssociate(ASSOCIATE_TYPE_HENCHMAN, oTarget) != oNearestC) &&
(GetAssociate(ASSOCIATE_TYPE_SUMMONED, oTarget) != oNearestC))
{
// Start the Time Stop effects
DelayCommand(0.75,TSEffects(oNearestC,oTarget));
}
// Get the next creature in the fDist meter radius and continue loop
oNearestC = GetNextObjectInShape(SHAPE_SPHERE, fDist, GetSpellTargetLocation(), FALSE, OBJECT_TYPE_CREATURE);
}
}
// Begin Main Function
void main()
{
//Signal event to start the Time Stop
SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_TIME_STOP, FALSE));
// Begin custom Time Stop
TimeStop(OBJECT_SELF);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_TIME_STOP), GetSpellTargetLocation());
}
if ((oNearestC != oTarget) &&
(GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oTarget) != oNearestC) &&
(GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oTarget) != oNearestC) &&
(GetAssociate(ASSOCIATE_TYPE_HENCHMAN, oTarget) != oNearestC) &&
(GetAssociate(ASSOCIATE_TYPE_SUMMONED, oTarget) != oNearestC))
GetIsReactionTypeHostile(oNearestC)
if (!/*Will Save*/ MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_MIND_SPELLS))
and who is this Invizible420 ??
Is that another name of you 420? Or is it someone other??
Oh and there seems to be no effect on the hostile creature when the spell fails due to a succesful will save. Do I have to make an extra efect for that?[snapback]22930[/snapback]
#include "NW_I0_GENERIC"
#include "NW_I0_SPELLS"
#include "x2_inc_spellhook"
// Customize User Defined Variables
//float fDur = 15.0; // Duration in seconds -- Change this to however long you want Time Stop to last Uncomment and Comment out 3rd ed duration
// This is the formula for accurate 3rd ed. Duration
float fDur = IntToFloat(d4(1)+1)*6.0; // Least duration is 12 seconds, maximum duration is 30 seconds
float fDist = 10.0; // Radius in meters -- for a wider area of affect increase this float
// Function to resume creature(s) previous actions wrapped for Delay
void ResumeLast(object oResumee, object oIntruder)
{
// Delay DetermineCombatRound
DelayCommand(fDur+0.25,AssignCommand(oResumee,DetermineCombatRound(oIntruder)));
}
// Function to control Time Stop effects
void TSEffects(object oEffector, object oCaster)
{
// Check if stopped creature is a hostile
if (GetIsReactionTypeHostile(oCaster,oEffector) == TRUE)
{
// Start the resume combat round after Time Stop
ResumeLast(oEffector, oCaster);
}
// Clear the creature(s) action que
AssignCommand(oEffector,ClearAllActions(TRUE));
// Make module dominate the creature(s) for fDur seconds & Freeze the Animation to look like time stopped
AssignCommand(GetModule(),ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectCutsceneDominated(),oEffector,fDur));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_DUR_FREEZE_ANIMATION),oEffector,fDur);
}
// Function to get creature(s) within radius and apply the alternate Time Stop
void TimeStop(object oTarget)
{
object oNearestC; // Define nearest creature
// Begin loop to find all creatures within the fDist meter radius
oNearestC = GetFirstObjectInShape(SHAPE_SPHERE, fDist, GetSpellTargetLocation(), FALSE, OBJECT_TYPE_CREATURE);
while(GetIsObjectValid(oNearestC))
{
// To make sure it doesn't stop the caster or caster's familiar, first henchman, or summons
GetIsReactionTypeHostile(oNearestC);
{
if (!MyResistSpell(OBJECT_SELF, oTarget))
{
//Make Will Save to negate effect
if (!/*Will Save*/ MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_MIND_SPELLS))
{
// Start the Time Stop effects
DelayCommand(0.75,TSEffects(oNearestC,oTarget));
}
else
{
effect eVisWill = EffectVisualEffect(VFX_IMP_WILL_SAVING_THROW_USE);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisWill, oNearestC);
}
}
}
// Get the next creature in the fDist meter radius and continue loop
oNearestC = GetNextObjectInShape(SHAPE_SPHERE, fDist, GetSpellTargetLocation(), FALSE, OBJECT_TYPE_CREATURE);
}
}
// Begin Main Function
void main()
{
//Signal event to start the Time Stop
SignalEvent(OBJECT_SELF, EventSpellCastAt(OBJECT_SELF, SPELL_TIME_STOP, FALSE));
// Begin custom Time Stop
TimeStop(OBJECT_SELF);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_TIME_STOP), GetSpellTargetLocation());
}
GetIsReactionTypeHostile(oNearestC);
if (spellsIsTarget(oNearestC, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF) && oNearestC != OBJECT_SELF)
if (GetIsReactionTypeHostile(oNearestC) == TRUE);
if (spellsIsTarget(oNearestC, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF) && oNearestC != OBJECT_SELF)
Is there a way to increase the spell's save dc?[snapback]23016[/snapback]
I want to change the lighting of an area by using a script.[snapback]23058[/snapback]
Go to this link (http://nwvault.ign.com/View.php?view=Modules.Detail&id=360) and download the "Dance Club.mod" file by Bioware. It's a demo mod showing examples of how to change tile lighting in-game.
-420[snapback]23078[/snapback]
void getrid(object oPC, object oItem)
{
itemproperty property=GetFirstItemProperty(oItem);
while(GetIsItemPropertyValid(property))
{
if (
(GetItemPropertyType(property) == ITEM_PROPERTY_CAST_SPELL)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_ON_HIT_PROPERTIES)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_REGENERATION)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_IMMUNITY_SPECIFIC_SPELL)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_IMMUNITY_SPELL_SCHOOL)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_IMMUNITY_SPELLS_BY_LEVEL)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DAMAGE_VULNERABILITY)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_AC_BONUS_VS_ALIGNMENT_GROUP)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_AC_BONUS_VS_DAMAGE_TYPE)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DAMAGE_VULNERABILITY)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_TRAP)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_THIEVES_TOOLS)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_ON_MONSTER_HIT)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_ABILITY_SCORE)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_AC)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_ATTACK_MODIFIER)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_DAMAGE)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_ENHANCEMENT_MODIFIER)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_SAVING_THROWS)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_SAVING_THROWS_SPECIFIC)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_SKILL_MODIFIER)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_MONSTER_DAMAGE)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_REGENERATION_VAMPIRIC)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DAMAGE_REDUCTION)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_ONHITCASTSPELL)
)
{
RemoveItemProperty(oItem, property);
}
property = GetNextItemProperty(oItem);
}
if(GetGoldPieceValue(oItem) > 500000)
{
DestroyObject(oItem);
}
}
//the function that gets the items and uses the filter on them
void filter_items(object oPC)
{
object oItem = GetFirstItemInInventory(oPC);
object oSlot;
//don't scan dm's
if(GetIsDM(oPC) == TRUE)
{
return;
}
//scan inventory
while(GetIsObjectValid(oItem))
{
getrid(oPC, oItem);
oItem = GetNextItemInInventory(oPC);
}
//scan equiped items
oSlot = GetItemInSlot(INVENTORY_SLOT_ARMS,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_ARROWS,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_BELT,oPC);
getrid(oPC, oSlot);
oSlot= GetItemInSlot(INVENTORY_SLOT_BOLTS,oPC);
getrid(oPC, oSlot);
oSlot= GetItemInSlot(INVENTORY_SLOT_BOOTS,oPC);
getrid(oPC, oSlot);
oSlot= GetItemInSlot(INVENTORY_SLOT_BULLETS,oPC);
getrid(oPC, oSlot);
oSlot= GetItemInSlot(INVENTORY_SLOT_CARMOUR,oPC);
getrid(oPC, oSlot);
oSlot= GetItemInSlot(INVENTORY_SLOT_CHEST,oPC);
getrid(oPC, oSlot);
oSlot= GetItemInSlot(INVENTORY_SLOT_CLOAK,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_CWEAPON_B,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_CWEAPON_L,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_CWEAPON_R,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_HEAD,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_LEFTRING,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_NECK,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,oPC);
getrid(oPC, oSlot);
}
void main()
{
object oPC = GetEnteringObject();
string sKey = GetPCPublicCDKey(oPC);
effect eLight = SupernaturalEffect(EffectVisualEffect(VFX_DUR_IOUNSTONE_GREEN));
filter_items(oPC);
int nStatus = GetCampaignInt(sKey, "sent");
if (nStatus == 5)
{
DelayCommand(6.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT ,eLight ,oPC));
CreateItemOnObject("blueprint", oPC);
CreateItemOnObject("blueprint001", oPC);
CreateItemOnObject("teleporter", oPC);
}
void main()
{
object oPC = GetEnteringObject();
string sKey = GetPCPublicCDKey(oPC);
effect eLight = SupernaturalEffect(EffectVisualEffect(VFX_DUR_IOUNSTONE_YELLOW));
filter_items(oPC);
int nStatus = GetCampaignInt(sKey, "lord");
if (nStatus == 5)
{
DelayCommand(6.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT ,eLight ,oPC));
CreateItemOnObject("blueprint", oPC);
CreateItemOnObject("blueprint001", oPC);
CreateItemOnObject("blueprint003", oPC);
CreateItemOnObject("blueprint002", oPC);
CreateItemOnObject("blueprint004", oPC);
CreateItemOnObject("restartrune", oPC);
CreateItemOnObject("teleporter", oPC);
}
void main()
{
object oPC = GetEnteringObject();
string sKey = GetPCPublicCDKey(oPC);
effect eLight = SupernaturalEffect(EffectVisualEffect(VFX_DUR_IOUNSTONE_BLUE));
filter_items(oPC);
int nStatus = GetCampaignInt(sKey, "dm");
if (nStatus == 5)
{
DelayCommand(6.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT ,eLight ,oPC));
CreateItemOnObject("blueprint001", oPC);
CreateItemOnObject("creaturerune", oPC);
CreateItemOnObject("blueprint003", oPC);
CreateItemOnObject("blueprint002", oPC);
CreateItemOnObject("blueprint007", oPC);
CreateItemOnObject("blueprint004", oPC);
CreateItemOnObject("blueprint006", oPC);
CreateItemOnObject("blueprint005", oPC);
CreateItemOnObject("restartrune", oPC);
CreateItemOnObject("blueprint", oPC);
CreateItemOnObject("teleporter", oPC);
}
}
You can't have 2 void main() in 1 script. You also only need to declare those once, except the visual effects you are using. The Cd key and stuff is fine once. Just use these "if"
int nStatus = GetCampaignInt(sKey, "dm");
if (nStatus == 5)
You're setting them as 5 I see. So change it for every part.
int nStatus = GetCampaignInt(sKey, "sent");
if (nStatus == 5)
int nStatus1 = GetCampaignInt(sKey, "lord");
if (nStatus1 == 5)
int nStatus2 = GetCampaignInt(sKey, "dm");
if (nStatus2 == 5)
That's just an example to change them to. They all have to be different. Just use certain "if"
Example:
int nStatus = GetCampaignInt(sKey, "dm");
if (nStatus == 5)
{
lights/items
}
int nStatus1 = GetCampaignInt(sKey, "lord");
if (nStatus1 == 5)
{
lights/items
}
int nStatus = GetCampaignInt(sKey, "sent");
if (nStatus == 5)
{
lights/items
}[snapback]23210[/snapback]
void getrid(object oPC, object oItem)
{
itemproperty property=GetFirstItemProperty(oItem);
while(GetIsItemPropertyValid(property))
{
if (
(GetItemPropertyType(property) == ITEM_PROPERTY_CAST_SPELL)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_ON_HIT_PROPERTIES)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_REGENERATION)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_IMMUNITY_SPECIFIC_SPELL)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_IMMUNITY_SPELL_SCHOOL)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_IMMUNITY_SPELLS_BY_LEVEL)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DAMAGE_VULNERABILITY)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_AC_BONUS_VS_ALIGNMENT_GROUP)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_AC_BONUS_VS_DAMAGE_TYPE)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DAMAGE_VULNERABILITY)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_TRAP)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_THIEVES_TOOLS)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_ON_MONSTER_HIT)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_ABILITY_SCORE)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_AC)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_ATTACK_MODIFIER)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_DAMAGE)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_ENHANCEMENT_MODIFIER)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_SAVING_THROWS)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_SAVING_THROWS_SPECIFIC)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DECREASED_SKILL_MODIFIER)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_MONSTER_DAMAGE)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_REGENERATION_VAMPIRIC)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_DAMAGE_REDUCTION)
|| (GetItemPropertyType(property) == ITEM_PROPERTY_ONHITCASTSPELL)
)
{
RemoveItemProperty(oItem, property);
}
property = GetNextItemProperty(oItem);
}
if(GetGoldPieceValue(oItem) > 500000)
{
DestroyObject(oItem);
}
}
//the function that gets the items and uses the filter on them
void filter_items(object oPC)
{
object oItem = GetFirstItemInInventory(oPC);
object oSlot;
//don't scan dm's
if(GetIsDM(oPC) == TRUE)
{
return;
}
//scan inventory
while(GetIsObjectValid(oItem))
{
getrid(oPC, oItem);
oItem = GetNextItemInInventory(oPC);
}
//scan equiped items
oSlot = GetItemInSlot(INVENTORY_SLOT_ARMS,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_ARROWS,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_BELT,oPC);
getrid(oPC, oSlot);
oSlot= GetItemInSlot(INVENTORY_SLOT_BOLTS,oPC);
getrid(oPC, oSlot);
oSlot= GetItemInSlot(INVENTORY_SLOT_BOOTS,oPC);
getrid(oPC, oSlot);
oSlot= GetItemInSlot(INVENTORY_SLOT_BULLETS,oPC);
getrid(oPC, oSlot);
oSlot= GetItemInSlot(INVENTORY_SLOT_CARMOUR,oPC);
getrid(oPC, oSlot);
oSlot= GetItemInSlot(INVENTORY_SLOT_CHEST,oPC);
getrid(oPC, oSlot);
oSlot= GetItemInSlot(INVENTORY_SLOT_CLOAK,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_CWEAPON_B,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_CWEAPON_L,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_CWEAPON_R,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_HEAD,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_LEFTRING,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_NECK,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC);
getrid(oPC, oSlot);
oSlot = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,oPC);
getrid(oPC, oSlot);
}
void main()
{
object oPC = GetEnteringObject();
string sKey = GetPCPublicCDKey(oPC);
effect eLight = SupernaturalEffect(EffectVisualEffect(VFX_DUR_IOUNSTONE_GREEN));
filter_items(oPC);
int nStatus = GetCampaignInt(sKey, "sent");
if (nStatus == 5)
{
DelayCommand(6.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT ,eLight ,oPC));
CreateItemOnObject("blueprint", oPC);
CreateItemOnObject("blueprint001", oPC);
CreateItemOnObject("teleporter", oPC);
}
{
effect eLight1 = SupernaturalEffect(EffectVisualEffect(VFX_DUR_IOUNSTONE_YELLOW));
int nStatus1 = GetCampaignInt(sKey, "lord");
if (nStatus1 == 5)
{
DelayCommand(6.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT ,eLight1 ,oPC));
CreateItemOnObject("blueprint", oPC);
CreateItemOnObject("blueprint001", oPC);
CreateItemOnObject("blueprint003", oPC);
CreateItemOnObject("blueprint002", oPC);
CreateItemOnObject("blueprint004", oPC);
CreateItemOnObject("restartrune", oPC);
CreateItemOnObject("teleporter", oPC);
}
effect eLight2 = SupernaturalEffect(EffectVisualEffect(VFX_DUR_IOUNSTONE_BLUE));
int nStatus2 = GetCampaignInt(sKey, "dm");
if (nStatus2 == 5)
{
DelayCommand(6.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT ,eLight2 ,oPC));
CreateItemOnObject("blueprint001", oPC);
CreateItemOnObject("creaturerune", oPC);
CreateItemOnObject("blueprint003", oPC);
CreateItemOnObject("blueprint002", oPC);
CreateItemOnObject("blueprint007", oPC);
CreateItemOnObject("blueprint004", oPC);
CreateItemOnObject("blueprint006", oPC);
CreateItemOnObject("blueprint005", oPC);
CreateItemOnObject("restartrune", oPC);
CreateItemOnObject("blueprint", oPC);
CreateItemOnObject("teleporter", oPC);
}
}
}
Thanks, it's a funny module but it containts a load of scripts, many of which I don't understand at all :( it's fun but no help *sigh*
in fact I only need to know how to use GetTileMainLight1Color and SetTileMainLight...
Just need a small example how to get a certain tile[snapback]23086[/snapback]
Sorry, I forgot that most of the modules scripts were being used for a chess game... d'oh!
See if this link helps at all: http://www.nwnlexicon.com/compiled/functio...ight1color.html (http://www.nwnlexicon.com/compiled/function.gettilemainlight1color.html)
-420[snapback]23237[/snapback]