- - -
:
> > Neverwinter Nights Aurora Toolset
: 1, 2, 3
Tarre T.
, . : "blood"- .
, , smile.gif
:
Neverwinter Script Source
#include "damage_system"
void main()
{
BloodEffect();
Talking();
}
.
.................................................
c :
..................................................
Neverwinter Script Source
location RandomLocation(object oTarget, float fRadius, int iLine = TRUE)
{
if(!iLine)
fRadius=IntToFloat(Random(FloatToInt(fRadius)));
float iXO=VectorMagnitude(GetPosition(oTarget))*cos(VectorToAngle(GetPosition(oTarget)));
float iYO=VectorMagnitude(GetPosition(oTarget))*sin(VectorToAngle(GetPosition(oTarget)));
float fRndomAngle=IntToFloat(Random(360));
location lNewLoc=Location(GetArea(oTarget),Vector(iXO+fRadius*cos(fRndomAngle), iYO+fRadius*sin(fRndomAngle)), 360.0);
return lNewLoc;}

void BloodEffect()
{
location lRandom1 = RandomLocation(OBJECT_SELF, 4.4, TRUE);
location lRandom2 = RandomLocation(OBJECT_SELF, 3.5, TRUE);
location lRandom3 = RandomLocation(OBJECT_SELF, 1.9, TRUE);
location lOS = GetLocation(OBJECT_SELF);
int iChL;
int iChM;
int iChS;
int iBS;
if (GetRacialType(OBJECT_SELF)==RACIAL_TYPE_HALFORC||
RACIAL_TYPE_HUMANOID_ORC||
RACIAL_TYPE_ABERRATION)
{
iChL = 99;
iChM = 49;
iChS = 19;
iBS = 9;}
else if (GetRacialType(OBJECT_SELF)==RACIAL_TYPE_HUMAN||
RACIAL_TYPE_GNOME||
RACIAL_TYPE_HALFELF)
{
iChL = 131;
iChM = 46;
iChS = 17;
iBS = 6;}
else if (GetRacialType(OBJECT_SELF)==RACIAL_TYPE_ELF||
RACIAL_TYPE_FEY||
RACIAL_TYPE_HALFLING||
RACIAL_TYPE_DWARF)
{
iChL = 9999;
iChM = 43;
iChS = 11;
iBS = 5;}
else
{
iChL = 99;
iChM = 49;
iChS = 19;
iBS = 9;
}
if (GetTotalDamageDealt()>iChL)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_CHUNK_RED_LARGE), OBJECT_SELF);
CreateObject(OBJECT_TYPE_PLACEABLE, "blood", lRandom1);
}
if (GetTotalDamageDealt()>iChM)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_CHUNK_RED_MEDIUM), OBJECT_SELF);
CreateObject(OBJECT_TYPE_PLACEABLE, "blood", lRandom2);
}
if (GetTotalDamageDealt()>iChS)
{
switch (Random(2))
{
case 1:
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_CHUNK_RED_SMALL), OBJECT_SELF);break;
}
case 2:
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_BLOOD_SPARK_MEDIUM), OBJECT_SELF);
break;
}
}
CreateObject(OBJECT_TYPE_PLACEABLE, "blood", lRandom3);
}
if (GetTotalDamageDealt()>iBS)
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_BLOOD_SPARK_SMALL), OBJECT_SELF);
}
}

void Talking()
{
string iP;
string sYa = GetName(GetObjectByTag("ax_letter_ya"));
if (GetAlignmentGoodEvil(OBJECT_SELF)==ALIGNMENT_EVIL)
{
switch(Random(6))
{
case 1: iP = " !"; break;
case 2: iP = " z, !"; break;
case 3: iP = "! !Z z !"; break;
case 4: iP = ", !"; break;
case 5: iP = "! !!"; break;
case 6: iP = ", , !"; break;
}
}
else if (GetAlignmentGoodEvil(OBJECT_SELF)==ALIGNMENT_GOOD)
{
switch(Random(6))
{
case 1: iP = "! !"; break;
case 2: iP = " z !"; break;
case 3: iP = "z !"; break;
case 4: iP = "! ! , !"; break;
case 5: iP = "! z ! z ! "; break;
case 6: iP = ", , !"; break;
}
}
if (GetAlignmentLawChaos(OBJECT_SELF)==ALIGNMENT_LAWFUL)
{
switch(Random(6))
{
case 1: iP = "! !"; break;
case 2: iP = " ! !"; break;
case 3: iP = "! !Z z !"; break;
case 4: iP = "! !"; break;
case 5: iP = "! !!"; break;
case 6: iP = ", , ! ?!"; break;
}
}
else if (GetAlignmentLawChaos(OBJECT_SELF)==ALIGNMENT_CHAOTIC)
{
switch(Random(6))
{
case 1: iP = " !"; break;
case 2: iP = " z"; break;
case 3: iP = "! !Z z !"; break;
case 4: iP = "! !"; break;
case 5: iP = "! !!"; break;
case 6: iP = ", , !"; break;
}
}
else if (GetAlignmentLawChaos(OBJECT_SELF)==ALIGNMENT_NEUTRAL)
{
switch (Random(6))
{
case 1: iP = "! !"; break;
case 2: iP = " z"; break;
case 3: iP = "! !Z z !"; break;
case 4: iP = " ! z !"; break;
case 5: iP = ", !!"; break;
case 6: iP = ", , z !!"; break;
}
}
switch (Random(2))
{
case 0: SpeakString(iP);break;
case 1: SpeakString(iP);break;
case 2: break;
}}
Bot
, ..
Lex: RandomLocation - .
. smile.gif , . . , . - , - . (-10) - .

Neverwinter Script Source
void bleed(int iBleedAmt)
{
    effect eBleedEff;
    if (GetCurrentHitPoints() <= 0) {
        if (iBleedAmt > 0) {
            eBleedEff = EffectDamage(iBleedAmt);
        } else {
            eBleedEff = EffectDamage(iBleedAmt);
        }
        ApplyEffectToObject(DURATION_TYPE_INSTANT, eBleedEff, OBJECT_SELF);
        if (GetCurrentHitPoints() <= -10) {
            PlayVoiceChat(VOICE_CHAT_DEATH);
            ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), OBJECT_SELF);
            ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), OBJECT_SELF);
            return;
        }

        if (iBleedAmt > 0) {
            if (d10(1) == 1) {
                iBleedAmt = -iBleedAmt;
                PlayVoiceChat(VOICE_CHAT_LAUGH);
            } else {
                switch (d6()) {
                    case 1: PlayVoiceChat(VOICE_CHAT_PAIN1); break;
                    case 2: PlayVoiceChat(VOICE_CHAT_PAIN2); break;
                    case 3: PlayVoiceChat(VOICE_CHAT_PAIN3); break;
                    case 4: PlayVoiceChat(VOICE_CHAT_HEALME); break;
                    case 5: PlayVoiceChat(VOICE_CHAT_NEARDEATH); break;
                    case 6: PlayVoiceChat(VOICE_CHAT_HELP);
                }
            }
        }
        DelayCommand(6.0,bleed(iBleedAmt));
    }
}
void main()
{
    object oDying = GetLastPlayerDying();
    AssignCommand(oDying, ClearAllActions());
    AssignCommand(oDying, bleed(1));
    CreateObject(OBJECT_TYPE_CREATURE, "blood", GetLocation(oDying));
}


'blood' - .

: NSS. .
Aiwan
, . OnFailToOpen . , WP_DOOR_TXT. . , .

Neverwinter Script Source
//:://////////////////////////////////////////////
//:: Copyright © 2004 WRG!
//:: OnFailToOpen
//:://////////////////////////////////////////////
/*
  WP_DOOR_TXT - .
     .
*/

//:://////////////////////////////////////////////
//:: Created By: Aiwan
//:: Created On: 10.01.2004
//:://////////////////////////////////////////////
void main()
{
object oWp = GetNearestObjectByTag("WP_DOOR_TXT"); //
string sDoor = GetName(oWp);

    if (GetIsObjectValid(oWp) && GetDistanceBetween(oWp, OBJECT_SELF) <= 10.0f)
        //  WP 10
        {
        SpeakString(sDoor); //
         return;
        }
        else
           {
           SpeakString("! WP_DOOR_TXT!");//
           return;
           }
}
Aiwan
, -. :cruel: OnAreaTransitionClick . biggrin.gif

Neverwinter Script Source
//:://////////////////////////////////////////////
//:: Copyright © 2004 WRG!  [URL=http://wrg.ru]http://wrg.ru[/URL]
//:: am_oa_stop
//:://////////////////////////////////////////////
/*
    
        
*/

//:://////////////////////////////////////////////
//:: Created By: Aiwan    Aiwan@e-mail.ru
//:: Created On: 21.04.2004
//:://////////////////////////////////////////////
void main()
{
  object oPC = GetEnteringObject();
  object oAnimal = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
  object oDominated = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
  object oFamiliar = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
  object oHenchman = GetAssociate(ASSOCIATE_TYPE_HENCHMAN, oPC);
  object oSummoned = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
  object oJamp = GetTransitionTarget(OBJECT_SELF);

  if (GetIsPC(oPC))
  {
  AssignCommand(oPC, JumpToObject(oJamp));
  AssignCommand(oAnimal, JumpToObject(oJamp));
  AssignCommand(oDominated, JumpToObject(oJamp));
  AssignCommand(oFamiliar, JumpToObject(oJamp));
  AssignCommand(oHenchman, JumpToObject(oJamp));
  AssignCommand(oSummoned, JumpToObject(oJamp));
  }
}
Baal
Neverwinter Script Source
float GetX(location lTarget)
{
return GetPositionFromLocation(lTarget).x;
}

float GetY(location lTarget)
{
return GetPositionFromLocation(lTarget).y;
}

float GetZ(location lTarget)
{
return GetPositionFromLocation(lTarget).z;
}

// lWizLoc -
// lSpelLoc -
// nCount - -
// fSpellTime -
void IceWallSpell(location lWizLoc, location lSpelLoc, int nCount, float fSpellTime)
{
vector vAB = GetPositionFromLocation(lSpelLoc) - GetPositionFromLocation(lWizLoc);
vAB = Vector(vAB.x,vAB.y);
float fAlfa = VectorToAngle(vAB);
float fAB = VectorMagnitude(vAB);
float fBC = 0.0;
float fX1, fX2, fY1, fY2;
location lLoc1, lLoc2;
object oPlaceable1, oPlaceable2;
string sVR;
int bTrueFalse = TRUE;
///
string sResRef1 = "plc_box2";
string sResRef2 = "plc_box3";
/// ( )
float fSize = 1.1;
nCount--;
while(nCount >= 0)
{
fBC = fSize*nCount/2;
fX1 = GetX(lWizLoc) + fAB*cos(fAlfa) + fBC*sin(fAlfa);
fX2 = GetX(lWizLoc) + fAB*cos(fAlfa) - fBC*sin(fAlfa);
fY1 = GetY(lWizLoc) + fAB*sin(fAlfa) - fBC*cos(fAlfa);
fY2 = GetY(lWizLoc) + fAB*sin(fAlfa) + fBC*cos(fAlfa);
  sVR = (bTrueFalse) ? sResRef1 : sResRef2;
  bTrueFalse = !bTrueFalse;
///
lLoc1 = Location(GetAreaFromLocation(lWizLoc), Vector(fX1, fY1, GetZ(lSpelLoc)), fAlfa);
oPlaceable1 = CreateObject(OBJECT_TYPE_PLACEABLE, sVR, lLoc1);
AssignCommand(oPlaceable1, DelayCommand(fSpellTime, DestroyObject(OBJECT_SELF)));
if(nCount !=0)
{
///
lLoc2 = Location(GetAreaFromLocation(lWizLoc), Vector(fX2, fY2, GetZ(lSpelLoc)), fAlfa);
oPlaceable2 = CreateObject(OBJECT_TYPE_PLACEABLE, sVR, lLoc2);
AssignCommand(oPlaceable2, DelayCommand(fSpellTime, DestroyObject(OBJECT_SELF)));
}
nCount = nCount - 2;
}
return;
}


, . ( ) . smile.gif .
Lord of V@MPIRES
- ? ! . , ... ... - -.
-:
Neverwinter Script Source
void GiveSubRaceCWeaponL(string sSubRaceWeapon, object oPC)
{
    object oPC = GetEnteringObject();
    object oRacialWeapon = CreateItemOnObject(sSubRaceWeapon, oPC);
    AssignCommand(oPC, ActionEquipItem(oRacialWeapon, INVENTORY_SLOT_CWEAPON_R));
}

string SR_SubRace(object oPC)
{
    if (GetIsPC(oPC)) {
        object oItem = GetItemInSlot(INVENTORY_SLOT_CWEAPON_R, oPC);
        if (GetIsObjectValid(oItem))
        string sSubRace = GetSubRace(oPC);
        string sSRItem = "None";
        int iRace = GetRacialType(oPC);
        if (iRace == RACIAL_TYPE_DWARF) {
            if (sSubRace == "Gold Dwarf") {
                sSRItem = "golddwarfsubitem";
                GiveSubRaceCWeaponL(sSRItem, oPC);
                return sSRItem;
            }
            if (sSubRace == "Gray Dwarf") {
                sSRItem = "graydwarfsubitem";
                GiveSubRaceCWeaponL(sSRItem, oPC);
                return sSRItem;
            }
            if (sSubRace == "Shield Dwarf")
                return sSRItem;
        } // Dwarf
        if (iRace == RACIAL_TYPE_ELF) {
            if (sSubRace == "Moon Elf")
                return sSRItem;
            if (sSubRace == "Sun Elf") {
                sSRItem = "sunelfsubitem";
                GiveSubRaceCWeaponL(sSRItem, oPC);
                return sSRItem;
            }
            if (sSubRace == "Wild Elf") {
                sSRItem = "wildelfsubitem";
                GiveSubRaceCWeaponL(sSRItem, oPC);
                return sSRItem;
            }
            if (sSubRace == "Wood Elf") {
                sSRItem = "woodelfsubitem";
                GiveSubRaceCWeaponL(sSRItem, oPC);
                return sSRItem;
            }
            if (sSubRace == "Drow Elf") {
                sSRItem = "drowsubitem";
                GiveSubRaceCWeaponL(sSRItem, oPC);
                return sSRItem;
            }
        } // Elf
        if (iRace == RACIAL_TYPE_HALFLING) {
            if (sSubRace == "Strongheart Halfling") {
                sSRItem = "";
                GiveSubRaceCWeaponL(sSRItem, oPC);
                return sSRItem;
            }
            if (sSubRace == "Ghostwise Halfling") {
                sSRItem = "";
                GiveSubRaceCWeaponL(sSRItem, oPC);
                return sSRItem;
            }
            if (sSubRace == "Lightfoot Halfling")
                return sSRItem;
        } // Halfling
        if (iRace == RACIAL_TYPE_GNOME) {
            if (sSubRace == "Deep Gnome") {
                sSRItem = "deepgnomesubitem";
                GiveSubRaceCWeaponL(sSRItem, oPC);
                return sSRItem;
            }
            if (sSubRace == "Rock Gnome")
                return sSRItem;
        } // Gnome
     }
    return "None";
}


, onClientEnter :
Neverwinter Script Source
#include "subrace"
void main()
{
    object oPC = GetEnteringObject();
    AddJournalQuestEntry("sub",0001, oPC);
    string sSubItem = SR_SubRace(oPC);
    if (sSubItem != "None")
    {
    SendMessageToPC(oPC, " - " + GetSubRace(oPC));
    }
}


- , , , .. , ! - ( , ):
+2 , -1 -1 .
, , - .
Aiwan
. , , . blum3.gif

, OnUnlocked OnDisarm .

Neverwinter Script Source
//:://////////////////////////////////////////////
//:: Copyright © 2004 WRG!  www.wrg.ru
//:://////////////////////////////////////////////
/*
    -
*/

//:://////////////////////////////////////////////
//:: Created By: Aiwan    Aiwan@e-mail.ru
//:: Created On: 09.05.2004
//:://////////////////////////////////////////////

#include "nw_i0_tool"
void main()
{
//================ ================
object oUnlocked = GetLastUnlocked();
if (!GetLocalInt(OBJECT_SELF, "UNLOCKED"))
{
   if (GetIsPC(oUnlocked))
    {
    SetLocalInt(OBJECT_SELF, "UNLOCKED", TRUE);
    GiveXPToCreature(oUnlocked, 100);
    return;
    }
    else
    RewardPartyXP(10, GetFirstPC());
}
//=============== ============
      object oDisarmed = GetLastDisarmed();
      if (!GetLocalInt(OBJECT_SELF, "DISARMED"))
        {
        if (GetIsPC(oDisarmed))
          {
          SetLocalInt(OBJECT_SELF, "DISARMED", TRUE);
          GiveXPToCreature(oDisarmed, 100);
          return;
          }
          else
          RewardPartyXP(10, GetFirstPC());
       }
}
Aiwan
, .
LEX:, . . .
! good.gif

Neverwinter Script Source
#include "nw_i0_tool"
void main()
{
int iL = GetLockUnlockDC(OBJECT_SELF);
int iT = GetTrapDisarmDC(OBJECT_SELF);
object oDisarmed = GetLastDisarmed();
object oUnlocked = GetLastUnlocked();

//================ ================
if ((!GetLocalInt(OBJECT_SELF, "UNLOCKED"))&&(GetIsObjectValid(oUnlocked)))
   {
   SetLocalInt(OBJECT_SELF, "UNLOCKED", TRUE);
   if (HasItem(oUnlocked,GetLockKeyTag(OBJECT_SELF))) return;
   if (GetIsPC(oUnlocked)) //
    {
    GiveXPToCreature(oUnlocked, (iL * GetHitDice(oUnlocked)/3));
    // XP = DC 1/3
    return;
    }
   else // Henchman
    RewardPartyXP((iL*2), GetMaster(oUnlocked));
    // XP = DC 2
   return;
   }
//=============== ============
if ((!GetLocalInt(OBJECT_SELF, "DISARMED"))&&(GetIsObjectValid(oDisarmed)))
   {
   SetLocalInt(OBJECT_SELF, "DISARMED", TRUE);
   if (HasItem(oDisarmed,GetTrapKeyTag(OBJECT_SELF))) return;
   if (GetIsPC(oDisarmed)) //
    {
    GiveXPToCreature(oDisarmed, (iT * GetHitDice(oDisarmed)/3));
    // XP = DC 1/3
    return;
    }
   else // Henchman
    RewardPartyXP((iT*2), GetMaster(oDisarmed));
    // XP = DC 2
   }
}
Aiwan
.... smile.gif
Tarre Talliorne
. +1 , , , 35. :

Neverwinter Script Source
int XdY(int nX, int nY)
{
int iN=0;
int iResult=0;
    while (iN<nX)
    {
    iResult=iResult+Random(nY)+1;
    iN++;
    }
return iResult;
}

<small> 15:30</small>
:
Neverwinter Script Source
// get the total from rolling [1]- [nX*Random(xY)+1]
// scripted by TARRE T.
int XdY(int nX, int nY);
Aiwan
, , OnHeartbeat .

Neverwinter Script Source
//:://////////////////////////////////////////////
//:: Copyright © 2004 WRG!  www.wrg.ru
//:: Name: am_doorlock_d_n
//:://////////////////////////////////////////////
/*
          
*/

//:://////////////////////////////////////////////
//:: Created By: Aiwan    Aiwan@e-mail.ru
//:: Created On: 21.05.2004
//:://////////////////////////////////////////////
void main()
{
if((GetIsNight() && GetLocked(OBJECT_SELF))||(GetIsDay() && !GetLocked(OBJECT_SELF)))
      {
      return;
      }
    if (GetIsNight())
        {
        SetLocked(OBJECT_SELF, TRUE);
        return;
        }
      if (GetIsDay())
           {
           SetLocked(OBJECT_SELF, FALSE);
           return;
           }
}
DBColl
.
//:://////////////////////////////////////////////
//:: Copyright (c) 2004 WRG! www.wrg.ru
//:: Name: am_doorlock_d_n
//:://////////////////////////////////////////////
/*

*/
//:://////////////////////////////////////////////
//:: Created By: Aiwan Aiwan@e-mail.ru
//:: Created On: 21.05.2004
//:://////////////////////////////////////////////
void main()
{
  if (GetArea(OBJECT_SELF) != GetArea(GetFirstPC())) //
       return;  // PS. !!!
// if((GetIsNight() && GetLocked(OBJECT_SELF))||(GetIsDay() && !GetLocked(OBJECT_SELF)))
// {
// return;   // [b] 4- , "" !
// }         // .[/b]
if (GetIsNight())
{
SetLocked(OBJECT_SELF, TRUE);
return;
}
if (GetIsDay())
{
SetLocked(OBJECT_SELF, FALSE);
return;
}
}
Sir_Sarles


. , ,
.


, . ? -
10 . smile.gif , .

