Było tu kilka postów że na oficjalnej stronie NWN jest skarbnica wiedzy o skryptach czy jakoś tak. Tylko że ja wpisuje adres strony to mi się pojawia "Serwer nwn.cdprojekt.com zbyt długo nie odpowiada" i jest tak zawsze. odkąd pierwszy raz o długiego czasu ( czyli 2 marca) wlazłem na tą stronę . Dlatego proponuję żeby tu zamieszczać gotowe skrypty.
Pojawianie sie gostka i rozpoczęcie rozmowy po użyciu dźwigni lub innego przedmiotu
robimy punkt nawigacyjny i nazywamy go np: oTraget i wpisujemy to w miejscu inuse :
object oPC = GetPCSpeaker();
object oTarget;
object oSpawn;
oTarget = oPC;
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "tu wpisz etykiete potwora", GetLocation(oTarget));
oTarget = oSpawn;
AssignCommand(oTarget, ActionStartConversation(oPC, "")); //rozpoczęcie konwersacji
oTarget = oSpawn;
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUNBEAM), GetLocation(oTarget)); //efekt wizualy
Leczenie object oPC = GetPCSpeaker();
object oHenchman = GetAssociate(ASSOCIATE_TYPE_HENCHMAN,oPC);
object oAnimal = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION,oPC);
object oFamiliar = GetAssociate(ASSOCIATE_TYPE_FAMILIAR,oPC);
object oDominated = GetAssociate(ASSOCIATE_TYPE_DOMINATED,oPC);
object oSummoned = GetAssociate(ASSOCIATE_TYPE_SUMMONED,oPC);
ActionPauseConversation();
ActionCastFakeSpellAtObject(SPELL_GREATER_RESTORATION, OBJECT_SELF);
ActionDoCommand(FakeRestore(oPC));
if(GetIsObjectValid(oHenchman))
{
ActionDoCommand(FakeRestore(oHenchman));
// checks to see if they have any cure crital wound potions; if not, creates it on them.
if (!GetIsObjectValid(GetItemPossessedBy(oHenchman,"NW_IT_MPOTION003")))
{
CreateItemOnObject("NW_IT_MPOTION003",oHenchman,3);
}
}
if(GetIsObjectValid(oAnimal))
{
ActionDoCommand(FakeRestore(oAnimal));
}
if(GetIsObjectValid(oFamiliar))
{
ActionDoCommand(FakeRestore(oFamiliar));
}
if(GetIsObjectValid(oDominated))
{
ActionDoCommand(FakeRestore(oDominated));
}
if(GetIsObjectValid(oSummoned))
{
ActionDoCommand(FakeRestore(oSummoned));
}
ActionResumeConversation();
}
void FakeRestore(object oTarget)
{
effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION_GREATER);
effect eBad = GetFirstEffect(oTarget);
//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_CURSE ||
GetEffectType(eBad) == EFFECT_TYPE_DISEASE ||
GetEffectType(eBad) == EFFECT_TYPE_POISON ||
GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL)
{
//Remove effect if it is negative.
RemoveEffect(oTarget, eBad);
}
eBad = GetNextEffect(oTarget);
}
if(GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD)
{
//Apply the VFX impact and effects
int nHeal = GetMaxHitPoints(oTarget) - GetCurrentHitPoints(oTarget);
effect eHeal = EffectHeal(nHeal);
if (nHeal > 0)
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
}
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oTarget);
tylko nie wiem gdzie się zmienia wygląd
Teleport gościa podczas rozmowy:
DelayCommand(1.0,ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), OBJECT_SELF));
DestroyObject(OBJECT_SELF,1.5);
Koniec modułu
ExportAllCharacters();
DelayCommand(2.0, EndGame(""));
poproszę o inne skrypty z objaśnieniem
Pojawianie sie gostka i rozpoczęcie rozmowy po użyciu dźwigni lub innego przedmiotu
robimy punkt nawigacyjny i nazywamy go np: oTraget i wpisujemy to w miejscu inuse :
object oPC = GetPCSpeaker();
object oTarget;
object oSpawn;
oTarget = oPC;
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "tu wpisz etykiete potwora", GetLocation(oTarget));
oTarget = oSpawn;
AssignCommand(oTarget, ActionStartConversation(oPC, "")); //rozpoczęcie konwersacji
oTarget = oSpawn;
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUNBEAM), GetLocation(oTarget)); //efekt wizualy
Leczenie object oPC = GetPCSpeaker();
object oHenchman = GetAssociate(ASSOCIATE_TYPE_HENCHMAN,oPC);
object oAnimal = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION,oPC);
object oFamiliar = GetAssociate(ASSOCIATE_TYPE_FAMILIAR,oPC);
object oDominated = GetAssociate(ASSOCIATE_TYPE_DOMINATED,oPC);
object oSummoned = GetAssociate(ASSOCIATE_TYPE_SUMMONED,oPC);
ActionPauseConversation();
ActionCastFakeSpellAtObject(SPELL_GREATER_RESTORATION, OBJECT_SELF);
ActionDoCommand(FakeRestore(oPC));
if(GetIsObjectValid(oHenchman))
{
ActionDoCommand(FakeRestore(oHenchman));
// checks to see if they have any cure crital wound potions; if not, creates it on them.
if (!GetIsObjectValid(GetItemPossessedBy(oHenchman,"NW_IT_MPOTION003")))
{
CreateItemOnObject("NW_IT_MPOTION003",oHenchman,3);
}
}
if(GetIsObjectValid(oAnimal))
{
ActionDoCommand(FakeRestore(oAnimal));
}
if(GetIsObjectValid(oFamiliar))
{
ActionDoCommand(FakeRestore(oFamiliar));
}
if(GetIsObjectValid(oDominated))
{
ActionDoCommand(FakeRestore(oDominated));
}
if(GetIsObjectValid(oSummoned))
{
ActionDoCommand(FakeRestore(oSummoned));
}
ActionResumeConversation();
}
void FakeRestore(object oTarget)
{
effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION_GREATER);
effect eBad = GetFirstEffect(oTarget);
//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_CURSE ||
GetEffectType(eBad) == EFFECT_TYPE_DISEASE ||
GetEffectType(eBad) == EFFECT_TYPE_POISON ||
GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL)
{
//Remove effect if it is negative.
RemoveEffect(oTarget, eBad);
}
eBad = GetNextEffect(oTarget);
}
if(GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD)
{
//Apply the VFX impact and effects
int nHeal = GetMaxHitPoints(oTarget) - GetCurrentHitPoints(oTarget);
effect eHeal = EffectHeal(nHeal);
if (nHeal > 0)
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
}
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oTarget);
tylko nie wiem gdzie się zmienia wygląd
Teleport gościa podczas rozmowy:
DelayCommand(1.0,ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), OBJECT_SELF));
DestroyObject(OBJECT_SELF,1.5);
Koniec modułu
ExportAllCharacters();
DelayCommand(2.0, EndGame(""));
poproszę o inne skrypty z objaśnieniem