IPB

, ( | )

    
5 V  < 1 2 3 4 5 >  
>  , . .
V
Lex
Mar 18 2005, 22:42
#51


Level 5


:
: Lawful Neutral
:
NWN:





" "
" MILEZ'"

:::::::::::::::::Milez::::::::::::::::::::::::::::::
May 22 2003
C .
OnPlayerDying .
+ , .
- as is, , - !
Neverwinter Script Source
void DyingTicker(object oPC)
{
int iHP=GetCurrentHitPoints(oPC);
if (iHP>0) {
RemoveEffect(oPC,EffectBlindness());
DeleteLocalInt(oPC,"DyingDC");
DeleteLocalInt(oPC,"STvsDeathSucceed");
return;
}
int iDC;
int iDam;
int iSuc;
if (iHP<-9) { ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDeath(TRUE,TRUE),oPC); }
else {
iDam=d4();
iDC=GetLocalInt(oPC,"DyingDC");
if (FortitudeSave(oPC,iDC)>0) {
iDam=iDam/2;
iSuc=GetLocalInt(oPC,"STvsDeathSucceed")+1;
SetLocalInt(oPC,"STvsDeathSucceed",iSuc);
if (iSuc>2) {
FloatingTextStringOnCreature(" ",oPC,FALSE);
return;
}
}
AssignCommand(oPC,DelayCommand(6.0,DyingTicker(oPC)));
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(iDam), oPC);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectBlindness(),oPC,6.0);
SetLocalInt(oPC,"DyingDC",iDC+1);
}
}

void main()
{
object oPC=GetLastPlayerDying();
if (!GetIsPC(oPC)) return;
SetLocalInt(oPC,"DyingDC",15);
SetLocalInt(oPC,"STvsDeathSucceed",0);
FloatingTextStringOnCreature(" z ",oPC,FALSE);
DyingTicker(oPC);
}

, (6 ) 1d4, DC, , 1 ( 15). 2 .
0 -9 - . -10 - .

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

:::::::::::::::::Milez::::::::::::::::::::::::::::::
May 24 2003

, D&D 3ed HEAT COLD DMG. , . . DMG (, DMG, , ).
, , ! / !

OnEnter .
Neverwinter Script Source
void DealTemperatureDamage(object oPC)

{
//
if (GetCurrentHitPoints(oPC)<1) return;
// ?
object oArea=GetArea(oPC);
// ?
int iT=GetLocalInt(oArea,"Temperature");
//
// ( 0 . 0 -1)
if (((iT<=32) && (iT>=4)) || (iT==0)) return;
//
int iDamType;
int iDamAmount;
int iSaveType;
float iInterval;

object oFire;
int iFatigue=FALSE;
int iFortSave;
int i;
effect eDam;
// / ?
int iCloth=(GetItemACValue(GetItemInSlot(INVENTORY_SLOT_CHEST,oPC))>5)
||GetIsObjectValid((GetItemInSlot(INVENTORY_SLOT_CLOAK,oPC)));
// "" ?
int iTimes=GetLocalInt(oPC,"TemperatureDamageTimer");
int iDC=15+iTimes; // DC
if (iT>32) { // !
FloatingTextStringOnCreature(" !",oPC);
iDamType=DAMAGE_TYPE_FIRE;
iSaveType=SAVING_THROW_TYPE_FIRE;
iDamAmount=d4();
if (iCloth) iDC+=4; // -4 +4 DC ( ). , :)
if (iT>60) { // !
// 1d6 2
eDam=EffectDamage(d6(),iDamType);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDam,oPC);
for (i=2;i<10;i+=2)
AssignCommand(oPC,DelayCommand(IntToFloat(i),
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDam,oPC)));
iFatigue=TRUE;
iInterval=10.0;
} else if (iT>43) { // !
iInterval=20.0;
iFatigue=TRUE;
} else { //
iInterval=120.0;
}
} else if (iT<4) { // !
//
oFire=GetNearestObjectByTag("ku_campfire",oPC);
// ,
if ((GetIsObjectValid(oFire)) &&
(GetDistanceBetween(oFire,oPC)<5.0)) {
iDC=0;
RemoveEffect(oPC,EffectSlow());
iInterval=120.0;
} else {
iDamType=DAMAGE_TYPE_COLD;
iSaveType=SAVING_THROW_TYPE_COLD;
iDamAmount=d6();
FloatingTextStringOnCreature(" !",oPC);
if (iT<-18) { //
if (iCloth) iInterval=120.0; else iInterval=20.0;
iFatigue=TRUE;
} else { // Very cold
if (iCloth) iDC=0; //
iInterval=120.0;
}
}
}
if (iDC>0){
iFortSave=FortitudeSave(oPC,iDC,iSaveType);
if (iFortSave==0) {
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDamage(iDamAmount,iDamType),oPC);
if (iFatigue) ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectSlow(),oPC,iInterval);
}
}
SetLocalInt(oPC,"TemperatureDamageTimer",iTimes+1);
AssignCommand(oPC,DelayCommand(iInterval,DealTemperatureDamage(oPC)));
}


void main()
{
object oPC=GetEnteringObject();
if (GetIsObjectValid(oPC)) {
DeleteLocalInt(oPC,"TemperatureDamageTimer");
AssignCommand(oPC,DealTemperatureDamage(oPC));
}
}


ku_campfire - ""

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

:::::::::::::::::Milez::::::::::::::::::::::::::::::
May 24 2003

"" . . , - . , , . / !
"" ( , , ) " ". Action Taken :
Neverwinter Script Source
void main()
{
object oPC=GetPCSpeaker();
object oPackAnimal=OBJECT_SELF;
location lLoc=GetLocation(oPC);
object oContainer=CreateObject(OBJECT_TYPE_PLACEABLE,"inviscont",lLoc);
object oEnum=GetFirstItemInInventory(oPackAnimal);
SetLocalObject(oContainer,"LinkedPackAnimal",oPackAnimal);
while (GetIsObjectValid(oEnum)) {
CopyObject(oEnum,lLoc,oContainer);
DestroyObject(oEnum);
oEnum=GetNextItemInInventory(oPackAnimal);
}
AssignCommand(oPC,ClearAllActions());
AssignCommand(oPC,ActionInteractObject(oContainer));
}

"" ( Invisible Object), "" Usable, Plot, Has Inventory. "inviscont". "" OnClose :
Neverwinter Script Source
void main()
{
object oMaster=GetLocalObject(OBJECT_SELF,"LinkedPackAnimal");
location lLoc=GetLocation(OBJECT_SELF);
object oEnum=GetFirstItemInInventory();
while (GetIsObjectValid(oEnum)) {
CopyObject(oEnum,lLoc,oMaster);
DestroyObject(oEnum);
oEnum=GetNextItemInInventory();
}
DelayCommand(1.0,DestroyObject(OBJECT_SELF));
}


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

:::::::::::::::::Milez::::::::::::::::::::::::::::::
May 27 2003
.
() ONYX'.
() Milez'.
, , , .
, , - Cast: Unique Power Unlim Times/Day. contract.
"", - Cast: Unique Power Self Only Unlim Times/Day. headofclient.
OnActivateItem :
Neverwinter Script Source
location RandomLocationFrom(location lOrigin)
{
vector vOrigin=GetPositionFromLocation(lOrigin);
vOrigin.x+=(Random(11)-5);
vOrigin.y+=(Random(11)-5);
return Location(GetAreaFromLocation(lOrigin),vOrigin,GetFacingFromLocation(lOrigin));
}

void SummonKiller(object oClient,object oMaster)
{
location lClient=RandomLocationFrom(GetLocation(oClient));
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,
EffectVisualEffect(VFX_FNF_SMOKE_PUFF),lClient);
object oKiller=CreateObject(OBJECT_TYPE_CREATURE,"gypsy007",lClient);
SetLocalObject(oKiller,"MyClient",oClient);
SetLocalString(oKiller,"MyClientName",GetName(oClient));
SetLocalString(oKiller,"MyClientTag",GetTag(oClient));
SetLocalObject(oKiller,"MyMaster",oMaster);
& nbsp;DelayCommand(IntToFloat(Random(51)+50),AssignCommand(oKiller,ActionAttack(o
Client)));
}

void SummonKillers(object oClient,object oMaster,int iNumKillers)
{
int i;
for (i=1;i<=iNumKillers;i++) {
SummonKiller(oClient,oMaster);
}
}

void main()
{
object oOwner=GetItemActivator();
if (!GetIsPC(oOwner)) return;
object oSource=GetItemActivated();
object oTarget=GetItemActivatedTarget();
string sSourTag=GetTag(oSource);
if (sSourTag=="contract") {
int iNumOfKillers=GetLocalInt(oSource,"NumberOfKillers");
if (iNumOfKillers<1) {
DestroyObject(oSource);
} else
if ((GetObjectType(oTarget)==OBJECT_TYPE_CREATURE) && (!GetIsDM(oTarget)) && (!GetPlotFlag(oTarget)))
{
FloatingTextStringOnCreature("The murder have been assigned!",oOwner,FALSE);
DelayCommand(IntToFloat(Random(51)+50),
SummonKillers(oTarget,oOwner,iNumOfKillers));
DestroyObject(oSource);
} else {
FloatingTextStringOnCreature("The murder can't be assigned to an item, DM or plot character!",oOwner,FALSE);
}
} else if (sSourTag=="headofclient") {
FloatingTextStringOnCreature("This is the head of "+
GetLocalString(oSource,"Client"),oOwner,FALSE);

}
}

:
( ). - , ,
(CreateItemOnObject("contract",oPC)).
- - (SetLocalInt(oContract,"NumberOfKillers",xxx))
. . "gypsy007". OnHeartbeat :
Neverwinter Script Source
void main()
{
object oClient=GetLocalObject(OBJECT_SELF,"MyClient");
object oMaster=GetLocalObject(OBJECT_SELF,"MyMaster");
object oMessenger;
string sNotifyVar;
if ((!GetIsObjectValid(oClient)) || GetIsDead(oClient)) {
if (GetIsObjectValid(oMaster)) {
sNotifyVar="Notified"+GetLocalString(OBJECT_SELF,"MyClientTag");
if (GetLocalInt(oMaster,sNotifyVar)!=TRUE) {
oMessenger=CreateObject(OBJECT_TYPE_CREATURE,"halfmerc002",
GetLocation(oMaster),TRUE);
SetLocalObject(oMessenger,"MyMaster",oMaster);
SetLocalString(oMessenger,"MyClient",GetLocalString(OBJECT_SELF,"MyClientName"));
SetLocalString(oMessenger,"NotifyVar",sNotifyVar);
SetLocalInt(oMaster,sNotifyVar,TRUE);
}
}
DestroyObject(OBJECT_SELF);
}
}

. . "halfmerc002".
, . :
Neverwinter Script Source
void main()
{
object oPC=GetPCSpeaker();
object oHead=CreateItemOnObject("headofclient",oPC);
SetLocalString(oHead,"Client",GetLocalString(OBJECT_SELF,"MyClient"));
SetLocalObject(oHead,"Master",oPC);
DeleteLocalInt(oPC,GetLocalString(OBJECT_SELF,"NotifyVar"));
}

: - /.
- ,
, .
/ "", 50-100
(DelayCommand(IntToFloat(Random(51)+50),... ) "" - . ( . Killer, , , ) , ( , ) . "". , - .
.

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

:::::::::::::::::Milez::::::::::::::::::::::::::::::
May 14 2003
( -).
Axistown'

kel_rest
Neverwinter Script Source
void DestroyFirecamp(object oCampFire=OBJECT_SELF)
{
//
object oLandMark=CreateObject(OBJECT_TYPE_PLACEABLE,"plc_weathmark",GetLocation(oCampFire));
// 120 (2 , 1 ).
AssignCommand(oLandMark,DelayCommand(120.0,DestroyObject(oLandMark)));
DestroyObject(oCampFire);
}

void ApplyRestEffect(object oTarget=OBJECT_SELF)
{
// . .
effect eSleep=EffectBlindness();

if (GetRacialType(oTarget)==RACIAL_TYPE_ELF)
{
// , (. D&D 3ed)
if (GetGender(oTarget)==GENDER_FEMALE)
FloatingTextStringOnCreature(" ",oTarget,FALSE);
else
FloatingTextStringOnCreature(" ",oTarget,FALSE);
} else

eSleep=EffectLinkEffects(eSleep,EffectVisualEffect(VFX_IMP_SLEEP));
// 30 . .
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eSleep,oTarget,30.0);
}

object FindFood(object oTarget=OBJECT_SELF)
{
object oEnum=GetFirstItemInInventory(oTarget);
while (GetIsObjectValid(oEnum) && (GetTag(oEnum)!="KEL_FOOD"))
oEnum=GetNextItemInInventory(oTarget);
return oEnum;
}


ku_makecamp ( OnUsed )
Neverwinter Script Source
#include "kel_rest"

void main()
{
object oPC=GetLastUsedBy();
if (!GetIsPC(oPC)) return;
object oTorch=GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oPC);
if (GetIsObjectValid(oTorch) &&
(GetTag(oTorch) == "NW_IT_TORCH001") &&
// , ( )
(GetLocalInt(GetArea(oPC),"NoCampArea") != TRUE)) {
object oFire=CreateObject(OBJECT_TYPE_PLACEABLE,"ku_campfire",GetLocation(OBJECT_SELF));
DestroyObject(OBJECT_SELF);
// 900 (15 7,5 )
//
AssignCommand(oFire,DelayCommand(900.0,DestroyFirecamp(oFire)));
} else {
CreateItemOnObject("kel_wood",oPC);
DestroyObject(OBJECT_SELF);
}
}


kua_dropwood ( OnUnAquiredItem )
Neverwinter Script Source
void main()
{
object oPC=GetModuleItemLostBy();
if (!GetIsPC(oPC)) return;
object oItem=GetModuleItemLost();
if (!GetIsObjectValid(oItem)) return;
string sResRef=GetTag(oItem);
if (sResRef=="KEL_WOOD")
{
// by Milez on 14/05/2003, Guest
if (GetIsObjectValid(GetAreaFromLocation(GetLocation(oItem)))) {
CreateObject(OBJECT_TYPE_PLACEABLE,"ku_woodpile",GetLocation(oItem));
DestroyObject(oItem);
}
}
}


kr_resteffect ( OnRested )
Neverwinter Script Source
#include "kel_rest"
void main()
{
object oPC=GetLastPCRested();
if (GetCurrentAction(oPC)!=ACTION_REST) return;
int iFreeRest=GetLocalInt(GetArea(oPC),"FreeRestArea");
if (iFreeRest) ApplyRestEffect(oPC);
else {
object oCampFire=GetNearestObjectByTag("ku_campfire",oPC);
// 3 ( )
if (GetIsObjectValid(oCampFire) && (GetDistanceBetween(oPC,oCampFire)<=3.0)) {
object oFood=FindFood(oPC);
if (GetIsObjectValid(oFood)) {
DestroyObject(oFood);
ApplyRestEffect(oPC);
} else {
FloatingTextStringOnCreature(" ",oPC,FALSE);
AssignCommand(oPC,ClearAllActions());
}
} else {
FloatingTextStringOnCreature(" ",oPC,FALSE);
AssignCommand(oPC,ClearAllActions());
}
}
}