Neverwinter Script Source
void main()
{
int iL = GetLockUnlockDC(OBJECT_SELF);
object oUnlocked = GetLastUnlocked();
int iDice;

if GetHitDice(oUnlocked) < 15
  {
  iDice = 15 - GetHitDice(oUnlocked);
  }
else
  {
  iDice = 1;
  }


//================ ================
if (!GetLocalInt(OBJECT_SELF, "UNLOCKED"))
{
  SetLocalInt(OBJECT_SELF, "UNLOCKED", TRUE);
  if (GetIsPC(oUnlocked)) //
  {
//  GiveXPToCreature(oUnlocked, (iL * GetHitDice(oUnlocked)/3));
  GiveXPToCreature(oUnlocked, (iL * iDice/3));
  return;
  }
  else // Henchman
  // RewardPartyXP((iL*2), GetMaster(oUnlocked));
  GiveXPToCreature(oUnlocked, 10);
}

}


------
, !
? wink3.gif ( Jagged Alliance,
1 100, . smile.gif ) Hostile?
Tarre Talliorne
( , , , , , - ). ( 7 - ) , .

1. , oWeapon. -, ( () ).

Neverwinter Script Source
int GetIsWeapon(object oWeapon)
{
    int iType = GetBaseItemType(oWeapon);
    if (GetIsObjectValid(oWeapon)&&iType!=BASE_ITEM_INVALID)
    {
        if (iType == BASE_ITEM_BASTARDSWORD ||
            iType == BASE_ITEM_BATTLEAXE ||
            iType == BASE_ITEM_CLUB ||
            iType == BASE_ITEM_DAGGER ||
            iType == BASE_ITEM_DART ||
            iType == BASE_ITEM_DIREMACE ||
            iType == BASE_ITEM_DOUBLEAXE ||
            iType == BASE_ITEM_GREATAXE ||
            iType == BASE_ITEM_GREATSWORD ||
            iType == BASE_ITEM_HALBERD ||
            iType == BASE_ITEM_HANDAXE ||
            iType == BASE_ITEM_HEAVYCROSSBOW ||
            iType == BASE_ITEM_HEAVYFLAIL ||
            iType == BASE_ITEM_KAMA ||
            iType == BASE_ITEM_KATANA ||
            iType == BASE_ITEM_KUKRI ||
            iType == BASE_ITEM_LIGHTFLAIL ||
            iType == BASE_ITEM_LIGHTHAMMER ||
            iType == BASE_ITEM_LIGHTMACE ||
            iType == BASE_ITEM_LONGBOW ||
            iType == BASE_ITEM_LONGSWORD ||
            iType == BASE_ITEM_MAGICSTAFF ||
            iType == BASE_ITEM_MORNINGSTAR ||
            iType == BASE_ITEM_QUARTERSTAFF ||
            iType == BASE_ITEM_RAPIER ||
            iType == BASE_ITEM_SCIMITAR ||
            iType == BASE_ITEM_SCYTHE ||
            iType == BASE_ITEM_SHORTBOW ||
            iType == BASE_ITEM_SHORTSPEAR ||
            iType == BASE_ITEM_SHORTSWORD ||
            iType == BASE_ITEM_SHURIKEN ||
            iType == BASE_ITEM_SICKLE ||
            iType == BASE_ITEM_SLING ||
            iType == BASE_ITEM_THROWINGAXE ||
            iType == BASE_ITEM_TORCH ||
            iType == BASE_ITEM_TWOBLADEDSWORD ||
            iType == BASE_ITEM_WARHAMMER
            )
        {
            return TRUE;
        }
    }
}


2. oObject(=OBJECT_SELF) .

Neverwinter Script Source
int GetIsCaster(object oObject=OBJECT_SELF)
{
    if((GetLevelByClass(CLASS_TYPE_BARD, oObject)||
        GetLevelByClass(CLASS_TYPE_CLERIC, oObject)||
        GetLevelByClass(CLASS_TYPE_DRUID, oObject)||
        GetLevelByClass(CLASS_TYPE_PALADIN, oObject)> 4||
        GetLevelByClass(CLASS_TYPE_RANGER, oObject)> 4||
        GetLevelByClass(CLASS_TYPE_SORCERER, oObject)||
        GetLevelByClass(CLASS_TYPE_WIZARD, oObject))&&
        GetObjectType(oObject)==OBJECT_TYPE_CREATURE)
    {
        return TRUE;
    }
}


3. -, . 2. 4.

Neverwinter Script Source
object GetNearestEnemyCaster(int iMaxLvl=20, int iMinLvl=1, object oObject=OBJECT_SELF)
{
    int i = 1;
    object oCreature = GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oObject, i++, CREATURE_TYPE_IS_ALIVE, TRUE);
    while (GetIsObjectValid(oCreature))
    {
        if (GetIsCaster(oCreature)&&
            GetPCLevel(oCreature)>=iMinLvl&&
            GetPCLevel(oCreature)<=iMaxLvl)
        {
            break;
        }
        oCreature = GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oObject, i++, CREATURE_TYPE_IS_ALIVE, TRUE);
    }
    return oCreature;
}


4. . 3.

Neverwinter Script Source
object GetNearestFriedlyCaster(int iMaxLvl=20, int iMinLvl=1, object oObject=OBJECT_SELF)
{
    int i = 1;
    object oCreature = GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oObject, i++, CREATURE_TYPE_IS_ALIVE, TRUE);
    while (GetIsObjectValid(oCreature))
    {
        if (GetIsCaster(oCreature)&&
            GetPCLevel(oCreature)>=iMinLvl&&
            GetPCLevel(oCreature)<=iMaxLvl)
        {
            break;
        }
        oCreature = GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oObject, i++, CREATURE_TYPE_IS_ALIVE, TRUE);
    }
    return oCreature;
}



5. , oWeapon.

Neverwinter Script Source
int GetIsRangedWeapon(object oWeapon)
{
    if (GetIsObjectValid(oWeapon))
    {
        int iBIT = GetBaseItemType(oWeapon);
        if (iBIT == BASE_ITEM_DART||
            iBIT == BASE_ITEM_HEAVYCROSSBOW||
            iBIT == BASE_ITEM_LIGHTCROSSBOW||
            iBIT == BASE_ITEM_LONGBOW||
            iBIT == BASE_ITEM_SHORTBOW||
            iBIT == BASE_ITEM_SHURIKEN||
            iBIT == BASE_ITEM_SLING||
            iBIT == BASE_ITEM_THROWINGAXE)
        {
            return TRUE;
        }
    }
}


6. , 1: 0 ( .) , 1- , 2 - , .

Neverwinter Script Source
int GetHasWeapon(object oTarget, int nType)
{
    int WInv = FALSE;
    int WSlot= FALSE;
    int iResult;
    object oItem = GetFirstItemInInventory(oTarget);
    while (GetIsObjectValid(oItem))
    {
        if (GetIsWeapon(oItem))
        {
        WInv = TRUE;
        break;
        }
    oItem = GetNextItemInInventory(oTarget);
    }
    int i;
    for (i=4; i<=5; i++)
    {
    oItem = GetItemInSlot(i, oTarget);
        if (GetIsWeapon(oItem))
        {
        iWSlot = TRUE;
        break;
        }
    }
    if (nType==0) { iResult = iWSlot;         }
    else
    if (nType==1) { iResult = iWInv;          }
    else
    if (nType==2)
    {
        if (iWSLot==TRUE||iWInv==TRUE)
        { return TRUE; } else { return FALSE; }
    }
    else { return -1; }
    return iResult;
}


7. , : , .

Neverwinter Script Source
int GetHasFighterClass(object oObject)
{
    int nClass1 = GetLevelByClass(CLASS_TYPE_BARBARIAN, GetPCSpeaker());
    int nClass2 = GetLevelByClass(CLASS_TYPE_FIGHTER, GetPCSpeaker());
    int nClass3 = GetLevelByClass(CLASS_TYPE_MONK, GetPCSpeaker());
    int nClass4 = GetLevelByClass(CLASS_TYPE_RANGER, GetPCSpeaker());
    if ((nClass1 > 0) || (nClass2 > 0) || (nClass3 > 0) || (nClass4 > 0))
    {
        return TRUE;
    }
    else return FALSE;
}


8. . .

Neverwinter Script Source
float GetRandomDelay(float fMinimumTime = 0.4, float MaximumTime = 1.1)
{
    float fRandom = MaximumTime - fMinimumTime;
    int nRandom;
    if(fRandom < 0.0)
    {
        return 0.0;
    }
    else
    {
        nRandom = FloatToInt(fRandom  * 10.0);
        nRandom = Random(nRandom) + 1;
        fRandom = IntToFloat(nRandom);
        fRandom /= 10.0;
        return fRandom + fMinimumTime;
    }
}


9. - oTarget.

Neverwinter Script Source
int GetNumItems(object oTarget,string sItem)
{
    int nNumItems = 0;
    object oItem = GetFirstItemInInventory(oTarget);
    while (GetIsObjectValid(oItem))
    {
        if (GetTag(oItem) == sItem)
        {
            nNumItems = nNumItems + GetNumStackedItems(oItem);
        }
        oItem = GetNextItemInInventory(oTarget);
    }
    return nNumItems;
}


!

PS: : . , smile.gif
LEX: , .
: < 0 >-11 ., . - . - . ... : .

Tarre

OnPlayerDying
Neverwinter Script Source
void bleed(int iBleedAmt)
{

effect eShake=EffectVisualEffect(VFX_FNF_SCREEN_SHAKE);
effect eBleedEff;
if (GetCurrentHitPoints() <= 0) {
if (iBleedAmt > 0) {
eBleedEff = EffectDamage(iBleedAmt);
} else {
eBleedEff = EffectDamage(iBleedAmt);
}
ApplyEffectToObject(DURATION_TYPE_INSTANT, eBleedEff, OBJECT_SELF);
if (GetCurrentHitPoints() <= -10) {
PlayVoiceChat(VOICE_CHAT_DEATH);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), OBJECT_SELF);
return;
}

if (iBleedAmt > 0) {
if (d10(1) == 1) {
iBleedAmt = -iBleedAmt;
} else {
switch (d6()) {
case 1: PlayVoiceChat(VOICE_CHAT_PAIN1);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eShake,OBJECT_SELF,10.0);
DelayCommand(1.5,FadeToBlack(OBJECT_SELF));
BlackScreen(OBJECT_SELF);
DelayCommand(3.0, FadeFromBlack(OBJECT_SELF,FADE_SPEED_SLOWEST));
break;
case 2: PlayVoiceChat(VOICE_CHAT_PAIN2);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eShake,OBJECT_SELF,10.0);
DelayCommand(1.5,FadeToBlack(OBJECT_SELF,FADE_SPEED_SLOWEST));
BlackScreen(OBJECT_SELF);
DelayCommand(3.0, FadeFromBlack(OBJECT_SELF,FADE_SPEED_SLOWEST));
break;
case 3: PlayVoiceChat(VOICE_CHAT_PAIN3);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eShake,OBJECT_SELF,10.0);
DelayCommand(1.5,FadeToBlack(OBJECT_SELF,FADE_SPEED_SLOWEST));
BlackScreen(OBJECT_SELF);
DelayCommand(3.0, FadeFromBlack(OBJECT_SELF,FADE_SPEED_SLOWEST));
break;
case 4: PlayVoiceChat(VOICE_CHAT_HEALME);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eShake,OBJECT_SELF,10.0);
DelayCommand(1.5,FadeToBlack(OBJECT_SELF,FADE_SPEED_SLOWEST));
BlackScreen(OBJECT_SELF);
DelayCommand(3.0, FadeFromBlack(OBJECT_SELF,FADE_SPEED_SLOWEST));
break;
case 5: PlayVoiceChat(VOICE_CHAT_NEARDEATH);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eShake,OBJECT_SELF,10.0);
DelayCommand(1.5,FadeToBlack(OBJECT_SELF,FADE_SPEED_SLOWEST));
BlackScreen(OBJECT_SELF);
DelayCommand(3.0, FadeFromBlack(OBJECT_SELF,FADE_SPEED_SLOWEST));
break;
case 6: PlayVoiceChat(VOICE_CHAT_HELP);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eShake,OBJECT_SELF,10.0);
DelayCommand(1.5,FadeToBlack(OBJECT_SELF,FADE_SPEED_SLOWEST));
BlackScreen(OBJECT_SELF);
DelayCommand(3.0, FadeFromBlack(OBJECT_SELF,FADE_SPEED_SLOWEST));


}
}
}
DelayCommand(6.0,bleed(iBleedAmt));
}
{

}
}
void main()
{
effect eBlood=EffectVisualEffect(VFX_COM_CHUNK_RED_MEDIUM);
object oDying = GetLastPlayerDying();
object oEnemy = GetLastAttacker();
float fWho = (GetFacing(oEnemy));
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY,eBlood, GetLocation(oDying), 10.0);
AssignCommand(oDying, ClearAllActions());
AssignCommand(oDying, bleed(1));
CreateObject(OBJECT_TYPE_PLACEABLE,"bloody",GetLocation(oDying),TRUE);

}


"bloody" - .
.. Tarre Object_Type smile.gif

OnPlayerDeath
Neverwinter Script Source
void main()
{
object oPlayer = GetLastPlayerDied();
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), GetLocation(oPlayer));
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_GHOSTLY_VISAGE), oPlayer); // , .
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_PROTECTION_GOOD_MAJOR), oPlayer,6.0);
DelayCommand(2.0,FadeToBlack(oPlayer));
DelayCommand(5.0,BlackScreen(oPlayer));

DelayCommand(5.5,ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPlayer));
DelayCommand(5.8,ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oPlayer)), oPlayer));
DelayCommand(6.0,AssignCommand(oPlayer,ClearAllActions()));
DelayCommand(6.2,AssignCommand(oPlayer,JumpToLocation(GetLocation(GetObjectByTag("WP_RAISE")))));
}

WP_RAISE -

- OnEnter
Neverwinter Script Source
void main()
{
object oPC = GetEnteringObject();
DelayCommand(2.0,FadeFromBlack(oPC,FADE_SPEED_SLOWEST));
}
Tarre Talliorne
: (1) (2).

Neverwinter Script Source
void ActionRemoveEffect(object oCreature, effect eEffect)
    {
        effect eMSD = GetFirstEffect(oCreature);
        while (GetIsEffectValid(eMSD))
        {
            if (GetEffectType(eMSD) == GetEffectType(eEffect))
            {
            RemoveEffect(oCreature, eMSD);
            }
        eMSD = GetNextEffect(oCreature);
        }
    }


Neverwinter Script Source
int HasEffect(object oCreature, effect eEffect)
    {
        int iResult = 0;
        effect eMSD = GetFirstEffect(oCreature);
        while (GetIsEffectValid(eMSD))
        {
            if (GetEffectType(eMSD) == GetEffectType(eEffect))
            {
            iResult = 1;
            }
        eMSD = GetNextEffect(oCreature);
        }
        return iResult;
    }

- ... . : ( - smile.gif )
Neverwinter Script Source
object oFPC = GetLastAttacker();
        object OS = OBJECT_SELF;     
        DelayCommand(0.10, ClearAllActions(TRUE));
        DelayCommand(0.60, ActionUseFeat(FEAT_KNOCKDOWN, oFPC));
        DelayCommand(0.61, ApplyEffectToObject(1, EffectKnockdown(), oFPC, 3.0));
        DelayCommand(1.00, ClearAllActions(TRUE));
        if (GetCurrentHitPoints(OS)<=0)
        {
        // ... , ... , (.. , ), , ...
        }
        else
        {
        DelayCommand(1.04, SetStandardFactionReputation(REPUTATION_TYPE_ENEMY, 50, oFPC));
        DelayCommand(5.10, ClearAllActions(TRUE));
        DelayCommand(5.20, ActionMoveToObject(oFPC, FALSE, 1.4));
        }
        // , - - .
Tarre Talliorne
Neverwinter Script Source
object oFPC = GetLastAttacker();
      object OS = OBJECT_SELF;     
      effect eEffect = EffectImmunity(IMMUNITY_TYPE_KNOCKDOWN);
      if (HasEffect(oFPC))
      {
      ActionRemoveEffect(oFPC, eEffect);
      }
      DelayCommand(0.10, ClearAllActions(TRUE));
      DelayCommand(0.60, ActionUseFeat(FEAT_KNOCKDOWN, oFPC));
      DelayCommand(0.61, ApplyEffectToObject(1, EffectKnockdown(), oFPC, 3.0));
      DelayCommand(1.00, ClearAllActions(TRUE));
      if (GetCurrentHitPoints(OS)<=0)
      {
      // ... , ... , (.. , ), , ...
      }
      else
      {
      DelayCommand(1.04, SetStandardFactionReputation(REPUTATION_TYPE_ENEMY, 50, oFPC));
      DelayCommand(5.10, ClearAllActions(TRUE));
      DelayCommand(5.20, ActionMoveToObject(oFPC, FALSE, 1.4));
      }
      // , - - .
... , , - :-)
- , (, , .. EFFECT_TYPE_IMMUNITY). , ... , , ...
Tarre Talliorne
, - , : ( ActionRemoveObject(. . .) ), ... , "" . - ... , :-)
, : - , . .

-----------------------------------------------------
: - , : ., , .. - ... __... .

Neverwinter Script Source
void main()
{
    SpeakString("This is what would happen if the store started"); // Store Open Script
    object oInv = GetFirstItemInInventory();
        while (GetIsObjectValid(oInv)) // -
        {
            string sOS = GetTag(OBJECT_SELF); //
            if  (sOS == "store1") // - "store1", , BASE_ITEM_POTIONS BASE_ITEM_SCROLL...
            {
                if (GetBaseItemType(oInv)!=BASE_ITEM_POTIONS&&
                    GetBaseItemType(oInv)!=BASE_ITEM_SCROLL  )
                {
                DestroyObject(oInv);
                }
            }
            else if (sOS == "store2")
            {
            // , "store2",
            }
        oInv = GetNextItemInInventory();
        }
}
Tarre Talliorne
Neverwinter Script Source
const string TXT_COLOR_GRAY    = "<c>"; // Gray
const string TXT_COLOR_WHITE    = "<c>"; // White
const string TXT_COLOR_CYAN    = "<c >"; // Light Cyan
const string TXT_COLOR_MAGENTA  = "<c >"; // Magenta
const string TXT_COLOR_YELLOW   = "<c >"; // Yellow
const string TXT_COLOR_RED      = "<c  >"; // Red
const string TXT_COLOR_GREEN    = "<c >"; // Green
const string TXT_COLOR_BLUE    = "<c  >"; // Blue
const string TXT_COLOR_NONE    = "";       // Default (no color)
const string TXT_COLOR_END      = "</c>";   // (color end TAG)
const string TXT_COLOR_DEFAULT  = TXT_COLOR_CYAN;


// Function changes color of the string
// * Param sText - text to color
// * Param sColor - parse a color constant here
// * Returns colored string
string colorText(string sText, string sColor);


string colorText(string sText, string sColor)
{
  return sColor + sText + TXT_COLOR_END;
}


. __ 4 . . .
Tarre Talliorne
. :
"lib_colortext". _ .
you are entering object, , (TXT_COLOR_RED). TXT_COLOR_RED TXT_COLOR_YELLOW , . .

Neverwinter Script Source
#include "lib_colortext"
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
AssignCommand(oPC, SpeakString(colorText("you are entering object", TXT_COLOR_RED)));
}
. ... . . .
N- (Plate) , . , "" .. "letter_r". - . . , , - "". (Usable).
, . - , - .

OnUsed -
Neverwinter Script Source
/////////////////////////////////////////
////// Script for Coded Door ////////////
/////// OnUsed any plate ////////////////
//////// Date: 10.07.2004 ///////////////
///////// Created by Avaddon ////////////
/////////////////////////////////////////

void main()
{
string sCode = GetLocalString(GetObjectByTag("code_lock"),"code"); //code_lock - .
string sName = GetName(OBJECT_SELF);
object oCodedDoor = GetObjectByTag("coded_door"); //
if (GetLocked(oCodedDoor)==TRUE)
{
if (sName=="")
{
// .
SetLocalString(GetObjectByTag("code_lock"), "code", sCode+" ");
SendMessageToPC(GetLastUsedBy()," ["+sName+"]");
SendMessageToPC(GetLastUsedBy()," : ["+sCode+" ]");
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), GetLocation(OBJECT_SELF)); // .
}
else
{
// , .
SetLocalString(GetObjectByTag("code_lock"), "code", sCode+sName);
SendMessageToPC(GetLastUsedBy()," ["+sName+"]");
SendMessageToPC(GetLastUsedBy()," : ["+sCode+sName+"]");
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_IMP_MAGIC_RESISTANCE_USE), GetLocation(OBJECT_SELF));
// .
}
}
else
{
SendMessageToPC(GetLastUsedBy(),".. ."); // .
}
}


OnUsed "code_lock"
Neverwinter Script Source
/////////////////////////////////////////
////// Script for Coded Door ////////////
/////// OnUsed some Lever ///////////////
//////// Date: 10.07.2004 ///////////////
///////// Created by Avaddon ////////////
/////////////////////////////////////////

