LucidMagic.net

Neverwinter Nights => NwN Building => Script Request => Topic started by: fireknight40 on December 22, 2004, 12:45:31 AM

Title: Uhm a few questions....
Post by: fireknight40 on December 22, 2004, 12:45:31 AM
Well I've been making a clan server based from Godspire also and was wondering how to make the custom filter at 22? also how to use multiple onactivateitem scripts in the same module? Also fast rest and onenter create an item in their inventory? Thanks.  :)
Title: Uhm a few questions....
Post by: Fury on December 22, 2004, 03:39:07 AM
Quote
Well I've been making a clan server based from Godspire also and was wondering how to make the custom filter at 22? also how to use multiple onactivateitem scripts in the same module? Also fast rest and onenter create an item in their inventory? Thanks.  :)
[snapback]13488[/snapback]

just add - gold piece value 50.000 or how much it is IDK the Zero's.. make it remove the usual resis, invalid classes etc
Title: Uhm a few questions....
Post by: fireknight40 on December 22, 2004, 01:25:09 PM
Where though is it a script or something like that?
Title: Uhm a few questions....
Post by: Tea-cup on December 22, 2004, 01:58:58 PM
Quote
Quote
Well I've been making a clan server based from Godspire also and was wondering how to make the custom filter at 22? also how to use multiple onactivateitem scripts in the same module? Also fast rest and onenter create an item in their inventory? Thanks.  :)
[snapback]13488[/snapback]

just add - gold piece value 50.000 or how much it is IDK the Zero's.. make it remove the usual resis, invalid classes etc
[snapback]13494[/snapback]
I'm not planning to explain it all, but that isn't enough to ensure the costlimit.

-Mel
Title: Uhm a few questions....
Post by: Fury on December 22, 2004, 04:19:46 PM
Code: [Select]
if(GetGoldPieceValue(oItem) > 500000){
DestroyObject(oItem);}

There We Go Hope It Helps :-)

-Vince :)
Title: Uhm a few questions....
Post by: fireknight40 on December 22, 2004, 05:55:55 PM
Okay, but where does it go?
Title: Uhm a few questions....
Post by: gashmo on December 22, 2004, 05:57:54 PM
Quote
Well I've been making a clan server based from Godspire also and was wondering how to make the custom filter at 22? also how to use multiple onactivateitem scripts in the same module? Also fast rest and onenter create an item in their inventory? Thanks.  :)
[snapback]13488[/snapback]

1) For level 22, item cost filter should be set at 500k gp per item. You need to script to do this.
2)  To use multiple onactivate item scripts - you have to name each item differently. Easiest way to learn this is to look at the script bioware uses for the OC on its recall stone. Just copy and paste.
3) Fast rest - look for Sygon's Fast Rest in nwnvault - it is a 2da change.
4) Onenter create item - look up nwnlexicon - they should have examples.
Title: Uhm a few questions....
Post by: Fury on December 22, 2004, 06:20:09 PM
Hm.. Very Difficult To Explain Under Where You Strip Items Like Resis,Immunes ETC Right Under There You Add The GoldPiece Thing I Just Wrote Up In Code To Be IN The Right Loop Hope It Helps :-)
BTW.. Look A Little Below - There Restduration Is Put It In Override Makes Players Rest Really Quick
-Vince :)
Title: Uhm a few questions....
Post by: fireknight40 on December 23, 2004, 12:50:06 AM
Thanks. :)
Title: Uhm a few questions....
Post by: Fury on December 23, 2004, 06:34:15 AM
Anytime Glad To Help :)


-Vince :)
Title: Uhm a few questions....
Post by: fireknight40 on December 24, 2004, 02:57:08 AM
Sigh I am regretted to say that I need more help...
A healing placeable like the healing lights I can't seem to be able to do anything like that.
Title: Uhm a few questions....
Post by: Tea-cup on December 24, 2004, 06:49:10 AM
Quote
Sigh I am regretted to say that I need more help...
A healing placeable like the healing lights I can't seem to be able to do anything like that.
[snapback]13667[/snapback]
Code: [Select]
void Raise(object oPlayer)
    {
        effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION);

        effect eBad = GetFirstEffect(oPlayer);
        ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPlayer);
        ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oPlayer)), oPlayer);

        //Search for negative effects
        while(GetIsEffectValid(eBad))
        {
            if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS ||
                GetEffectType(eBad) == EFFECT_TYPE_DEAF ||
                GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
                GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL)
                {
                    //Remove effect if it is negative.
                    RemoveEffect(oPlayer, eBad);
                }
            eBad = GetNextEffect(oPlayer);
        }
        //Fire cast spell at event for the specified target
        SignalEvent(oPlayer, EventSpellCastAt(OBJECT_SELF, SPELL_RESTORATION, FALSE));
        ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oPlayer);
    }
void main()
{
    object oPC = GetLastUsedBy();
    if(GetIsInCombat(oPC) == FALSE)
    {
        Raise(oPC);
        ForceRest(oPC);
    }
    else
    {
        DelayCommand(0.1, SendMessageToPC(oPC, "You are in combat."));
    }
}
Does use the same Raise() function as the standard ondeath script. Also, someone that is in combat, someone can't rest, can't use the light either.

Just place it in the onuse of the object and make it useable/plot.

-Mel
Title: Uhm a few questions....
Post by: fireknight40 on December 24, 2004, 05:22:10 PM
Thank you!!! :)
Title: Uhm a few questions....
Post by: fireknight40 on December 28, 2004, 10:51:55 PM
Well I need some more help... I don't know much about scripting and I was wondering if someone would check my script and I also don't know how to make it so that it's the one item? Here's the script as I have right now.
Code: [Select]
void main()
{
object oPC;

if (!GetIsDM(GetItemActivatorTarget())
|| !GetIsPC(GetItemActivatedTarget())
){

SendMessageToPC(GetItemActivator(), "");
return;}

SetCutsceneMode(oPC, TRUE);

FadeFromBlack(oPC, FADE_SPEED_SLOW);

object oTarget;
oTarget = oPC;


int nInt;
nInt = GetObjectType(oTarget);

if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), GetLocation(oTarget));

oTarget = oPC;


nInt = GetObjectType(oTarget);

if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_STRIKE_HOLY), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_STRIKE_HOLY), GetLocation(oTarget));

oTarget = oPC;

nInt = GetObjectType(oTarget);

if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), GetLocation(oTarget));

}