khb_cfire_sfx ( OnHeartbeat , , )
Neverwinter Script Source
void main()
{
PlaySound("al_cv_firecamp1");
}



"":
KEL_WOOD -
ku_woodpile -
ku_campfire -
KEL_FOOD -

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


:::::::::::::::::Milez::::::::::::::::::::::::::::::
May 29 2003
" ". . . - ApplyWindEffect.
:
int iWindForce - : 0 - Light wind; 1 - Moderate wind; 2 - Strong wind; 3 - Severe wind; 4 - Windstorm; 5 - Hurricane force wind; 6 - Tornado.
Neverwinter Script Source
float fWindDirection
- , .
Neverwinter Script Source
object oTarget
- ""
Heartbeat', , . :
Neverwinter Script Source
void main()
{
object oPC=GetFirstPC();
while (GetIsObjectValid(oPC)) {
ApplyWindEffect(4,45.0,oPC);
oPC=GetNextPC();
}
}

DMG.
.
Neverwinter Script Source
vector BlowAwayTo(vector vOrigin,float fAngle,float fRange)
{
float dx=fRange*cos(fAngle);
float dy=fRange*sin(fAngle);
return Vector(vOrigin.x+dx,vOrigin.y+dy,vOrigin.z);
}

// "". + 1d4*10 1d4 10 .
void ApplyBlowAwayEffect(float fWindDirection,object oTarget=OBJECT_SELF)
{
int iRange=d4();
int iDam=d4(iRange);
iRange *= 10;
float fRange=FeetToMeters(IntToFloat(iRange));
vector vNewPos=BlowAwayTo(GetPosition(oTarget),fWindDirection,fRange);
AssignCommand(oTarget,ClearAllActions(TRUE));
AssignCommand(oTarget,JumpToLocation(Location(GetArea(oTarget),vNewPos,GetFacin
g(oTarget))));
AssignCommand(oTarget,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectKnockdown(),oTarget,6.0));
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDamage(iDam),oTarget);
PrintVector(vNewPos,TRUE);
}

void ApplyWindEffect(int iWindForce,float fWindDirection,object oTarget=OBJECT_SELF)
{
if (iWindForce<1) return;
object oTorch=GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oTarget);

if (GetBaseItemType(oTorch)==BASE_ITEM_TORCH) {
if (iWindForce==1) { // Moderate wind 50% ()
if (d2()==1) ActionUnequipItem(oTorch);
return;
} else { ActionUnequipItem(oTorch); } // Stronger winds extinguish fire at 100%
} else if (iWindForce==1) return; // If there's no lit torch moderate wind doesn't do any effect

int iCreatureSize=GetCreatureSize(oTarget);
// , , /
int iWpnType=GetBaseItemType(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oTarget));
int iFeet;
vector vVec;
int bRangeWpn=FALSE;

if (iWpnType!=BASE_ITEM_INVALID) {
bRangeWpn=(iWpnType==BASE_ITEM_DART)||
(iWpnType==BASE_ITEM_HEAVYCROSSBOW)||
(iWpnType==BASE_ITEM_LIGHTCROSSBOW)||
(iWpnType==BASE_ITEM_LONGBOW)||
(iWpnType==BASE_ITEM_SHORTBOW)||
(iWpnType==BASE_ITEM_SHURIKEN)||
(iWpnType==BASE_ITEM_SLING)||
(iWpnType==BASE_ITEM_THROWINGAXE);
}

switch (iWindForce) {
case 2: // Strong wind
if (bRangeWpn)
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectAttackDecrease(2),oTarget,6.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectSkillDecrease(SKILL_LISTEN,2),oTarget,6.0);

if (iCreatureSize==1) // . (Tiny)
if (FortitudeSave(oTarget,10)==0)
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectKnockdown(),oTarget,3.0);
break;
case 3: // Severe wind
if (bRangeWpn)
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectAttackDecrease(4),oTarget,6.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectSkillDecrease(SKILL_LISTEN,4),oTarget,6.0);

if (iCreatureSize<4)
if (FortitudeSave(oTarget,15)==0)
switch (iCreatureSize) {
case 3: // (Medium).
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectEntangle(),oTarget,6.0);
break;
case 2: // - (Small)
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectKnockdown(),oTarget,6.0);
break;
case 1:
ApplyBlowAwayEffect(fWindDirection,oTarget);
}
break;
case 4: // Windstorm
if (bRangeWpn)
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectAttackDecrease(50),oTarget,6.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectSkillDecrease(SKILL_LISTEN,8),oTarget,6.0);

if (iCreatureSize<6)
if (FortitudeSave(oTarget,18)==0)
switch (iCreatureSize) {
case 3:
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectKnockdown(),oTarget,6.0);
break;
case 4: // (Large)
case 5: // - (Huge)
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectEntangle(),oTarget,6.0);
break;
case 2:
case 1:
ApplyBlowAwayEffect(fWindDirection,oTarget);
break;
}
break;
case 5: // Hurricane force wind
if (bRangeWpn)
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectAttackDecrease(50),oTarget,6.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectSkillDecrease(SKILL_LISTEN,50),oTarget,6.0);

if (iCreatureSize<6)
if (FortitudeSave(oTarget,20)==0)
switch (iCreatureSize) {
case 3:
case 2:
case 1:
ApplyBlowAwayEffect(fWindDirection,oTarget);
break;
case 4:
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectKnockdown(),oTarget,6.0);
break;
case 5:
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectEntangle(),oTarget,6.0);
break;
}
break;
case 6: // Tornado (WOW!)
if (bRangeWpn)
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectAttackDecrease(50),oTarget,6.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectSkillDecrease(SKILL_LISTEN,50),oTarget,6.0);
if ((iCreatureSize==5) && (FortitudeSave(oTarget,30)==0))
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectKnockdown(),oTarget,6.0);
else { // . , 1d10 , 6d6
iFeet=GetLocalInt(oTarget,"IsInTornado");
if (iFeet<1)
if (FortitudeSave(oTarget,30)==0) iFeet=d10();
if (iFeet>0) {
iFeet-=1;
// 30 .
// ,
// ,
// 10 .
vVec=GetPosition(oTarget);
vVec.x+=Random(21)-10;
vVec.y+=Random(21)-10;
AssignCommand(oTarget,ClearAllActions(TRUE));
AssignCommand(oTarget,JumpToLocation(Location(GetArea(oTarget),vVec,GetFacing(o
Target))));
AssignCommand(oTarget,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectKnockdown(),oTarget,6.0));
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDamage(d6(6)),oTarget);
}
SetLocalInt(oTarget,"IsInTornado",iFeet);
}
break;
}
}

3 (Severe wind) Gust of Wind, SoU
spells.2da, , , .

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


:::::::::::::::::Milez::::::::::::::::::::::::::::::
Jun 8 2003
, . : , . , (. , , , ). , , .
DMG AD&D 3ed.
Neverwinter Script Source
int PRECIPITATION_RAIN=1;
int PRECIPITATION_SNOW=2;
int PRECIPITATION_SLEET=3;
int PRECIPITATION_HAIL=4;

void ApplyPrecipitationEffect(int iPrecType,object oTarget=OBJECT_SELF)
{
object oTorch=GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oTarget);
if (GetBaseItemType(oTorch)==BASE_ITEM_TORCH) ActionUnequipItem(oTorch);
int iWpnType=GetBaseItemType(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oTarget));
int bRangeWpn=FALSE;

if (iWpnType!=BASE_ITEM_INVALID) {
bRangeWpn=(iWpnType==BASE_ITEM_DART)||
(iWpnType==BASE_ITEM_HEAVYCROSSBOW)||
(iWpnType==BASE_ITEM_LIGHTCROSSBOW)||
(iWpnType==BASE_ITEM_LONGBOW)||
(iWpnType==BASE_ITEM_SHORTBOW)||
(iWpnType==BASE_ITEM_SHURIKEN)||
(iWpnType==BASE_ITEM_SLING)||
(iWpnType==BASE_ITEM_THROWINGAXE);
}

switch(iPrecType) {
case 3: //PRECIPITATION_SLEET -
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectMovementSpeedDecrease(50),oTarget,7.0);
case 1: //PRECIPITATION_RAIN -
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectSkillDecrease(SKILL_SPOT,4),oTarget,7.0);

ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectSkillDecrease(SKILL_SEARCH,4),oTarget,7.0);

ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectSkillDecrease(SKILL_LISTEN,4),oTarget,7.0);

if (bRangeWpn)
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectAttackDecrease(4),oTarget,7.0);
break;
case 2: //PRECIPITATION_SNOW -
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectMovementSpeedDecrease(50),oTarget,7.0);

if (bRangeWpn)
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectAttackDecrease(4),oTarget,7.0);

ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectSkillDecrease(SKILL_SPOT,4),oTarget,7.0);

ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectSkillDecrease(SKILL_SEARCH,4),oTarget,7.0);
break;
case 4: //PRECIPITATION_HAIL -
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectMovementSpeedDecrease(50),oTarget,7.0);

ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectSkillDecrease(SKILL_LISTEN,4),oTarget,7.0);

if (d100()<=5) {
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDamage(1,DAMAGE_TYPE_BLUDGEONIN
G),oTarget);
SendMessageToPC(oTarget,"z z .");
}
break;
}
}

, . , : .

************************************************************************************
+
Lex
Mar 18 2005, 23:50
#52


Level 5


:
: Lawful Neutral
:
NWN:





" "
" MILEZ'"

:::::::::::::::::Milez::::::::::::::::::::::::::::::
Jun 29 2003
. , , , . .
Heartbeat , :
Neverwinter Script Source
void main()
{
object oSelf=OBJECT_SELF;
object oPC=GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR,PLAYER_CHAR_IS_PC);
if (!GetIsObjectValid(oPC)) return;
float fActDist=IntToFloat(GetMaxHitPoints()); // , - ,
if (GetDistanceBetween(oPC,oSelf)>fActDist) return;
int iSpawnDist=GetReflexSavingThrow(oSelf); // . -, - -
int iSpawnChance=GetWillSavingThrow(oSelf); // , %
int iMaxSpawn=GetFortitudeSavingThrow(oSelf); // . - -,
int iSpawned=GetLocalInt(oSelf,"SpawnedCreatures");
object oMonster;
string sMonster;
float fSpawnAngle;
float fSpawnDist;
vector vSpawnPlace;
location lSpawnLoc;
if (iSpawned<iMaxSpawn) {
if (d100()<=iSpawnChance) {
iSpawned++;
fSpawnDist=IntToFloat(Random(iSpawnDist)+1);
fSpawnAngle=IntToFloat(Random(360));
vSpawnPlace=GetPosition(oSelf);
vSpawnPlace.x+=fSpawnDist*cos(fSpawnAngle);
vSpawnPlace.y+=fSpawnDist*sin(fSpawnAngle);
lSpawnLoc=Location(GetArea(oSelf),vSpawnPlace,IntToFloat(Random(360)));
// -,
switch (Random(2)) {
case 0:
sMonster="nw_skeleton";
break;
case 1:
sMonster="nw_zombie01";
break;
}
oMonster=CreateObject(OBJECT_TYPE_CREATURE,sMonster,lSpawnLoc);
SetLocalObject(oMonster,"MySpawner",oSelf);
SetLocalObject(oSelf,"LastMonsterSpawned",oMonster);
}
}
SetLocalInt(oSelf,"SpawnedCreatures",iSpawned);
}


OnUserDefined nw_c2_defaultd 1007 (), -:
Neverwinter Script Source
...
object oSpawnPoint;
switch(iEvent) {
...
case 1007:
oSpawnPoint=GetLocalObject(OBJECT_SELF,"MySpawner");
if (GetIsObjectValid(oSpawnPoint)) {
SetLocalInt(oSpawnPoint,"SpawnedCreatures",GetLocalInt(oSpawnPoint,"SpawnedCreatures")-1);
}
break;
...
}


. . , 1 , . ,
:
- - ( ) :
Max Hit Points - , , .
Reflex Save - . - , -.
Fortitude Save - . - , - .
Will Save - , , (100 - , 0 - . 100 : , !)

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

:::::::::::::::::Milez::::::::::::::::::::::::::::::
Feb 24 2004
, . . , ... ! - !
:
Neverwinter Script Source
void SetGhostState(object oPC)
{
// polymorph, so we can't equip/use things, cast spells etc.
effect eGhost = EffectPolymorph(POLYMORPH_TYPE_SPECTRE,TRUE);
// this way we can pass thru other mobs
eGhost = EffectLinkEffects(EffectCutsceneGhost(),eGhost);
// ghosts are invisible, you know
eGhost = EffectLinkEffects(EffectInvisibility(INVISIBILITY_TYPE_DARKNESS),eGhost);
// ghosts can't attack as well
eGhost = EffectLinkEffects(EffectDazed(),eGhost);
// others can't detect ghosts, no way!
eGhost = EffectLinkEffects(EffectEthereal(),eGhost);
// these effects can't be dispelled, as well as they can't be removed by rest
eGhost = SupernaturalEffect(eGhost);

ApplyEffectToObject(DURATION_TYPE_PERMANENT,eGhost,oPC);
SetPlotFlag(oPC,TRUE); // ghosts are invincible
SetLocalInt(oPC,"IAmAGhost",1);
}

OnDeath, , , , - . , , "" , .

" MILEZ'" " "
+
Lex
Mar 19 2005, 01:06
#53


Level 5


:
: Lawful Neutral
:
NWN:





" "
" _kaa_"

:::::::::::::::::_kaa_::::::::::::::::::::::::::::::
Feb 24 2004
. , -. - ( - )
.
Neverwinter Script Source
void main()
{
object oPC = GetEnteringObject();
string sCDKEY = GetPCPublicCDKey(oPC);
string sName = GetName(oPC);
string sPCName = GetPCPlayerName(oPC);
// ( ) - .
string sID = "("+sPCName+")"+sName;
int SecurityDisabled = GetLocalInt(GetModule(),"SecurityDisable");
//if (GetIsDM(oPC)) return;
WriteTimestampedLogEntry("Security: "+sName+" :["+sPCName+"]: with key ="+sCDKEY);
string sReadID = GetCampaignString("Security",sID);
// -
if (sReadID =="" || SecurityDisabled)
SetCampaignString("Security",sID,sCDKEY);
if (sReadID != sCDKEY && sReadID !="" && !SecurityDisabled)
{
BootPC(oPC);
SendMessageToAllDMs("Security: Error! "+sName+" :["+sPCName+"]: with key ="+sCDKEY+ " != "+sReadID);
WriteTimestampedLogEntry("Security: Error! "+sName+" :["+sPCName+"]: with key ="+sCDKEY+ " != "+sReadID);
}
else
WriteTimestampedLogEntry("Security: Check ok.");
}

- - :
dm_setmodulevarint SecurityDisable 1
:
dm_setmodulevarint SecurityDisable 0

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