void main()
{
string sNull=""; // .
string sCode = GetLocalString(OBJECT_SELF,"code"); //
object oCodedDoor = GetObjectByTag("coded_door"); //
object oPC = GetLastUsedBy();
effect eOpen = EffectVisualEffect(VFX_IMP_REMOVE_CONDITION); // .

if (GetLocked(oCodedDoor)==TRUE)
{
// - - .
if (sCode==" ")
{
PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);//
DelayCommand(2.0,PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
SetLocked(oCodedDoor, FALSE); // .
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eOpen,oCodedDoor,5.0); // .
SendMessageToPC(GetLastUsedBy()," . ");
ActionOpenDoor(oCodedDoor); //
SetLocalString(OBJECT_SELF,"code",sNull); //
}
else
{
SendMessageToPC(GetLastUsedBy()," .");
AssignCommand (OBJECT_SELF, ActionCastSpellAtObject(SPELL_ELECTRIC_JOLT, oPC, PROJECTILE_PATH_TYPE_DEFAULT)); // .
PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);//
DelayCommand(2.0,PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
SetLocalString(OBJECT_SELF,"code",sNull); //
}
}
else
{
SendMessageToPC(oPC," ."); //
}
}


. 9.
, .
, CDKey . SetLocalString smile.gif - Undropable. .

, - . 3 : "", "", "". ( ). 1 . - , .
LocalInt .

OnSpawn
Neverwinter Script Source
/////////////////////////////////////////
////// Script for Interactive ///////////
///////// Mini Bank System //////////////
/////// OnSpawn NPC Banker //////////////
//////// Date: 11.07.2004 ///////////////
///////// Created by Avaddon ////////////
/////////////////////////////////////////

void main()
{
object oPC = GetLastSpeaker();
SetListening(OBJECT_SELF, 1);
SetListenPattern(OBJECT_SELF,"",1);
SetListenPattern(OBJECT_SELF,"",2);
SetListenPattern(OBJECT_SELF,"",3);
SetListenPattern(OBJECT_SELF,"",4);
SetListenPattern(OBJECT_SELF,"",5);
}


OnConversation

Neverwinter Script Source
/////////////////////////////////////////
////// Script for Interactive ///////////
///////// Mini Bank System //////////////
/////// OnConversarion NPC Banker ///////
//////// Date: 11.07.2004 ///////////////
///////// Created by Avaddon ////////////
/////////////////////////////////////////

#include "nw_i0_tool"
void main()
{
object oPC = GetLastSpeaker();
object oOffer = GetItemPossessedBy(oPC, "bank_offer"); // bank_offer - .
int iAmount = StringToInt (GetMatchedSubstring (0));
int iAccount = GetLocalInt(oOffer, "money");
string sBallance = IntToString(iAccount);
string sBallancePlus = IntToString(iAccount+iAmount);
string sBallanceMinus = IntToString(iAccount-iAmount);
if(HasItem(oPC, "bank_offer"))
{
if (GetListenPatternNumber()==10 && GetIsListening(OBJECT_SELF) && GetLocalInt(oPC,"account")==1)
{
if (iAmount>0)
{
if (iAmount<=GetGold(oPC))
{
SpeakString(" "+GetMatchedSubstring(0)+" .");
TakeGoldFromCreature(iAmount,oPC,TRUE);
SetLocalInt(oOffer,"money",iAccount+iAmount);
SpeakString (" = "+sBallancePlus+" .");
DeleteLocalInt(oPC,"account");
SetListenPattern(OBJECT_SELF,"DELETED",10);
}
else
{
SpeakString(" ");
}
}
else
{
SpeakString(" ");
}
}

if (GetListenPatternNumber()==10 && GetIsListening(OBJECT_SELF) && GetLocalInt(oPC,"account")==2)
{
if (iAmount>0)
{

if (iAmount<=GetLocalInt(oOffer,"money"))
{
SpeakString(" "+GetMatchedSubstring(0)+" .");
GiveGoldToCreature(oPC,iAmount);
SetLocalInt(oOffer,"money",iAccount-iAmount);
SpeakString (" = "+sBallanceMinus+" .");
DeleteLocalInt(oPC,"account");
SetListenPattern(OBJECT_SELF,"DELETED",10);
}
else
{
SpeakString(" ");
}
}
else
{
SpeakString(" ");
}
}

if (GetListenPatternNumber()==1 && GetIsListening(OBJECT_SELF))
{

SpeakString (" ?");
SetListenPattern(OBJECT_SELF,"**",10);
SetLocalInt(oPC,"account",1);

}
if (GetListenPatternNumber()==2 && GetIsListening(OBJECT_SELF))
{
SetListenPattern(OBJECT_SELF,"DELETED",10);
SpeakString (" ?");
SetListenPattern(OBJECT_SELF,"**",10);
SetLocalInt(oPC,"account",2);
}

if (GetListenPatternNumber()==3 && GetIsListening(OBJECT_SELF))
{
SpeakString (" = "+sBallance+" .");
}
}
else
{
if (GetListenPatternNumber()==1 && GetIsListening(OBJECT_SELF))
{
SpeakString (", ? ? . [] []");
SetLocalInt(oPC,"new_account", TRUE);
DelayCommand(60.0 , DeleteLocalInt(oPC,"new_account"));
}
if (GetListenPatternNumber()==2 && GetIsListening(OBJECT_SELF))
{
SpeakString (", ? ? . [] []");
SetLocalInt(oPC,"new_account", TRUE);
DelayCommand(60.0 , DeleteLocalInt(oPC,"new_account"));
}
if (GetListenPatternNumber()==3 && GetIsListening(OBJECT_SELF))
{
SpeakString (", ? ? . [] []");
SetLocalInt(oPC,"new_account", TRUE);
DelayCommand(60.0 , DeleteLocalInt(oPC,"new_account"));
}
if (GetListenPatternNumber()==4 && GetIsListening(OBJECT_SELF) && GetLocalInt(oPC,"new_account")== TRUE)
{
CreateItemOnObject("bank_offer", oPC, 1);
SetLocalInt(oOffer, "money", 0);
SpeakString(" , ! !");
SetListenPattern(OBJECT_SELF,"DELETED",10);
}
if (GetListenPatternNumber()==5 && GetIsListening(OBJECT_SELF) && GetLocalInt(oPC,"new_account")== TRUE)
{
SpeakString (" , .");
DeleteLocalInt(oPC,"new_account");
}


}
}


: good.gif
Tarre Talliorne
. ( , , , ), . ( :-) ) . , . : (string RusGenetiv). nSex - : 1 - , 2 - , 3 - .
150 . , , - , , .
: Dativ & Akkusativ ( Genetic ) ( - :-) ), . ( + + )
:

Neverwinter Script Source
//
//   [SCRIPTED BY TARRE TALLIORNE! (TARRE@list.ru)]
string OrfographieTest(string sString);

// sWord ;
// - "" ( nSex ):
// 1 - ,
// 2 - ,
// 3 - .
//   [SCRIPTED BY TARRE TALLIORNE! (TARRE@list.ru)]
string RusGenetiv(string sWord, int nSex);

string ya()
{
return GetName(GetWaypointByTag("ya"));
}

int GetIsSound(string sLetter)
{
    int iResult = 0;
    //:://
    if (sLetter != ""&&
        sLetter != ""&&
        sLetter != "" &&
        GetStringLength(sLetter)==1)
        {
        iResult = 1;
        }
    return iResult;
}

int GetIsVowel(string sLetter)
{
    int iResult = 0;
    if (!GetIsSound(sLetter))
        return iResult = -1;
    if (sLetter=="" ||
        sLetter=="" ||
        sLetter=="" ||
        sLetter=="" ||
        sLetter=="" ||
        sLetter=="" ||
        sLetter=="" ||
        sLetter=="" ||
        sLetter==ya() )
        {
        iResult = 1;
        }
    return iResult;
}

/*int GetIsSoft(string sLetter, string sNextLetter)
{
    int iResult;
    if (!GetIsSound(sLetter)                ||
       ( GetStringLength(sNextLetter)!=0    &&
         GetStringLength(sNextLetter)!=1)   ||
         GetIsVowel(sLetter))
         return iResult = -1;
    else if (sLetter == "")
         return iResult = 1;
    else if (sNextLetter == "")
         return iResult = 1;
}*/


string OrfographieTest(string sString)
{
    //:://///////////:://
    //::// - //:://
    //:://///////////:://

    //:://
    string sNew;
    int nZHi = FindSubString(sString, "");
    int nzhi = FindSubString(sString, "");
    int nSHi = FindSubString(sString, "");
    int nshi = FindSubString(sString, "");

    //::// ""
    if (nZHi!=-1)
    {
    int nZH = nZHi;
    int nI = nZH + 1;
    string s1 = GetStringLeft(sString, nI);
    string s2 = GetStringRight(sString, GetStringLength(sString)-nI-1);
    sNew = s1+""+s2;
    }

    //::// ""

    else if (nzhi!=-1)
    {
    int nzh = nzhi;
    int nI = nzh + 1;
    string s1 = GetStringLeft(sString, nI);
    string s2 = GetStringRight(sString, GetStringLength(sString)-nI-1);
    sNew = s1+""+s2;
    }

    //::// ""
    else if (nSHi!=-1)
    {
    int nSH = nSHi;
    int nI = nSH + 1;
    string s1 = GetStringLeft(sString, nI);
    string s2 = GetStringRight(sString, GetStringLength(sString)-nI-1);
    sNew = s1+""+s2;
    }

    //::// ""
    else if (nshi!=-1)
    {
    int nsh = nshi;
    int nI = nsh + 1;
    string s1 = GetStringLeft(sString, nI);
    string s2 = GetStringRight(sString, GetStringLength(sString)-nI-1);
    sNew = s1+""+s2;
    }

    //::// , sString
    else sNew = sString;
    return sNew;
}

string RusGenetiv(string sWord, int nSex)
{
    string sGenLast;
    string sOsnov;
    string sGenetiv;
    string sLast = GetStringRight(sWord, 1);
    //::////////////////////////////////////////////////:://
    //::// DEBUGGING [ deleted by author at 17.07.04 ]//:://
    //::// SpeakDebugString(OBJECT_SELF, sLast);////////:://
    //::////////////////////////////////////////////////:://
    switch (nSex)
    {
    //:://///////////////:://
    //::// //:://
    //:://///////////////:://
    case 1:
        //:://
        if (sLast==""||sLast==ya()||sLast==""||sLast=="")
        {
            if (sLast=="")
                sGenLast = "";
                    else if (sLast==ya())
                        sGenLast = "";
                            else if (sLast==""||
                                sLast=="")
                                    sGenLast = ya();
        sOsnov = GetStringLeft(sWord, GetStringLength(sWord)-1);
        sGenetiv = sOsnov + sGenLast;
        }
        //:://
        else if (sLast==""||
                 sLast==""||
                 sLast==""||
                 sLast==""||
                 sLast==""||
                 sLast=="")
                 {
                 sGenetiv = sWord;
                 }
                 //::// ""
        else {
        sGenLast = "";
        sOsnov = GetStringLeft(sWord, GetStringLength(sWord));
        sGenetiv = sOsnov + sGenLast;
        }
    break;

    //:://///////////////:://
    //::// //:://
    //:://///////////////:://
    case 2:
        //:://
        if (sLast=="")
        {
        sGenLast = "";
        sOsnov = GetStringLeft(sWord, GetStringLength(sWord)-1);
        sGenetiv = sOsnov + sGenLast;
        }
        else if (sLast==ya()||sLast=="")
        {
        sGenLast = "";
        sOsnov = GetStringLeft(sWord, GetStringLength(sWord)-1);
        sGenetiv = sOsnov + sGenLast;
        }
        //:://
        else
        {
        sGenetiv = sWord;
        }
    break;

    //:://///////////////:://
    //::// //:://
    //:://///////////////:://
    case 3:
        if (sLast=="")
        {
        sGenLast = "";
        sOsnov = GetStringLeft(sWord, GetStringLength(sWord)-1);
        sGenetiv = sOsnov + sGenLast;
        }
        if (sLast=="")
        {
        sGenLast = ya();
        sOsnov = GetStringLeft(sWord, GetStringLength(sWord)-1);
        sGenetiv = sOsnov + sGenLast;
        }
        else sGenetiv = sWord;
    break;
    }
    sGenetiv = OrfographieTest(sGenetiv);
    return sGenetiv;
}
Valleo
, .
: , , , .
=)

Neverwinter Script Source
//############################################################################//
//*        *//
//*      Valleo, "",       *//
//############################################################################//

//*
void NoCheatDeleteAndSetItemProperty(object oItem, itemproperty iItemProperty);

//* , , - FALSE
int NoCheatCheckItemProperty(itemproperty iItemProperty);

//*
void NoCheatItemProperty(object oItem);

//*
void NoCheatStarting(object oPC);

//############################################################################//

void NoCheatDeleteAndSetItemProperty(object oItem, itemproperty iItemProperty)
{
itemproperty iNewItemPropert;
int iItemPropertyType = GetItemPropertyType(iItemProperty);
int iItemPropertySubType;
if(iItemPropertyType == ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS)
  {
  iItemPropertySubType = GetItemPropertySubType(iItemProperty);
  if(iItemPropertySubType == IP_CONST_IMMUNITYMISC_DEATH_MAGIC)
   {
   iNewItemPropert = ItemPropertyCastSpell(IP_CONST_CASTSPELL_DEATH_WARD_7, IP_CONST_CASTSPELL_NUMUSES_3_USES_PER_DAY);
   RemoveItemProperty(oItem,iItemProperty);
   AddItemProperty(DURATION_TYPE_PERMANENT,iNewItemPropert,oItem);
   }
  if(iItemPropertySubType == IP_CONST_IMMUNITYMISC_KNOCKDOWN)
   {
   iNewItemPropert = ItemPropertySkillBonus(SKILL_DISCIPLINE,10);
   RemoveItemProperty(oItem,iItemProperty);
   AddItemProperty(DURATION_TYPE_PERMANENT,iNewItemPropert,oItem);
   }
  if(iItemPropertySubType == IP_CONST_IMMUNITYMISC_CRITICAL_HITS)
   {
   iNewItemPropert = ItemPropertySkillBonus(SKILL_TUMBLE,10);
   RemoveItemProperty(oItem,iItemProperty);
   AddItemProperty(DURATION_TYPE_PERMANENT,iNewItemPropert,oItem);
   }
  }
if(iItemPropertyType == ITEM_PROPERTY_HASTE)
  {
  iNewItemPropert = ItemPropertyCastSpell(IP_CONST_CASTSPELL_HASTE_5, IP_CONST_CASTSPELL_NUMUSES_3_USES_PER_DAY);
  RemoveItemProperty(oItem,iItemProperty);
  AddItemProperty(DURATION_TYPE_PERMANENT,iNewItemPropert,oItem);
  }
if(iItemPropertyType == ITEM_PROPERTY_TRUE_SEEING)
  {
  iNewItemPropert = ItemPropertyCastSpell(IP_CONST_CASTSPELL_TRUE_SEEING_9, IP_CONST_CASTSPELL_NUMUSES_3_USES_PER_DAY);
  RemoveItemProperty(oItem,iItemProperty);
  AddItemProperty(DURATION_TYPE_PERMANENT,iNewItemPropert,oItem);
  }
if(iItemPropertyType == ITEM_PROPERTY_FREEDOM_OF_MOVEMENT)
  {
  iNewItemPropert = ItemPropertyCastSpell(IP_CONST_CASTSPELL_FREEDOM_OF_MOVEMENT_7, IP_CONST_CASTSPELL_NUMUSES_3_USES_PER_DAY);
  RemoveItemProperty(oItem,iItemProperty);
  AddItemProperty(DURATION_TYPE_PERMANENT,iNewItemPropert,oItem);
  }
}

int NoCheatCheckItemProperty(itemproperty iItemProperty)
{
int iDurationType = GetItemPropertyDurationType(iItemProperty);
if(iDurationType != DURATION_TYPE_PERMANENT)return FALSE;

int iItemPropertyType = GetItemPropertyType(iItemProperty);
if(iItemPropertyType == ITEM_PROPERTY_HASTE) return TRUE;
if(iItemPropertyType == ITEM_PROPERTY_TRUE_SEEING) return TRUE;
if(iItemPropertyType == ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS) return TRUE;
if(iItemPropertyType == ITEM_PROPERTY_FREEDOM_OF_MOVEMENT) return TRUE;
return FALSE;
}

void NoCheatItemProperty(object oItem)
{
itemproperty iItemProperty = GetFirstItemProperty(oItem);
while(GetIsItemPropertyValid(iItemProperty))
  {
  if(NoCheatCheckItemProperty(iItemProperty) && !GetPlotFlag(oItem)) NoCheatDeleteAndSetItemProperty(oItem, iItemProperty);
  iItemProperty = GetNextItemProperty(oItem);
  }
}

void NoCheatStarting(object oPC)
{
object oItem;
oItem = GetFirstItemInInventory(oPC);
while(oItem != OBJECT_INVALID)
  {
  NoCheatItemProperty(oItem);
  oItem = GetNextItemInInventory(oPC);
  }
int iSlot = 0;
for (iSlot; iSlot<14; iSlot++)
{
oItem = GetItemInSlot(iSlot, oPC);
if(GetIsObjectValid(oItem)) NoCheatItemProperty(oItem);
}
}

//############################################################################//

void main()
{
object oPC = GetEnteringObject(); //* , On Enter
NoCheatStarting(oPC);
}
Aiwan
, POST_- 15 , .
Neverwinter Script Source
//::///////////////////////////////////////////////
//:: Copyright © 2004 WRG!
//:://////////////////////////////////////////////
/*
*/

//:://////////////////////////////////////////////
//:: Created By: Aiwan
//:: Created On: 23.07.2004
//:://////////////////////////////////////////////

int StartingConditional()
{
    string sTag = ("POST_"+GetTag(OBJECT_SELF));
    object oWp = GetWaypointByTag(sTag);

    if (GetIsObjectValid(oWp) && GetDistanceBetween(oWp, OBJECT_SELF) > 15.0f)
        return TRUE;
    return FALSE;
}
Valleo
, , :

Neverwinter Script Source
object oPC = GetLastPCRested();
if(GetLastRestEventType() == REST_EVENTTYPE_REST_STARTED)
  {
  SendMessageToPC(oPC," ."); //
  AssignCommand(oPC, ClearAllActions());
  }
Lex
: _kaa_

:
Neverwinter Script Source
//::///////////////////////////////////////////////
//:: NW_S3_Alcohol.nss
//:: Copyright 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Makes beverages fun.
May 2002: Removed fortitude saves. Just instant intelligence loss
*/

//:://////////////////////////////////////////////
//:: Created By:  Brent
//:: Created On:  February 2002
//:://////////////////////////////////////////////

void DrinkIt(object oTarget)
{
  // AssignCommand(oTarget, ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK));
  AssignCommand(oTarget,ActionSpeakStringByStrRef(10499));
}

void MakeDrunk(object oTarget, int nPoints)
{
if (Random(100) + 1 < 40)
AssignCommand(oTarget, ActionPlayAnimation(ANIMATION_LOOPING_TALK_LAUGHING));
else
AssignCommand(oTarget, ActionPlayAnimation(ANIMATION_LOOPING_PAUSE_DRUNK));

effect eDumb = EffectAbilityDecrease(ABILITY_INTELLIGENCE, nPoints);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDumb, oTarget, 60.0);
//  AssignCommand(oTarget, SpeakString(IntToString(GetAbilityScore(oTarget,ABILITY_INTELLIGENCE))));
}
void main()
{
object oTarget = GetSpellTargetObject();
  // SpeakString("here");
// * Beer
if (GetSpellId() == 406)
{
// *burp*
//AssignCommand(oTarget, SpeakString("Beer"));
DrinkIt(oTarget);
// if (FortitudeSave(oTarget, d20()+10) == TRUE)
{
MakeDrunk(oTarget, 1);
}
}
else
// *Wine
if (GetSpellId() == 407)
{
DrinkIt(oTarget);
// if (FortitudeSave(oTarget, d20()+10 +2) == TRUE)
{
MakeDrunk(oTarget, 2);
}
}
else
// * Spirits
if (GetSpellId() == 408)
{
DrinkIt(oTarget);
// if (FortitudeSave(oTarget, d20()+10) == TRUE)
{
MakeDrunk(oTarget, 3);
}
  }

}


-:

smile.gif
. , , .

Neverwinter Script Source
object oItem = GetSpellCastItem();
if (GetStringUpperCase(GetStringLeft(GetTag(oItem),13))=="AX_IT_POISON_"){
float PoisonType = StringToFloat(GetStringRight(GetTag(oItem),GetStringLength(GetTag(oItem))-13));
DelayCommand(PoisonType, ExecuteScript("lg_anim_death",oTarget));

: `lg_anim_death`
Neverwinter Script Source
void main()
{
AssignCommand(OBJECT_SELF,ClearAllActions());
AssignCommand(OBJECT_SELF,ActionPlayAnimation(ANIMATION_LOOPING_SPASM));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectKnockdown(),OBJECT_SELF,4.0));
DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectDeath(TRUE),OBJECT_SELF));
DelayCommand(4.0, SendMessageToPC(OBJECT_SELF,"Âàñ îòðàâèëè"));


[mergetime]1092332152[/mergetime]
<small> 17:26</small>



,

