QUOTE |
что такое Валео?..или кто такой? |
QUOTE |
Нет. Есть желание? Вперед! |
Neverwinter Script Source |
void main() { object oPC = GetEnteringObject(); object oNPC1 = GetObjectByTag("NPC_1"); object oNPC2 = GetObjectByTag ("NPC_2"); object oWP = GetObjectByTag ("WP_PC_1"); /* :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ if (!GetIsPC(oPC) || GetLocalInt(OBJECT_SELF, "TRIGGER") == 1) return; { SetLocalInt(OBJECT_SELF, "TRIGGER", 1); SetCutsceneMode(oPC); AssignCommand(oNPC1, ClearAllActions()); AssignCommand(oPC, ClearAllActions()); ActionDoCommand(AssignCommand(oPC, ActionMoveToObject(oWP))); ActionDoCommand(AssignCommand(oPC, SetCameraFacing(280.0, 20.0, 45.0, CAMERA_TRANSITION_TYPE_MEDIUM))); ActionWait(2.5); ActionDoCommand(AssignCommand(oNPC1, ActionMoveToObject(oPC))); ActionDoCommand(AssignCommand(oNPC1, ActionPlayAnimation(ANIMATION_FIREFORGET_SALUTE, 1.0, 3.0))); ActionDoCommand(AssignCommand(oNPC1, PlayVoiceChat(VOICE_CHAT_HELLO))); ActionDoCommand(AssignCommand(oNPC1, SpeakString("ÏÐÈÂÅÒ"))); ActionDoCommand(AssignCommand(oPC, SetCutsceneMode(oPC, FALSE))); ActionDoCommand(AssignCommand(oNPC1, ActionStartConversation(oPC))); } } |
QUOTE (-fenix- @ Jun 19 2005, 10:52) |
ActionDoCommand(AssignCommand(oNPC1, ActionMoveToObject(oPC))); ActionDoCommand(AssignCommand(oNPC1, ActionPlayAnimation(ANIMATION_FIREFORGET_SALUTE, 1.0, 3.0))); ActionDoCommand(AssignCommand(oNPC1, PlayVoiceChat(VOICE_CHAT_HELLO))); ActionDoCommand(AssignCommand(oNPC1, SpeakString("ÏÐÈÂÅÒ"))); |
Neverwinter Script Source |
void SetItemStackSize(object oItem, int nSize) |
Neverwinter Script Source |
int GetItemStackSize(object oItem) |
CODE |
int GetNumItems(object oTarget,string sItem) { int nNumItems = 0; object oItem = GetFirstItemInInventory(oTarget); while (GetIsObjectValid(oItem) == TRUE) { if (GetTag(oItem) == sItem) { nNumItems = nNumItems + GetNumStackedItems(oItem); } oItem = GetNextItemInInventory(oTarget); } return nNumItems; } |
Neverwinter Script Source |
int removeStackItems(object oInventory, string sItem, int nNum) { object oItem = GetFirstItemInInventory(oInventory); int nCount = nNum; // столько итемов осталось удалить while(GetIsObjectValid(oItem) && (nCount > 0)) { if(GetTag(oItem) == sItem) { int nStack = GetItemStackSize(oItem); if (nStack <= nCount) // ЕСЛИ в стопке предметов меньше, { // чем нам нужно удалить: DestroyObject(oItem); // - удаляем все стопку nCount-=nStack; // - уменьшаем счетчик на кол-во уд-х пред-ов } else { // ИНАЧЕ сокращ. размер стопки и обнуляем счетчик SetItemStackSize(oItem, nStack-nCount); nCount = 0; } } oItem = GetNextItemInInventory(oInventory); } return nNum - nCount; // возвращаем кол-во уд-х пред-ов } |
Neverwinter Script Source |
DelayCommand(144.0, FadeToBlack(oPC, FADE_SPEED_MEDIUM)); // ...Несколько // ...различных // ...функций (джампы PC и NPC + одна анимация) DelayCommand(145.0, FadeFromBlack(oPC, FADE_SPEED_MEDIUM)); |
Neverwinter Script Source |
DelayCommand(144.0, AssignCommand(oPC, FadeToBlack(oPC, FADE_SPEED_MEDIUM))); // ..... DelayCommand(145.0, AssignCommand(oPC, FadeFromBlack(oPC, FADE_SPEED_MEDIUM))); |
QUOTE |
DelayCommand(145.0, AssignCommand(oPC, FadeFromBlack(oPC, FADE_SPEED_MEDIUM))); |
Neverwinter Script Source |
void main() { object oPC = GetEnteringObject(); object oНПС = GetObjectByTag("ТЕГ"); DelayCommand(3.0, FadeToBlack(oPC, FADE_SPEED_MEDIUM)); DelayCommand(5.0, AssignCommand(oНПС, ActionJumpToObject(GetWaypointByTag("WP")))); DelayCommand(5.0, AssignCommand(oPC, ActionJumpToObject(GetWaypointByTag("WP")))); DelayCommand(7.0, AssignCommand(oНПС, ActionPlayAnimation(ANIMATION_LOOPING_GET_MID))); DelayCommand(9.0, AssignCommand(oНПС, FadeFromBlack(oPC, FADE_SPEED_MEDIUM))); } |
Neverwinter Script Source |
DelayCommand(75.0, AssignCommand(oPC, ClearAllActions())); DelayCommand(77.0, FadeToBlack(oPC, FADE_SPEED_FASTEST)); DelayCommand(78.0, AddCutEffects(oPC)); DelayCommand(78.1, AssignCommand(oPC, JumpToObject(oWpCamPC4))); DelayCommand(78.5, AssignCommand(oPC, SetCameraFacing(45.0, 5.0, 70.0, CAMERA_TRANSITION_TYPE_SNAP))); DelayCommand(79.0, FadeFromBlack(oPC, FADE_SPEED_FAST)); |
Neverwinter Script Source |
void main() { object oPC = GetEnteringObject(); object oNPS = GetObjectByTag("ENEMY2"); object oNRS = GetObjectByTag("ENEMY1"); object oWPpc = GetWaypointByTag("WPPS1"); object oWP1 = GetWaypointByTag("WP01"); object oWP2 = GetWaypointByTag("WP02"); effect eCutInv = EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY); if (!GetIsPC(oPC) || GetLocalInt(OBJECT_SELF, "TRIGGER") == 1) return; { FadeToBlack(oPC, FADE_SPEED_FASTEST); AssignCommand(oPC, ClearAllActions()); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eCutInv, oPC, 16.6); SetCutsceneMode(oPC); SetAILevel(oNPS, AI_LEVEL_HIGH); SetAILevel(oNRS, AI_LEVEL_HIGH); DelayCommand(0.5, AssignCommand(oPC, JumpToObject(oWPpc))); AssignCommand(oPC, SetCameraFacing(270.0, 15.0, 45.0, CAMERA_TRANSITION_TYPE_SLOW)); DelayCommand(1.0, FadeFromBlack(oPC, FADE_SPEED_MEDIUM)); DelayCommand(1.5, AssignCommand(oNPS, ActionJumpToObject(oWP1))); DelayCommand(2.0, AssignCommand(oNPS, ActionJumpToObject(oWP2))); DelayCommand(1.5, AssignCommand(oNRS, ActionJumpToObject(oWP1))); DelayCommand(2.0, AssignCommand(oNRS, ActionJumpToObject(oWP2))); DelayCommand(12.8, AssignCommand(oNPS, ActionDoCommand(DestroyObject(oNPS)))); DelayCommand(12.9, AssignCommand(oNRS, ActionDoCommand(DestroyObject(oNRS)))); DelayCommand(15.5, FadeToBlack(oPC, FADE_SPEED_FASTEST)); DelayCommand(17.0, FadeFromBlack(oPC, FADE_SPEED_MEDIUM)); DelayCommand(18.0, SetCutsceneMode(oPC, FALSE)); } } |
Neverwinter Script Source |
DelayCommand(12.8, (DestroyObject(oNPS)); DelayCommand(12.9, (DestroyObject(oNRS)); |
QUOTE (Nick Parker @ Jun 22 2005, 13:00) |
SetAILevel(oNPS, AI_LEVEL_HIGH); SetAILevel(oNRS, AI_LEVEL_HIGH); |
QUOTE (Friedrich @ Jun 22 2005, 13:44) |
А это зачем? |
Neverwinter Script Source |
// СДЕЛАТЬ НЕВИДИМЫМ oCreature // Если bSlow = TRUE, то накладываем EffectSlow() // Если int bInv = TRUE - накладываем невидимость void AddCutEffects(object oCreature, int bInv=TRUE, int bSlow=FALSE); void AddCutEffects(object oCreature, int bInv=TRUE, int bSlow=FALSE) { effect eInv = EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY); effect eSlow = EffectSlow(); if (oCreature != OBJECT_INVALID) { if(bInv==TRUE){ ApplyEffectToObject(DURATION_TYPE_PERMANENT, eInv, oCreature);} if(bSlow==TRUE){ ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSlow, oCreature);} } } |
QUOTE |
Как заставить ездить тележки? |
QUOTE |
Можно сделать, чтобы игрок не мог атаковать? Ни врагов ни друзей ни какими спосабами, включая магию. Но при этом он может двигаться. |
QUOTE |
Создай животное и выбери ему внешность тележки, а потом двигай как непися |
QUOTE |
Я не уверен, не разбирался, но попробуй поставить условие если ПК атакует, то на нем запускается ClearAllActions. Поставь скрипт onSpawn непися. |
QUOTE |
Кажись есть функция, она мне и нужна. |
Neverwinter Script Source |
ActionMoveToObject(GetWaypointByTag("ТЕГ ВЕЙПА")); |
QUOTE |
Совсем забыл На челе невидемость, НПС его атаковать не могут, нужно чтоб и ПС не мог даже если захочет и чтоб заклинания не кастовал. |
Neverwinter Script Source |
// СДЕЛАТЬ НЕВИДИМЫМ oCreature // Если bSlow = TRUE, то накладываем EffectSlow() // Если int bInv = TRUE - накладываем невидимость void AddCutEffects(object oCreature, int bInv=TRUE, int bSlow=FALSE); void AddCutEffects(object oCreature, int bInv=TRUE, int bSlow=FALSE) { effect eInv = EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY); effect eSlow = EffectSlow(); if (oCreature != OBJECT_INVALID) { if(bInv)// так проще { ApplyEffectToObject(DURATION_TYPE_PERMANENT, eInv, oCreature);} if(bSlow) { ApplyEffectToObject(DURATION_TYPE_PERMANENT, eSlow, oCreature);} } } |
QUOTE |
Создай животное и выбери ему внешность тележки, а потом двигай как непися |
QUOTE (-fenix- @ Jun 26 2005, 10:36) |
Эээ - это как? Кажись не лзя менять внешность НПС на внешность размещаемых объектов, сделать из слона подсвечник не получется. |
QUOTE (minion @ Jun 25 2005, 21:12) |
if(bInv)// так проще |
QUOTE (Friedrich @ Jun 26 2005, 14:48) |
А нано- это сколько, ксати? |
QUOTE |
Можно, если 2da подредактировать. |
Neverwinter Script Source |
void SetWeather(object oTarget, int nWeather) |
Neverwinter Script Source |
// Gets the weight of an item, or the total carried weight of a creature in tenths // of pounds (as per the baseitems.2da). // - oTarget: the item or creature for which the weight is needed int GetWeight(object oTarget=OBJECT_SELF) // Set the weather for oTarget. // - oTarget: if this is GetModule(), all outdoor areas will be modified by the // weather constant. If it is an area, oTarget will play the weather only if // it is an outdoor area. // - nWeather: WEATHER_* // -> WEATHER_USER_AREA_SETTINGS will set the area back to random weather. // -> WEATHER_CLEAR, WEATHER_RAIN, WEATHER_SNOW will make the weather go to // the appropriate precipitation *without stopping*. void SetWeather(object oTarget, int nWeather) // Gets the fog amount in the area specified. // nFogType = nFogType specifies wether the Sun, or Moon fog type is returned. // Valid values for nFogType are FOG_TYPE_SUN or FOG_TYPE_MOON. // If no valid area (or object) is specified, it uses the area of caller. // If an object other than an area is specified, will use the area that the object is currently in. int GetFogAmount(int nFogType, object oArea=OBJECT_INVALID) // Gets the fog color in the area specified. // nFogType specifies wether the Sun, or Moon fog type is returned. // Valid values for nFogType are FOG_TYPE_SUN or FOG_TYPE_MOON. // If no valid area (or object) is specified, it uses the area of caller. // If an object other than an area is specified, will use the area that the object is currently in. int GetFogColor(int nFogType, object oArea=OBJECT_INVALID) // Sets the fog amount in the area specified. // nFogType = FOG_TYPE_* specifies wether the Sun, Moon, or both fog types are set. // nFogAmount = specifies the density that the fog is being set to. // If no valid area (or object) is specified, it uses the area of caller. // If an object other than an area is specified, will use the area that the object is currently in. void SetFogAmount(int nFogType, int nFogAmount, object oArea=OBJECT_INVALID) // Sets the fog color in the area specified. // nFogType = FOG_TYPE_* specifies wether the Sun, Moon, or both fog types are set. // nFogColor = FOG_COLOR_* specifies the color the fog is being set to. // The fog color can also be represented as a hex RGB number if specific color shades // are desired. // The format of a hex specified color would be 0xFFEEDD where // FF would represent the amount of red in the color // EE would represent the amount of green in the color // DD would represent the amount of blue in the color. // If no valid area (or object) is specified, it uses the area of caller. // If an object other than an area is specified, will use the area that the object is currently in. void SetFogColor(int nFogType, int nFogColor, object oArea=OBJECT_INVALID) // Changes the sky that is displayed in the specified area. // nSkyBox = SKYBOX_* constants (associated with skyboxes.2da) // If no valid area (or object) is specified, it uses the area of caller. // If an object other than an area is specified, will use the area that the object is currently in. void SetSkyBox(int nSkyBox, object oArea=OBJECT_INVALID) |
Neverwinter Script Source |
void main() { object oPC = GetEnteringObject(); object oNPC1 = GetObjectByTag("barmen"); object oWP = GetObjectByTag ("WP_PC_1"); //============================================================================== if (!GetIsPC(oPC) || GetLocalInt(OBJECT_SELF, "TRIGGER") == 1) return; { SetLocalInt(OBJECT_SELF, "TRIGGER", 1); SetCutsceneMode(oPC, TRUE); AssignCommand(oNPC1, ClearAllActions()); AssignCommand(oPC, ClearAllActions()); ActionDoCommand(AssignCommand(oPC, ActionMoveToObject(oWP))); ActionDoCommand(AssignCommand(oPC, SetCameraFacing(280.0,20.0, 90.0, CAMERA_TRANSITION_TYPE_MEDIUM))); ActionWait(2.0); ActionDoCommand(AssignCommand(oNPC1, ActionMoveToObject(oPC))); ActionDoCommand(AssignCommand(oNPC1, ActionPlayAnimation (ANIMATION_FIREFORGET_SALUTE, 1.0, 3.0))); ActionDoCommand(AssignCommand(oNPC1, ActionDoCommand(PlayVoiceChat (VOICE_CHAT_HELLO)))); ActionDoCommand(AssignCommand(oNPC1, ActionSpeakString("ÏÐÈÂÅÒ"))); ActionDoCommand(AssignCommand(oPC, SetCutsceneMode(oPC, FALSE))); ActionDoCommand(AssignCommand(oNPC1, ActionStartConversation(oPC))); } } |
Neverwinter Script Source |
ActionDoCommand(AssignCommand(oNPC1, ActionSpeakString(""))); ActionDoCommand(AssignCommand(oNPC1, ActionStartConversation(oPC))); ActionDoCommand(AssignCommand(oNPC1, ActionDoCommand(SetCutsceneMode(oPC, FALSE)))); |
QUOTE (-fenix- @ Jun 26 2005, 18:40) |
ActionDoCommand(AssignCommand(oPC, SetCutsceneMode(oPC, FALSE))); |
Neverwinter Script Source |
ActionDoCommand(AssignCommand(oPC, ActionMoveToObject(oWP))); --------------- ActionWait(2.0); --------------- ActionDoCommand(AssignCommand(oPC, SetCutsceneMode(oPC, FALSE))); |
Neverwinter Script Source |
ActionDoCommand(AssignCommand(oNPC1, ActionStartConversation(oPC))); ActionDoCommand(AssignCommand(oNPC1, ActionDoCommand(SetCutsceneMode(oPC, FALSE)))); |
QUOTE |
Ясно? |
Neverwinter Script Source |
void RemovePolymorth(object oPC) { // Посмотреть первый эффект effect eEffect = GetFirstEffect(oPC); while (GetIsEffectValid(eEffect)) { // Если есть эффект полиморфа на игроке, то продолжить if (GetEffectType(eEffect) == EFFECT_TYPE_POLYMORPH) { // Удалить эффект полиморфа с игрока RemoveEffect(oPC, eEffect); ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), oPC); ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(GetMaxHitPoints(oPC)), oPC); break; } // Посмотреть следующий эффект eEffect = GetNextEffect(oPC); } object oSkin = GetItemInSlot(INVENTORY_SLOT_CARMOUR, oPC); // Если есть объект невидимой брони, удалить if (GetIsObjectValid(oSkin)) { DestroyObject(oSkin); } } |
Neverwinter Script Source |
if (GetIsDM(oPC) || GetIsDMPossessed(oPC) || !GetIsPC(oPC)) return; // Start script - Выпадение из рук оружия, если его решили сменить в бою object oWeaponR = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC); object oWeaponL = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oPC); effect eAttack = EffectAttackDecrease(15); int nUsedOther; string sMessage = "Вы пытаетесь быстро выхватить новое оружие в бою, но все равно мешкаете немного!"; if (GetIsObjectValid(oWeaponR) && GetIsObjectValid(oWeaponL)) { if ((GetLocalInt(oWeaponR,"WeaponR") != 1) || (GetLocalInt(oWeaponL,"WeaponL") != 1)) { object oItem = GetFirstItemInInventory(oPC); while (GetIsObjectValid(oItem)) { if (GetLocalInt(oItem,"WeaponR") == 1) || (GetLocalInt(oItem,"WeaponL") == 1)) { nUsedOther = 1; DeleteLocalInt(oItem, "WeaponR"); DeleteLocalInt(oItem, "WeaponL"); break; } oItem = GetNextItemInInventory(oPC); } if (nUsedOther == 1) { nUsedOther = 0; SendMessageToPC(oPC, sMessage); AssignCommand(oPC, ClearAllActions(TRUE)); AssignCommand(oPC, ActionUnequipItem(oWeaponR)); AssignCommand(oPC, ActionUnequipItem(oWeaponL)); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAttack, oPC, 60.0f); } else { SetLocalInt(oWeaponR, "WeaponR", 1); SetLocalInt(oWeaponL, "WeaponL", 1); DelayCommand(7.0, DeleteLocalInt(oWeaponR, "WeaponR")); DelayCommand(7.0, DeleteLocalInt(oWeaponL, "WeaponL")); } } } else if (GetIsObjectValid(oWeaponR)) { if (GetLocalInt(oWeaponR,"WeaponR") != 1) { object oItem = GetFirstItemInInventory(oPC); while (GetIsObjectValid(oItem)) { if (GetLocalInt(oItem,"WeaponR") == 1) { nUsedOther = 1; DeleteLocalInt(oItem, "WeaponR"); break; } oItem = GetNextItemInInventory(oPC); } if (nUsedOther == 1) { nUsedOther = 0; SendMessageToPC(oPC, sMessage); AssignCommand(oPC, ClearAllActions(TRUE)); AssignCommand(oPC, ActionUnequipItem(oWeaponR)); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAttack, oPC, 60.0f); } else { SetLocalInt(oWeaponR, "WeaponR", 1); DelayCommand(7.0, DeleteLocalInt(oWeaponR, "WeaponR")); } } } else if (GetIsObjectValid(oWeaponL)) { if (GetLocalInt(oWeaponL,"WeaponL") != 1) { object oItem = GetFirstItemInInventory(oPC); while (GetIsObjectValid(oItem)) { if (GetLocalInt(oItem,"WeaponL") == 1) { nUsedOther = 1; DeleteLocalInt(oItem, "WeaponL"); break; } oItem = GetNextItemInInventory(oPC); } if (nUsedOther == 1) { nUsedOther = 0; SendMessageToPC(oPC, sMessage); AssignCommand(oPC, ClearAllActions(TRUE)); AssignCommand(oPC, ActionUnequipItem(oWeaponL)); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAttack, oPC, 60.0f); } else { SetLocalInt(oWeaponL, "WeaponL", 1); DelayCommand(7.0, DeleteLocalInt(oWeaponL, "WeaponL")); } } } // End script - Выпадение из рук оружия, если его решили сменить в бою |
QUOTE (Zirrex @ Jun 30 2005, 11:36) |
Извините, закинул не туда вопросы, размещаю тут. |
Neverwinter Script Source |
TouchAttackMelee |
Neverwinter Script Source |
TouchAttackRanged |
Neverwinter Script Source |
GetAttemptedAttackTarget() |