:::::::::::::::::_kaa_::::::::::::::::::::::::::::::
Oct 3 2003
. , - . , , .. - 10 , .
. "_SHOP" (// , ). - %)
GetObjectType();
OnUnAcquireItem
:
ExecuteScript("at_check_dupe",OBJECT_SELF);

:
at_check_dupe
Neverwinter Script Source
void main()
{
object oLostItem = GetModuleItemLost();
object oLostBy = GetModuleItemLostBy();
object oNewPosessor = GetItemPossessor(oLostItem);

if (FindSubString(GetStringUpperCase(GetTag(oNewPosessor)),"_SHOP"))
{
int n = 0;
object oItem = GetFirstItemInInventory(oNewPosessor);
while (GetIsObjectValid(oItem))
{
if (GetTag(oLostItem) == GetTag(oItem)) n++;
if (n>1)
{
DestroyObject(oLostItem);
break;
}
oItem = GetNextItemInInventory(oNewPosessor);
}
}
}


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

:::::::::::::::::_kaa_::::::::::::::::::::::::::::::
Jan 30 2004
.
- . - .
( , ).
DayToNight() .
onPlayerEquipItem()
Neverwinter Script Source
void main()
{
object oPC = GetPCItemLastEquippedBy();
object oItem = GetPCItemLastEquipped();
if (GetTag(oItem) == "mg_it_ringghost")
{
effect E = EffectCutsceneGhost();
E = EffectLinkEffects(EffectEthereal(),E);
ApplyEffectToObject(DURATION_TYPE_PERMANENT,E,oPC);
}
}
[/nss

onPlayerUnEquipItem()
[nss]
void FindAndRemoveGhostEffect(object O)
{
effect e = GetFirstEffect(O);
while (GetIsEffectValid(e))
{
if (GetEffectType(e) == EFFECT_TYPE_CUTSCENEGHOST)
RemoveEffect(O,e);
if (GetEffectType(e) == EFFECT_TYPE_ETHEREAL)
RemoveEffect(O,e);
e = GetNextEffect(O);
}
void main()
{
object oPC = GetPCItemLastUnequippedBy();
object oItem = GetPCItemLastUnequipped();
//
if (GetTag(oItem) == "mg_it_ringghost")
{
FindAndRemoveGhostEffect(oPC);
}

mg_it_ringghost - .
.

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

:::::::::::::::::_kaa_::::::::::::::::::::::::::::::
Mar 25 2004
, SendMessageToPC()
: <cRGB> </c>
RGB - , ascii - .
, " " () (32) "" (254) .
- s_end()
4 , :
Neverwinter Script Source
string s_green()
{
return "<c >";
}
string s_blue()
{
return "<c >";
}
string s_red()
{
return "<c >";
}
string s_white()
{
return "<c>";
}
string s_end()
{
return "</c>";
}


SetCustomToken

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

:::::::::::::::::_kaa_::::::::::::::::::::::::::::::
Mar 26 204
( .2da ).
- , 0..999

Neverwinter Script Source
//Add string S to array O[X,Y]
void _arr_SetStringXY(object O, int X,int Y,string S,string Prefix="_arr");
//Get string S from array O[X,Y]
string _arr_GetStringXY(object O, int X,int Y,string Prefix="_arr");
string _arr_AddNull(int I)
{
string result = "";
if (I<10) result+="0";
if (I<100) result+="0";
result += IntToString(I);
return result;
}

void _arr_SetStringXY(object O, int X,int Y,string S,string Prefix="_arr")
{
SetLocalString(O,Prefix+_arr_AddNull(X)+_arr_AddNull(Y),S);
}

string _arr_GetStringXY(object O, int X,int Y,string Prefix="_arr")
{
return GetLocalString(O,Prefix+_arr_AddNull(X)+_arr_AddNull(Y));
}


ps. , :
- ) ) ( , )

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

" _kaa_" " "
+
Lex
Mar 19 2005, 13:56
#54


Level 5


:
: Lawful Neutral
:
NWN:





" "
" DBCOLL'A"

::::::::::::DBColl::::::::::::::::::::
May 7 2003
, .
"OnUsed"
Neverwinter Script Source
void main()
{
object oDoor=GetNearestObjectByTag("_");
if(GetIsOpen(oDoor)) //
{
AssignCommand(OBJECT_SELF,ActionCloseDoor(oDoor));
// . .
SetLocked(oDoor,TRUE); //
ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
//
}
else if(!GetIsOpen(oDoor)) //,
{
SetLocked(oDoor,FALSE);//
AssignCommand(OBJECT_SELF,ActionOpenDoor(oDoor));
// .
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
//
}
}


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

:::::::::::::::::DBColl::::::::::::::::::::::::::::::
May 8 2003
18 , , 15 .
( )
Neverwinter Script Source
void main()
{
object oPC = GetFirstPC();
object oFlame = GetObjectByTag(" ");
int nSpeedOfDec = 3;
// 3 ( 18 1 )
int nSpeed = GetLocalInt(oPC, "DecHealthSpeed");
// , == 0
if (nSpeed == nSpeedOfDec && GetDistanceBetween(oPC, oFlame) > 15.0)
// Health
// (15 )
{
effect eDamage = EffectDamage( 1, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_NORMAL);
/// -
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oPC);
///
AssignCommand(oPC, ActionSpeakString(", ..."));
SetLocalInt(oPC, "DecHealthSpeed", 0);
return;
}
else if (GetDistanceBetween(oPC, oFlame) < 15.0
&& GetCurrentHitPoints(oPC) <= GetMaxHitPoints(oPC))
/// 15 , 2
{
effect eHeal = EffectHeal(2);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oPC);
return;
}
SetLocalInt(oPC, "DecHealthSpeed", nSpeed+1);
}


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

:::::::::::::::::DBColl::::::::::::::::::::::::::::::
May 28 2003
. ( ) . UserDefined
Neverwinter Script Source
#include nw_i0_generic
void main()
{
int nEvent = GetUserDefinedEventNumber();
if (nEvent == 1002)
{
object oNPC = GetLastPerceived();
if (GetFactionEqual(oNPC, OBJECT_SELF))
{
if (GetLastPerceptionSeen() && GetDistanceToObject(oNPC) < 6.0f &&
GetLocalInt(oNPC, "GREATED") != 1)
{
SetLocalInt(oNPC, "GREATED", 1);
AssignCommand(oNPC, ClearAllActions());
AssignCommand(oNPC, ActionDoCommand(SetFacingPoint(GetPosition(OBJECT_SELF))));
AssignCommand(oNPC, ActionSpeakString(" !"));
AssignCommand(oNPC, ActionPlayAnimation(ANIMATION_FIREFORGET_SALUTE, 0.5f, 1.0f));
AssignCommand(oNPC, ActionDoCommand(WalkWayPoints()));
DelayCommand(15.0f, SetLocalInt(oNPC, "GREATED", 0));
}
}
return;
}
}


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

:::::::::::::::::DBColl::::::::::::::::::::::::::::::
Feb 20 2004
-, , - , ... :
1. . ! .
Neverwinter Script Source
//::///////////////////////////////////////////////
//:: Name
//:: Copyright 2003 WRG!
//:://////////////////////////////////////////////
//:: Created By: DBColl
//:: Created On: 7.09.2003
//:://////////////////////////////////////////////
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC) || GetLocalInt(OBJECT_SELF, "triggered") > 0)
return;
string sStr = GetName(OBJECT_SELF);
AssignCommand(oPC, SpeakString(sStr));
if (GetLockKeyTag(OBJECT_SELF) == "")
SetLocalInt(OBJECT_SELF, "triggered", 1);
}

2. , Name , !!!
3. KeyTag - ( !) PC, .

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

" DBCOLL'A" " "

+
Lex
Mar 19 2005, 15:03
#55


Level 5


:
: Lawful Neutral
:
NWN:





" "
" LAZY RAMN'"

::::::::::::Lazy Ramna::::::::::::::::::::
Oct 14 2003
LEX: LAZY. 2003 !! DUMBO
, ""
"" , . ax_letter_ya "". ya() , "" "". =)
Neverwinter Script Source
string ya(string sMessage = "")
{
string sYa = GetName(GetObjectByTag("ax_letter_ya"));
string sResult = "";
string sSub;
int i = 0;
while ((sSub = GetSubString(sMessage, i, 2)) != "")
{
if (sSub == "")
{
sResult += sYa;
i += 2;
}
else
{
sResult += GetStringLeft(sSub, 1);
i++;
}
}
return sResult;
}


:
1) string sMessage = ""+ya()+" "+ya()+" ";
2) string sMessage = ya(" ");
sMessage " "

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

::::::::::::Lazy Ramna::::::::::::::::::::
Mar 15 2004
, ( ), "". , KeyTag. OnEnter.
Neverwinter Script Source
void main()
{
object oPC = GetEnteringObject();
object oTarget = GetObjectByTag(GetTrapKeyTag(OBJECT_SELF));
if (GetIsObjectValid(oPC) && GetIsObjectValid(oTarget)) {
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, JumpToObject(oTarget));
}
}

, . PC "" , , .
18:57
. - /////, . ( UNIX_TIMESTAMP ) AX_LIB_START_YEAR - .
Neverwinter Script Source
// 2003 by Alexander Ponyatikh, aka Lazy Ranma

const int AX_LIB_START_YEAR = 0;

int GetCurrentYear()
{
return GetCalendarYear() - AX_LIB_START_YEAR;
}

int GetCurrentMonth()
{
return GetCurrentYear()*12 + GetCalendarMonth();
}

int GetCurrentDay()
{
return (GetCurrentMonth() - 1)*28 + GetCalendarDay();
}

int GetCurrentHour()
{
return (GetCurrentDay() - 1)*24 + GetTimeHour();
}

int GetCurrentMinute()
{
return GetCurrentHour()*FloatToInt(HoursToSeconds(1))/60 + GetTimeMinute();
}

int GetCurrentSecond()
{
return GetCurrentMinute()*60 + GetTimeSecond();
}


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

" LAZY RAMN'" " "
+
Lex
Mar 19 2005, 16:06
#56


Level 5


:
: Lawful Neutral
:
NWN:





" "
" BAAL'A"

::::::::::::Baal::::::::::::::::::::
May 7 2003
( ) .
Neverwinter Script Source
void main()
{
  object oPC = GetFirstPC();
  /// ( GetObjectByTag(" ")
  object oInv = GetFirstItemInInventory(oPC);
    ///
  while(GetIsObjectValid(oInv)) ///
      {
      DestroyObject(oInv); ///
      oInv = GetNextItemInInventory(oPC);
      ///
      }
    int i=0;
    while(i<14
      {
      DestroyObject(GetItemInSlot(i, oPC)); ///
      i++;
      }
}


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

::::::::::::Baal::::::::::::::::::::
Aug 18 2003
, , . , .
Neverwinter Script Source
void main()
{
int iHour=GetTimeHour();
int iGameHourRealMinutes = 2; // 1 ( )
float fMinute = IntToFloat(GetTimeMinute());
float fSecond = IntToFloat(GetTimeSecond());
float fGameMinute = fMinute*(60/iGameHourRealMinutes)+(fSecond/iGameHourRealMinutes);
int iMinute=FloatToInt(fGameMinute);
string sHour;
string sMinute;
if(iHour>0||iHour==21)
sHour=" ";
if(iHour>1||iHour>21)
sHour=" ";
if(iHour>4&&iHour<21)
sHour=" ";
if(iHour==0)
sHour=" ";
sHour=IntToString(iHour)+sHour;

int iVR=StringToInt(GetStringRight(IntToString(iMinute),1));
if(iVR==0)
sMinute=IntToString(iMinute)+" .";
if(iVR>0)
sMinute=IntToString(iMinute)+" .";
if(iVR>1)
sMinute=IntToString(iMinute)+" .";
if(iVR>4||(iMinute>10&&iMinute<21))
sMinute=IntToString(iMinute)+" .";
if(iMinute<10)
sMinute="0"+sMinute;

AssignCommand(GetFirstPC(),SpeakString(" : "+sHour+sMinute));
PlaySound("as_an_rooster1");// :-)
}


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

::::::::::::Baal::::::::::::::::::::
. oInventory - . sItemTag -
Neverwinter Script Source
int ItemsAmount(string sItemTag, object oCreature = OBJECT_SELF)
{
int N=0;
object oItem = GetFirstItemInInventory(oCreature);
while (GetIsObjectValid(oItem))
  {
  if(GetTag(oItem) == sItemTag)
      {
      N = N + GetNumStackedItems(oItem);
      }
  oItem = GetNextItemInInventory(oCreature);
  }
return N;
}


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

" BAAL'A" " "
+
Lex
Mar 19 2005, 16:21
#57


Level 5


:
: Lawful Neutral
:
NWN:





" "
" SMITH'A"

::::::::::::Smith::::::::::::::::::::
Sep 24 2003
- . ( ), , . :
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+fRadiu
s*sin(fRndomAngle)),360.0);
return lNewLoc;
}

fRadius oTarget, , iLine = FALSE, , , , fRadius.

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

" SMITH'A" " "
+
Lex
Mar 19 2005, 16:22
#58


Level 5


:
: Lawful Neutral
:
NWN:





" "
" SELLARY"

::::::::::::sellary::::::::::::::::::::
Oct 20 2003
, .
:
oArmor - ,
oCreature - ,
TRUE, , FALSE - .
(, " ").
Lazy Ranma spurlos - , DBColl .
Neverwinter Script Source
int GetIsValidArmor(object oArmor, object oCreature)
{
  //
  int nPrice = GetGoldPieceValue(oArmor);

  //
  int nClass = GetHitDice(oCreature);

  // , nClass
  // nPrice
  // ( #13 ;
  // , , 20
  // )
  int bResult = TRUE;
  switch (nClass) {
  case 1: bResult = (nPrice<=1000);
  break;
  case 2: bResult = (nPrice<=1500);
  break;
  case 3: bResult = (nPrice<=2500);
  break;
  case 4: bResult = (nPrice<=3500);
  break;
  case 5: bResult = (nPrice<=5000);
  break;
  case 6: bResult = (nPrice<=6500);
  break;
  case 7: bResult = (nPrice<=9000);
  break;
  case 8: bResult = (nPrice<=12000);
  break;
  case 9: bResult = (nPrice<=15000);
  break;
  case 10: bResult = (nPrice<=19500);
  break;
  case 11: bResult = (nPrice<=25000);
  break;
  case 12: bResult = (nPrice<=30000);
  break;
  case 13: bResult = (nPrice<=35000);
  break;
  case 14: bResult = (nPrice<=40000);
  break;
  case 15: bResult = (nPrice<=50000);
  break;
  case 16: bResult = (nPrice<=65000);
  break;
  case 17: bResult = (nPrice<=75000);
  break;
  case 18: bResult = (nPrice<=90000);
  break;
  case 19: bResult = (nPrice<=110000);
  break;
  case 20: bResult = (nPrice<=130000);
  break;
  default: bResult = (nClass>20);
  break;
  };

  //
  return bResult;
}


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

" SELLARY" " "
+
Lex
Mar 19 2005, 16:23
#59


Level 5


:
: Lawful Neutral
:
NWN:





" "
" GREEDO BEEFY"