object oJamp = GetTransitionTarget(OBJECT_SELF);
if (GetIsPC(oPC))
{
AssignCommand(oPC, JumpToObject(oJamp));


:

string sJamp = GetTag(GetTransitionTarget(OBJECT_SELF));
....
JumpToObject(GetObjectByTag(sJamp));


************************************************
tag = mask + INtToString(Number);
mask = "WP_NPCTAG_"
Number = 1..12

*************************************************

DestroyObject(GetItemInSlot(INVENTORY_SLOT_CARMOR,oPC));

*************************************************
>    

object oItem=GetModuleItemAcquired();
if(GetTag(oItem)=="SEAMAGAZIN_PIRAT")
{
 if(GetLocalInt(oItem,"DO_ONCE")!=1 && GetItemPossessor(oItem) == GetFirstPC())
  {
 AddJournalQuestEntry("ANDRA_PIRATES", 4, GetFirstPC());
 SetLocalInt(oItem,"DO_ONCE",1);
  }
}

*****************************************************
> .
SetLocalInt(_1, "_1", GetLocalInt(_1, "_1") + 1);

?
_1 = OBJECT_SELF -
           
GetEnteringObject() -

********************************          
>
int StartingConditional()
{

  // Add the randomness
  if(Random(100) >= 15)
      return FALSE;

  return TRUE;
}

*************************************************
> .
reateObject "new_tag"
, , :
void main()
{
int i=0;
object oScelet = GetObjectByTag("new_tag",i);
while (oScelet!=OBJECT_INVALID)
 {
 DestroyObject(oScelet);
 i++;
 oScelet = GetObjectByTag("new_tag",i)
 }
}

****************************************************
>

if (GetTag(GetItemInSlot(INVENTORY_SLOT_CARMOUR,GetPCSpeaker())==" ")

>***************************************
>
object oPC = GetEnteringObject();
object oDoor = GetObjectByTag("_1"); //
if (!GetIsPC(oPC))
   return;
if (GetLocalInt(oPC, "FLOODED") == 1)
  oDoor = GetObjectByTag("_2"); //
AssignCommand(oDoor, ActionOpenDoor(oDoor));
AssignCommand(oPC, JumpToObject(oDoor));

>***************************************
// PC !!!

void main()
{
object oPC = GetPCSpeaker();
object oItem = GetItemPossessedBy(oPC, "ZAVTRAK");
if (GetTag(oItem) == "ZAVTRAK")
{
 SpeakString(" !");
 DestroyObject(oItem); //
}
else
{
 SpeakString("! ?");
}
}
>******************************************
// !!!

void main()
{
object oPC = GetPCSpeaker();
object oItem = GetObjectByTag("ZAVTRAK");
if (GetTag(GetItemPossessedBy(oPC, "ZAVTRAK")) == "ZAVTRAK")
{
 SpeakString(" !");
 ActionGiveItem(oItem, oPC);  //
}
else
{
 SpeakString("! ?");
}
}

>******************************************
void main()
{
object oPC = GetPCSpeaker();
object oItem = GetItemPossessedBy(oPC, "MINERS_PISMO");
object oNos = GetObjectByTag("SUPER_NOS_IN_MARKET");
AssignCommand (oNos, JumpToObject(GetObjectByTag("POISON_SUPER_NOS")));
if (GetTag(oItem) == "MINERS_PISMO")
{
 DestroyObject(oItem); //
 SpeakString(", !");
}
}
>******************************************
> ,
object oPC = GetFirstPC();
CreateItemOnObject("ResRef-", oPC, );

...
. 2
:)...
>******************************************

<small> 17:29</small>
Valleo

:
Neverwinter Script Source
void StartBog()
{
object oBog = OBJECT_SELF;
object oArea = GetArea(oBog);
location lLocation = GetLocation(oBog);
location lLoc;
location lLocat;
object oObject = GetFirstObjectInShape(SHAPE_SPHERE,100.0,lLocation,FALSE,OBJECT_TYPE_CREATURE);
while(GetIsObjectValid(oObject))
{
lLoc = GetLocation(oObject);
lLocat = GetLocalLocation(oObject,"BOGLOC");
if(GetIsObjectValid(GetAreaFromLocation(lLocat)))
  {
  float fDist = GetDistanceBetweenLocations(lLoc,lLocat);
  if(fDist < 5.0)
   {
   effect eSlow = EffectMovementSpeedDecrease(75);
   ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eSlow,oObject,70.0);
   FloatingTextStringOnCreature(" ...",oObject,FALSE);
   }
  }
SetLocalLocation(oObject,"BOGLOC",lLoc);
oObject = GetNextObjectInShape(SHAPE_SPHERE,100.0,lLocation,FALSE,OBJECT_TYPE_CREATURE);
}
}
void main()
{
object oBog = OBJECT_SELF;
int iTimer = GetLocalInt(oBog,"TIMER");
if(iTimer <= 9)
{
iTimer = iTimer + 1;
SetLocalInt(oBog,"TIMER",iTimer);
return;
}
SetLocalInt(oBog,"TIMER",0);
StartBog();
}
Aiwan
, , , . , : " ..." :?)

Neverwinter Script Source
//:://////////////////////////////////////////////
//:: Created By: WRG! Aiwan aiwan@e-mail.ru
//:: Created On: 21.12.2003
//:://////////////////////////////////////////////
/*
           
*/

//:://////////////////////////////////////////////
void main()
{
    object oPC = GetPCSpeaker();
    AssignCommand(OBJECT_SELF, ActionPauseConversation());
    AssignCommand(OBJECT_SELF, FadeToBlack(oPC, FADE_SPEED_SLOW));
    AssignCommand(OBJECT_SELF, ActionWait(4.0));
    AssignCommand(OBJECT_SELF, FadeFromBlack(oPC, FADE_SPEED_SLOW));
    SetTime(GetTimeHour()+(Random(4)), GetTimeMinute()+(Random(60)), 0, 0);
    AssignCommand(OBJECT_SELF, ActionResumeConversation());
}
Twin
, NPC , . wink.gif - , .. "" .., NPC .

PLC_AUTORESPAWN. , , DelayCommand. "" 8x8, . DelayCommand , . wink.gif
, :

Neverwinter Script Source
//:://////////////////////////////////////////////
//:: Created By: Twin
//:: Communication:
//::  E-mail: twin_quad@hotmail.com
//::  IRC: Twin@irc.rinet.ru:6669
//::
//:: Created On: 2004.10
//:://////////////////////////////////////////////

void doSpawn(string sResRef, string sTag, location locWhere, int nRespawnTime, int nMaxSpawns, int nCurrent, int bAnimation);

void cycleSpawn(object oNPC)
{
    object oRespawner = GetObjectByTag("PLC_AUTORESPAWN");
    if ( !GetIsObjectValid(oRespawner) )
        return;

    int nRespawnTime = GetLocalInt(oNPC, "respawn_time");
    if ( nRespawnTime <= 0 )
        return;

    string sWaypoint = GetTag(oNPC);
    if ( FindSubString(sWaypoint, "NPC_") == 0 )
        sWaypoint = GetStringRight(sWaypoint, GetStringLength(sWaypoint) - 4);
    sWaypoint = "WPR_" + sWaypoint;

    int bAnimation = GetLocalInt(oNPC, "respawn_animation");
    int nMaxSpawns = GetLocalInt(oNPC, "respawn_max");
    int nCurrent  = GetLocalInt(oNPC, "respawn_current");
    if ( nCurrent == 0 )
        nCurrent = 1;

    if ( (nMaxSpawns <= 0 || nCurrent < nMaxSpawns) && GetIsObjectValid(GetObjectByTag(sWaypoint)) )
    {
        //SendMessageToPC(GetFirstPC(), "Next respawn in "+ IntToString(nRespawnTime) +" seconds.");
        //SendMessageToPC(GetFirstPC(), "Current/Max: "+ IntToString(nCurrent) +"/"+ IntToString(nMaxSpawns));

        string sResRef = GetResRef(oNPC);
        string sTag = GetTag(oNPC);
        location locWhere = GetLocation(GetObjectByTag(sWaypoint));

        AssignCommand(oRespawner,
            DelayCommand(IntToFloat(nRespawnTime),
                doSpawn(sResRef, sTag, locWhere, nRespawnTime, nMaxSpawns, nCurrent, bAnimation)
            )
        );
    }
}

void doSpawn(string sResRef, string sTag, location locWhere, int nRespawnTime, int nMaxSpawns, int nCurrent, int bAnimation)
{
    object oNPC;
    oNPC = CreateObject(OBJECT_TYPE_CREATURE, sResRef, locWhere, bAnimation, sTag);

    nCurrent++;
    SetLocalInt(oNPC, "respawn_time", nRespawnTime);
    SetLocalInt(oNPC, "respawn_max", nMaxSpawns);
    SetLocalInt(oNPC, "respawn_current", nCurrent);
    SetLocalInt(oNPC, "respawn_animation", bAnimation);

    //SendMessageToPC(GetFirstPC(), "doSpawn("+ sResRef +", "+ sTag +")");
}


NPC, OnDeath UserDefined 1007 ( ) :
Neverwinter Script Source
#include " "


- :
Neverwinter Script Source
cycleSpawn(OBJECT_SELF);


. Variables NPC ( int):
respawn_time - , NPC.
respawn_max - . NPC.
respawn_animation - . NPC [0/1].

Variables NPC, .

NPC "WPR_"+ __NPC. NPC "NPC_", .

.

NPC, . .

- . wink.gif

P.S. ... .
, , . . - . - , . OnHB . Static.
Neverwinter Script Source
void main()
{
object oSelf = OBJECT_SELF;
if (GetIsDay()==FALSE && GetLocalInt(OBJECT_SELF,"on")!=1)
{
SetLocalInt(OBJECT_SELF,"on",1);
PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
effect eLight = EffectVisualEffect(VFX_DUR_LIGHT_YELLOW_10);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLight, oSelf);
}

if (GetIsDay()==TRUE && GetLocalInt(OBJECT_SELF,"on")==1)
{
SetLocalInt(OBJECT_SELF,"on",0);
PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
effect eEffect = GetFirstEffect(oSelf);
while (GetIsEffectValid(eEffect) == TRUE)
{
if (GetEffectType(eEffect) == EFFECT_TYPE_VISUALEFFECT)
RemoveEffect(oSelf, eEffect);
eEffect = GetNextEffect(oSelf);
}
}

}
[MoF]Darth_Nick. . . , - biggrin.gif
Neverwinter Script Source
void main()
{
object oPC = GetPCLevellingUp();

if(GetAlignmentGoodEvil(oPC) == ALIGNMENT_EVIL)
{
SetCutsceneMode(oPC, TRUE);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_SCREEN_SHAKE), GetLocation(oPC), 8.0);
AssignCommand(oPC, PlayAnimation(ANIMATION_LOOPING_SPASM,1.0,5.0));
DelayCommand(1.0,AssignCommand(oPC,PlayVoiceChat(VOICE_CHAT_LAUGH)));
DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_EPIC_UNDEAD), oPC));
DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HARM), oPC));
DelayCommand(4.0,AssignCommand(oPC, PlayAnimation(ANIMATION_LOOPING_DEAD_FRONT,1.0,10.0)));
DelayCommand(3.8,AssignCommand(oPC,PlayVoiceChat(VOICE_CHAT_DEATH)));
DelayCommand(5.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_SLEEP), oPC));
DelayCommand(10.0,SetCutsceneMode(oPC, FALSE));
}
else if(GetAlignmentGoodEvil(oPC) == ALIGNMENT_GOOD)
{
SetCutsceneMode(oPC, TRUE);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_SCREEN_SHAKE), GetLocation(oPC), 8.0);
AssignCommand(oPC, PlayAnimation(ANIMATION_LOOPING_SPASM,1.0,5.0));
DelayCommand(1.0,AssignCommand(oPC,PlayVoiceChat(VOICE_CHAT_NEARDEATH)));
DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HOLY_AID), oPC));
DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUNBEAM), oPC));
DelayCommand(4.0,AssignCommand(oPC, PlayAnimation(ANIMATION_LOOPING_DEAD_FRONT,1.0,10.0)));
DelayCommand(3.8,AssignCommand(oPC,PlayVoiceChat(VOICE_CHAT_DEATH)));
DelayCommand(5.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_SLEEP), oPC));
DelayCommand(10.0,SetCutsceneMode(oPC, FALSE));
}
else if(GetAlignmentGoodEvil(oPC) == ALIGNMENT_NEUTRAL)
{
SetCutsceneMode(oPC, TRUE);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_SCREEN_SHAKE), GetLocation(oPC), 8.0);
AssignCommand(oPC, PlayAnimation(ANIMATION_LOOPING_SPASM,1.0,5.0));
DelayCommand(1.0,AssignCommand(oPC,PlayVoiceChat(VOICE_CHAT_NEARDEATH)));
DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SOUND_BURST), oPC));
DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HEALING_X), oPC));
DelayCommand(4.0,AssignCommand(oPC, PlayAnimation(ANIMATION_LOOPING_DEAD_FRONT,1.0,10.0)));
DelayCommand(3.8,AssignCommand(oPC,PlayVoiceChat(VOICE_CHAT_DEATH)));
DelayCommand(5.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_SLEEP), oPC));
DelayCommand(10.0,SetCutsceneMode(oPC, FALSE));
}
}
, smile.gif dntknw.gif
. :

1. () aka
2. .
3. 3 .
4. ( 20 lbs) , . wink.gif (- biggrin.gif )

:
1. ( ..)
2. .
3. .
4. 180 ( )
5. - , - .

:

Item':
- [bedroll]
- [food]
- [wood]

Placeable':
- [camp]
( ) - [place_bedroll]
( aka woodpile biggrin.gif) - [place_wood] .

P.S. Blueprint ResRef

Static! .

...

OnPlayerRest
Neverwinter Script Source
//////////////////////////////////////////////////
////////////Avaddon's Rest System//////////
////////// Script On Player Rest ////////////
////////// Date: 12.10.2004 ///////////////
//////// Created by: Avaddon ////////////
/////////////////////////////////////////////

#include "nw_i0_tool"
void main()
{
object oPC = GetLastPCRested();
object oCamp = GetNearestObjectByTag("camp",oPC);
object oBedroll = GetNearestObjectByTag("place_bedroll",oPC);
effect eSleep = EffectVisualEffect(VFX_IMP_SLEEP);
effect eBlind = EffectBlindness();
effect eDisease = EffectDisease(DISEASE_SOLDIER_SHAKES);

if (GetLastRestEventType() == REST_EVENTTYPE_REST_STARTED) //
{
if(GetIsObjectValid(oCamp)!=TRUE) //
{
  FloatingTextStringOnCreature(" ",oPC,FALSE);
  AssignCommand(oPC,ClearAllActions()); //
}
  else
  {
  if(GetDistanceBetween(oPC,oCamp)>3.0)
  {
  FloatingTextStringOnCreature(" ",oPC,FALSE);
  AssignCommand(oPC,ClearAllActions()); //
  }
  else
  {
if (HasItem(oPC,"bedroll")==TRUE) //
{
if (HasItem(oPC,"food")==TRUE) //
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eSleep,oPC,30.0); // Z-z-z
FadeToBlack(oPC, FADE_SPEED_SLOW); //
CreateObject(OBJECT_TYPE_PLACEABLE,"place_bedroll",GetLocation(oPC)); //
DestroyObject(GetItemPossessedBy(oPC,"food")); //
DestroyObject(GetItemPossessedBy(oPC,"bedroll")); // (, )
SetLocalInt(oPC,"slept",1); //
}
else
{
FloatingTextStringOnCreature(" ?!",oPC,FALSE);
AssignCommand(oPC,ClearAllActions());
}
}
else
{
FloatingTextStringOnCreature(" ",oPC,FALSE);
AssignCommand(oPC,ClearAllActions());
}
  }
  }
}
  if (GetLastRestEventType() == REST_EVENTTYPE_REST_FINISHED) //
  {
  FadeFromBlack(oPC, FADE_SPEED_SLOW); //
  DestroyObject(oBedroll); //
  SetLocalInt(oPC,"slept",0); //
  CreateItemOnObject("bedroll", oPC,1); //
  if (GetWeight(GetItemInSlot(INVENTORY_SLOT_CHEST,oPC))>20) //
  {
  ApplyEffectToObject(DURATION_TYPE_INSTANT,eDisease,oPC); //
  }

  }

  if (GetLastRestEventType() == REST_EVENTTYPE_REST_CANCELLED) //
  {
  if(GetLocalInt(oPC,"slept")==1) //
  {
  FadeFromBlack(oPC, FADE_SPEED_FAST); //
  DestroyObject(oBedroll); //
  FloatingTextStringOnCreature(" , .",oPC,FALSE);
  ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eSleep,oPC,10.0); //
  ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eBlind,oPC,10.0); //
  SetLocalInt(oPC,"slept",0); //
  CreateItemOnObject("bedroll", oPC,1); //
  }
  }

}


UnAcquireItem
Neverwinter Script Source
/////////////////////////////////////////
//////////Avaddon's Rest System//////////
////// Script On UnAcquireItem //////////
//////// Date: 12.10.2004 ///////////////
//////// Created by: Avaddon ////////////
/////////////////////////////////////////
void main()
{
object oLost = GetModuleItemLost();
object oPC = GetModuleItemLostBy();
if (GetTag(oLost)=="wood")
{
CreateObject(OBJECT_TYPE_PLACEABLE,"place_wood",GetLocation(oPC)); //
DestroyObject(oLost); //
}
}


On Used
Neverwinter Script Source
/////////////////////////////////////////
//////////Avaddon's Rest System//////////
////// Script On Used Woodpile //////////
//////// Date: 12.10.2004 ///////////////
//////// Created by: Avaddon ////////////
/////////////////////////////////////////
#include "nw_i0_tool"
void main()
{
object oPC = GetLastUsedBy();

if (GetIsPC(oPC)==TRUE)
{
if (GetTag(GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oPC))=="NW_IT_TORCH001") // -
{
AssignCommand(oPC,PlayAnimation(ANIMATION_LOOPING_GET_LOW,1.0,2.0));
CreateObject(OBJECT_TYPE_PLACEABLE,"camp",GetLocation(OBJECT_SELF),TRUE);// -
DestroyObject(OBJECT_SELF); //
}
else
{
DestroyObject(OBJECT_SELF);
CreateItemOnObject("wood",oPC,1); // -
}
}
}


On Heartbeat
Neverwinter Script Source
/////////////////////////////////////////
//////////Avaddon's Rest System//////////
////// Script On Heartbeat Campfire /////
//////// Date: 12.10.2004 ///////////////
//////// Created by: Avaddon ////////////
/////////////////////////////////////////

void main()
{
int iFire = GetLocalInt(OBJECT_SELF,"fire");

if (iFire<1)
{
SetLocalInt(OBJECT_SELF,"fire",6);
}
else
{
SetLocalInt(OBJECT_SELF,"fire",iFire+6);
}

if (iFire>180) // - 180
{
DeleteLocalInt(OBJECT_SELF,"fire");
DestroyObject(OBJECT_SELF);
}
}


. - , .
Lex
: .
: .

Neverwinter Script Source
// Make a large SoU bench usable by 3 creatures simultaneously
void main()
{
    // Set some variable for a beter understanding
    object oPlayer = GetLastUsedBy();
    object oBench = OBJECT_SELF;

    // Get a hold on the 3 pillows
    object oPillow1 = GetLocalObject( OBJECT_SELF, "Pillow 1" );
    object oPillow2 = GetLocalObject( OBJECT_SELF, "Pillow 2" );
    object oPillow3 = GetLocalObject( OBJECT_SELF, "Pillow 3" );

    // If "pillow 1" do not exist, create 3 of them and attach them to the bench
    if( !GetIsObjectValid( oPillow1 ) )
    {
        // Set up some variable for understanding
        object oArea = GetArea( oBench );
        vector locBench = GetPosition( oBench );
        float fOrient = GetFacing( oBench );

        // You can change the space between pillows changing this value
        float fSpace = 1.0f;

        // Calculate location of the 3 pillows
        location locPillow1 = Location( oArea, locBench + AngleToVector( fOrient + 90.0f ) * fSpace, fOrient );
        location locPillow2 = Location( oArea, locBench + AngleToVector( fOrient - 90.0f ) * fSpace, fOrient );
        location locPillow3 = Location( oArea, locBench, fOrient );

        // Create the 3 pillows
        oPillow1 = CreateObject( OBJECT_TYPE_PLACEABLE, "plc_invisobj", locPillow1 );
        oPillow2 = CreateObject( OBJECT_TYPE_PLACEABLE, "plc_invisobj", locPillow2 );
        oPillow3 = CreateObject( OBJECT_TYPE_PLACEABLE, "plc_invisobj", locPillow3 );
   
        // "attach" the pillows to the bench
        SetLocalObject( OBJECT_SELF, "Pillow 1", oPillow1 );
        SetLocalObject( OBJECT_SELF, "Pillow 2", oPillow2 );
        SetLocalObject( OBJECT_SELF, "Pillow 3", oPillow3 );
    }
   
    // Get a hold on the nearest invisible object, (maybe a pillow)
    int iDistance = 1;
    object oPillow = GetNearestObjectByTag( "InvisibleObject", oPlayer, iDistance );
   
    // while we find invisible object and that we did not check the 3 linked pillows
    int iCount = 0;
    while( GetIsObjectValid( oPillow ) || iCount < 3 )
    {
        // if it is one of the three pillow linked the the bench
        if( oPillow == oPillow1 || oPillow == oPillow2 || oPillow == oPillow3 )
        {
            iCount = iCount + 1 ;
            // If available
            if( !GetIsObjectValid( GetSittingCreature( oPillow ) ) )
            {
                // Sit and quit the script
                AssignCommand( oPlayer, ActionSit( oPillow ) );
                return;
            }
        }
        // Get the next nearest invisible object
        iDistance = iDistance + 1;
        oPillow = GetNearestObjectByTag( "InvisibleObject", oPlayer, iDistance );
    }
}