::::::::::::Greedo Beefy::::::::::::::::::::
Jan 10 2004
...
, PW, .
, , OnHeartBeat
Neverwinter Script Source
void SaveCurTime (int minutes)
{
  int current = GetLocalInt(GetModule(), "cyclestill");
  if (current < ((minutes * 60) / 6))
  SetLocalInt(GetModule(), "cyclestill", current + 1);
  else
  {
        object oMod = GetModule();
        int iMonth = GetCalendarMonth();
        int iDay = GetCalendarDay();
        int iYear = GetCalendarYear();
        int iHour = GetTimeHour();
        SetCampaignInt("server_time", "CUR_YEAR", iYear, oMod);
        SetCampaignInt("server_time", "CUR_DAY", iDay, oMod);
        SetCampaignInt("server_time", "CUR_MONTH", iMonth, oMod);
        SetCampaignInt("server_time", "CUR_HOUR", iHour, oMod);
        SetLocalInt(GetModule(), "cyclestill", 0);
        WriteTimestampedLogEntry("Save Current Time completed");
  }
return;
}
void main ()
{
SaveCurTime(10);
}

( ) , .
OnModuleLoad :
Neverwinter Script Source
void main()
{
object oMod = GetModule();
int iMonthNew = GetCampaignInt("server_time", "CUR_MONTH", oMod);
int iDayNew = GetCampaignInt("server_time", "CUR_DAY", oMod);
int iYearNew = GetCampaignInt("server_time", "CUR_YEAR", oMod);
int iHourNew = GetCampaignInt("server_time", "CUR_HOUR", oMod);
SetCalendar (iYearNew, iMonthNew, iDayNew);
SetTime (iHourNew, 0, 0, 0);
}

, .


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

" GREEDO BEEFY" " "
+
Lex
Mar 19 2005, 16:24
#60


Level 5


:
: Lawful Neutral
:
NWN:





" "
" DOCFEERT'A"

::::::::::::DocFeert::::::::::::::::::::
Feb 10 2004
:
C OnHeartBeat
, .
Neverwinter Script Source
void main()
{
object oItem = GetFirstObjectInArea(GetArea(OBJECT_SELF));
while (GetIsObjectValid(oItem) == TRUE)
ClearAllActions();
{
if (GetObjectType(oItem) == OBJECT_TYPE_ITEM)
{
ActionPickUpItem(oItem);
}
oItem = GetNextObjectInArea(GetArea(OBJECT_SELF));
}
}


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

::::::::::::DocFeert::::::::::::::::::::
Feb 24 2004
- . oObject - , - oObject.
Neverwinter Script Source
int Percent(object oObject)
{
int iCur = GetCurrentHitPoints(oObject);
int iMax = GetMaxHitPoints(oObject);
int iSt = iCur * 100;
int iPercent = iSt / iMax;
return iPercent;
}


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

::::::::::::DocFeert::::::::::::::::::::
Feb 24 2004
. 2 . OnEnter :
Neverwinter Script Source
void main()
{
object oDoor = GetFirstObjectInShape(SHAPE_SPHERE, 3.0, GetLocation(OBJECT_SELF), FALSE, OBJECT_TYPE_DOOR);
if (GetLocked(OBJECT_SELF) == FALSE)
{
ActionOpenDoor(oDoor);
}
}

OnExit :
Neverwinter Script Source
void main()
{
if (GetLocked(OBJECT_SELF) == FALSE)
{
object oDoor = GetFirstObjectInShape(SHAPE_SPHERE, 3.0, GetLocation(OBJECT_SELF), FALSE, OBJECT_TYPE_DOOR);
ActionCloseDoor(oDoor);
}
}

.

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

::::::::::::DocFeert::::::::::::::::::::
Mar 10 2004
" ", , , ... - . oArea , , , Y Y, sObjByResRef , iObjType (OBJECT_TYPE_*) iMaxObjects .
Neverwinter Script Source
void RandomObjectsAtRandomLocation(object oArea, int X, int Y, string sObjByResRef, int iObjType, int iMaxObjects)
{
int iMax = 0;
float fX = IntToFloat(Random(X * 10));
float fY = IntToFloat(Random(Y * 10));
float fZ = 0.0;
float fF = IntToFloat(Random(360));
location lLoc = Location(oArea, Vector(fX, fY, fZ), fF);
while (iMax != iMaxObjects)
{
iMax = iMax + 1;
float fX = IntToFloat(Random(X * 10));
float fY = IntToFloat(Random(Y * 10));
float fZ = 0.0;
float fF = IntToFloat(Random(360));
location lLoc = Location(oArea, Vector(fX, fY, fZ), fF);
if (d2(1) == 2)
{
CreateObject(iObjType, sObjByResRef, lLoc, FALSE);
}
}
}


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

::::::::::::DocFeert::::::::::::::::::::
Mar 10 2004
(, , ) . oAreaFrom , oAreaTo , iDestroy = TRUE, oAreaFrom . , .
Neverwinter Script Source
void MoveArea(object oAreaFrom, object oAreaTo, int iDestroy=TRUE)
{
object oObject = GetFirstObjectInArea(oAreaFrom);
while (GetIsObjectValid(oObject) == TRUE)
{
location lLoc = Location(oAreaTo, GetPosition(oObject), GetFacing(oObject));
if (GetObjectType(oObject) == OBJECT_TYPE_ITEM)
{
CopyObject(oObject, lLoc, OBJECT_INVALID, GetTag(oObject));
if (iDestroy == TRUE)
{
DestroyObject(oObject);
}
}
if ((GetObjectType(oObject) == OBJECT_TYPE_PLACEABLE))
{
string sTag = GetResRef(oObject);
CreateObject(OBJECT_TYPE_PLACEABLE, sTag, lLoc);
if (iDestroy == TRUE)
{
DestroyObject(oObject);
}
}
if (GetObjectType(oObject) == OBJECT_TYPE_CREATURE)
{
AssignCommand(oObject, JumpToLocation(lLoc));
}
oObject = GetNextObjectInArea(oAreaFrom);
}
}


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

" DOCFEERT'A" " "
+
Lex
Mar 19 2005, 16:26
#61


Level 5


:
: Lawful Neutral
:
NWN:





" "
" MALKOR'A"

::::::::::::MalkoR::::::::::::::::::::
Sep 13 2003
. , 4 . 10 , . onHeartbeat 10 . .
onHeartbeat
Neverwinter Script Source
void main()
{
object wp_k4 = GetObjectByTag("TWp_KEEPER4"); //WayPoint , , .
AssignCommand(OBJECT_SELF, ActionJumpToObject(wp_k4)); //
object os = OBJECT_SELF;
effect eff = EffectBeam(VFX_BEAM_LIGHTNING,os,BODY_NODE_CHEST,FALSE); // ( , , , - )

object c1 = GetObjectByTag("TP_CORPOSE_001"); //
object c2 = GetObjectByTag("TP_CORPOSE_002");
object c3 = GetObjectByTag("TP_CORPOSE_003");
object c4 = GetObjectByTag("TP_CORPOSE_004");
object c5 = GetObjectByTag("TP_CORPOSE_005");
object c6 = GetObjectByTag("TP_CORPOSE_006");
object c7 = GetObjectByTag("TP_CORPOSE_007");
object c8 = GetObjectByTag("TP_CORPOSE_008");
object c9 = GetObjectByTag("TP_CORPOSE_009");
object c10 = GetObjectByTag("TP_CORPOSE_010");

int a = d10();

if (a == 1)
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eff,c1,6.0f);
return;
}
if (a == 2)
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eff,c2,6.0f);
return;
}
if (a == 3)
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eff,c3,6.0f);
return;
}
///. . . . . . ( == 4, ==5 .. 9) . . . . . . .

if (a == 10)
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eff,c10,6.0f);
return;
}
}


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

" MALKOR'A" " "
+
Lex
Mar 19 2005, 16:28
#62


Level 5


:
: Lawful Neutral
:
NWN:





" "
" VALLEO"

::::::::::::Valleo::::::::::::::::::::
Mar 19 2004
:
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();
}

( )...

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

::::::::::::Valleo::::::::::::::::::::
Mar 19 2004
Persuade. , ...
:
NPC: !
1) ! ?
NPC (1) [ ] , ! <-- Persuade
NPC (2) [ ] ?
2) , ...
Neverwinter Script Source
int StartingConditional()
{
object oPC = GetPCSpeaker();
object oNPC = OBJECT_SELF;
object oWinner;
int iCharisma = GetAbilityScore(oPC,ABILITY_CHARISMA);
if(iCharisma < 7)
{
SendMessageToPC(oPC," 7, "+GetName(oNPC));
return FALSE;
}
int iPCPersuade, iNPCPersuade;
int iAddPC, iAddNPC;
int iPCCharModif, iNPCCharModif;
if(GetHasSkill(SKILL_PERSUADE,oPC)) iPCPersuade = GetSkillRank(SKILL_PERSUADE,oPC);
if(GetHasSkill(SKILL_PERSUADE,oNPC)) iNPCPersuade = GetSkillRank(SKILL_PERSUADE,oNPC);
iPCCharModif = GetAbilityModifier(ABILITY_CHARISMA,oPC);
iNPCCharModif = GetAbilityModifier(ABILITY_CHARISMA,oNPC);
iAddPC = d12();
iAddNPC = d12();
SendMessageToPC(oPC," Persuade:");
SendMessageToPC(oPC," = "+IntToString(iPCPersuade)+" + "+IntToString(iAddPC)+" (d12) + "+IntToString(iPCCharModif)+" ( ) = " +IntToString(iPCPersuade+iAddPC+iPCCharModif));
SendMessageToPC(oPC," = "+IntToString(iNPCPersuade)+" + "+IntToString(iAddNPC)+" (d12) + "+IntToString(iNPCCharModif)+" ( ) = " +IntToString(iNPCPersuade+iAddNPC+iNPCCharModif));
iPCPersuade = iPCPersuade + iAddPC + iPCCharModif;
iNPCPersuade = iNPCPersuade + iAddNPC + iNPCCharModif;
if(iPCPersuade > iNPCPersuade)
{
SendMessageToPC(oPC," .");
return TRUE;
}
SendMessageToPC(oPC," .");
return FALSE;
}


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

" VALLEO" " "
+
Lex
Mar 19 2005, 16:30
#63


Level 5


:
: Lawful Neutral
:
NWN:





" "
" "

:::::::::::: ::::::::::::::::::::
May 17 2003
. . . .
. h01. onDeath . , .
. Nekrolog01.
Neverwinter Script Source
void Raise()
{
effect eVisDead = EffectVisualEffect(VFX_IMP_HEAD_ACID);/// . !
object oNew = CreateObject(OBJECT_TYPE_CREATURE,"ZombieWeak07", GetLocation(OBJECT_SELF)) ;/// .
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, eVisDead, GetLocation(oNew));

}
void main()
{
object oCleric = GetNearestObjectByTag("Nekrolog01");/// . .

if (GetIsObjectValid(oCleric) == TRUE && GetIsDead(oCleric) == FALSE)
{
AssignCommand(oCleric, ClearAllActions());
AssignCommand(oCleric, ActionPlayAnimation(ANIMATION_LOOPING_WORSHIP, 1.0, 3.0));/// "" . .
effect eVisCleric = EffectVisualEffect(VFX_IMP_AURA_NEGATIVE_ENERGY);/// . . !
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eVisCleric, oCleric);
DelayCommand(3.0, Raise());
DelayCommand(0.2,AssignCommand(oCleric, SpeakOneLinerConversation())) ;
}
}

.

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

:::::::::::: ::::::::::::::::::::
May 17 2003
. . 10 . 1 OnHeartbeat. OnPlayerDying. /// .
Neverwinter Script Source
void loadBehaviors()
{
SetLocalInt(OBJECT_SELF, "DEATH_TARGET", -10);
SetLocalInt(OBJECT_SELF, "PLAYER_ONLY_GRUNTS_WHILE_DYING", FALSE);
}
void bleedCheck(object pc)
{
if (!GetIsPC(pc))
return;
int DEATH_TARGET = GetLocalInt(OBJECT_SELF, "DEATH_TARGET");
int PLAYER_ONLY_GRUNTS_WHILE_DYING = GetLocalInt(OBJECT_SELF, "PLAYER_ONLY_GRUNTS_WHILE_DYING");
int hp = GetCurrentHitPoints(pc);
if ((hp <= 0) && (hp > DEATH_TARGET))
{
effect dmg = EffectDamage(1);
ApplyEffectToObject(DURATION_TYPE_INSTANT, dmg, pc);
int which = Random(6)+1;
if (PLAYER_ONLY_GRUNTS_WHILE_DYING)
switch (which)
{
case 1:
PlayVoiceChat(VOICE_CHAT_PAIN1, pc);
break;
case 2:
PlayVoiceChat(VOICE_CHAT_PAIN2, pc);
break;
case 3:
PlayVoiceChat(VOICE_CHAT_PAIN3, pc);
break;
case 4:
PlayVoiceChat(VOICE_CHAT_HEALME, pc);
break;
case 5:
PlayVoiceChat(VOICE_CHAT_NEARDEATH, pc);
break;
case 6:
PlayVoiceChat(VOICE_CHAT_HELP, pc);
break;
  }
}
else if (hp <= DEATH_TARGET)
  {
  effect death = EffectDeath(FALSE, FALSE);
  ApplyEffectToObject(DURATION_TYPE_INSTANT, death, pc);
  }
}

void main()
{
loadBehaviors();
object pc = GetFirstPC();
while (GetIsObjectValid(pc))
  {
  bleedCheck(pc);
  pc = GetNextPC();
  }
}



Neverwinter Script Source
void main()
{
// load up desired behaviors for all OnHeartbeat scripts
loadBehaviors();

// enumerate all PCs, calling bleedCheck on each
// if you want to add more / other scripts that act on all players
// every heartbeat, this is the place to do it ... just put a call
// to them after (or before) bleedCheck, within the while loop.
object pc = GetFirstPC();

while (GetIsObjectValid(pc))
{
bleedCheck(pc);
pc = GetNextPC();
}
}


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

:::::::::::: ::::::::::::::::::::
Jun 3 2003
. . OnUsed
. .
Neverwinter Script Source
void main()
{
object oPC = GetLastUsedBy();
object oTarget = GetObjectByTag("Waypoint"); /// Waypoint-, .
effect eVis = EffectVisualEffect(VFX_IMP_HEALING_X); /// .
location lPC = GetLocation(oPC);
ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, eVis, lPC);
AssignCommand(oPC,JumpToObject(oTarget));
}


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

:::::::::::: ::::::::::::::::::::
Jun 3 2003
C . Heartbeat!!
( .)
Neverwinter Script Source
void main()
{
object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC);
if ((GetIsObjectValid(oPC) != TRUE) || (GetIsDead(oPC) == TRUE) || GetDistanceToObject(oPC) >= 10.0)
{
location l = GetLocation(OBJECT_SELF);
location lNew = Location( GetAreaFromLocation(l), GetPositionFromLocation(l), GetFacingFromLocation(l) + 180);
// CreateObject( OBJECT_TYPE_PLACEABLE, "plc_statue3", lNew );
CreateObject(OBJECT_TYPE_PLACEABLE, "StatueStone", lNew); /// .
DestroyObject(OBJECT_SELF, 0.5);
}
}


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

" " " "
+
Lex
Mar 19 2005, 16:31
#64


Level 5


:
: Lawful Neutral
:
NWN:





" "
" NEUROSHOOTA"

::::::::::::neuroshoot::::::::::::::::::::
Jun 19 2003
( , , ).
:
Neverwinter Script Source
void main()
{
object oArea = OBJECT_SELF;
int nRain = WEATHER_RAIN;
int nClear = WEATHER_CLEAR;
int nDef = WEATHER_USE_AREA_SETTINGS;
int nHour = GetTimeHour();
if(nHour == 20|| nHour == 21|| nHour == 22|| nHour == 23||
nHour == 24|| nHour == 0 || nHour == 1 || nHour == 2 ||
nHour == 3 || nHour == 4 || nHour == 5 || nHour == 6 &&
!GetLocalInt(oArea, "IsDef") == 1)
{
SetWeather(oArea, nDef);
SetLocalInt(oArea, "IsRaining", 0);
SetLocalInt(oArea, "IsClear", 0);
SetLocalInt(oArea, "IsDef", 1);
}

if(nHour == 7 || nHour == 8 || nHour == 9 || nHour == 10||
nHour == 11|| nHour == 12&&
!GetLocalInt(oArea, "IsClear") == 1)
{
SetWeather(oArea, nClear);
SetLocalInt(oArea, "IsRaining", 0);
SetLocalInt(oArea, "IsClear", 1);
SetLocalInt(oArea, "IsDef", 0);
}

if(nHour == 13|| nHour == 14|| nHour == 15|| nHour == 16||
nHour == 17|| nHour == 18|| nHour == 19&&
!GetLocalInt(oArea, "IsRaining") == 1)
{
SetWeather(oArea, nRain);
SetLocalInt(oArea, "IsRaining", 1);
SetLocalInt(oArea, "IsClear", 0);
SetLocalInt(oArea, "IsDef", 0);
}
}

. , , . , ( ..).

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

" " " "
+
Lex
Mar 19 2005, 16:33
#65


Level 5


:
: Lawful Neutral
:
NWN:





" "
" AIWAN'A"

::::::::::::Aiwan::::::::::::::::::::
Jan 19 2004
.
Neverwinter Script Source
//::///////////////////////////////////////////////////////////
//:: Created By: WRG! Aiwan aiwanwrg.ru
//:: Created On: 19.01.2004
//:://////////////////////////////////////////////////////////
/*
OnOpen .
, ,

F-2, .
, .
*/

//:://////////////////////////////////////////////////////////
void main()
{
object oPC = GetLastOpenedBy();

if (!GetIsPC(oPC) || GetLocalInt(OBJECT_SELF, "DO_IT") ||
!GetLocalInt(oPC, "_"))
{return;}
SetLocalInt(OBJECT_SELF, "DO_IT", TRUE);

if(GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1) // 1 .
{
CreateItemOnObject("res-ref ", OBJECT_SELF, 1);
return;
}
if(GetLevelByClass(CLASS_TYPE_WIZARD,oPC) >= 1) // 1 .
{
CreateItemOnObject("res-ref ", OBJECT_SELF, 1);
return;
}
CreateItemOnObject("res-ref ", OBJECT_SELF, 1); //
return;
}


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

::::::::::::Aiwan::::::::::::::::::::
Mar 5 2004
, OnOpen , .. , . ,
Neverwinter Script Source
//:://////////////////////////////////////////////
//:: Created By: WRG! Aiwan aiwane-mail.ru
//:: Created On: 06.12.2003
//:://////////////////////////////////////////////
/* OnOpen .
, .
, .
*/

//:://////////////////////////////////////////////
#include "nw_i0_tool"
void main()
{
object oPC = GetLastOpenedBy();

if (GetIsPC(oPC) && GetLocalInt(OBJECT_SELF, "DO_IT") != 1 &&
(AutoDC(DC_HARD, SKILL_SEARCH, oPC))) //
{
AssignCommand(oPC, SpeakString("B ."));
if (GetAlignmentGoodEvil(oPC) == ALIGNMENT_GOOD) //
{
CreateItemOnObject("ResRef ", OBJECT_SELF, 1);
}
if (GetAlignmentGoodEvil(oPC) == ALIGNMENT_EVIL) //
{
CreateItemOnObject("ResRef ", OBJECT_SELF, 1);
}
RewardPartyXP(1500, oPC);
SetLocalInt(OBJECT_SELF, "DO_IT", 1);
}
if (GetIsPC(oPC) && GetLocalInt(OBJECT_SELF, "DO_IT") != 1)
{
AssignCommand(oPC, SpeakString(" ."));
RewardPartyXP(500, oPC);
SetLocalInt(OBJECT_SELF, "DO_IT", 1);
}
}


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

::::::::::::Aiwan::::::::::::::::::::
Mar 5 2004
. , , . , , . , ,

Neverwinter Script Source
//:://////////////////////////////////////////////
//:: Copyright 2004 WRG!
//:://////////////////////////////////////////////
/*
OnHeartBeat
.
.

*/

//:://////////////////////////////////////////////
//:: Created By: Aiwan
//:: Created On: 03.02.2004
//:://////////////////////////////////////////////

void main()
{
object oItm = OBJECT_SELF;
object oTarget = GetObjectByTag("WP_NIMPHA_GOST"); //
object oGost = GetObjectByTag("ANDR_GOST");
//===================== ܠ ====================
if (GetIsDay() && GetLocalInt(OBJECT_SELF, "NIGHT") == 1)
{
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,
EffectVisualEffect(VFX_FNF_SOUND_BURST), GetLocation(oGost));
ActionWait(1.0);
ActionDoCommand(DestroyObject(oGost));
SetLocalInt(OBJECT_SELF, "NIGHT", 0);
}
if (!GetIsNight() && GetLocalInt(OBJECT_SELF, "NIGHT") == 0)
return;
//===================== =====================
{
if (!GetIsNight() || GetLocalInt(OBJECT_SELF, "NIGHT") == 1)
return;

oGost = CreateObject(OBJECT_TYPE_CREATURE, "ResRef_", GetLocation(oTarget));
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,
EffectVisualEffect(VFX_IMP_DEATH_WARD), GetLocation(oTarget));
AssignCommand(oGost, ClearAllActions());
SetLocalInt(OBJECT_SELF, "NIGHT", 1);
}
}


, . :
Neverwinter Script Source
if (GetTimeHour()==23) //


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

::::::::::::Aiwan::::::::::::::::::::
Mar 8 2004
, , : " . " . , - . , .
, . , .
, . , .
Neverwinter Script Source
//:://////////////////////////////////////////////
//:: Copyright 2004 WRG!
//:: OnFailToOpen
//:://////////////////////////////////////////////
//:: Created By: Aiwan
//:: Created On: 10.01.2004
//:://////////////////////////////////////////////
void main()
{
string oDoor = GetTag(OBJECT_SELF);
string sMesseg = "! TAG !"; //
{
if (oDoor == "TAG__01" || oDoor == "TAG__02") //
{sMesseg = " , .";}
if (oDoor == "TAG__03")
{sMesseg = " .";}
SpeakString(sMesseg);
}
}


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::::::::::::::::::::
Mar 14 2004
. , .
+4, +5 .. -

Neverwinter Script Source
//:://////////////////////////////////////////////
//:: Copyright 2004 WRG! www.wrg.ru
//:: OnOpen OBJECT
//:://////////////////////////////////////////////
/*
 
*/

//:://////////////////////////////////////////////
//:: Created By: Aiwan Aiwane-mail.ru
//:: Created On: 14.03.2004
//:://////////////////////////////////////////////
void main()
{
object oPC = GetLastOpenedBy();
string sResRef;
if (!GetIsPC(oPC) || GetLocalInt(OBJECT_SELF, "DO_IT"))
{return;}
{
SetLocalInt(OBJECT_SELF, "DO_IT", TRUE);
int iPrize = Random(10);
  switch (iPrize)
  {
  case 0:
  {
sResRef = "sResRef_itm"; break;
  }
  case 1:
  {
sResRef = "sResRef_itm"; break;
  }
  case 2:
  {
sResRef = "sResRef_itm"; break;
  }
  case 3:
  {
sResRef = "sResRef_itm"; break;
  }
  case 4:
  {
sResRef = "sResRef_itm"; break;
  }
  case 5:
  {
sResRef = "sResRef_itm"; break;
  }
  case 6:
  {
sResRef = "sResRef_itm"; break;
  }
  case 7:
  {
sResRef = "sResRef_itm"; break;
  }
  case 8:
  {
sResRef = "sResRef_itm"; break;
  }
  case 9:
  {
sResRef = "sResRef_itm"; break;
  }
  }
  CreateItemOnObject(sResRef, OBJECT_SELF, 1); //
  CreateItemOnObject("sResRef_itm_2", OBJECT_SELF, 1); // , .. 2
  }
}


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

" AIWAN'A" " "
+
Lex
Mar 19 2005, 16:34
#66


Level 5


:
: Lawful Neutral
:
NWN:





" "
" EXICUTIONER'A"

::::::::::::NightElf-Sniper aka Executioner::::::::::::::::::::
:
Neverwinter Script Source
//:: Dlg_Open_Store :: Executioner :://

void main()
{
string sNPSTag = GetTag(OBJECT_SELF);
object oStore = GetNearestObjectByTag(sNPSTag+"_store");

if(GetObjectType(oStore) == OBJECT_TYPE_STORE)
OpenStore(oStore, GetPCSpeaker());

else
ActionSpeakStringByStrRef(53090, TALKVOLUME_TALK);
}

, :
m_weapons, m_weapons_store, ...
:
Neverwinter Script Source
/******************************
Name: _On_Pl_Death
Autor: Executioner
*******************************/


void main()
{
object oDied = GetLastPlayerDied();
object oHenchman = GetHenchman(oDied);
object oKiller = GetLastAttacker(oDied);
object oMod = GetModule();

string sName = GetName(oDied);
string sID = GetName(oDied)+GetPCPublicCDKey(oDied); //ID , ...

int iGold = GetGold(oDied);

location lDiedHere = GetLocation(oDied);

object oDeathCorpse=CreateObject(OBJECT_TYPE_PLACEABLE,"mod_deathcorpse",lDiedHere,FALSE,"DeathCorpse"+sID);
object oBag = CreateItemOnObject("mod_bagofgold",oDeathCorpse);


//
if (GetIsObjectValid(oHenchman))
RemoveHenchman(oDied, oHenchman);


//
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oDied);
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oDied)), oDied);
AssignCommand(oDied, ActionJumpToObject(GetObjectByTag("wp_death"))); &#092;&#092; , (&#092;)


// 10%
int iDeadXP = 10;
int iXP = GetXP(oDied);
int iNewXP = iXP-iXP*iDeadXP/100;

SetXP(oDied, iNewXP);

//
SetLocalString(oDeathCorpse,"oDiedName",sName);
SetLocalInt(oBag,"Gold",iGold);

int i;
for(i=0;i<15;i++)
AssignCommand(oDeathCorpse, ActionTakeItem(GetItemInSlot(i, oDied), oDied));

AssignCommand(oDeathCorpse, TakeGoldFromCreature(iGold,oDied,TRUE));
}
[nss]

[nss]
//:: OnOpen_DthCorpse :: Executioner :://
void main()
{
SpeakString("Corpse of "+GetLocalString(OBJECT_SELF,"oDiedName"),TALKVOLUME_TALK);
}


Neverwinter Script Source
//:: OnClse_DthCorpse :: Executioner :://
void main()
{
if(GetIsObjectValid(GetFirstItemInInventory(OBJECT_SELF))==FALSE)
DelayCommand(3.0,DestroyObject(OBJECT_SELF));
}

1 1 (\)

:
tag: Mod_DeathCorpse
resref: mod_deathcorpse
Usable Has Inventory
OnClose OnClse_DthCorpse, OnOpen OnOpen_DthCorpse
:
tag: Mod_BagOfGold
resref: mod_bagofgold

: , 10% . , . , ) .
- , , ...

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

" EXICUTIONER'A" " "
+
Lex
Mar 19 2005, 16:37
#67


Level 5


:
: Lawful Neutral
:
NWN:





" "
" (MOF)DARTH_NICK'A"

::::::::::::[MoF]Darth_Nick::::::::::::::::::::
Jul 3 2004

Neverwinter Script Source
/*
Created By: [MoF]Darth_Nick
Data Of Creating: 02.07.2004 11:03
Discription: So, this script is do following - when you have a level up, after up
script founding your alignment(GOOD, EVIL, NEUTRAL) and doing something visual effects
for you. Also effects maybe change if you change Constans...Sample:
VFX_FNF_SUMMON_EPIC_UNDEAD - this is first constant of evil leveling, delete that and
enter something yours in the list of constants, an example - VFX_FNF_IMPLOSION.
*/


void main()
{
object oPC = GetPCLevellingUp();

if(GetAlignmentGoodEvil(oPC) == ALIGNMENT_EVIL)
{
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_EPIC_UNDEAD), oPC));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HARM), oPC));
}
else if(GetAlignmentGoodEvil(oPC) == ALIGNMENT_GOOD)
{
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HOLY_AID), oPC));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUNBEAM), oPC));
}
else if(GetAlignmentGoodEvil(oPC) == ALIGNMENT_NEUTRAL)
{
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SOUND_BURST), oPC));
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HEALING_X), oPC));
}
}


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

::::::::::::[MoF]Darth_Nick::::::::::::::::::::
Jul 3 2004

Neverwinter Script Source
/*
Created By: [MoF]Darth_Nick
Data Of Creating: 11:37
Discription: Script is stand on a OnEnter of Generic Triger, you also can use it in the
trap, but unexpectandlly is be very other!
*/


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);
}
}


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

" (MOF)DARTH_NICK'A" " "
+
Lex
Mar 19 2005, 16:39
#68


Level 5


:
: Lawful Neutral
:
NWN:





" "
" RED DEVIL'A"

::::::::::::Red Devil::::::::::::::::::::
Jul 31 2004
. .
+1 .
Neverwinter Script Source
#include "x2_inc_itemprop"
void main()
{
int iBonus;
object oPC=GetPCSpeaker();
object oArmor=GetItemInSlot(INVENTORY_SLOT_CHEST,oPC);
itemproperty ipHasAC=GetFirstItemProperty(oArmor);
GetItemPropertyType(ipHasAC)==ITEM_PROPERTY_AC_BONUS;
if (!GetIsObjectValid(oArmor)) return;
if (GetBaseItemType(oArmor)!=BASE_ITEM_ARMOR) return;
{
iBonus=GetItemPropertyCostTableValue(ipHasAC);
if (iBonus<0) iBonus=0;
iBonus++;
itemproperty ipAddAC=ItemPropertyACBonus(iBonus);
IPSafeAddItemProperty(oArmor,ipAddAC);
}
}


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