. APS/NWNX 2 + MySQL.
, .
- .
MySQL . . :
-
-
-
- IP
- CD-Key
- IP
- CD-Key
-
- -
- ,
- , .
- .
- - .
, PHP - - smile.gif

:

aps_include erf APS/NWNX 2.

OnModuleLoad:

Neverwinter Script Source
#include "aps_include"
void main()
{
SQLInit();
string sSQL="CREATE TABLE `reg_data` ("+
" `status` varchar(64) NOT NULL default '',"+
" `login` varchar(64) NOT NULL default '',"+
" `name` varchar(64) NOT NULL default '',"+
" `gender` char(1) NOT NULL default '',"+
" `race` varchar(100) NOT NULL default '',"+
" `sub_race` varchar(100) NOT NULL default '',"+
" `deity` varchar(100) NOT NULL default '',"+
" `cd_key` varchar(64) NOT NULL default '',"+
" `ip` varchar(25) NOT NULL default '',"+
" `creation_date` datetime NOT NULL default '0000-00-00 00:00:00',"+
") TYPE=MyISAM;";


SQLExecDirect("DESCRIBE reg_data");
// -
if (SQLFetch()!= SQL_SUCCESS)
{
SQLExecDirect(sSQL);
}
}


OnClientEnter:
Neverwinter Script Source
#include "aps_include"
void main()
{
object oPC=GetEnteringObject();
string sName=SQLEncodeSpecialChars(GetName(oPC));//
string sLogin=SQLEncodeSpecialChars(GetPCPlayerName(oPC)); //
string sGender=""; if(GetGender(oPC)==GENDER_FEMALE)sGender="";//
string sKey=GetPCPublicCDKey(oPC); //CD-key
string sIp=GetPCIPAddress(oPC); //Ip
string sDeity=GetDeity(oPC); //
string sStatus = "PC";////
if (GetIsDM(oPC)==TRUE)sStatus = "DM";
string sRace = ""; //
if(GetRacialType(oPC)==RACIAL_TYPE_DWARF)sRace = "";
if(GetRacialType(oPC)==RACIAL_TYPE_ELF)sRace = "";
if(GetRacialType(oPC)==RACIAL_TYPE_GNOME)sRace = "";
if(GetRacialType(oPC)==RACIAL_TYPE_HALFELF)sRace = "";
if(GetRacialType(oPC)==RACIAL_TYPE_HALFLING)sRace = "";
if(GetRacialType(oPC)==RACIAL_TYPE_HALFORC)sRace = "";
if(GetRacialType(oPC)==RACIAL_TYPE_HUMAN)sRace = "";
string sSubrace=GetStringLeft(GetSubRace(oPC), 99);


// SQL - - =
string sSelect = "SELECT cd_key FROM `reg_data` WHERE login='"+GetPCPlayerName(oPC)+
"' AND name='" +GetName(oPC)+ "' AND status='"+sStatus+"'";

// - , , -, , , , -, ip,
string sReg="INSERT INTO reg_data (status, login, name, gender,"+
  "race,sub_race, deity,cd_key,ip,creation_date) "+
  "VALUES('"+sStatus+
      "','"+sLogin+
      "','"+sName+
      "','"+sGender+
      "','"+sRace+
      "','"+sSubrace+
      "','"+sDeity+
      "','"+sKey+
      "','"+sIp+
      "',NOW())";

// ( )
SQLExecDirect(sSelect);
if (SQLFirstRow() == SQL_SUCCESS)
{
SendMessageToPC(oPC," !");

}
else
{
SQLExecDirect(sReg);
SendMessageToPC(oPC," ! !");
}
}
[MoF]Darth_Nick
Neverwinter Script Source
//::///////////////////////////////////////////////
//:: Name:
//:://////////////////////////////////////////////
/*
OnEnter (Generic)...
- smile.gif
*/

//:://////////////////////////////////////////////
//:: Created By: [MoF]Darth_Nick
//:://////////////////////////////////////////////

void main()
{
object oPC = GetEnteringObject();
effect eBall = EffectVisualEffect(VFX_FNF_FIREBALL);

if (GetIsPC(oPC) && GetCurrentHitPoints(oPC) <= 70)
{
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, eBall, oPC));
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oPC));
}
else if (GetIsPC(oPC) && GetCurrentHitPoints(oPC) > 70)
{
FloatingTextStringOnCreature("Heh...This trick is not for me!", oPC);
}
}


...
OnPlayerDeath
CODE
void main()
{
object oPlayer = GetLastPlayerDied();
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DEATH), GetLocation(oPlayer));

DelayCommand(6.0,AssignCommand(oPlayer,ClearAllActions()));
DelayCommand(2.5, PopUpGUIPanel(oPlayer,GUI_PANEL_PLAYER_DEATH));
}


CODE
DelayCommand(2.5, PopUpGUIPanel(oPlayer,GUI_PANEL_PLAYER_DEATH));


yes.gif
CODE
#include "nw_i0_plot"
void ApplyPenalty(object oDead)
{
   int nXP = GetXP(oDead);
   int nPenalty = 100 * GetHitDice(oDead);
   int nHD = GetHitDice(oDead);
   // * You can not lose a level with this respawning
   int nMin = ((nHD * (nHD - 1)) / 2) * 1000;

   int nNewXP = nXP - nPenalty;
   if (nNewXP < nMin)
      nNewXP = nMin;
   SetXP(oDead, nNewXP);
   int nGoldToTake =    FloatToInt(0.10 * GetGold(oDead));
   // * a cap of 10 000gp taken from you
   if (nGoldToTake > 10000)
   {
       nGoldToTake = 10000;
   }
   AssignCommand(oDead, TakeGoldFromCreature(nGoldToTake, oDead, TRUE));
   DelayCommand(4.0, FloatingTextStrRefOnCreature(58299, oDead, FALSE));
   DelayCommand(4.8, FloatingTextStrRefOnCreature(58300, oDead, FALSE));

}
void main()
{
   object oRespawner = GetLastRespawnButtonPresser();
   AssignCommand(oRespawner,JumpToLocation(GetLocation(GetObjectByTag("WP_RAISE"))));
   ApplyPenalty(oRespawner);
   ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oRespawner);
   ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oRespawner)), oRespawner);
   RemoveEffects(oRespawner);
}

... , good.gif
[MoF]Darth_Nick
smile.gif
Neverwinter Script Source
#include "aps_include"
void main()
{
object oPC = GetLastPlayerDied();
string sDeath = "UPDATE `reg_data` SET death=1 WHERE name='" + GetName(oPC) + "'";
string sDHelp = " , !";
PopUpDeathGUIPanel(oPC, TRUE, TRUE, 1, sDHelp);
SQLExecDirect(sDeath);
}

...

smile.gif
1: , ?
[mergetime]1101261601[/mergetime]
.. OnRespawn smile.gif , lol.gif lol.gif
Ilharess
/ ( , , , , , biggrin.gif ).

DAYTIMEGUARD string resref npc, ""
NIGHTTIMEGUARD string resref npc, ""
GATESGUARD string resref npc, ""
onhb :
Neverwinter Script Source
/*
door_guardspaw_5
Spawner for guards.
*/

//#include "kv_tools"
void main()
{
//--
string sDaytimeGuard = "MOB_DAYTIMEGUARD" + GetSubString(GetTag(OBJECT_SELF), 4, GetStringLength(GetTag(OBJECT_SELF)));
object oDaytimeGuard = GetObjectByTag(sDaytimeGuard);
//--
string sNighttimeGuard = "MOB_NIGHTTIME" + GetSubString(GetTag(OBJECT_SELF), 4, GetStringLength(GetTag(OBJECT_SELF)));
object oNighttimeGuard = GetObjectByTag(sNighttimeGuard);
//--
string sGatesGuard = "MOB_GATESGUARD" + GetSubString(GetTag(OBJECT_SELF), 4, GetStringLength(GetTag(OBJECT_SELF)));
object oGatesGuard = GetObjectByTag(sGatesGuard);
//--Spawn day guard--//
if ( GetIsDay() && !GetIsObjectValid(oDaytimeGuard) && GetLocalString(OBJECT_SELF, "DAYTIMEGUARD") != "")

{
ActionOpenDoor(OBJECT_SELF);
object oNewGuard = CreateObject(OBJECT_TYPE_CREATURE, GetLocalString(OBJECT_SELF, "DAYTIMEGUARD"), GetLocation(OBJECT_SELF), 0, sDaytimeGuard);

/* if (GetIsObjectValid(oNewGuard))
{
DebugMessage(GetTag(OBJECT_SELF) + ": Guard " + sDaytimeGuard + " spawned sucsesfull");
}*/

//--Spawn Night Guard--//
} else if ( GetIsNight() && !GetIsObjectValid(oNighttimeGuard) && GetLocalString(OBJECT_SELF, "NIGHTTIMEGUARD") != "")
{
ActionOpenDoor(OBJECT_SELF);
object oNewGuard = CreateObject(OBJECT_TYPE_CREATURE, GetLocalString(OBJECT_SELF, "NIGHTTIMEGUARD"), GetLocation(OBJECT_SELF), 0, sNighttimeGuard);

/* if (GetIsObjectValid(oNewGuard))
{
DebugMessage(GetTag(OBJECT_SELF) + ": Guard " + sNighttimeGuard + " spawned sucsesfull");
}*/

//--Spawn Gate Guard--//
} else if ( GetIsDusk() && !GetIsObjectValid(oGatesGuard) && GetLocalString(OBJECT_SELF, "GATESGUARD") != "")
{
ActionOpenDoor(OBJECT_SELF);
object oNewGuard = CreateObject(OBJECT_TYPE_CREATURE, GetLocalString(OBJECT_SELF, "GATESGUARD"), GetLocation(OBJECT_SELF), 0, sGatesGuard);
/*if (GetIsObjectValid(oNewGuard))
{
DebugMessage(GetTag(OBJECT_SELF) + ": Guard " + sGatesGuard + " spawned sucsesfull");
}*/

}
//--
if (GetIsNight() && GetIsObjectValid(oDaytimeGuard))
{
SignalEvent(oDaytimeGuard, EventUserDefined(111));//TIME TO GO HOME:)
SetLocalObject(GetArea(OBJECT_SELF), "THE_DOOR", OBJECT_SELF);
}
else if (GetIsDay() && GetIsObjectValid(oNighttimeGuard))
{
SignalEvent(oNighttimeGuard, EventUserDefined(111));//TIME TO GO HOME:)
SetLocalObject(GetArea(OBJECT_SELF), "THE_DOOR", OBJECT_SELF);
}
else if (GetIsDawn() && GetIsObjectValid(oGatesGuard))
{
SignalEvent(oGatesGuard, EventUserDefined(111));//TIME TO GO HOME:)
SetLocalObject(GetArea(OBJECT_SELF), "THE_DOOR", OBJECT_SELF);
}
}


onopen
Neverwinter Script Source
/*
door_guardspaw_8
Spawner for guards.
*/


void main()
{

DelayCommand(5.0, ActionCloseDoor(OBJECT_SELF));
SetLocked(OBJECT_SELF, TRUE);
//--
object oClicker = GetLastOpenedBy();
if ( GetIsPC(oClicker)) return;
//--
string sDaytimeGuard = "MOB_DAYTIMEGUARD" + GetSubString(GetTag(OBJECT_SELF), 4, GetStringLength(GetTag(OBJECT_SELF)));
//--
string sNighttimeGuard = "MOB_NIGHTTIME" + GetSubString(GetTag(OBJECT_SELF), 4, GetStringLength(GetTag(OBJECT_SELF)));
//--
string sGatesGuard = "MOB_GATESGUARD" + GetSubString(GetTag(OBJECT_SELF), 4, GetStringLength(GetTag(OBJECT_SELF)));
//--
if (GetTag(oClicker) == sDaytimeGuard || GetTag(oClicker) == sNighttimeGuard || GetTag(oClicker) == sGatesGuard)
{
DelayCommand(1.0, DestroyObject(oClicker));
}

}



onfailtoopen
Neverwinter Script Source
/*
door_guardspaw_4
Spawner for guards.
*/


void main()
{
//--
object oClicker = GetClickingObject();
if (GetIsPC(oClicker)) return;
//--
string sDaytimeGuard = "MOB_DAYTIMEGUARD" + GetSubString(GetTag(OBJECT_SELF), 4, GetStringLength(GetTag(OBJECT_SELF)));
//--
string sNighttimeGuard = "MOB_NIGHTTIME" + GetSubString(GetTag(OBJECT_SELF), 4, GetStringLength(GetTag(OBJECT_SELF)));
//--
string sGatesGuard = "MOB_GATESGUARD" + GetSubString(GetTag(OBJECT_SELF), 4, GetStringLength(GetTag(OBJECT_SELF)));
//--
if (GetTag(oClicker) == sDaytimeGuard || GetTag(oClicker) == sNighttimeGuard || GetTag(oClicker) == sGatesGuard)
{

AssignCommand(oClicker, SpeakString("*Ñòó÷èò â äâåðü*"));
DelayCommand(1.0, ActionOpenDoor(OBJECT_SELF));
DelayCommand(1.5, DestroyObject(oClicker));

}

}


userdef :
Neverwinter Script Source
//-- ondef --//
............................................
else if (nUser == 111) //TIME TO GO HOME:)
{

if ( !GetIsInCombat() || GetCurrentAction() != ACTION_DIALOGOBJECT)
{
ClearAllActions();
ActionMoveToObject(GetLocalObject(GetArea(OBJECT_SELF), "THE_DOOR"));
ActionOpenDoor(GetLocalObject(GetArea(OBJECT_SELF), "THE_DOOR"));
}
}


smile.gif
smile.gif DOOR_7 ( )
, ....

QUOTE (baskan @ Nov 20 2004, 17:26)
, 1
: , PC , , , ? !

, . smile.gif

QUOTE ([MoF)
Darth_Nick, Nov 24 2004, 04:57]
1: , ?

2- ?
:

int iMax = - ;
int iValue = 20 ;// -
int iDiff=iMax-iSet; // -
int iSet = iMax-iDiff;

(iSet) PC
20 .

QUOTE ([MoF)
Darth_Nick, Nov 24 2004, 04:57]

...



... ? . ? ... , Web smile.gif , , - .
--, Bioware. "Post game to Inernet", , (, ) , , , PHP , .
APS/NWNX2 MySQL. [MoF]Darth_Nick PHP MySQL.

:

-
- ( MoF]Darth_Nick' - , - . " PHP "
, :
-
-
-
-
- PC DM

:

OnModuleLoad

Neverwinter Script Source
/*
////////////////////////////////
//////Created By: Avaddon//////
//////Date: 28. 11. 2004//////
/////////////////////////////
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\\\\MYSQL SERVER STATUS\\\\\\\
\\\\\\Put this script:\\\\\\\\\
\\\\\\\"OnModuleLoad"\\\\\\\\\\\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
*/

#include "aps_include"
void main()
{
// "aps_onload"
SQLInit();

// MySQL " REG_DATA"
string sSQL="CREATE TABLE `reg_data` ("+
"  `pc_dm` varchar(64) NOT NULL default '',"+
"  `login` varchar(64) NOT NULL default '',"+
"  `name` varchar(64) NOT NULL default '',"+
"  `gender` varchar(10) NOT NULL default '',"+
"  `race` varchar(64) NOT NULL default '',"+
"  `sub_race` varchar(100) NOT NULL default '',"+
"  `levels` varchar(3) NOT NULL default '',"+
"  `class_1` varchar(64) NOT NULL default '',"+
"  `class_2` varchar(64) NOT NULL default '',"+
"  `class_3` varchar(64) NOT NULL default '',"+
"  `deity` varchar(100) NOT NULL default '',"+
"  `cd_key` varchar(64) NOT NULL default '',"+
"  `ip` varchar(25) NOT NULL default '',"+
"  `line_status`  varchar(4) NOT NULL default '',"+
"  `creation_date` datetime NOT NULL default '0000-00-00 00:00:00',"+
") TYPE=MyISAM;";

/* MySQL " line_status" "off", = "on".

. */

string sOffline = "UPDATE `reg_data` SET line_status = 'off' WHERE line_status='on'";

  // REG_DATA
  SQLExecDirect("DESCRIBE reg_data");

  // -
  if (SQLFetch()!= SQL_SUCCESS)
  {
    SQLExecDirect(sSQL);
  }
  // "Offline"
  SQLExecDirect(sOffline);
}



OnClientEnter

Neverwinter Script Source
/*
////////////////////////////////
//////Created By: Avaddon//////
//////Date: 28. 11. 2004//////
/////////////////////////////
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\\\\MYSQL SERVER STATUS\\\\\\\
\\\\\\Put this script:\\\\\\\\\
\\\\\\\"OnClentEnter"\\\\\\\\\\\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
*/

#include "aps_include"
void main()
{
object oPC=GetEnteringObject();
string sName=SQLEncodeSpecialChars(GetName(oPC));//
string sLogin=SQLEncodeSpecialChars(GetPCPlayerName(oPC)); //
string sGender=""; if(GetGender(oPC)==GENDER_FEMALE)sGender="";//
string sKey=GetPCPublicCDKey(oPC); //CD-key
string sIp=GetPCIPAddress(oPC); //Ip
string sDeity=GetDeity(oPC); //
string sPC_DM = "PC"; if (GetIsDM(oPC)==TRUE)sPC_DM = "DM";////
string sSubrace=GetStringLeft(GetSubRace(oPC), 99);//
string sAllLevels = IntToString(GetHitDice(oPC));
// ////////////////////////
string sRace;                                              //
int iRace = GetRacialType(oPC);                            //
switch (iRace)                                            //
    {                                                      //
    case RACIAL_TYPE_DWARF:                                //
    sRace = "";                                      //
    break;                                                //
                                                          //
    case RACIAL_TYPE_ELF:                                  //
    sRace = "";                                        //
    break;                                                //
                                                          //
    case RACIAL_TYPE_GNOME:                                //
    sRace = "";                                        //
    break;                                                //
                                                          //
    case RACIAL_TYPE_HALFELF:                              //
    sRace = "";                                    //
    break;                                                //
                                                          //
    case RACIAL_TYPE_HALFLING:                            //
    sRace = "";                                  //
    break;                                                //
                                                          //
    case RACIAL_TYPE_HALFORC:                              //
    sRace = "";                                    //
    break;                                                //
                                                          //
    case RACIAL_TYPE_HUMAN:                                //
    sRace = "";                                    //
    break;                                                //
    }                                                      //
/////////////////////////////////////////////////////////////


// ///////////////////////////////////////////
int iNum;                                  //
for (iNum=0; iNum<4; iNum++)
{
string sClass;                                          //
int iClass = GetClassByPosition(iNum,oPC);              //
switch (iClass)                                        //
    {                                                  //
    case CLASS_TYPE_ARCANE_ARCHER:                      //
    sClass = " ";                          //
    break;                                              //
                                                        //
    case CLASS_TYPE_ASSASSIN:                          //
    sClass = "";                                  //
    break;                                              //
                                                        //
    case CLASS_TYPE_BARBARIAN:                          //
    sClass = "";                                  //
    break;                                              //
                                                        //
    case CLASS_TYPE_BARD:                              //
    sClass = "";                                    //
    break;                                              //
                                                        //
    case CLASS_TYPE_BLACKGUARD:                        //
    sClass = " ";                              //
    break;                                              //
                                                        //
    case CLASS_TYPE_CLERIC:                            //
    sClass = "";                                  //
    break;                                              //
                                                        //
    case CLASS_TYPE_DIVINECHAMPION:                    //
    sClass = " ";                          //
    break;                                              //
                                                        //
    case CLASS_TYPE_DRAGONDISCIPLE:                    //
    sClass = " ";                          //
    break;                                              //
                                                        //
    case CLASS_TYPE_DRUID:                              //
    sClass = "";                                  //
    break;                                              //
                                                        //
    case CLASS_TYPE_DWARVENDEFENDER:                    //
    sClass = " ";                        //
    break;                                              //
                                                        //
    case CLASS_TYPE_FIGHTER:                            //
    sClass = "";                                    //
    break;                                              //
                                                        //
    case CLASS_TYPE_HARPER:                            //
    sClass = " ";                      //
    break;                                              //
                                                        //
    case CLASS_TYPE_INVALID:                            //
    sClass = " - ";                      //
    break;                                              //
                                                        //
    case CLASS_TYPE_MONK:                              //
    sClass = "";                                  //
    break;                                              //
                                                        //
    case CLASS_TYPE_PALADIN:                            //
    sClass = "";                                //
    break;                                              //
                                                        //
    case CLASS_TYPE_PALEMASTER:                        //
    sClass = " ";                          //
    break;                                              //
                                                        //
    case CLASS_TYPE_RANGER:                            //
    sClass = "";                                //
    break;                                              //
                                                        //
    case CLASS_TYPE_ROGUE:                              //
    sClass = "";                                    //
    break;                                              //
                                                        //
    case CLASS_TYPE_SHADOWDANCER:                      //
    sClass = " ";                            //
    break;                                              //
                                                        //
    case CLASS_TYPE_SHIFTER:                            //
    sClass = "";                              //
    break;                                              //
                                                        //
    case CLASS_TYPE_SORCERER:                          //
    sClass = "";                              //
    break;                                              //
                                                        //
    case CLASS_TYPE_WEAPON_MASTER:                      //
    sClass = " ";                          //
    break;                                              //
                                                        //
    case CLASS_TYPE_WIZARD:                            //
    sClass = "";                                    //
    break;                                              //
    }                                                  //
//////////////////////////////////////////////////////////

//
SetLocalString(oPC,"Class"+IntToString(iNum),sClass);//
//
SetLocalString(oPC,"Level"+IntToString(iNum),IntToString(GetLevelByPosition(iNum,oPC)));//;
}
// 1,2, 3 
string sLevel1 = GetLocalString(oPC,"Level1");
string sLevel2 = GetLocalString(oPC,"Level2");
string sLevel3 = GetLocalString(oPC,"Level3");

// 1,2, 3 
string sClass_1 = GetLocalString(oPC,"Class1")+" ("+sLevel1+")";
string sClass_2 = GetLocalString(oPC,"Class2")+" ("+sLevel2+")";
string sClass_3 = GetLocalString(oPC,"Class3")+" ("+sLevel3+")";


// SQL - - =
string sSelect = "SELECT * FROM `reg_data` WHERE login='"+GetPCPlayerName(oPC)+
"' AND name='" +GetName(oPC)+ "' AND pc_dm='"+sPC_DM+"'";

// MySQL " OnLine"
string sLine_Status = "UPDATE `reg_data` SET line_status = 'on' WHERE login='"+GetPCPlayerName(oPC)+
"' AND name='" +GetName(oPC)+ "' AND pc_dm='"+sPC_DM+"'";

// - , , -, , , (1,2,3), , -, ip,
string sReg="INSERT INTO reg_data (pc_dm, login, name, gender,"+
      "race, sub_race,levels, class_1,class_2,class_3, deity,cd_key,ip,line_status,creation_date) "+
      "VALUES('"+sPC_DM+
      "','"+sLogin+
      "','"+sName+
      "','"+sGender+
      "','"+sRace+
      "','"+sSubrace+
      "','"+sAllLevels+
      "','"+sClass_1+
      "','"+sClass_2+
      "','"+sClass_3+
      "','"+sDeity+
      "','"+sKey+
      "','"+sIp+
      "','on',NOW())";

// ( )
SQLExecDirect(sSelect);
if (SQLFirstRow() == SQL_SUCCESS)
    {
    SendMessageToPC(oPC," [On Line]");
    // - OnLine
    SQLExecDirect(sLine_Status);
    }
    else
    {
    // - , OnLine
        SQLExecDirect(sReg);
        SendMessageToPC(oPC," ! !");
        SendMessageToPC(oPC," [On Line]");
    }

//
SetLocalString(oPC,"Login",GetPCPlayerName(oPC));
SetLocalString(oPC,"Name",GetName(oPC));
}



OnClientLeave

Neverwinter Script Source
/*
////////////////////////////////
//////Created By: Avaddon//////
//////Date: 28. 11. 2004//////
/////////////////////////////
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\\\\MYSQL SERVER STATUS\\\\\\\
\\\\\\Put this script:\\\\\\\\\
\\\\\\\"OnClentLeave"\\\\\\\\\\\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
*/

#include "aps_include"
void main()
{
object oPC=GetExitingObject();

//
string sName=SQLEncodeSpecialChars(GetLocalString(oPC,"Name"));

//
string sLogin=SQLEncodeSpecialChars(GetLocalString(oPC,"Login"));
string sPC_DM = "PC"; if (GetIsDM(oPC)==TRUE)sPC_DM = "DM";////
//
// SQL - - =
string sSelect = "SELECT * FROM `reg_data` WHERE login='"+sLogin+
"' AND name='" +sName+ "' AND pc_dm='"+sPC_DM+"'";

// MySQL " "line_status" "off", = .
string sLine_Status = "UPDATE `reg_data` SET line_status = 'off' WHERE login='"+sLogin+
"' AND name='" +sName+ "' AND pc_dm='"+sPC_DM+"'";

SQLExecDirect(sSelect);
if (SQLFirstRow() == SQL_SUCCESS)
    {
    SendMessageToPC(oPC," [Off Line]");
    SQLExecDirect(sLine_Status);
    }
}



OnPlayerLevelUp

Neverwinter Script Source
/*
////////////////////////////////
//////Created By: Avaddon//////
//////Date: 28. 11. 2004//////
/////////////////////////////
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\\\\MYSQL SERVER STATUS\\\\\\\
\\\\\\Put this script:\\\\\\\\\
\\\\\\\"OnPlayerLevelUp"\\\\\\\\\\\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
*/


#include "aps_include"
void main()
{
object oPC = GetPCLevellingUp();
string sAllLevels = IntToString(GetHitDice(oPC));
// ///////////////////////////////////////////
int iNum;   //
for (iNum=0; iNum<4; iNum++)
{
string sClass; //
int iClass = GetClassByPosition(iNum,oPC); //
switch (iClass)   //
{   //
case CLASS_TYPE_ARCANE_ARCHER: //
sClass = " "; //
break; //
//
case CLASS_TYPE_ASSASSIN:   //
sClass = ""; //
break; //
//
case CLASS_TYPE_BARBARIAN: //
sClass = ""; //
break; //
//
case CLASS_TYPE_BARD:   //
sClass = ""; //
break; //
//
case CLASS_TYPE_BLACKGUARD:   //
sClass = " "; //
break; //
//
case CLASS_TYPE_CLERIC:   //
sClass = ""; //
break; //
//
case CLASS_TYPE_DIVINECHAMPION:   //
sClass = " ";   //
break; //
//
case CLASS_TYPE_DRAGONDISCIPLE:   //
sClass = " "; //
break; //
//
case CLASS_TYPE_DRUID: //
sClass = "";   //
break; //
//
case CLASS_TYPE_DWARVENDEFENDER: //
sClass = " "; //
break; //
//
case CLASS_TYPE_FIGHTER: //
sClass = ""; //
break; //
//
case CLASS_TYPE_HARPER:   //
sClass = " "; //
break; //
//
case CLASS_TYPE_INVALID: //
sClass = " - ";   //
break; //
//
case CLASS_TYPE_MONK:   //
sClass = "";   //
break; //
//
case CLASS_TYPE_PALADIN: //
sClass = "";   //
break; //
//
case CLASS_TYPE_PALEMASTER:   //
sClass = " "; //
break; //
//
case CLASS_TYPE_RANGER:   //
sClass = ""; //
break; //
//
case CLASS_TYPE_ROGUE: //
sClass = ""; //
break; //
//
case CLASS_TYPE_SHADOWDANCER:   //
sClass = " ";   //
break; //
//
case CLASS_TYPE_SHIFTER: //
sClass = "";   //
break; //
//
case CLASS_TYPE_SORCERER:   //
sClass = "";   //
break; //
//
case CLASS_TYPE_WEAPON_MASTER: //
sClass = " ";   //
break; //
//
case CLASS_TYPE_WIZARD:   //
sClass = "";   //
break; //
}   //
SetLocalString(oPC,"Class"+IntToString(iNum),sClass);
SetLocalString(oPC,"Level"+IntToString(iNum),IntToString(GetLevelByPosition(iNum,oPC)));//;
//////////////////////////////////////////////////////////
}
string sName=SQLEncodeSpecialChars(GetName(oPC));
string sLogin=SQLEncodeSpecialChars(GetPCPlayerName(oPC));
// 1,2, 3
string sLevel1 = GetLocalString(oPC,"Level1");
string sLevel2 = GetLocalString(oPC,"Level2");
string sLevel3 = GetLocalString(oPC,"Level3");

// 1,2, 3
string sClass_1 = GetLocalString(oPC,"Class1")+" ("+sLevel1+")";
string sClass_2 = GetLocalString(oPC,"Class2")+" ("+sLevel2+")";
string sClass_3 = GetLocalString(oPC,"Class3")+" ("+sLevel3+")";

// MySQL " "
string sLevel = "UPDATE `reg_data` SET levels = '"+sAllLevels+
"', class_1 = '"+sClass_1+
"', class_2 = '"+sClass_2+
"', class_3 = '"+sClass_3+
"' WHERE login = '"+sLogin+"' AND name = '"+sName+"'";

SQLExecDirect(sLevel);
}


PHP- by [MoF]Darth_Nick
,

. .
, .
, .
, ?

1. (0.04 ), , , .

2. . "free". , free_inn_rooms.
, . "BED" "SLEEP".

3. , .
, , . . , - , . - , Slow, . , . .

OnPlayerRest .
Neverwinter Script Source
/*
////////////////////////////////
//////Created By: Avaddon//////
//////Date: 04. 12. 2004//////
/////////////////////////////
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\\\\\INN ROOM FREE REST\\\\\\\
\\\\\\Put this script:\\\\\\\\\
\\\\\\\"OnPlayerRest"\\\\\\\\\\\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
*/

void main()
{
//
effect eBlack = EffectVisualEffect(VFX_DUR_BLACKOUT);
effect eZzz =  EffectVisualEffect(VFX_IMP_SLEEP);
effect eSlow = EffectSlow();

object oPC = GetLastPCRested();

// "BED"
object oBed = GetNearestObjectByTag("BED",oPC);

/* "SLEEP"
( nwvault.ign.com)*/

object oSleep = GetNearestObjectByTag("SLEEP",oPC);

//
object oArmor =GetItemInSlot(INVENTORY_SLOT_CHEST,oPC);
object oRightHand = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC);
object oLeftHand = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oPC);
object oBoots = GetItemInSlot(INVENTORY_SLOT_BOOTS,oPC);
object oHelmet = GetItemInSlot(INVENTORY_SLOT_HEAD,oPC);
object oBelt = GetItemInSlot(INVENTORY_SLOT_BELT,oPC);
object oCloak = GetItemInSlot(INVENTORY_SLOT_CLOAK,oPC);
object oArms = GetItemInSlot(INVENTORY_SLOT_ARMS,oPC);

//
string sFree = GetTag(GetArea(oPC));
string sArmor = GetLocalString(oPC,"armor");
string sRightHand = GetLocalString(oPC,"right");
string sLeftHand = GetLocalString(oPC,"left");
string sHelmet = GetLocalString(oPC,"helmet");
string sBoots = GetLocalString(oPC,"boots");
string sBelt = GetLocalString(oPC,"belt");
string sCloak = GetLocalString(oPC,"cloak");
string sArms = GetLocalString(oPC,"arms");

    /* .
    "free" ( "free_inn_rooms"),
    */

    if(GetStringLeft(sFree,4)=="free")
    {
    // ...
        if(GetLocalInt(GetLastPCRested(),"on_bed")!=1)
        {
        //
        SetLocalString(oPC,"armor",GetTag(oArmor));
        SetLocalString(oPC,"right",GetTag(oRightHand));
        SetLocalString(oPC,"left",GetTag(oLeftHand));
        SetLocalString(oPC,"helmet",GetTag(oHelmet));
        SetLocalString(oPC,"boots",GetTag(oBoots));
        SetLocalString(oPC,"belt",GetTag(oBelt));
        SetLocalString(oPC,"cloak",GetTag(oCloak));
        SetLocalString(oPC,"arms",GetTag(oArms));

        /* 2 (
        . . ,
        , .*/

        DelayCommand(2.0,AssignCommand(oPC,ActionUnequipItem(oArmor)));
        DelayCommand(2.0,AssignCommand(oPC,ActionUnequipItem(oRightHand)));
        DelayCommand(2.0,AssignCommand(oPC,ActionUnequipItem(oLeftHand)));
        DelayCommand(2.0,AssignCommand(oPC,ActionUnequipItem(oHelmet)));
        DelayCommand(2.0,AssignCommand(oPC,ActionUnequipItem(oBoots)));
        DelayCommand(2.0,AssignCommand(oPC,ActionUnequipItem(oBelt)));
        DelayCommand(2.0,AssignCommand(oPC,ActionUnequipItem(oCloak)));
        DelayCommand(2.0,AssignCommand(oPC,ActionUnequipItem(oArms)));

            // ( )...
            if (GetLastRestEventType()==REST_EVENTTYPE_REST_STARTED)
            {
            //
            AssignCommand(oPC,ClearAllActions());

            // ( - )
            AssignCommand(oPC,ActionMoveToObject(oBed));

            // -
            DelayCommand(2.0,AssignCommand(oPC,ActionJumpToObject(oSleep)));

            // " "
            DelayCommand(2.5,SetLocalInt(oPC,"on_bed",1));

            //
            DelayCommand(3.0,AssignCommand(oPC,ActionRest()));

            //
            DelayCommand(3.5,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eZzz,oPC,10.0));
            DelayCommand(4.0,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eBlack,oPC,60.0));
            }// " "
        }// " "
    }// " 'free' "
    else
    {
    /* -
    "free".
    "AssignCommand(oPC,ClearAllActions()" - . ,
    , ,
    .*/

    AssignCommand(oPC,ClearAllActions());
    }

  //////////////////////////////////////////////////////////////////////
  /* "free"
  .*/
/////////////////////////////////////

    if(GetStringLeft(sFree,4)=="free" && GetLocalInt(oPC,"on_bed")==1)
    {
        //
        if (GetLastRestEventType()==REST_EVENTTYPE_REST_FINISHED)
        {
        // ( )
        DelayCommand(2.0,AssignCommand(oPC, ActionEquipItem(GetItemPossessedBy(oPC,sArmor), INVENTORY_SLOT_CHEST)));
        DelayCommand(2.0,AssignCommand(oPC, ActionEquipItem(GetItemPossessedBy(oPC,sRightHand), INVENTORY_SLOT_RIGHTHAND)));
        DelayCommand(2.0,AssignCommand(oPC, ActionEquipItem(GetItemPossessedBy(oPC,sLeftHand), INVENTORY_SLOT_LEFTHAND)));
        DelayCommand(2.0,AssignCommand(oPC, ActionEquipItem(GetItemPossessedBy(oPC,sBoots), INVENTORY_SLOT_BOOTS)));
        DelayCommand(2.0,AssignCommand(oPC, ActionEquipItem(GetItemPossessedBy(oPC,sHelmet), INVENTORY_SLOT_HEAD)));
        DelayCommand(2.0,AssignCommand(oPC, ActionEquipItem(GetItemPossessedBy(oPC,sBelt), INVENTORY_SLOT_BELT)));
        DelayCommand(2.0,AssignCommand(oPC, ActionEquipItem(GetItemPossessedBy(oPC,sCloak), INVENTORY_SLOT_CLOAK)));
        DelayCommand(2.0,AssignCommand(oPC, ActionEquipItem(GetItemPossessedBy(oPC,sArms), INVENTORY_SLOT_ARMS)));

        //
        AssignCommand(oPC,ActionJumpToObject(oBed));

        // .
        DeleteLocalInt(oPC,"on_bed");
        DeleteLocalString(oPC,"armor");
        DeleteLocalString(oPC,"right");
        DeleteLocalString(oPC,"left");
        DeleteLocalString(oPC,"helmet");
        DeleteLocalString(oPC,"boots");
        DeleteLocalString(oPC,"belt");
        DeleteLocalString(oPC,"cloak");
        DeleteLocalString(oPC,"arms");

        //
        RemoveEffect(oPC,eBlack);
        }// "

        /* ( ,
        .. .*/

        if (GetLastRestEventType()==REST_EVENTTYPE_REST_CANCELLED)
        {
        //
        AssignCommand(oPC,ActionJumpToObject(oBed));

        // .
        DeleteLocalInt(oPC,"on_bed");
        DeleteLocalString(oPC,"armor");
        DeleteLocalString(oPC,"right");
        DeleteLocalString(oPC,"left");
        DeleteLocalString(oPC,"helmet");
        DeleteLocalString(oPC,"boots");
        DeleteLocalString(oPC,"belt");
        DeleteLocalString(oPC,"cloak");
        DeleteLocalString(oPC,"arms");

        /*
        Blackout ,
        30 .*/


        ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eSlow,oPC,30.0);
        //
        ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eZzz,oPC,10.0);
        DelayCommand(10.0,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eZzz,oPC,10.0));
        DelayCommand(20.0,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eZzz,oPC,10.0));
        }
    }
}
Twin

. ( ) , . ( On Monster Hit) . .
:
.
Additional Price ResRef'.
On Monster Hit ( Creature Weapon) , . (SubType) . , ? ;)
X uses/day. , - .
- , .
Neverwinter Script Source
/*
** z .
*/

string GetProperties(object oItem)
{
    string sProperties = IntToString(GetItemCharges(oItem));
    int nTemp;
    itemproperty ipTemp = GetFirstItemProperty(oItem);

    while (GetIsItemPropertyValid(ipTemp))
    {
        if (GetItemPropertyDurationType(ipTemp) == 2)
        {
            sProperties += "@"+
                IntToString(GetItemPropertyType(ipTemp)) +":";

            nTemp = GetItemPropertyParam1Value(ipTemp);
            if (nTemp == 255 || nTemp == -1)
                sProperties += "-1:";
            else
                sProperties += IntToString(nTemp - 1) +":";

            sProperties +=
                IntToString(GetItemPropertyCostTable(ipTemp)) +":";

            nTemp = GetItemPropertyCostTableValue(ipTemp);
            if (nTemp == -1)
                sProperties += "-1:";
            else
                sProperties += IntToString(nTemp - 1) +":";

            nTemp = GetItemPropertySubType(ipTemp);
            if (nTemp == -1) sProperties += "0";
            else            sProperties += IntToString(nTemp);
        }

        ipTemp = GetNextItemProperty(oItem);
    }

    return sProperties;
}

/*
** .
*/

void SetProperties(object oItem, string sProperties)
{
    //SendMessageToPC(GetFirstPC(), "SetProperties :: sProperties == "+ sProperties);

    itemproperty ipTemp = GetFirstItemProperty(oItem);
    while (GetIsItemPropertyValid(ipTemp))
    {
        RemoveItemProperty(oItem, ipTemp);
        ipTemp = GetNextItemProperty(oItem);
    }

    int i = 1;
    int pos, nCharges;
    string sTemp;

    nCharges = StringToInt(GetStringLeft(sProperties, FindSubString(sProperties, "@")));
    if (nCharges > 0)
        SetItemCharges(oItem, nCharges);

    while ((pos = FindSubString(sProperties, "@")) != -1)
    {
        sProperties = GetStringRight(sProperties, GetStringLength(sProperties) - pos - 1);

        pos = FindSubString(sProperties, "@");
        if (pos == -1)
            pos = GetStringLength(sProperties);

        sTemp = GetStringLeft(sProperties, pos);

        //SendMessageToPC(GetFirstPC(), "sTemp["+ IntToString(i) +"] == "+ sTemp);
        SetProperty(oItem, sTemp);

        i++;
    }
}