::::::::::::Red Devil::::::::::::::::::::
Jul 31 2004
+1 , +1 .
Neverwinter Script Source
#include "x2_inc_itemprop"
void main()
{
object oPC=GetPCSpeaker();
object oWeap=GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC);
int iBonus;
int bType=GetBaseItemType(oWeap);
if (!GetIsObjectValid(oWeap)) return;
if ((bType == BASE_ITEM_BASTARDSWORD) ||
(bType == BASE_ITEM_BATTLEAXE) ||
(bType == BASE_ITEM_CLUB) ||
(bType == BASE_ITEM_DAGGER) ||
(bType == BASE_ITEM_DIREMACE) ||
(bType == BASE_ITEM_DOUBLEAXE) ||
(bType == BASE_ITEM_DWARVENWARAXE) ||
(bType == BASE_ITEM_GREATAXE) ||
(bType == BASE_ITEM_GREATSWORD) ||
(bType == BASE_ITEM_HALBERD) ||
(bType == BASE_ITEM_HANDAXE) ||
(bType == BASE_ITEM_HEAVYFLAIL) ||
(bType == BASE_ITEM_KAMA) ||
(bType == BASE_ITEM_KATANA) ||
(bType == BASE_ITEM_KUKRI) ||
(bType == BASE_ITEM_LIGHTFLAIL) ||
(bType == BASE_ITEM_LIGHTHAMMER) ||
(bType == BASE_ITEM_LIGHTMACE) ||
(bType == BASE_ITEM_LONGSWORD) ||
(bType == BASE_ITEM_MORNINGSTAR) ||
(bType == BASE_ITEM_QUARTERSTAFF) ||
(bType == BASE_ITEM_RAPIER) ||
(bType == BASE_ITEM_SCIMITAR) ||
(bType == BASE_ITEM_SCYTHE) ||
(bType == BASE_ITEM_SHORTSPEAR) ||
(bType == BASE_ITEM_SHORTSWORD) ||
(bType == BASE_ITEM_SICKLE) ||
(bType == BASE_ITEM_TWOBLADEDSWORD) ||
(bType == BASE_ITEM_WARHAMMER) ||
(bType == BASE_ITEM_WHIP) ||
(bType == BASE_ITEM_SHURIKEN) ||
(bType == BASE_ITEM_WHIP))
{
iBonus=IPGetWeaponEnhancementBonus(oWeap);
iBonus++;
itemproperty ipAdd=ItemPropertyEnhancementBonus(iBonus);
IPSafeAddItemProperty(oWeap,ipAdd);
}
else
if ((bType == BASE_ITEM_SLING)||
(bType == BASE_ITEM_SHORTBOW)||
(bType == BASE_ITEM_LONGBOW)||
(bType == BASE_ITEM_LIGHTCROSSBOW)||
(bType == BASE_ITEM_HEAVYCROSSBOW))
{
itemproperty ipHasAttack=GetFirstItemProperty(oWeap);
GetItemPropertyType(ipHasAttack)==ITEM_PROPERTY_ATTACK_BONUS;
iBonus=GetItemPropertyCostTableValue(ipHasAttack);
if (iBonus<0) iBonus=0;
iBonus++;
itemproperty ipAddAttack=ItemPropertyAttackBonus(iBonus);
IPSafeAddItemProperty(oWeap,ipAddAttack);
}
}


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

" RED DEVIL'A" " "


" "
+
Lex
Mar 24 2005, 11:10
#69


Level 5


:
: Lawful Neutral
:
NWN:





" "
" BAAL'A"

" ", . ! bm_inv_transit1 . bm_inv_transit3 , ( ).

2 SECOND_PC SECOND_HENCH
3 transit_cont1, transit_cont2 transit_cont3

Neverwinter Script Source
//::///////////////////////////////////////////////
//:: FileName bm_inv_transit1
//:: 2005 WRG!
//:://////////////////////////////////////////////
/*
 
,
. ""
 
*/

//:://////////////////////////////////////////////
//:: Created By: BaaL
//:: Created On:
//:://////////////////////////////////////////////

int GetHasObject (object oCreature, object oItem)
{
object oItm = GetFirstItemInInventory(oCreature);
while(GetIsObjectValid(oItm))
{
if (oItm == oItem) return TRUE;
oItm = GetNextItemInInventory(oCreature);
}
return FALSE;
}

void main()
{
object oPC = GetFirstPC();
object oHench = GetHenchman(oPC);
object oSecPC = GetObjectByTag("SECOND_PC");
object oSecHench = GetObjectByTag("SECOND_HENCH");
object oCopy;
object oItem;
string sContainerTag;
object oContainer;
// .
if(!GetIsObjectValid(oHench)) return;
// plot PC
sContainerTag = "transit_cont1";
oContainer = CreateItemOnObject(sContainerTag, oSecPC);
oItem = GetFirstItemInInventory(oPC);
while(GetIsObjectValid(oItem))
{
if(GetPlotFlag(oItem))
{
if(GetBaseItemType(oItem) != BASE_ITEM_LARGEBOX)
{
oCopy = CopyItem(oItem, oContainer, TRUE);
if(!GetHasObject(oContainer, oCopy))
{
DestroyObject(oCopy);
oContainer = CreateItemOnObject(sContainerTag, oSecPC);
oCopy = CopyItem(oItem, oContainer, TRUE);
}
DestroyObject(oItem);
}
}
oItem = GetNextItemInInventory(oPC);
}

// plot Hench
sContainerTag = "transit_cont2";
oContainer = CreateItemOnObject(sContainerTag, oSecHench);
oItem = GetFirstItemInInventory(oHench);
while(GetIsObjectValid(oItem))
{
if(GetPlotFlag(oItem))
{
if(GetBaseItemType(oItem) != BASE_ITEM_LARGEBOX)
{
oCopy = CopyItem(oItem, oContainer, TRUE);
if(!GetHasObject(oContainer, oCopy))
{
DestroyObject(oCopy);
oContainer = CreateItemOnObject(sContainerTag, oSecHench);
oCopy = CopyItem(oItem, oContainer, TRUE);
}
DestroyObject(oItem);
}
}
oItem = GetNextItemInInventory(oHench);
}
// not plot PC
sContainerTag = "transit_cont1";
oContainer = CreateItemOnObject(sContainerTag, oSecPC);
oItem = GetFirstItemInInventory(oPC);
while(GetIsObjectValid(oItem))
{
if(!GetPlotFlag(oItem))
{
if(GetBaseItemType(oItem) != BASE_ITEM_LARGEBOX)
{
oCopy = CopyItem(oItem, oContainer, TRUE);
if(!GetHasObject(oContainer, oCopy))
{
DestroyObject(oCopy);
oContainer = CreateItemOnObject(sContainerTag, oSecPC);
oCopy = CopyItem(oItem, oContainer, TRUE);
}
DestroyObject(oItem);
}
}
oItem = GetNextItemInInventory(oPC);
}
// not plot Hench
sContainerTag = "transit_cont2";
oContainer = CreateItemOnObject(sContainerTag, oSecHench);
oItem = GetFirstItemInInventory(oHench);
while(GetIsObjectValid(oItem))
{
if(!GetPlotFlag(oItem))
{
if(GetBaseItemType(oItem) != BASE_ITEM_LARGEBOX)
{
oCopy = CopyItem(oItem, oContainer, TRUE);
if(!GetHasObject(oContainer, oCopy))
{
DestroyObject(oCopy);
oContainer = CreateItemOnObject(sContainerTag, oSecHench);
oCopy = CopyItem(oItem, oContainer, TRUE);
}
DestroyObject(oItem);
}
}
oItem = GetNextItemInInventory(oHench);
}
// :
DelayCommand(0.5, ExecuteScript("bm_inv_transit2", OBJECT_SELF));
}

Neverwinter Script Source
//::///////////////////////////////////////////////
//:: FileName bm_inv_transit2
//:: 2005 WRG!
//:://////////////////////////////////////////////
/*
  ,
.
  (NEW!)
*/

//:://////////////////////////////////////////////
//:: Created By: BaaL
//:: Created On:
//:://////////////////////////////////////////////

void FindContainers(object oCreature)
{
int NN=0;
object oItm = GetFirstItemInInventory(oCreature);
while(GetIsObjectValid(oItm))
{
if(GetBaseItemType(oItm) == BASE_ITEM_LARGEBOX)
{
SetIdentified(oItm, TRUE);
NN++;
SetLocalInt(oCreature, "CONT_NUMBER", NN);
SetLocalObject(oCreature, "CONTAINER"+IntToString(NN), oItm);
}
oItm = GetNextItemInInventory(oCreature);
}
return;
}

int Ncont(object oCreature)
{
return GetLocalInt(oCreature, "CONT_NUMBER");
}

object GiveContainer(object oCreature, int NN)
{
return GetLocalObject(oCreature, "CONTAINER"+IntToString(NN));
}

void DeleteLocals(object oCreature)
{
int NN = Ncont(oCreature);
int NN1 = 1;
while (NN >= NN1)
{
DeleteLocalObject(oCreature, "CONTAINER"+IntToString(NN1));
NN1++;
}
DeleteLocalInt(oCreature, "CONT_NUMBER");
return;
}

int GetHasObject (object oCreature, object oItem)
{
object oItm = GetFirstItemInInventory(oCreature);
while(GetIsObjectValid(oItm))
{
if (oItm == oItem) return TRUE;
oItm = GetNextItemInInventory(oCreature);
}
return FALSE;
}

void main()
{
object oPC = GetFirstPC();
object oHench = GetHenchman(oPC);
object oSecPC = GetObjectByTag("SECOND_PC");
object oSecHench = GetObjectByTag("SECOND_HENCH");
object oCopy;
string sContainerTag;
int iContNumber = 1;
object oContainer;
object oItem = GetFirstItemInInventory(oHench);
while(GetIsObjectValid(oItem))
{
if(GetBaseItemType(oItem) == BASE_ITEM_LARGEBOX)
{
oCopy = CopyItem(oItem, oPC);
DestroyObject(oItem);
}
oItem = GetNextItemInInventory(oHench);
}
FindContainers(oPC);
///---///---
sContainerTag = "transit_cont1";
// oContainer = CreateItemOnObject(sContainerTag, oPC);
oContainer=(iContNumber>Ncont(oPC))?CreateItemOnObject(sContainerTag,oPC):GiveContainer(oPC,iContNumber);
oItem = GetFirstItemInInventory(oSecPC);
while(GetIsObjectValid(oItem))
{
if(GetBaseItemType(oItem) != BASE_ITEM_LARGEBOX && GetTag(oItem) != sContainerTag)
{
oCopy = CopyItem(oItem, oContainer, TRUE);
// esli item v sumku ne vlez - sozdaem novuyu
if(!GetHasObject(oContainer, oCopy))
{
DestroyObject(oCopy);
// oContainer = CreateItemOnObject(sContainerTag, oPC);
iContNumber++;
oContainer=(iContNumber>Ncont(oPC))?CreateItemOnObject(sContainerTag,oPC):GiveContainer(oPC,iContNumber);
oCopy = CopyItem(oItem, oContainer, TRUE);
}
// uni4tojaem original
DestroyObject(oItem);
}
oItem = GetNextItemInInventory(oSecPC);
}

///---///---
sContainerTag = "transit_cont2";
// oContainer = CreateItemOnObject(sContainerTag, oPC);
iContNumber++;
oContainer=(iContNumber>Ncont(oPC))?CreateItemOnObject(sContainerTag,oPC):GiveContainer(oPC,iContNumber);
oItem = GetFirstItemInInventory(oSecHench);
while(GetIsObjectValid(oItem))
{
if(GetBaseItemType(oItem) != BASE_ITEM_LARGEBOX && GetTag(oItem) != sContainerTag)
{
oCopy = CopyItem(oItem, oContainer, TRUE);
// esli item v sumku ne vlez - sozdaem novuyu
if(!GetHasObject(oContainer, oCopy))
{
DestroyObject(oCopy);
// oContainer = CreateItemOnObject(sContainerTag, oPC);
iContNumber++;
oContainer=(iContNumber>Ncont(oPC))?CreateItemOnObject(sContainerTag,oPC):GiveContainer(oPC,iContNumber);
oCopy = CopyItem(oItem, oContainer, TRUE);
}
// uni4tojaem original
DestroyObject(oItem);
}
oItem = GetNextItemInInventory(oSecHench);
}

///---///---
sContainerTag = "transit_cont3";
oContainer = CreateItemOnObject(sContainerTag, oPC);
int iSlot = 0;
oItem = GetItemInSlot(iSlot, oHench);
while (iSlot < 14)
{
if(GetIsObjectValid(oItem))
{
oCopy = CopyItem(oItem, oContainer, TRUE);
// esli item v sumku ne vlez - sozdaem novuyu
if(!GetHasObject(oContainer, oCopy))
{
DestroyObject(oCopy);
oContainer = CreateItemOnObject(sContainerTag, oPC);
oCopy = CopyItem(oItem, oContainer, TRUE);
}
// uni4tojaem original
DestroyObject(oItem);
}
iSlot ++;
oItem = GetItemInSlot(iSlot, oHench);
}
DeleteLocals(oPC);

oItem = GetFirstItemInInventory(oSecPC);
while(GetIsObjectValid(oItem))
{
DestroyObject(oItem);
oItem = GetNextItemInInventory(oSecPC);
}
oItem = GetFirstItemInInventory(oSecHench);
while(GetIsObjectValid(oItem))
{
DestroyObject(oItem);
oItem = GetNextItemInInventory(oSecHench);
}
}

Neverwinter Script Source
//::///////////////////////////////////////////////
//:: FileName bm_inv_transit3
//:: 2005 WRG!
//:://////////////////////////////////////////////
/*
 
.
 
  , .
*/

//:://////////////////////////////////////////////
//:: Created By: BaaL
//:: Created On:
//:://////////////////////////////////////////////
int GetSuitableSlot(object oItem)
{
int iSlot;
switch (GetBaseItemType(oItem))
{
case BASE_ITEM_AMULET:   iSlot = INVENTORY_SLOT_NECK; break;
case BASE_ITEM_ARMOR: iSlot = INVENTORY_SLOT_CHEST;   break;
case BASE_ITEM_ARROW: iSlot = INVENTORY_SLOT_ARROWS; break;
case BASE_ITEM_BASTARDSWORD:  iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_BATTLEAXE: iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_BELT:   iSlot = INVENTORY_SLOT_BELT; break;
case BASE_ITEM_BOLT:   iSlot = INVENTORY_SLOT_BOLTS;   break;
case BASE_ITEM_BOOTS: iSlot = INVENTORY_SLOT_BOOTS;   break;
case BASE_ITEM_BRACER:   iSlot = INVENTORY_SLOT_ARMS; break;
case BASE_ITEM_BULLET:   iSlot = INVENTORY_SLOT_BULLETS;  break;
case BASE_ITEM_CLOAK: iSlot = INVENTORY_SLOT_CLOAK;   break;
case BASE_ITEM_CLUB:   iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_DAGGER:   iSlot = INVENTORY_SLOT_LEFTHAND; break;
case BASE_ITEM_DART:   iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_DIREMACE:   iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_DOUBLEAXE: iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_DWARVENWARAXE: iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_GLOVES:   iSlot = INVENTORY_SLOT_ARMS; break;
case BASE_ITEM_HALBERD: iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_HANDAXE: iSlot = INVENTORY_SLOT_LEFTHAND; break;
case BASE_ITEM_HEAVYCROSSBOW: iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_HEAVYFLAIL:   iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_HELMET:   iSlot = INVENTORY_SLOT_HEAD; break;
case BASE_ITEM_KAMA:   iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_KATANA:   iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_KUKRI: iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_LARGESHIELD: iSlot = INVENTORY_SLOT_LEFTHAND; break;
case BASE_ITEM_LIGHTCROSSBOW: iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_LIGHTFLAIL:   iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_LIGHTHAMMER: iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_LIGHTMACE: iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_LONGBOW: iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_LONGSWORD: iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_MAGICSTAFF:   iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_MORNINGSTAR: iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_QUARTERSTAFF:  iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_RAPIER:   iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_RING:   iSlot = INVENTORY_SLOT_RIGHTRING; break;
case BASE_ITEM_SCIMITAR:   iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_SCYTHE:   iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_SHORTBOW:   iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_SHORTSPEAR:   iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_SHORTSWORD:   iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_SHURIKEN:   iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_SLING: iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_SMALLSHIELD: iSlot = INVENTORY_SLOT_LEFTHAND; break;
case BASE_ITEM_THROWINGAXE: iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_TORCH: iSlot = INVENTORY_SLOT_LEFTHAND; break;
case BASE_ITEM_TOWERSHIELD: iSlot = INVENTORY_SLOT_LEFTHAND; break;
case BASE_ITEM_TWOBLADEDSWORD: iSlot = INVENTORY_SLOT_RIGHTHAND; break;
case BASE_ITEM_WARHAMMER: iSlot = INVENTORY_SLOT_RIGHTHAND; break;
}
return iSlot;
}

void main()
{
object oPC = GetFirstPC();
object oHench = GetHenchman(oPC);
object oSecPC = GetObjectByTag("SECOND_PC");
object oCopy;
object oContainer;
object oItem2;
object oItem = GetFirstItemInInventory(oPC);
// "transit_cont3" ( 1 2 ,
// .. ),
//
if(!GetIsObjectValid(GetItemPossessedBy(oPC, "transit_cont3")))
{
DestroyObject(oHench);
return;
}
AssignCommand(oHench, ClearAllActions());
while (GetIsObjectValid(oItem))
{
///+++
if(GetTag(oItem) == "transit_cont1")
{
oContainer = oItem;
oItem2 = GetFirstItemInInventory(oContainer);
while (GetIsObjectValid(oItem2))
{
oCopy = CopyItem(oItem2, oSecPC, TRUE);
DestroyObject(oItem2);
oItem2 = GetNextItemInInventory(oContainer);
}
DestroyObject(oContainer);
}
///---
///+++
if(GetTag(oItem) == "transit_cont2")
{
oContainer = oItem;
oItem2 = GetFirstItemInInventory(oContainer);
while (GetIsObjectValid(oItem2))
{
oCopy = CopyItem(oItem2, oHench, TRUE);
DestroyObject(oItem2);
oItem2 = GetNextItemInInventory(oContainer);
}
DestroyObject(oContainer);
}
///---
///+++
if(GetTag(oItem) == "transit_cont3")
{
oContainer = oItem;
oItem2 = GetFirstItemInInventory(oContainer);
while (GetIsObjectValid(oItem2))
{
oCopy = CopyItem(oItem2, oHench, TRUE);
SetIdentified(oCopy, TRUE);
AssignCommand(oHench, ActionEquipItem(oCopy, GetSuitableSlot(oCopy)));
DestroyObject(oItem2);
oItem2 = GetNextItemInInventory(oContainer);
}
DestroyObject(oContainer);
}
///---
oItem = GetNextItemInInventory(oPC);
}
// :
DelayCommand(0.5, ExecuteScript("bm_inv_transit4", OBJECT_SELF));
}

Neverwinter Script Source
//::///////////////////////////////////////////////
//:: FileName bm_inv_transit4
//:: 2005 WRG!
//:://////////////////////////////////////////////
/*

*/

//:://////////////////////////////////////////////
//:: Created By: BaaL
//:: Created On:
//:://////////////////////////////////////////////
void main()
{
object oPC = GetFirstPC();
object oSecPC = GetObjectByTag("SECOND_PC");
object oCopy;
object oItem = GetFirstItemInInventory(oSecPC);
while (GetIsObjectValid(oItem))
{
oCopy = CopyItem(oItem, oPC, TRUE);
DestroyObject(oItem);
oItem = GetNextItemInInventory(oSecPC);
}
}
+
][umepa
Mar 27 2005, 09:32
#70


Level 3
*

:
: Neutral Evil
:



NPC . .
1 . ACTION TAKEN

Neverwinter Script Source
void main()
{
object oPC = GetPCSpeaker();
ActionForceFollowObject(oPC, 1.0);
SetLocalObject(OBJECT_SELF, "PC_TO_FOLLOW", oPC);
}


c .
2 OnSpawn SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT);
// . .
3 OnUserDefined
Neverwinter Script Source
void main()
{
int nEvent = GetUserDefinedEventNumber();
if (nEvent == EVENT_HEARTBEAT)
  {
  object oPC = GetLocalObject(OBJECT_SELF, "PC_TO_FOLLOW");
  // ->
  if(!GetIsObjectValid(oPC) || GetIsInCombat() ) return;
  ActionForceFollowObject(oPC, 1.0);
  }
}


OnUserDefined,
.
+
RiPPeR
Apr 27 2005, 10:13
#71


Level 5


:
: Chaotic Neutral
:
NWN: [PW]




" "
" RIPPER'a"


, , "" .

:
.

pl_onlogon.nss ( OnClientEnter )
Neverwinter Script Source
// ===========================================
// pl_on_logon.nss 12.12.04
// RiPPeR
// glebkk@xaker.ru
// ===========================================

#include "main_spirit"

void main()
{
object oPlayer = GetEnteringObject();
object oSpirit = GetPlayerSpirit(oPlayer);
string ID = IntToString(GetLocalInt(oSpirit, "ID"));
string sAccount = GetPCPlayerName(oPlayer);

string sDB_CDKEY = GetCampaignString("db",sAccount+"_CDKEY");
string sPC_CDKEY = GetPCPublicCDKey(oPlayer);

if (GetStringLength(sDB_CDKEY) <= 1) //
SetCampaignString("db",sAccount+"_CDKEY",sPC_CDKEY);
else
if (sDB_CDKEY != sPC_CDKEY)
BootPC(oPlayer);

if (oSpirit == OBJECT_INVALID) //
{
oSpirit = CreateItemOnObject("spirit", GetEnteringObject(), 1);

int nCounter = GetCampaignInt("db","pl_Counter") + 1;

SetLocalInt(oSpirit,"ID",nCounter);
SetCampaignInt("db","pl_Counter",nCounter);

ID = IntToString(nCounter);
}
else //
{
}

SetLocalInt(oSpirit,"bFlaged",1);
SetLocalInt(oSpirit,"bConnected",1);
}


pl_on_logoff.nss ( OnClientLeave )

Neverwinter Script Source
// ===========================================
// pl_on_logoff.nss 12.12.04
// RiPPeR
// glebkk@xaker.ru
// ===========================================

#include "main_spirit"

void main()
{
object oPlayer = GetExitingObject();
object oSpirit = GetPlayerSpirit(oPlayer);

string ID = IntToString(GetLocalInt(oSpirit,"ID"));

SetLocalInt(oSpirit,"bConnected",0);
}


default.nss
Neverwinter Script Source
// ===========================================
// default.nss 12.12.04
// RiPPeR
// glebkk@xaker.ru
// ===========================================

#include "main_spirit"

void main()
{
object oPlayer = OBJECT_SELF;
object oSpirit = GetPlayerSpirit(oPlayer);

vector vPos = GetPosition(oPlayer);

if (GetLocalInt(oSpirit,"bFlaged") == 0)
{
SetLocalFloat(oSpirit,"pos_x",vPos.x);
SetLocalFloat(oSpirit,"pos_y",vPos.y);
SetLocalFloat(oSpirit,"pos_z",vPos.z);
SetLocalFloat(oSpirit,"pos_angle",VectorToAngle(vPos));
}
else
SetLocalInt(oSpirit,"bFlaged",0);
}

main_spirit.nss ( )
Neverwinter Script Source
// ===========================================
// main_spirit.nss 12.12.04
// RiPPeR
// glebkk@xaker.ru
// ===========================================

object GetPlayerSpirit(object oPlayer);

object GetPlayerSpirit(object oPlayer)
{
object oItem = GetFirstItemInInventory(oPlayer);

if (GetResRef(oItem) == "spirit")
return oItem;

while(oItem != OBJECT_INVALID)
{
oItem = GetNextItemInInventory(oPlayer);

if (GetResRef(oItem) == "spirit")
return oItem;
}
return OBJECT_INVALID;
}


main_active_item.nss
Neverwinter Script Source
// ===========================================
// main_active_item.nss 12.12.04
// RiPPeR
// glebkk@xaker.ru
// ===========================================

#include "main_spirit"

void main()
{
object oPlayer = GetItemActivator();
object oItem = GetItemActivated();
object oTarget = GetItemActivatedTarget();

string sResRef = GetResRef(oItem);
string sTag = GetTag(oItem);

if (sResRef == "dm_wand")
//if (GetIsDM(oPlayer)) //, -
{
AssignCommand(oPlayer,ActionStartConversation(oPlayer,"dm_wand_pl_list",TRUE,FALSE));
ExecuteScript("dm_ban_info",oPlayer);
SpeakString("DM_WAND ACT",TALKVOLUME_SHOUT);
}
}


m_def_loc_enter.nss ( OnEnter __ , __ )
Neverwinter Script Source
// ===========================================
// m_def_loc_enter.nss 12.12.04
// RiPPeR
// glebkk@xaker.ru
// ===========================================

#include "main_spirit"

void main()
{
object oArea = OBJECT_SELF;
object oPlayer = GetEnteringObject();
object oSpirit = GetPlayerSpirit(oPlayer);

string sTag = GetTag(oArea);
string sResRef = GetResRef(oArea);

SetLocalString(oSpirit, "pos_area", sTag);
ExecuteScript(sResRef,oArea); // OnEnter - -'
}

m_loc_saver.nss
22.
:
CODE

====
=**=
=**=
====

= -
* -

.

Neverwinter Script Source
// ===========================================
// m_loc_saver.nss 12.12.04
// RiPPeR
// glebkk@xaker.ru
// ===========================================

#include "main_spirit"

void main()
{
object oPlayer = GetEnteringObject();
object oSpirit = GetPlayerSpirit(oPlayer);

vector vPlayer;
location lPlayer;
object oArea;

float x = GetLocalFloat(oSpirit,"pos_x");
float y = GetLocalFloat(oSpirit,"pos_y");
float z = GetLocalFloat(oSpirit,"pos_z");
float angle = GetLocalFloat(oSpirit,"pos_angle");

string sArea = GetLocalString(oSpirit,"pos_area");

vPlayer = Vector(x,y,z);
oArea = GetObjectByTag(sArea);

lPlayer = Location(oArea,vPlayer,angle);

SetLocalInt(oSpirit,"bConnected",1);
AssignCommand(oPlayer,ActionJumpToLocation(lPlayer));
}

dm_ban_boot.nss
Neverwinter Script Source
// ===========================================
// dm_ban_boot.nss 12.12.04
// RiPPeR
// glebkk@xaker.ru
// ===========================================

#include "main_spirit"

void main()
{
int nID = GetLocalInt(OBJECT_SELF,"DM_WAND_ID");

object oPlayer = GetFirstPC();
object oSpirit;

while (oPlayer != OBJECT_INVALID)
{
oSpirit = GetPlayerSpirit(oPlayer);

if (GetLocalInt(oSpirit,"ID") == nID)
{
BootPC(oPlayer);
break;
}
}
}


dm_ban_info.nss
Neverwinter Script Source
// ===========================================
// dm_ban_info.nss 12.12.04
// RiPPeR
// glebkk@xaker.ru
// ===========================================

#include "main_spirit"

string PlayerList(object oPC);
object GetPCByPlaceNum(int num);
int GetPCAmount();

string GetGoodEvil(object oPC);
string GetLawChaotic(object oPC);

void main()
{
int num = GetLocalInt(OBJECT_SELF,"DM_WAND_NUM");
int player_amount = GetPCAmount();

if (num == 0)
num = player_amount;

if (num > player_amount)
num = 1;

object oPC = GetPCByPlaceNum(num);
int ID = GetLocalInt(GetPlayerSpirit(oPC),"ID");

SetLocalInt(OBJECT_SELF,"DM_WAND_NUM",num);
SetLocalInt(OBJECT_SELF,"DM_WAND_ID",ID);

string sPlayerList = PlayerList(oPC);

SetCustomToken(1999, sPlayerList);
}

string PlayerList(object oPC)
{
//object oPC = GetFirstPC();
string Text = " \n";

string Account = GetPCPlayerName(oPC);
string Name = GetName(oPC);
string ID = IntToString(GetLocalInt(GetPlayerSpirit(oPC),"ID"));
string CD_KEY = GetPCPublicCDKey(oPC);
string IP = GetPCIPAddress(oPC);

string Level = IntToString(GetLevelByPosition(1, oPC) + GetLevelByPosition(2, oPC) + GetLevelByPosition(3, oPC));
string BadGood = GetGoodEvil(oPC);
string ChaoticLaw = GetLawChaotic(oPC);
string ThisHP = IntToString(GetCurrentHitPoints(oPC));
string MaxHP = IntToString(GetMaxHitPoints(oPC));
string AC = IntToString(GetAC(oPC));

string Area = GetName(GetArea(oPC));

Text += "<c>"+"-----------------------------\n";
Text += "<c>"+": "+"<c>"+Account+"\n";
Text += "<c>"+" : "+"<c>"+Name+"\n";
Text += "<c>"+"ID: "+"<c>"+ID+"\n";
Text += "<c>"+"PUBLIC CD KEY: "+"<c>"+CD_KEY+"\n";
Text += "<c>"+"IP: "+"<c>"+IP+"\n";
Text += "<c>"+"\n";
Text += "<c>"+": "+"<c>"+Level+"\n";
Text += "<c>"+"/: "+"<c>"+BadGood+"\n";
Text += "<c>"+"/: "+"<c>"+ChaoticLaw+"\n";
Text += "<c>"+"HP: "+"<c>"+ThisHP+"/"+"<c>"+MaxHP+"\n";
Text += "<c>"+"AC: "+"<c>"+AC+"\n";
Text += "<c>"+": "+"<c>"+Area+"\n";

return Text;
}

object GetPCByPlaceNum(int num)
{
object oPC = GetFirstPC();
int num2 = 0;

for (num2 = 0; num2 < num - 1; num2++)
oPC = GetNextPC();

return oPC;
}

int GetPCAmount()
{
object oPC = GetFirstPC();
int num = 0;

while (oPC != OBJECT_INVALID)
{
num++;
oPC = GetNextPC();
}

return num;
}