void SetProperty(object oItem, string sProperty)
{
    int pos = FindSubString(sProperty, ":");
    int nType = StringToInt(GetSubString(sProperty, 0, pos));

    sProperty = GetSubString(sProperty, pos + 1, GetStringLength(sProperty));
    pos = FindSubString(sProperty, ":");
    int nParam1Value = StringToInt(GetSubString(sProperty, 0, pos));
    nParam1Value++;

    sProperty = GetSubString(sProperty, pos + 1, GetStringLength(sProperty));
    pos = FindSubString(sProperty, ":");
    int nCostTable = StringToInt(GetSubString(sProperty, 0, pos));

    sProperty = GetSubString(sProperty, pos + 1, GetStringLength(sProperty));
    pos = FindSubString(sProperty, ":");
    int nCostTableValue = StringToInt(GetSubString(sProperty, 0, pos));
    nCostTableValue++;

    sProperty = GetSubString(sProperty, pos + 1, GetStringLength(sProperty));
    int nSubType = StringToInt(sProperty);

    itemproperty ipTemp;

    switch (nType)
    {
/*OK*/  case ITEM_PROPERTY_ABILITY_BONUS:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_ABILITY_BONUS _OK_");
            ipTemp = ItemPropertyAbilityBonus(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_AC_BONUS:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_AC_BONUS _OK_");
            ipTemp = ItemPropertyACBonus(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_AC_BONUS_VS_ALIGNMENT_GROUP:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_AC_BONUS_VS_ALIGNMENT_GROUP _OK_");
            ipTemp = ItemPropertyACBonusVsAlign(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_AC_BONUS_VS_DAMAGE_TYPE:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_AC_BONUS_VS_DAMAGE_TYPE _OK_");
            ipTemp = ItemPropertyACBonusVsDmgType(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_AC_BONUS_VS_RACIAL_GROUP:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_AC_BONUS_VS_RACIAL_GROUP _OK_");
            ipTemp = ItemPropertyACBonusVsRace(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_AC_BONUS_VS_SPECIFIC_ALIGNMENT:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_AC_BONUS_VS_SPECIFIC_ALIGNMENT _OK_");
            ipTemp = ItemPropertyACBonusVsSAlign(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_ARCANE_SPELL_FAILURE:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_ARCANE_SPELL_FAILURE _OK_");
            ipTemp = ItemPropertyArcaneSpellFailure(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_ATTACK_BONUS:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_ATTACK_BONUS _OK_");
            ipTemp = ItemPropertyAttackBonus(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_ATTACK_BONUS_VS_ALIGNMENT_GROUP:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_ATTACK_BONUS_VS_ALIGNMENT_GROUP _OK_");
            ipTemp = ItemPropertyAttackBonusVsAlign(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_ATTACK_BONUS_VS_RACIAL_GROUP:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_ATTACK_BONUS_VS_RACIAL_GROUP _OK_");
            ipTemp = ItemPropertyAttackBonusVsRace(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_ATTACK_BONUS_VS_SPECIFIC_ALIGNMENT:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_ATTACK_BONUS_VS_SPECIFIC_ALIGNMENT _OK_");
            ipTemp = ItemPropertyAttackBonusVsSAlign(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_BASE_ITEM_WEIGHT_REDUCTION:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_BASE_ITEM_WEIGHT_REDUCTION _OK_");
            ipTemp = ItemPropertyWeightReduction(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_BONUS_FEAT:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_BONUS_FEAT _OK_");
            ipTemp = ItemPropertyBonusFeat(nSubType);
            break;
/*OK*/  case ITEM_PROPERTY_BONUS_SPELL_SLOT_OF_LEVEL_N:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_BONUS_SPELL_SLOT_OF_LEVEL_N _OK_");
            ipTemp = ItemPropertyBonusLevelSpell(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_CAST_SPELL:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_CAST_SPELL _OK_");
            ipTemp = ItemPropertyCastSpell(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_DAMAGE_BONUS:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_DAMAGE_BONUS _OK_");
            ipTemp = ItemPropertyDamageBonus(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_DAMAGE_BONUS_VS_ALIGNMENT_GROUP:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_DAMAGE_BONUS_VS_ALIGNMENT_GROUP _OK_");
            ipTemp = ItemPropertyDamageBonusVsAlign(nSubType, nParam1Value, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_DAMAGE_BONUS_VS_RACIAL_GROUP:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_DAMAGE_BONUS_VS_RACIAL_GROUP _OK_");
            ipTemp = ItemPropertyDamageBonusVsRace(nSubType, nParam1Value, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_DAMAGE_BONUS_VS_SPECIFIC_ALIGNMENT:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_DAMAGE_BONUS_VS_SPECIFIC_ALIGNMENT _OK_");
            ipTemp = ItemPropertyDamageBonusVsSAlign(nSubType, nParam1Value, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_DAMAGE_REDUCTION:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_DAMAGE_REDUCTION _OK_");
            ipTemp = ItemPropertyDamageReduction(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_DAMAGE_RESISTANCE:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_DAMAGE_RESISTANCE _OK_");
            ipTemp = ItemPropertyDamageResistance(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_DAMAGE_VULNERABILITY:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_DAMAGE_VULNERABILITY _OK_");
            ipTemp = ItemPropertyDamageVulnerability(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_DARKVISION:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_DARKVISION _OK_");
            ipTemp = ItemPropertyDarkvision();
            break;
/*OK*/  case ITEM_PROPERTY_DECREASED_ABILITY_SCORE:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_DECREASED_ABILITY_SCORE _OK_");
            ipTemp = ItemPropertyDecreaseAbility(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_DECREASED_AC:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_DECREASED_AC _OK_");
            ipTemp = ItemPropertyDecreaseAC(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_DECREASED_ATTACK_MODIFIER:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_DECREASED_ATTACK_MODIFIER _OK_");
            ipTemp = ItemPropertyAttackPenalty(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_DECREASED_DAMAGE:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_DECREASED_DAMAGE _OK_");
            ipTemp = ItemPropertyDamagePenalty(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_DECREASED_ENHANCEMENT_MODIFIER:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_DECREASED_ENHANCEMENT_MODIFIER _OK_");
            ipTemp = ItemPropertyEnhancementPenalty(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_DECREASED_SAVING_THROWS:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_DECREASED_SAVING_THROWS _OK_");
            ipTemp = ItemPropertyReducedSavingThrowVsX(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_DECREASED_SAVING_THROWS_SPECIFIC:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_DECREASED_SAVING_THROWS_SPECIFIC _OK_");
            ipTemp = ItemPropertyReducedSavingThrow(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_DECREASED_SKILL_MODIFIER:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_DECREASED_SKILL_MODIFIER _OK_");
            ipTemp = ItemPropertyDecreaseSkill(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_ENHANCED_CONTAINER_REDUCED_WEIGHT:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_ENHANCED_CONTAINER_REDUCED_WEIGHT _OK_");
            ipTemp = ItemPropertyContainerReducedWeight(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_ENHANCEMENT_BONUS:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_ENHANCEMENT_BONUS _OK_");
            ipTemp = ItemPropertyEnhancementBonus(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_ALIGNMENT_GROUP:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_ALIGNMENT_GROUP _OK_");
            ipTemp = ItemPropertyEnhancementBonusVsAlign(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_RACIAL_GROUP:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_RACIAL_GROUP _OK_");
            ipTemp = ItemPropertyEnhancementBonusVsRace(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_SPECIFIC_ALIGNEMENT:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_SPECIFIC_ALIGNEMENT ?_OK_");
            ipTemp = ItemPropertyEnhancementBonusVsSAlign(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_EXTRA_MELEE_DAMAGE_TYPE:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_EXTRA_MELEE_DAMAGE_TYPE _OK_");
            ipTemp = ItemPropertyExtraMeleeDamageType(nSubType);
            break;
/*OK*/  case ITEM_PROPERTY_EXTRA_RANGED_DAMAGE_TYPE:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_EXTRA_RANGED_DAMAGE_TYPE _OK_");
            ipTemp = ItemPropertyExtraRangeDamageType(nSubType);
            break;
/*OK*/  case ITEM_PROPERTY_FREEDOM_OF_MOVEMENT:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_FREEDOM_OF_MOVEMENT _OK_");
            ipTemp = ItemPropertyFreeAction();
            break;
/*OK*/  case ITEM_PROPERTY_HASTE:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_HASTE _OK_");
            ipTemp = ItemPropertyHaste();
            break;
/*OK*/  case ITEM_PROPERTY_HEALERS_KIT:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_HEALERS_KIT _OK_");
            ipTemp = ItemPropertyHealersKit(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_HOLY_AVENGER:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_HOLY_AVENGER _OK_");
            ipTemp = ItemPropertyHolyAvenger();
            break;
/*OK*/  case ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE _OK_");
            ipTemp = ItemPropertyDamageImmunity(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS _OK_");
            ipTemp = ItemPropertyImmunityMisc(nSubType);
            break;
/*OK*/  case ITEM_PROPERTY_IMMUNITY_SPECIFIC_SPELL:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_IMMUNITY_SPECIFIC_SPELL _OK_");
            ipTemp = ItemPropertySpellImmunitySpecific(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_IMMUNITY_SPELL_SCHOOL:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_IMMUNITY_SPELL_SCHOOL _OK_");
            ipTemp = ItemPropertySpellImmunitySchool(nSubType);
            break;
/*OK*/  case ITEM_PROPERTY_IMMUNITY_SPELLS_BY_LEVEL:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_IMMUNITY_SPELLS_BY_LEVEL _OK_");
            ipTemp = ItemPropertyImmunityToSpellLevel(nCostTableValue+1);
            break;
/*OK*/  case ITEM_PROPERTY_IMPROVED_EVASION:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_IMPROVED_EVASION _OK_");
            ipTemp = ItemPropertyImprovedEvasion();
            break;
/*OK*/  case ITEM_PROPERTY_KEEN:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_KEEN _OK_");
            ipTemp = ItemPropertyKeen();
            break;
/*OK*/  case ITEM_PROPERTY_LIGHT:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_LIGHT _OK_");
            ipTemp = ItemPropertyLight(nCostTableValue, nParam1Value);
            break;
/*OK*/  case ITEM_PROPERTY_MASSIVE_CRITICALS:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_MASSIVE_CRITICALS _OK_");
            ipTemp = ItemPropertyMassiveCritical(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_MIGHTY:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_MIGHTY _OK_");
            ipTemp = ItemPropertyMaxRangeStrengthMod(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_MIND_BLANK:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_MIND_BLANK");
            break;
/*OK*/  case ITEM_PROPERTY_MONSTER_DAMAGE:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_MONSTER_DAMAGE ?OK?");
            ipTemp = ItemPropertyMonsterDamage(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_NO_DAMAGE:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_NO_DAMAGE _OK_");
            ipTemp = ItemPropertyNoDamage();
            break;
/*OK*/  case ITEM_PROPERTY_ON_HIT_PROPERTIES:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_ON_HIT_PROPERTIES _OK_");
            ipTemp = ItemPropertyOnHitProps(nSubType, nCostTableValue, nParam1Value);
            break;
/*FAIL*/case ITEM_PROPERTY_ON_MONSTER_HIT:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_ON_MONSTER_HIT _PARTIAL_ "+ IntToString(nSubType) +"!"+ IntToString(nParam1Value));
            ipTemp = ItemPropertyOnMonsterHitProperties(nSubType, nParam1Value);
            break;
/*OK*/  case ITEM_PROPERTY_ONHITCASTSPELL:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_ONHITCASTSPELL _OK_");
            ipTemp = ItemPropertyOnHitCastSpell(nSubType, nCostTableValue+1);
            break;
/*OK*/  case ITEM_PROPERTY_POISON:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_POISON");
            break;
/*OK*/  case ITEM_PROPERTY_REGENERATION:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_REGENERATION _OK_");
            ipTemp = ItemPropertyRegeneration(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_REGENERATION_VAMPIRIC:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_REGENERATION_VAMPIRIC _OK_");
            ipTemp = ItemPropertyVampiricRegeneration(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_SAVING_THROW_BONUS:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_SAVING_THROW_BONUS _OK_");
            ipTemp = ItemPropertyBonusSavingThrowVsX(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_SAVING_THROW_BONUS_SPECIFIC:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_SAVING_THROW_BONUS_SPECIFIC _OK_");
            ipTemp = ItemPropertyBonusSavingThrow(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_SKILL_BONUS:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_SKILL_BONUS _OK_");
            ipTemp = ItemPropertySkillBonus(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_SPECIAL_WALK:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_SPECIAL_WALK ?OK?");
            ipTemp = ItemPropertySpecialWalk(nSubType);
            break;
/*OK*/  case ITEM_PROPERTY_SPELL_RESISTANCE:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_SPELL_RESISTANCE _OK_");
            ipTemp = ItemPropertyBonusSpellResistance(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_THIEVES_TOOLS:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_THIEVES_TOOLS _OK_");
            ipTemp = ItemPropertyThievesTools(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_TRAP:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_TRAP _OK_");
            ipTemp = ItemPropertyTrap(nSubType, nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_TRUE_SEEING:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_TRUE_SEEING _OK_");
            ipTemp = ItemPropertyTrueSeeing();
            break;
/*OK*/  case ITEM_PROPERTY_TURN_RESISTANCE:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_TURN_RESISTANCE _OK_");
            ipTemp = ItemPropertyTurnResistance(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_UNLIMITED_AMMUNITION:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_UNLIMITED_AMMUNITION _OK_");
            ipTemp = ItemPropertyUnlimitedAmmo(nCostTableValue);
            break;
/*OK*/  case ITEM_PROPERTY_USE_LIMITATION_ALIGNMENT_GROUP:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_USE_LIMITATION_ALIGNMENT_GROUP _OK_");
            ipTemp = ItemPropertyLimitUseByAlign(nSubType);
            break;
/*OK*/  case ITEM_PROPERTY_USE_LIMITATION_CLASS:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_USE_LIMITATION_CLASS _OK_");
            ipTemp = ItemPropertyLimitUseByClass(nSubType);
            break;
/*OK*/  case ITEM_PROPERTY_USE_LIMITATION_RACIAL_TYPE:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_USE_LIMITATION_RACIAL_TYPE _OK_");
            ipTemp = ItemPropertyLimitUseByRace(nSubType);
            break;
/*OK*/  case ITEM_PROPERTY_USE_LIMITATION_SPECIFIC_ALIGNMENT:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_USE_LIMITATION_SPECIFIC_ALIGNMENT _OK_");
            ipTemp = ItemPropertyLimitUseBySAlign(nSubType);
            break;
/*OK*/  case ITEM_PROPERTY_USE_LIMITATION_TILESET:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_USE_LIMITATION_TILESET");
            break;
/*OK*/  case ITEM_PROPERTY_VISUALEFFECT:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_VISUALEFFECT _OK_");
            ipTemp = ItemPropertyVisualEffect(nSubType);
            break;
/*OK*/  case ITEM_PROPERTY_WEIGHT_INCREASE:
            //SendMessageToPC(GetFirstPC(), "const ITEM_PROPERTY_WEIGHT_INCREASE _OK_");
            ipTemp = ItemPropertyWeightIncrease(nParam1Value);
            break;
        default:
            //SendMessageToPC(GetFirstPC(), "const default");
            break;
    }

    if (GetIsItemPropertyValid(ipTemp)) {
        AddItemProperty(DURATION_TYPE_PERMANENT, ipTemp, oItem);
    }
}

. .
Tarre Talliorne
http://rage-t.boom.ru/creative.html
. .
, OnClientEnter ....... . _kaa_ baal , . .
, , , smile.gif . oBook, ,
object oBook=GetItemPossessedBy(oPC, "item004");

:
Neverwinter Script Source
//::///////////////////////////////////////////////
//:: module_enter
//:://////////////////////////////////////////////
/* system OnClientEnter
*/

//:://////////////////////////////////////////////
//:: Created By: _kaa_ , Baal , Ëèòî
//:: Created On: Jan 27, 2005
//:://////////////////////////////////////////////
#include "nw_o0_itemmaker"
void main()
{
object oPC = GetEnteringObject();
object oStore = GetModule();
string sStoreName = GetName(oPC)+GetPCPlayerName(oPC); // =[PC name] + [login name]
SetLocalString(oPC,"HP_MyIdString",sStoreName); // Çàãðóçêà õèò ïîèíòîâ è ñïåëëîâ
int iSavedHP = GetLocalInt(oStore,sStoreName);
if (iSavedHP != 0)
{
effect efDamage = EffectDamage(GetMaxHitPoints(oPC)-iSavedHP,DAMAGE_TYPE_MAGICAL,DAMAGE_POWER_ENERGY);
ApplyEffectToObject(DURATION_TYPE_INSTANT,efDamage,oPC);
}

int k,j,nSpells;
for (k=1; k < 510; k++)
{
nSpells = GetLocalArrayInt(oStore,sStoreName+"_spells",k);
if (nSpells)
for (j=0; j <= GetHasSpell(k,oPC)-nSpells; j++) DecrementRemainingSpellUses(oPC, k);
if(GetIsDM(oPC)) //Åñëè DM, òî íå âûäàâàòü ñòàðòîâûé ïàêåò
return;
object oBook=GetItemPossessedBy(oPC, "item004");
if(!GetIsObjectValid(oBook)) //Åñëè äîñòóïåí ïðåäìåò ñ ResRef*îì "item004",
//íå âûäàâàòü ñòàðòîâûé ïàêåò, åñëè íå äîñòóïåí, òî óíè÷òîæèòü âñå âåùè â èíâåíòàðå
{
object oItem = GetFirstItemInInventory (oPC);
while(GetIsObjectValid(oItem))
{
DestroyObject(oItem);
oItem = GetNextItemInInventory (oPC);
}
int i=0;
while(i<14)
{
DestroyObject(GetItemInSlot(i, oPC));
i++;
}
if(GetLevelByClass(CLASS_TYPE_FIGHTER, oPC)) //Âûäà÷à íà÷àëüíîãî ïàêåòà ïî êëàññó
{
GiveGoldToCreature(oPC, 500);
CreateItemOnObject("item004", oPC); //Âûäà÷à âåùåé ïî ResRef*àì
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("item001", oPC);
CreateItemOnObject("item003", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
}
else if(GetLevelByClass(CLASS_TYPE_BARBARIAN, oPC))
{
GiveGoldToCreature(oPC, 500);
CreateItemOnObject("item004", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("item001", oPC);
CreateItemOnObject("item003", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
}
else if(GetLevelByClass(CLASS_TYPE_MONK, oPC))
{
GiveGoldToCreature(oPC, 500);
CreateItemOnObject("item004", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("item001", oPC);
CreateItemOnObject("item003", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
}
else if(GetLevelByClass(CLASS_TYPE_RANGER, oPC))
{
CreateItemOnObject("item004", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("item001", oPC);
CreateItemOnObject("item003", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
}
else if(GetLevelByClass(CLASS_TYPE_WIZARD, oPC))
{
CreateItemOnObject("item004", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("item001", oPC);
CreateItemOnObject("item003", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
}
else if(GetLevelByClass(CLASS_TYPE_SORCERER, oPC))
{
CreateItemOnObject("item004", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("item001", oPC);
CreateItemOnObject("item003", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
}
else if(GetLevelByClass(CLASS_TYPE_BARD, oPC))
{
CreateItemOnObject("item004", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("item001", oPC);
CreateItemOnObject("item003", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
}
else if(GetLevelByClass(CLASS_TYPE_DRUID, oPC))
{
CreateItemOnObject("item004", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("item001", oPC);
CreateItemOnObject("item003", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
}
else if(GetLevelByClass(CLASS_TYPE_BARD, oPC))
{
CreateItemOnObject("item004", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("item001", oPC);
CreateItemOnObject("item003", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
}
else if(GetLevelByClass(CLASS_TYPE_CLERIC, oPC))
{
CreateItemOnObject("item004", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("item001", oPC);
CreateItemOnObject("item003", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
}
else if(GetLevelByClass(CLASS_TYPE_PALADIN, oPC))
{
CreateItemOnObject("item004", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("item001", oPC);
CreateItemOnObject("item003", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
}
else if(GetLevelByClass(CLASS_TYPE_ROGUE, oPC))
{
CreateItemOnObject("item004", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("Item", oPC);
CreateItemOnObject("item001", oPC);
CreateItemOnObject("item003", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
CreateItemOnObject("it_mpotion004", oPC);
}
}
}
}


(_kaa_) OnClientLeave

Neverwinter Script Source
#include "nw_o0_itemmaker"
void main()
{
object oPC = GetExitingObject();
object oStore = GetModule();
string sStoreName = GetLocalString(oPC,"HP_MyIdString");
SetLocalInt(oStore, sStoreName, GetCurrentHitPoints(oPC));
int k,nSpells;
for (k=1;k<510;k++)
{
nSpells = GetHasSpell(k,oPC);
if (nSpells)
SetLocalArrayInt(oStore,sStoreName+"_spells",k,nSpells);
}
}
Lex
. , . 250 .

"low_plc_loot" - .
Neverwinter Script Source
//::Created by
//::Modificated by Lex
void Clear(object oBag = OBJECT_SELF)
{
object oItem = GetFirstItemInInventory(oBag);
while (GetIsObjectValid(oItem))
{
DestroyObject(oItem);
oItem = GetNextItemInInventory(oBag);
}
DestroyObject(oBag,1.0);
}
void main()
{
string sTemplate = "low_plc_loot";
string sTag = GetTag(OBJECT_SELF);
location lLoc = GetLocation(OBJECT_SELF);
object oloot = CreateObject(OBJECT_TYPE_PLACEABLE, sTemplate, lLoc, TRUE, sTag);
int i = 0;
object oItem = GetFirstItemInInventory(OBJECT_SELF);
while (GetIsObjectValid(oItem))
{
if (GetDroppableFlag(oItem))
CopyObject(oItem,lLoc,oloot);
DestoyObject(oItem);
oItem = GetNextItemInInventory(OBJECT_SELF);
}
oItem = GetItemInSlot(i,OBJECT_SELF);
while (i<14)
{
if (GetDroppableFlag(oItem))
CopyObject(oItem,lLoc,oloot);
DestoyObject(oItem);
i++;
oItem = GetItemInSlot(i,OBJECT_SELF);
}
AssignCommand(oloot,DelayCommand(250.0,Clear(oloot)));
}
Aiwan
.
, 10 . ? , 10, . .
, 15 . . .

Neverwinter Script Source
//:://////////////////////////////////////////////
//:: Copyright 2004 WRG!  www.wrg.ru
//:: am_pc_stinki_go2
//:://////////////////////////////////////////////
/*
  ,
    oPC (!)

*/

//:://////////////////////////////////////////////
//:: Created By: Aiwan    Aiwan@e-mail.ru
//:: Created On: 20.03.2004
//:://////////////////////////////////////////////
void main()
{
    object oPC = GetPCSpeaker();
    object oStinki = GetObjectByTag("MM_STINKI");
    object oWp01 = GetObjectByTag("WP_STINKI_01");
    object oWp02 = GetObjectByTag("WP_STINKI_02");
    object oWp03 = GetObjectByTag("WP_STINKI_03");
    object oWp04 = GetObjectByTag("WP_STINKI_04");
    object oWp05 = GetObjectByTag("WP_STINKI_05");
    object oWp06 = GetObjectByTag("WP_STINKI_06");
    object oWp07 = GetObjectByTag("WP_STINKI_07");
    object oWp08 = GetObjectByTag("WP_STINKI_08");
    object oWp09 = GetObjectByTag("WP_STINKI_09");
    object oWp10 = GetObjectByTag("WP_STINKI_10");
    object oWp11 = GetObjectByTag("WP_STINKI_11");
    object oDoor = GetObjectByTag("AM_DOOR_FLEG_NO");
    effect eHaste = EffectHaste(); // !

    SetLocalInt(oPC, "STINKI", 3);
    AssignCommand(oStinki, ActionPauseConversation());
    AssignCommand(oPC, ActionForceFollowObject(oStinki, 4.0f));
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHaste, oPC, 9999.0);
    AssignCommand(oStinki, ActionDoCommand(SetCommandable(FALSE, oPC)));
    AssignCommand(oStinki, ActionForceMoveToObject(oWp02, TRUE, 4.0));
    AssignCommand(oStinki, ActionDoCommand(SetFacingPoint(GetPosition(oPC))));
    AssignCommand(oStinki, ActionDoCommand(SpeakString(" !")));
    AssignCommand(oStinki, ActionWait(1.0));
    AssignCommand(oStinki, ActionForceMoveToObject(oWp03, TRUE, 4.0));
    AssignCommand(oStinki, ActionWait(2.0));
    AssignCommand(oStinki, ActionForceMoveToObject(oWp04, TRUE, 4.0));
    AssignCommand(oStinki, ActionDoCommand(SetFacingPoint(GetPosition(oPC))));
    AssignCommand(oStinki, ActionDoCommand(SpeakString(" ?")));
    AssignCommand(oStinki, ActionWait(2.0));
    AssignCommand(oStinki, ActionForceMoveToObject(oWp05, TRUE, 4.0));
    AssignCommand(oStinki, ActionWait(2.0));
    AssignCommand(oStinki, ActionForceMoveToObject(oDoor, TRUE, 4.0));
    AssignCommand(oStinki, ActionDoCommand(SpeakString(" , .")));
    AssignCommand(oStinki, ActionForceMoveToObject(oWp06, TRUE, 4.0));
    AssignCommand(oStinki, ActionWait(2.0));
    AssignCommand(oStinki, ActionForceMoveToObject(oWp07, TRUE, 4.0));
    AssignCommand(oStinki, ActionWait(2.0));
    AssignCommand(oStinki, ActionForceMoveToObject(oWp08, TRUE, 1.0));
    AssignCommand(oStinki, ActionDoCommand(SpeakString(" !")));
    AssignCommand(oStinki, ActionForceMoveToObject(oWp09, TRUE, 1.0));
    AssignCommand(oStinki, ActionWait(2.0));
    AssignCommand(oStinki, ActionForceMoveToObject(oWp10, TRUE, 1.0));
    AssignCommand(oStinki, ActionWait(2.0));
    AssignCommand(oStinki, ActionForceMoveToObject(oWp11, TRUE, 1.0));
    AssignCommand(oStinki, ActionDoCommand(SetFacingPoint(GetPosition(oPC))));
    AssignCommand(oStinki, ActionDoCommand(RemoveEffect(oPC, eHaste)));
    AssignCommand(oStinki, ActionDoCommand(SetCommandable(TRUE, oPC)));
    AssignCommand(oStinki, ActionResumeConversation());
}
Lex
" "
" LEX'"


:
2 ( ) .
(, . .)
:
2 , . , .

"+" - . ( , .) .
"-" - . .

Neverwinter Script Source
//::///////////////////////////////////////////////
//:: Name lm_2speakers
//:: Copyright 2004 -=WRG!=-
//:://////////////////////////////////////////////
/*
2- . .
*/

//:://////////////////////////////////////////////
//:: Created By: Lex
//:: Created On: Agust 2004
//:://////////////////////////////////////////////

void ANIMATION(object oD)
/// . .
{
int A=0;
float T,S;
switch (Random(8)+1)
{
case 2: A=ANIMATION_FIREFORGET_PAUSE_SCRATCH_HEAD;T=3.0;S=1.0;break;
case 3: A=ANIMATION_FIREFORGET_TAUNT;T=3.0;S=1.0;break;
case 4: A=ANIMATION_FIREFORGET_PAUSE_BORED;S=1.0;break;
case 5: A=ANIMATION_LOOPING_LISTEN;T=5.0;S=1.0;break;
case 6: A=ANIMATION_LOOPING_LISTEN;T=5.0;S=1.0;break;
}
if (A==0) return;
AssignCommand(oD,PlayAnimation(A,S,T));
}

void DIALOG(object oD1,object oD2)
{
string s1="",s2="";
string ya = GetName(GetObjectByTag("ya")); // "+ya+"
switch (Random(30))
{
case 0: s1=" , ?";s2=" ..";break;
case 1: s1=" ? "+ya+"?";s2=" ! "+ya+" !";break;
/// 20 -
}
AssignCommand(oD1,SpeakString(s1)); ///
AssignCommand(oD2,DelayCommand(5.0,SpeakString(s2))); ///
}

void main()
{
object oPC = GetFirstPC();
if (GetArea(oPC)!=GetArea(OBJECT_SELF)) return; // ,
object oD1 = GetNearestObjectByTag("SPEAKING_NPC_1"); //
object oD2 = GetNearestObjectByTag("SPEAKING_NPC_1"); //
if (GetIsInCombat(oD1)) return; //
if (GetIsInCombat(oD2)) return; //
if ( (IsInConversation(oD1)) || (IsInConversation(oD2)) ) return; ///
if (GetDistanceToObject(oPC)>10.0) return; // ( 10 ) .
AssignCommand(oD1,SetFacingPoint(GetPosition(oD2))); //
AssignCommand(oD2,SetFacingPoint(GetPosition(oD1)));
DIALOG(oD1,oD2);
ANIMATION(oD1);
ANIMATION(oD2);
}



================================================================================

onDamage . ( "DANGER")

, . , . , .
: 5 . .... .
, ,
KeyTag. . .
( KeyTaG:
. . .
: , KeyTaG .)
KeyTag : X_Y
X - . 2
1 -
2 -
3 -
Y - . ( 9). 5 .
30%.
Neverwinter Script Source
//::///////////////////////////////////////////////
//:: Name ******
//:: FileName lm_damage_danger
//:: Copyright 2003 -=WRG!=-.
//:://////////////////////////////////////////////
/*
THIS SCRIPT CHECKS IF ANYBODY DAMAGED DANGER OBJECT MORE THEN 30%
THEN THE OBJECT EXPLOSE
EXPLOSION DEPENDS ON STRONG EXPLOSION RADIUS.
EXPLOSION RADIUS & STRONG ARE IN TrapKeyTag of object
*/

//:://////////////////////////////////////////////
//:: Created By: Lex
//:: Created On: October 2003
//:: Special thanks to:
//:: Baal (WRG) for advice about calculation power
//:://////////////////////////////////////////////

void DamageObject(float ExplosionRadius, int Strong, object oDamager, location lCenter)
{
float modifier=1.0;
effect eAddition;
int DamagePower=DAMAGE_POWER_PLUS_ONE;
float fDistance = GetDistanceBetweenLocations(GetLocation(oDamager),lCenter);
switch(Strong)
{
case 1: modifier=0.5;
DamagePower=DAMAGE_POWER_NORMAL;
eAddition = EffectFrightened();
break;
case 2: modifier=1.0;
DamagePower=DAMAGE_POWER_PLUS_ONE;
eAddition = EffectFrightened();
break;
case 3: modifier=1.5;
DamagePower=DAMAGE_POWER_PLUS_TWO;
eAddition = EffectParalyze();
break;
default:modifier=2.0;
DamagePower=DAMAGE_POWER_PLUS_THREE;
eAddition = EffectParalyze();
break;
}
int iDamage = FloatToInt((ExplosionRadius*ExplosionRadius/2 - fDistance*fDistance/2)*modifier+modifier*5);
effect eDamage = EffectDamage(iDamage,DAMAGE_TYPE_FIRE,DamagePower);
AssignCommand(oDamager,ClearAllActions());
AssignCommand(oDamager,DelayCommand(0.2,SetCommandable(FALSE,oDamager)));
if (GetObjectType(oDamager)==OBJECT_TYPE_CREATURE)
if (Random(2)==1)
AssignCommand(oDamager,PlayAnimation(ANIMATION_LOOPING_DEAD_FRONT,0.6,2.0));
else AssignCommand(oDamager,PlayAnimation(ANIMATION_LOOPING_DEAD_BACK,0.6,2.0));
AssignCommand(oDamager,DelayCommand(0.8,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_COM_HIT_FIRE),oDamager,1.0)));
if (fDistance<=ExplosionRadius/3)
{
float time = modifier*ExplosionRadius/fDistance;
AssignCommand(oDamager,DelayCommand(0.8,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eAddition,oDamager,time)));
}
AssignCommand(oDamager,DelayCommand(0.3,ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oDamager)));
AssignCommand(oDamager,DelayCommand(2.5,SetCommandable(TRUE,oDamager)));
}
void main()
{
//========================================================
int iDamage;
float ExplosionRadius;
int Strong;
location lCenter;
int Next=TRUE;
int Filter;
int Explosion;
object oDamager;
string STR;
int Critical=0;
Filter = OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE;
lCenter = GetLocation(OBJECT_SELF);
if (GetTrapKeyTag(OBJECT_SELF)!="**")
{
ExplosionRadius=5.0;
Strong=2;
}
else if (GetTag(OBJECT_SELF)!="ITM_FIREMINE")
{
iDamage = GetMaxHitPoints()-GetCurrentHitPoints();
STR = GetStringRight(GetTrapKeyTag(OBJECT_SELF),1);
if (STR!="") ExplosionRadius = StringToFloat(STR);
STR = GetStringLeft(GetTrapKeyTag(OBJECT_SELF),1);
if (STR!="") Strong = StringToInt(STR);
if ((Strong>3)||(Strong==0)) Strong=2;
if ((ExplosionRadius>10.0)||(ExplosionRadius==0.0)) ExplosionRadius=5.0;
if (iDamage*10 < GetMaxHitPoints()*3) return;
}
else
{
ExplosionRadius = 6.5;
Strong = 2;
SendMessageToPC(GetFirstPC(),"MINE");
}
Strong = GetLocalInt(OBJECT_SELF,"ADD_STRONG")+Strong;
if (Strong<3) Explosion = VFX_FNF_GAS_EXPLOSION_FIRE;
else Explosion = VFX_FNF_FIREBALL;
if ((iDamage<GetMaxHitPoints()/3)&&(GetDamageDealtByType(DAMAGE_TYPE_FIRE)==0)) return;
if (GetLocalInt(OBJECT_SELF,"ALREADY")) return;
SetLocalInt(OBJECT_SELF,"ALREADY",TRUE);
oDamager = GetFirstObjectInShape(SHAPE_SPHERE,ExplosionRadius,lCenter,TRUE,Filter);
object oPC = GetFirstPC();
DestroyObject(OBJECT_SELF);
if ((GetLocalInt(GetObjectByTag("TS_LOCALS"),"FIRECAMP_DESTROED"))&&(GetTag(GetArea(OBJECT_SELF))=="TSUR_SUB_EASTFOREST_BOMBCAVE"))
return;
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_IMP_PULSE_FIRE),lCenter,1.5);
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT,EffectVisualEffect(Explosion),lCenter);
while (GetIsObjectValid(oDamager))
{
if ((GetTag(oDamager)=="DANGER")&&(!GetLocalInt(oDamager,"ALREADY"))&&(GetDistanceToObject(oDamager)<=ExplosionRadius/2))
{
if (Next) SetLocalInt(oDamager,"ADD_STRONG",1);
ExplosionRadius = ExplosionRadius + 2.0;
Critical++;
}
if (Critical==3)
{
Next=TRUE;
}
if (Critical==5)
{
Strong++;
Critical=0;
}
AssignCommand(oDamager,DamageObject(ExplosionRadius,Strong,oDamager,lCenter));
oDamager = GetNextObjectInShape(SHAPE_SPHERE,ExplosionRadius,lCenter,TRUE,Filter);
}
}
Aiwan
" "
" AIWAN'"


smile.gif ...
Neverwinter Script Source
//:://////////////////////////////////////////////
//:: Created By: WRG! Aiwan aiwan@e-mail.ru
//:: Created On: 14.01.2004
//:://////////////////////////////////////////////
//:: " "
//:: ""
//:://////////////////////////////////////////////
#include "NW_I0_GENERIC"

void main()
{
if (GetArea(OBJECT_SELF) != GetArea(GetFirstPC()))
return; //
int nEvent = GetUserDefinedEventNumber();
if (nEvent == 1002) //
{
object oPC = GetLastPerceived();
object oNPC = OBJECT_SELF;
object oArm = GetItemInSlot(INVENTORY_SLOT_CHEST, oPC); // ""
if (GetLastPerceptionSeen() && GetIsPC(oPC))
{
if (GetTag(oArm) != "AM_ITM_IRONTRON" && GetLocalInt(oPC,"TRONE_ALARM") != 1)
// AM_ITM_IRONTRON
{
SetLocalInt(oPC, "TRONE_ALARM", 1); //
SetFacingPoint(GetPosition(oPC));
SpeakString(" , ?!");
AdjustReputation(oPC, oNPC, -100);
DetermineCombatRound(oPC);
}
if (GetLocalInt(oNPC, "LOOK") != 1 && GetTag(oArm) == "AM_ITM_IRONTRON" &&
GetLocalInt(oPC,"TRONE_ALARM") != 1)
{
SetLocalInt(oNPC, "LOOK", 1); //
AssignCommand(oNPC, ClearAllActions());
AssignCommand(oNPC, ActionDoCommand(SetFacingPoint(GetPosition(oPC))));
DelayCommand(16.0f, SetLocalInt(oNPC, "LOOK", 0));
int iRand = Random(10);
switch (iRand)
{
case 0:
{
SpeakString(" , !"); break;
}
case 1:
{
SpeakString(", ?"); break;
}
case 2:
{
SpeakString(", ..."); break;
}
case 3:
{
SpeakString(" ?"); break;
}
case 4:
{
SpeakString(" ?"); break;
case 5:
{
SpeakString(", ?"); break;
case 6:
{
SpeakString(" !"); break;
}
case 7:
{
SpeakString(" -..."); break;
}
case 8:
{
SpeakString(", ? ?"); break;
}
AssignCommand(oNPC, ActionDoCommand(WalkWayPoints()));
}
}
}
}
}
}
return;
}


, . 3.

Neverwinter Script Source
//:://////////////////////////////////////////////
//:: Copyright 2004 WRG! www.wrg.ru
//:: Name: oud_am_warrord
//:://////////////////////////////////////////////
/*
UserDefined -
*/

//:://////////////////////////////////////////////
//:: Created By: Aiwan Aiwan@e-mail.ru
//:: Created On: 26.02.2004
//:://////////////////////////////////////////////
void main()
{
int nEvent = GetUserDefinedEventNumber();
//======================= DAMAGED EVENT 1006 ===================================
if (nEvent == 1006)
{
object oPC = GetFirstPC(); // .
object oCat = GetHenchman(oPC);
object oWord = OBJECT_SELF;
object oSlave1 = GetObjectByTag("AM_SKELLETON_SLAVE_01"); // - 1
object oSlave2 = GetObjectByTag("AM_SKELLETON_SLAVE_02"); // - 2
object oWPTrone = GetObjectByTag("WP_TRONE_WARRIOR");
int iCurHP = GetCurrentHitPoints(OBJECT_SELF);
int iMaxHP = GetMaxHitPoints(OBJECT_SELF);
int iD;
//==============================================================================
if (!GetIsPC(oPC) || !GetLocalInt(oPC, "DALLIK_HELP"))
{return;}
int Class = GetClassByPosition(1, oPC); //
switch (Class)
{
case CLASS_TYPE_BARBARIAN:{iD = 200; break;}
case CLASS_TYPE_BARD:{iD = 300; break;}
case CLASS_TYPE_CLERIC:{iD = 250; break;}
case CLASS_TYPE_DRUID:{iD = 300; break;}
case CLASS_TYPE_FIGHTER:{iD = 200; break;}
case CLASS_TYPE_MONK:{iD = 150; break;}
case CLASS_TYPE_PALADIN:{iD = 200; break;}
case CLASS_TYPE_RANGER:{iD = 250; break;}
case CLASS_TYPE_ROGUE:{iD = 300; break;}
case CLASS_TYPE_SORCERER:{iD = 300; break;}
case CLASS_TYPE_WIZARD:{iD = 300; break;}
}

if (GetIsPC(oPC) && ((iMaxHP - iD) >= iCurHP) && !GetLocalInt(oWord, "DALLIK_JAMP"))
{
SetLocalInt(oWord, "DALLIK_JAMP", TRUE);
AssignCommand(oPC, ClearAllActions());
AssignCommand(oCat, ClearAllActions());
AssignCommand(OBJECT_SELF, ClearAllActions());
AssignCommand(oSlave1, ClearAllActions());
AssignCommand(oSlave2, ClearAllActions());
ExecuteScript("am_chang_fr_warr", OBJECT_SELF); //
// DelayCommand(0.5, ExecuteScript("am_scen_warr_03", oPC));
}
}
}


:
Neverwinter Script Source
//:://////////////////////////////////////////////
//:: Copyright 2004 WRG! www.wrg.ru
//:: name: am_chang_fr_warr
//:://////////////////////////////////////////////
/*

*/

//:://////////////////////////////////////////////
//:: Created By: Aiwan Aiwan@e-mail.ru
//:: Created On: 23.03.2004
//:://////////////////////////////////////////////
void main()
{
object oPC = GetFirstPC();
object oHen = GetHenchman(oPC);
object oWord = GetObjectByTag("AM_WARRIOR_HORDE"); //
object oSlave1 = GetObjectByTag("AM_SKELLETON_SLAVE_01"); // - 1
object oSlave2 = GetObjectByTag("AM_SKELLETON_SLAVE_02"); // - 2
location lClose = GetLocation(GetObjectByTag("AIWAN_CLOSE_ARENA")); //. Aiwan'a
object oNeutral = GetObjectByTag("AM_TRUE_NEUTRAL"); //
ChangeFaction(oWord, oNeutral);
ChangeFaction(oSlave1, oNeutral);
ChangeFaction(oSlave2, oNeutral);
//--------------------------------------
ClearPersonalReputation(oSlave1, oPC);
ClearPersonalReputation(oPC, oSlave1);
ClearPersonalReputation(oSlave1, oHen);
ClearPersonalReputation(oHen, oSlave1);
//--------------------------------------
ClearPersonalReputation(oSlave2, oPC);
ClearPersonalReputation(oPC, oSlave2);
ClearPersonalReputation(oSlave2, oHen);
ClearPersonalReputation(oHen, oSlave2);
//--------------------------------------
ClearPersonalReputation(oWord, oPC);
ClearPersonalReputation(oPC, oWord);
ClearPersonalReputation(oWord, oHen);
ClearPersonalReputation(oHen, oWord);
}





Neverwinter Script Source
//:://////////////////////////////////////////////
//:: Copyright 2004 WRG
//:: a0_onareaexit
//:://////////////////////////////////////////////
/*
   
       
*/

//:://////////////////////////////////////////////
//:: Created By: Aiwan    Aiwan@e-mail.ru
//:: Created On: 21.04.2004
//:://////////////////////////////////////////////
void main()
{
  object oPC = GetEnteringObject();
  object oAnimal = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
  object oDominated = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
  object oFamiliar = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
  object oHenchman = GetAssociate(ASSOCIATE_TYPE_HENCHMAN, oPC);
  object oSummoned = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
  object oJamp = GetTransitionTarget(OBJECT_SELF);
  // , ,
  if (GetIsPC(oPC) && !GetIsPosessedFamiliar(oPC))
  {
  AssignCommand(oPC, JumpToObject(oJamp));
  AssignCommand(oAnimal, JumpToObject(oJamp));
  AssignCommand(oDominated, JumpToObject(oJamp));
  AssignCommand(oFamiliar, JumpToObject(oJamp));
  AssignCommand(oHenchman, JumpToObject(oJamp));
  AssignCommand(oSummoned, JumpToObject(oJamp));
  }
  else
  {
  // ya ,
  AssignCommand(oPC, ClearAllActions());
  }
}
. , , .
Invision Power Board © 2001-2019 Invision Power Services, Inc.