string GetGoodEvil(object oPC)
{
int ret = GetAlignmentGoodEvil(oPC);

if (ret == ALIGNMENT_GOOD)
return "GOOD";

if (ret == ALIGNMENT_EVIL)
return "EVIL";

if (ret == ALIGNMENT_NEUTRAL)
return "NEUTRAL";

return "OBJECT_INVALID";
}

string GetLawChaotic(object oPC)
{
int ret = GetAlignmentLawChaos(oPC);

if (ret == ALIGNMENT_LAWFUL)
return "LAWFUL";

if (ret == ALIGNMENT_CHAOTIC)
return "CHAOTIC";

if (ret == ALIGNMENT_NEUTRAL)
return "NEUTRAL";

return "OBJECT_INVALID";
}

dm_ban_minus.nss
Neverwinter Script Source
// ===========================================
// dm_ban_minus.nss 12.12.04
// RiPPeR
// glebkk@xaker.ru
// ===========================================

void main()
{
SetLocalInt(OBJECT_SELF,"DM_WAND_NUM",GetLocalInt(OBJECT_SELF,"DM_WAND_NUM") - 1);
ExecuteScript("dm_ban_info",OBJECT_SELF);
ExecuteScript("dm_w_return",OBJECT_SELF);
}

dm_ban_plus.nss
Neverwinter Script Source
// ===========================================
// dm_ban_plus.nss 12.12.04
// RiPPeR
// glebkk@xaker.ru
// ===========================================

void main()
{
SetLocalInt(OBJECT_SELF,"DM_WAND_NUM",GetLocalInt(OBJECT_SELF,"DM_WAND_NUM") + 1);
ExecuteScript("dm_ban_info",OBJECT_SELF);
ExecuteScript("dm_w_return",OBJECT_SELF);
}

dm_w_return.nss
Neverwinter Script Source
// ===========================================
// dm_w_return.nss 12.12.04
// RiPPeR
// glebkk@xaker.ru
// ===========================================

void main()
{
ExecuteScript("dm_ban_info",OBJECT_SELF);
AssignCommand(OBJECT_SELF,ActionStartConversation(OBJECT_SELF,"dm_wand_pl_list",TRUE,FALSE));
}


- :
-' "dm_wand" .
dm_wand_pl_list

:
CODE

[OWNER] - <CUSTOM1999>
|
(ActionTaken - dm_ban_boot)
(ActionTaken - dm_ban_plus)
(ActionTaken - dm_ban_minus)



, - . :).

"Spirit", ResRef' "spirit", Undropable

p.s. .



RiPPeR - Apr 30 2005, 07:49
+
Aiwan
Jun 9 2005, 09:39
#72





:
: Chaotic Good
:
NWN:





. - . .
Neverwinter Script Source
//:://////////////////////////////////////////////
//:: OnEnter am_ten_torch_on
//:: Copyright 2005 WRG!
//:://////////////////////////////////////////////
/*
.

= "AM_PLS_TORCH_ON".
Static.
,
.
. ,
, :
AM_SOUND_TORTCH_( = i).
. !

*/

//:://////////////////////////////////////////////
//:: Created By: Aiwan
//:: Created On: 08.06.2005
//:://///////////////////////////////////////////
#include "am_inc_debug"
void main()
{
int i=1; //
float f=0.5; //
float r=f+0.2; //
object oPC = GetEnteringObject();
string sSound = GetTag(OBJECT_SELF); //
object oTorch = GetFirstObjectInArea(OBJECT_SELF);
object oSound = GetObjectByTag(sSound+IntToString(i)); //
if (!GetIsPC(oPC)) {return;}
//---------------------------------- --------------------------------------
if (GetIsDay() && !GetLocalInt(OBJECT_SELF, "DEACTIVATED"))
  //
{
while (GetIsObjectValid(oTorch))
{
  if (GetTag(oTorch) == "AM_PLS_TORCH_ON" && !GetLocalInt(oTorch, "LIGHT_OFF"))
  /* ,
  , . */

{
SetLocalInt(oTorch, "LIGHT_OFF", TRUE);
AssignCommand(oTorch, PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
DelayCommand(f, SetPlaceableIllumination(oTorch, FALSE));
DelayCommand(r, RecomputeStaticLighting(GetArea(oTorch)));
Debug(FloatToString(f));
Debug(FloatToString®);
f=f+0.4; // !
r=f+0.2; // - , .
/* . .
  , , , 0.2,
  . , ,
  . */

}
if (GetIsObjectValid(oSound))
  {
  SoundObjectStop(oSound); //
  i++; //
  }
  oSound = GetObjectByTag("AM_SOUND_TORCH_"+IntToString(i));
  oTorch = GetNextObjectInArea(OBJECT_SELF);
}
  SetLocalInt(OBJECT_SELF, "DEACTIVATED", TRUE);
  }
//----------------------------- -------------------------------------------
if (GetIsNight() && GetLocalInt(OBJECT_SELF, "DEACTIVATED"))
  //
{
while (GetIsObjectValid(oTorch))
{
  if (GetTag(oTorch) == "AM_PLS_TORCH_ON" && GetLocalInt(oTorch, "LIGHT_OFF"))
  {
SetLocalInt(oTorch, "LIGHT_OFF", FALSE);
AssignCommand(oTorch, PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
DelayCommand(f, SetPlaceableIllumination(oTorch, TRUE));
DelayCommand(r, RecomputeStaticLighting(GetArea(oTorch)));
Debug(FloatToString(f));
Debug(FloatToString®);
f=f+0.4;
r=f+0.2;
}
if (GetIsObjectValid(oSound))
  {
  SoundObjectPlay(oSound); //
  i++; //
  }
  oSound = GetObjectByTag("AM_SOUND_TORCH_"+IntToString(i));
  oTorch = GetNextObjectInArea(OBJECT_SELF);
}
  SetLocalInt(OBJECT_SELF, "DEACTIVATED", FALSE); //
  return;
  }
}

[mergetime]1118299586[/mergetime]
CODE
, (r) , Debug(FloatToString);

[mergetime]1118299909[/mergetime]
Neverwinter Script Source
//::///////////////////////////////////////////////
//:: Name: am_inc_common
//:: Copyright © 2005 WRG!
//:://////////////////////////////////////////////
/*
         
*/

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

// ( )
// -
// LocalInt - "DEBAG_PC" ,
// LocalInt - "DEBAG_DM" , DM-
void Debug(string message);
// Debug: TAG, ResRef Name .
void DebugObject(object oObject);

//------------------------------------------------------------------------------
void Debug(string message)
{
    object oPC = GetFirstPC();
    if (!GetLocalInt(GetModule(), "DEBAG_PC"))
    {
      SendMessageToPC(oPC, "Debag message: "+message);
    }
    if (!GetLocalInt(GetModule(), "DEBAG_DM"))
          {
            SendMessageToAllDMs("Debag message to DMs: "+message);
          }
}
void DebugObject(object oObject)
{
    string sTag = GetTag(oObject);
    string sResRef = GetResRef(oObject);
    string sName = GetName(oObject);
    Debug ("TAG = "+sTag+", ResRef = "+sResRef+",  Name = "+sName+".");
}
/*
void main(){}

  demo_mod.rar ( 9.63 ) - : 72
 
+
Buldog
Jun 23 2005, 20:21
#73


Level 5
**

:
: Chaotic Neutral
:



, , , , , , , , , .

:
Neverwinter Script Source
//////////////////////////////////////
//////////////////////////////////////
//////For Area Transmition Trigers////
//////////////////////////////////////
//////////OnClick Script//////////////
//////////////////////////////////////
////////////Created By Buldog/////////
////////////////23.06.05//////////////
//////////////////////////////////////
//////////////////////////////////////

void main()
{
    object oPC = GetClickingObject();
    object oTarget = GetTransitionTarget(OBJECT_SELF);
    object oTArea = GetArea(oTarget);

    location lTarget;

    vector vPC = GetPosition(oPC);
    vector vTarget = GetPosition(oTarget);
    vector vTLoc = Vector();

    vTLoc.z = vPC.z;

    if(vPC.x < 10.0 || vPC.x > vTarget.x * 2 - 10) vTLoc.x = vTarget.x * 2 - vPC.x;
    else vTLoc.x = vPC.x;

    if(vPC.y < 10.0 || vPC.y > vTarget.y * 2 - 10) vTLoc.y = vTarget.y * 2 - vPC.y;
    else vTLoc.y = vPC.y;

    float fFace = GetFacing(oPC);

    lTarget = Location(oTArea, vTLoc, fFace);

    AssignCommand(oPC, ClearAllActions());
    AssignCommand(oPC, ActionJumpToLocation(lTarget));
}


:

- ( ) .
- , .

:

- ( , ) .
- , .
- () () .
+
Aiwan
Jun 24 2005, 21:22
#74





:
: Chaotic Good
:
NWN:





. . 10. 30 5 -, 10 1 ...
Neverwinter Script Source
//::///////////////////////////////////////////////
//:: Name: am_inc_dialog
//:: Copyright © 2005 WRG!
//:://////////////////////////////////////////////
/*
         
*/

//:://////////////////////////////////////////////
//:: Created By: Aiwan      Aiwan@e-mail.ru
//:: Created On: 22.06.2005
//:://////////////////////////////////////////////
#include "am_inc_debug"

//
// iPercent - . 10%
void GiveXPScale(object oPC, int iPercent=10);

//------------------------------------------------------------------------------
void GiveXPScale(object oPC, int iPercent=10)
{
    object oCreature;
    int iHit = GetHitDice(oPC); //
    int iXP; //
    int i = iHit*1000; //
    iXP= i/iPercent;
    Debug(" - "+IntToString(i));
    Debug(" - "+IntToString(iPercent));
    Debug(" - "+IntToString(iXP));
    /*
    ,
    int iP, . 10%.
    */

    GiveXPToCreature(oPC,iXP);
}
/*
void main(){}
+
Friedrich
Aug 10 2005, 22:15
#75


Level 5
**

:
: Neutral Good
:



makeTrace ( ) , . (.. VFX_FNF_SMOKE_PUFF).
- .
Neverwinter Script Source
// ********************************* //
// * fh_inc_trace                  * //
// * () Friedrich W. Heik, 2005.  * //
// * darkowl@inbox.ru              * //
// ********************************* //

//** Interface **

//
// :
// x - ro: 
// y - fi:  , ( X ..)
// z - psi:
vector sph(vector vDsc);

//
// vSph:
// x - ro: 
// y - fi:  , ( X ..)
// z - psi:
vector dsc(vector vSph);

// .
// . fMagnitude, vVector.
vector setMagnitude(vector vVector, float fMagnitude);

//
// lSource: 
// lTarget: 
// fJump:    , .
// fSpeed:    "", /
// nTraceVFX: ,
// nBurstVFX: (. -1 (VFX_NONE), ) 
void makeTrace(location lSource, location lTarget, float fJump = 0.25f, float fSpeed = 10.0f, int nTraceVFX = VFX_FNF_SMOKE_PUFF, int nBurstVFX = VFX_FNF_FIREBALL);


//** Implementation **

//
// :
// x - ro: 
// y - fi:  , ( X ..)
// z - psi:
vector sph(vector vDsc)
{
  float ro = VectorMagnitude(vDsc);
  float fi = atan(vDsc.y/vDsc.x); // I
  float psi = asin(vDsc.z/ro);

  if (vDsc.x < 0.0) fi += 180.0;      // II, III: +Pi
  else if (vDsc.y < 0.0) fi += 360.0; // IV: +2Pi, :)
  return Vector(ro, fi, psi);
}

//
vector dsc(vector vSph)
{
  float x = vSph.x*cos(vSph.z)*cos(vSph.y); // ro*cos(psi)*cos(fi)
  float y = vSph.x*cos(vSph.z)*sin(vSph.y); // ro*cos(psi)*sin(fi)
  float z = vSph.x*sin(vSph.z); // ro*sin(psi)
  return Vector(x, y, z);
}

vector setMagnitude(vector vVector, float fMagnitude)
{
  vector vSph = sph(vVector);
  vSph.x = fMagnitude;
  return dsc(vSph);
}

void makeTrace(
  location lSource,    //
  location lTarget,    //
  float fJump = 0.25f// , .
  float fSpeed = 10.0f, // "", /
  int nTraceVFX = VFX_FNF_SMOKE_PUFF,
  int nBurstVFX = VFX_FNF_FIREBALL) 
{
  float fInterval = fJump/fSpeed;
  effect eVis = EffectVisualEffect(nTraceVFX);

  vector vOA = GetPositionFromLocation(lSource); // (OA)
  vector vOB = GetPositionFromLocation(lTarget); // (OB)
  vector vAB = vOB - vOA; // (AB) = (OB)-(OA)
 
  //vector vNorm = VectorNormalize(vAB); // , AB
  vector vJump = setMagnitude(vAB, fJump);
 
  vector vCurrent = vOA;
  object oArea = GetAreaFromLocation(lTarget);
  int n = FloatToInt( VectorMagnitude(vAB)/fJump );
  int i;
  float fDelay = 0.0;
  for (i=0; i < n; i++)
  {
    vCurrent += vJump;
    location lCurrent = Location(oArea, vCurrent, 0.0);
    fDelay += fInterval;
    DelayCommand(fDelay, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, lCurrent));
  }
  // Fireball VFX on target:
  if (nBurstVFX != VFX_NONE)
  {
    fDelay += fInterval;
    effect eBurst = EffectVisualEffect(nBurstVFX);
    DelayCommand(fDelay, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eBurst, lTarget));
  }
}
//void main(){}


, :
Neverwinter Script Source
void setGoodEvilValue(object oCreature, int nValue)
{
  if(!GetIsObjectValid(oCreature)||
    (GetObjectType(oCreature) != OBJECT_TYPE_CREATURE))
    return;
 
  if (nValue < 0) nValue = 0;
  else if (nValue > 100) nValue = 100;
 
  int nCurGE = GetGoodEvilValue(oCreature);
  int nShift = abs(nCurGE - nValue);
  if (nShift == 0) return;
  int nDir = (nValue > nCurGE) ? ALIGNMENT_GOOD : ALIGNMENT_EVIL;
  AdjustAlignment(oCreature, nDir, nShift);
  if (GetGoodEvilValue(oCreature) != nValue)
    setGoodEvilValue(oCreature, nValue);
}

void setLawChaosValue(object oCreature, int nValue)
{
  if(!GetIsObjectValid(oCreature)||
    (GetObjectType(oCreature) != OBJECT_TYPE_CREATURE))
    return;
 
  if (nValue < 0) nValue = 0;
  else if (nValue > 100) nValue = 100;
 
  int nCurLC = GetLawChaosValue(oCreature);
  int nShift = abs(nCurLC - nValue);
  if (nShift == 0) return;
  int nDir = (nValue > nCurLC) ? ALIGNMENT_LAWFUL : ALIGNMENT_CHAOTIC;
  AdjustAlignment(oCreature, nDir, nShift);
  if (GetLawChaosValue(oCreature) != nValue)
    setLawChaosValue(oCreature, nValue);
}
//void main(){}

- .
+

5 V  < 1 2 3 4 5 >
1 . (: 1, : 0)
: 0

 

: · : · :

· · ·

: 21st January 2018 - 23:34