![]() |
Здравствуйте, гость ( Вход | Регистрация )
![]() ![]() |
![]() |
![]()
Сообщение
#3451
|
|
Level 5 ![]() ![]() Класс: Вор Характер: Neutral Good Раса: Человек ![]() |
x0_i0_walkway - это просто ад и яркий пример того, как делать нельзя (IMG:style_emoticons/kolobok_light/smile.gif) Там функция запускается из спавна, хертбита и хз чего ещё, а потом ещё рекурсивно вызывает сама себя каждую секунду. http://www.city-of-masters.ru/forums/index...?showtopic=5123 По теме: хертбит как раз самый простой и изящный вариант, именно для этого он и предназначен, иначе задолбаешься отслеживать все моменты прерывания непися. Чтобы не было тормозов, предусмотрены 2 вещи. Во-первых, при отсутствии игроков рядом аи выключается. Т.е. скрипты запускаются и сразу выходят на первой строке. Но всякие события всё равно триггерят (те же бесконечные проверки игроков рядом), т.е. выключение аи как бы помогает, но меньше, чем хотелось бы. Во-вторых, если заморочиться, вместо выключения можно написать деспавн. Я так делал для стражи на шарде. Все остальные неписи были без скриптов, стража - полностью боевая и с точками ходьбы. При выходе игроков из локации стража удалялась, заменяясь простыми вейпоинтами, а при входе - ставилась заново. Если это сингл, но проще запихнуть в хб и не трахать мозги (IMG:style_emoticons/kolobok_light/smile.gif) Один голый скрипт игру не повесит. Стоп,стоп! Так че нужно x2_i0_walkways гнать в шею?? И еще - Кто нибудь подскажет мне скрипт хождений - открываний?!?! Сообщение отредактировал ReZkiy - Sep 11 2011, 14:23 |
![]()
Сообщение
#3452
|
|
Level 7 ![]() ![]() Класс: Некромант Характер: True Neutral Раса: Нежить ![]() |
Стоп,стоп! Так че нужно x2_i0_walkways гнать в шею?? Повторюсь, можно посмотреть, как оно сделано. denis0k напомнил, почему это на самом деле плохо. И еще - Кто нибудь подскажет мне скрипт хождений - открываний?!?! Тебе подсказали, с помощью чего это всё можно сделать - смотри посты WirTus, denis0k и gennady, а если что-то не будет получаться, то обращайся. |
![]()
Сообщение
#3453
|
|
Level 5 ![]() Класс: Обыватель Характер: Lawful Neutral Раса: Человек NWN: Модмейкер Проклятие Левора Порядок Времени ![]() |
....... Neverwinter Script vPos = GetPosition(oNPC); AssignCommand(oNPC, ActionJumpToLocation(Location(GetArea(oNPC), vPos, 360-GetFacing(oCont1)))); //Поворачиваем NPC к сундуку это что за адский ад? Neverwinter Script AssignCommand(oNPC, ActionDoCommand(TurnToFaceObject(oNPC),oCont1)); и никакой далее написанной и надуманной проблемы нет. и далее ActionUnlockObject() явно не в тему. Это отпирать объект. А открывать - немного другая функция. (ActionOpenObject) Цитата Если нужно заставить NPC вечно ходить открывать-закрывать сундуки, то первое, что пришло в голову: OnSpawn непися дописывается/ставится скрипт, заставляющий идти к первому сундуку и открыть его. На OnOpen сундука идет проверка, кто открыл, и если это нужный нам непись, то заставляем открывшего закрыть и пойти к другому сундуку, на котором повторяется то же, но учитывая, что сундук другой. Я сразу вспомнил "Утро Эдвина" (мб помнит кто из старых). Написан он был на примерно схожем принципе, но это все очень криво на самом деле и громоздко. Вариант с ХБ/ЮД, если не писать там фигню - нормальный и стоит думать именно в этом направлении. ReZkiy, в древней статье я рассматривал вариант оживления НПС, там многие моменты учтены, до которых ты пока не дошел, но скорее всего дойдешь, если продолжишь в этом направлении копать http://nwnmod.narod.ru/stat_anim_npc2.htm |
![]()
Сообщение
#3454
|
|
Level 5 ![]() ![]() Класс: Вор Характер: Neutral Good Раса: Человек ![]() |
это что за адский ад? Neverwinter Script AssignCommand(oNPC, ActionDoCommand(TurnToFaceObject(oNPC),oCont1)); и никакой далее написанной и надуманной проблемы нет. и далее ActionUnlockObject() явно не в тему. Это отпирать объект. А открывать - немного другая функция. (ActionOpenObject) Я сразу вспомнил "Утро Эдвина" (мб помнит кто из старых). Написан он был на примерно схожем принципе, но это все очень криво на самом деле и громоздко. Вариант с ХБ/ЮД, если не писать там фигню - нормальный и стоит думать именно в этом направлении. ReZkiy, в древней статье я рассматривал вариант оживления НПС, там многие моменты учтены, до которых ты пока не дошел, но скорее всего дойдешь, если продолжишь в этом направлении копать http://nwnmod.narod.ru/stat_anim_npc2.htm Спасибо.Посмотри пожалуйста мой вопрос о хаках |
![]()
Сообщение
#3455
|
|
Level 5 ![]() ![]() Класс: Убийца Характер: Lawful Evil Раса: Человек ![]() |
Пишу же, я нуб и позорюсь (IMG:style_emoticons/kolobok_light/unknw.gif) Спасибо за корректировки, пригодится, хех.
О хаках ответ есть, надеюсь, он не настолько крив, как тут (IMG:style_emoticons/kolobok_light/smile.gif) Сообщение отредактировал wirTUS - Sep 12 2011, 15:53 |
![]()
Сообщение
#3456
|
|
Level 5 ![]() ![]() Класс: Паладин Характер: Chaotic Good Раса: Человек ![]() |
Дайте пожалуйста скрипт на спавн, а то я в этом не смог разобраться (IMG:style_emoticons/kolobok_light/snoozer_17.gif)
Сообщение отредактировал Ollone5 - Sep 13 2011, 11:44 |
![]()
Сообщение
#3457
|
|
Level 17 ![]() Класс: Волшебник Характер: Neutral Good Раса: Человек NWN: Скриптинг [PW] Axistown SR 1.9 NWNX ![]() |
Если просто спаунер, то http://www.lrjonline.net/swg/ness.html
|
![]()
Сообщение
#3458
|
|
Level 6 ![]() ![]() Класс: Маг Характер: Lawful Evil Раса: Нежить ![]() |
wirTUS, возвращаясь к твоему коду сообщения #3436, а конкретно, по конструкции вида:
Neverwinter Script while(i<1) //1 - количество проходов NPC по маршруту //[позиция NPC] - первый сундук - второй сундук, { ++i; //закомментировать строчку выше - плохая идея, ибо при попытке использования бесконечного цикла //nwn благополучно зависает /* Код */ } Как мне кажется, это довольно опасное решение. Nwn зависает не при попытке использования бесконечного цикла (на самом деле он их позволяет), а на обработке действий, которые в таком случае игре приходится выполнить. В коде идут действия, помещающиеся в стек персонажей. Стек ограничен, а таким образом ты пытаешься бесконечно, с невероятной скоростью забивать в него все, что у тебя в коде. Твое решение фиксирует количество проходов, но они по-прежнему выдаются единомоментно. Лимит стека - семьдесят пять, насколько я помню, действий. Цикл примера выдает по пять действия за раз, т.е. если i переходит за 15-16 - тут уже все туманно, сам понимаешь. Реализуя скрипт на OnEnter триггера, как ты, я бы наверное, забил код в функцию и выполнял ее по делею, или даже попытался бы отследить выполнение текущей итерации (допустим, произвел ли NPC действие над сундуком, который условно принимается за конечную точку, находится ли он в условно конечной позиции и так далее). Теоретически нагрузка на игру тогда действительно будет меньше, чем с помощью HB, но вряд ли даст ощутимый результат. Сообщение отредактировал Talarasha - Sep 13 2011, 12:46 |
![]()
Сообщение
#3459
|
|
Level 5 ![]() ![]() Класс: Паладин Характер: Chaotic Good Раса: Человек ![]() |
|
![]()
Сообщение
#3460
|
|
Level 5 ![]() ![]() Класс: Вор Характер: Neutral Good Раса: Человек ![]() |
Люди! Дайте скрипт вот для OnClientInter:
Дает предмет по классу или расе: Полурослику - штаны с кинжалом; Эльфу - лук и стрелы с каким нибудь эльфийским доспехом и т.п; Или так: воину меч, друиду посох и т.п Кто нибудь знает такое? |
![]()
Сообщение
#3461
|
|
Level 5 ![]() ![]() Класс: Убийца Характер: Lawful Evil Раса: Человек ![]() |
|
![]()
Сообщение
#3462
|
|
Level 5 ![]() ![]() Класс: Вор Характер: Neutral Good Раса: Человек ![]() |
Здесь такого нет. Или есть но не то. |
![]()
Сообщение
#3463
|
|
Level 5 ![]() ![]() Класс: Убийца Характер: Lawful Evil Раса: Человек ![]() |
Цитата Здесь такого нет. Или есть но не то. Цитата Люди! Дайте скрипт вот для OnClientInter: Дает предмет по классу или расе Цитата Начем. Самое главное, это начало модуля. Тут все написано, как раздеть игрока, одеть, дать ему денег и отправить дальше. Ставится он на слот модуля OnClientEnter.
|
![]()
Сообщение
#3464
|
|
Level 5 ![]() ![]() Класс: Вор Характер: Neutral Good Раса: Человек ![]() |
wirTUS, так как в 2да урук-хаев,лошадей и разные дополнения к одежде добавить?
|
![]()
Сообщение
#3465
|
|
Level 5 ![]() ![]() Класс: Паладин Характер: Chaotic Good Раса: Человек ![]() |
Цитата дополнения к одежде добавить? так как в 2да урук-хаев,лошадей и разные Проще скачать хак. |
![]()
Сообщение
#3466
|
|
Level 5 ![]() ![]() Класс: Вор Характер: Neutral Good Раса: Человек ![]() |
Цитата Проще скачать хак. Ага. Знаешь как все виснет? И где мне его найти? Один есть - не работает. |
![]()
Сообщение
#3467
|
|
Level 5 ![]() ![]() Класс: Убийца Характер: Lawful Evil Раса: Человек ![]() |
Цитата wirTUS, так как в 2да урук-хаев,лошадей и разные дополнения к одежде добавить? Легко. Заполняешь appearance.2da строчками, состоящими из "****" на каждый столбец вплоть до 750 строки. Далее: Урук-хаев: дописываешь туда же "751 Uruk-Hai", далее звездочками Лошадей: так же, но вместо Uruk-Hai пишешь Horse и вместо 751, предположим, 752 Дополнения к одежде: берешь parts_[название нужной части].2da, смотришь на этот 2да Safe2DALines.txt, прописываешь все звездочками до строки, значащейся в оном текстовике, далее аналогично урук-хаям и лошадям: дописываешь [id] part100500, далее звездочками. А еще через 2da можно корованы грабить: создаешь 2да под названием rob_cowtrain.2da, прописываешь в него такие столбцы: Id - так же, как и везде Name1 - ресреф возницы корована Name2 - ресреф первого охранника Name3 - ресреф второго охранника RoberT - тип грабителя - E - ельф, Z - злодей RName1 - ресреф главного грабителя RName2 - ресреф первого неглавного грабителя RName3 - ресреф второго неглавного грабителя CApp1 - Id из appearence.2da, отвечающий за внешний вид первого существа, тянущего корован CApp2 - Id из appearence.2da, отвечающий за внешний вид второго существа, тянущего корован CApp3 - Id из appearence.2da, отвечающий за внешний вид третьего существа, тянущего корован CApp4 - Id из appearence.2da, отвечающий за внешний вид четвертого существа, тянущего корован Затем запихиваешь этот 2да в хак. В палитре появится триггер COWTRAINROB, ставишь его куда тебе надо и наслаждаешься ограблением корована, написанного тобой в 2да. Цитата И где мне его найти? ваулт. А лошадей можно поставить биоваревских, поставив патч 1.69
Сообщение отредактировал wirTUS - Sep 19 2011, 15:35 |
![]()
Сообщение
#3468
|
|
Level 5 ![]() ![]() Класс: Вор Характер: Neutral Good Раса: Человек ![]() |
Цитата вместо 751, предположим, 751 (IMG:style_emoticons/kolobok_light/scratch_one-s_head.gif) Это как понять? |
![]()
Сообщение
#3469
|
|
Level 5 ![]() ![]() Класс: Убийца Характер: Lawful Evil Раса: Человек ![]() |
*исправил*
|
![]() ![]()
Сообщение
#3470
|
|
Level 5 ![]() ![]() Класс: Паладин Характер: Chaotic Good Раса: Человек ![]() |
ReZkiy, а другие вещи и расы мира LOTR тебя интересуют?
(оружие, броня, ортханк) (IMG:http://vnmedia.ign.com/nwvault.ign.com/fms/images/hakpaks/2824/1114980850_thumb.jpg) (IMG:http://vnmedia.ign.com/nwvault.ign.com/fms/images/hakpaks/6322/1130015972_thumb.jpg) (IMG:http://vnmedia.ign.com/nwvault.ign.com/fms/images/hakpaks/2231/1114980529_thumb.jpg) (IMG:http://vnmedia.ign.com/nwvault.ign.com/fms/images/hakpaks/4020/1114981398_thumb.jpg) (IMG:http://vnmedia.ign.com/nwvault.ign.com/fms/images/hakpaks/3584/1114981188_thumb.jpg) Сообщение отредактировал Ollone5 - Sep 19 2011, 21:33 |
![]()
Сообщение
#3471
|
|
Level 5 ![]() ![]() Класс: Паладин Характер: Chaotic Good Раса: Человек ![]() |
Я нашёл эти скрипты (IMG:style_emoticons/kolobok_light/yu.gif) , пожалуйста скажите для чего они нужны? Куда ставятся (IMG:style_emoticons/kolobok_light/dance.gif) ? И напишите комментарии к ним. (IMG:style_emoticons/kolobok_light/king.gif)
пожалуйста (IMG:style_emoticons/kolobok_light/pilot.gif) Neverwinter Script //::////////////////////////////////////////////////// //:: NW_C2_DEFAULT9 /* * Default OnSpawn handler with XP1 revisions. * This corresponds to and produces the same results * as the default OnSpawn handler in the OC. * * This can be used to customize creature behavior in three main ways: * * - Uncomment the existing lines of code to activate certain * common desired behaviors from the moment when the creature * spawns in. * * - Uncomment the user-defined event signals to cause the * creature to fire events that you can then handle with * a custom OnUserDefined event handler script. * * - Add new code _at the end_ to alter the initial * behavior in a more customized way. */ //::////////////////////////////////////////////////// //:: Copyright © 2002 Floodgate Entertainment //:: Created By: Naomi Novik //:: Created On: 12/11/2002 //::////////////////////////////////////////////////// #include "x0_i0_anims" // #include "x0_i0_walkway" - in x0_i0_anims #include "x0_i0_treasure" void main() { // ***** Spawn-In Conditions ***** // // * REMOVE COMMENTS (// ) before the "Set..." functions to activate // * them. Do NOT touch lines commented out with // *, those are // * real comments for information. // * This causes the creature to say a one-line greeting in their // * conversation file upon perceiving the player. Put [NW_D2_GenCheck] // * in the "Text Seen When" field of the greeting in the conversation // * file. Don't attach any player responses. // * // SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); // * Same as above, but for hostile creatures to make them say // * a line before attacking. // * // SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERS ATION); // * This NPC will attack when its allies call for help // * // SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET ); // * If the NPC has the Hide skill they will go into stealth mode // * while doing WalkWayPoints(). // * // SetSpawnInCondition(NW_FLAG_STEALTH); // * Same, but for Search mode // * // SetSpawnInCondition(NW_FLAG_SEARCH); // * This will set the NPC to give a warning to non-enemies // * before attacking. // * NN -- no clue what this really does yet // * // SetSpawnInCondition(NW_FLAG_SET_WARNINGS); // * Separate the NPC's waypoints into day & night. // * See comment on WalkWayPoints() for use. // * // SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); // * If this is set, the NPC will appear using the "EffectAppear" // * animation instead of fading in, *IF* SetListeningPatterns() // * is called below. // * // SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMAT ION); // * This will cause an NPC to use common animations it possesses, // * and use social ones to any other nearby friendly NPCs. // * // SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMA TIONS); // * Same as above, except NPC will wander randomly around the // * area. // * // SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); // **** Animation Conditions **** // // * These are extra conditions you can put on creatures with ambient // * animations. // * Civilized creatures interact with placeables in // * their area that have the tag "NW_INTERACTIVE" // * and "talk" to each other. // * // * Humanoid races are civilized by default, so only // * set this flag for monster races that you want to // * behave the same way. // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); // * If this flag is set, this creature will constantly // * be acting. Otherwise, creatures will only start // * performing their ambient animations when they // * first perceive a player, and they will stop when // * the player moves away. // SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); // * Civilized creatures with this flag set will // * randomly use a few voicechats. It's a good // * idea to avoid putting this on multiple // * creatures using the same voiceset. // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); // * Creatures with _immobile_ ambient animations // * can have this flag set to make them mobile in a // * close range. They will never leave their immediate // * area, but will move around in it, frequently // * returning to their starting point. // * // * Note that creatures spawned inside interior areas // * that contain a waypoint with one of the tags // * "NW_HOME", "NW_TAVERN", "NW_SHOP" will automatically // * have this condition set. // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE _RANGE); // **** Special Combat Tactics *****// // * These are special flags that can be set on creatures to // * make them follow certain specialized combat tactics. // * NOTE: ONLY ONE OF THESE SHOULD BE SET ON A SINGLE CREATURE. // * Ranged attacker // * Will attempt to stay at ranged distance from their // * target. // SetCombatCondition(X0_COMBAT_FLAG_RANGED); // * Defensive attacker // * Will use defensive combat feats and parry // SetCombatCondition(X0_COMBAT_FLAG_DEFENSIVE); // * Ambusher // * Will go stealthy/invisible and attack, then // * run away and try to go stealthy again before // * attacking anew. // SetCombatCondition(X0_COMBAT_FLAG_AMBUSHER); // * Cowardly // * Cowardly creatures will attempt to flee // * attackers. // SetCombatCondition(X0_COMBAT_FLAG_COWARDLY); // **** Escape Commands ***** // // * NOTE: ONLY ONE OF THE FOLLOWING SHOULD EVER BE SET AT ONE TIME. // * NOTE2: Not clear that these actually work. -- NN // * Flee to a way point and return a short time later. // * // SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // * Flee to a way point and do not return. // * // SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // * Teleport to safety and do not return. // * // SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // * Teleport to safety and return a short time later. // * // SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // ***** CUSTOM USER DEFINED EVENTS ***** / /* If you uncomment any of these conditions, the creature will fire a specific user-defined event number on each event. That will then allow you to write custom code in the "OnUserDefinedEvent" handler script to go on top of the default NPC behaviors for that event. Example: I want to add some custom behavior to my NPC when they are damaged. I uncomment the "NW_FLAG_DAMAGED_EVENT", then create a new user-defined script that has something like this in it: if (GetUserDefinedEventNumber() == 1006) { // Custom code for my NPC to execute when it's damaged } These user-defined events are in the range 1001-1007. */ // * Fire User Defined Event 1001 in the OnHeartbeat // * // SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); // * Fire User Defined Event 1002 // * // SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); // * Fire User Defined Event 1005 // * // SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); // * Fire User Defined Event 1006 // * // SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); // * Fire User Defined Event 1008 // * // SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); // * Fire User Defined Event 1003 // * // SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT ); // * Fire User Defined Event 1004 // * // SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); // ***** DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) ***** // // * Goes through and sets up which shouts the NPC will listen to. // * SetListeningPatterns(); // * Walk among a set of waypoints. // * 1. Find waypoints with the tag "WP_" + NPC TAG + "_##" and walk // * among them in order. // * 2. If the tag of the Way Point is "POST_" + NPC TAG, stay there // * and return to it after combat. // // * Optional Parameters: // * void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) // // * If "NW_FLAG_DAY_NIGHT_POSTING" is set above, you can also // * create waypoints with the tags "WN_" + NPC Tag + "_##" // * and those will be walked at night. (The standard waypoints // * will be walked during the day.) // * The night "posting" waypoint tag is simply "NIGHT_" + NPC tag. WalkWayPoints(); //* Create a small amount of treasure on the creature CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); // ***** ADD ANY SPECIAL ON-SPAWN CODE HERE ***** // ExecuteScript("zombie_feed", OBJECT_SELF); } Neverwinter Script //::////////////////////////////////////////////////// //:: NW_C2_DEFAULT9 /* * Default OnSpawn handler with XP1 revisions. * This corresponds to and produces the same results * as the default OnSpawn handler in the OC. * * This can be used to customize creature behavior in three main ways: * * - Uncomment the existing lines of code to activate certain * common desired behaviors from the moment when the creature * spawns in. * * - Uncomment the user-defined event signals to cause the * creature to fire events that you can then handle with * a custom OnUserDefined event handler script. * * - Add new code _at the end_ to alter the initial * behavior in a more customized way. */ //::////////////////////////////////////////////////// //:: Copyright © 2002 Floodgate Entertainment //:: Created By: Naomi Novik //:: Created On: 12/11/2002 //::////////////////////////////////////////////////// #include "x0_i0_anims" // #include "x0_i0_walkway" - in x0_i0_anims #include "x0_i0_treasure" void main() { // ***** Spawn-In Conditions ***** // // * REMOVE COMMENTS (// ) before the "Set..." functions to activate // * them. Do NOT touch lines commented out with // *, those are // * real comments for information. // * This causes the creature to say a one-line greeting in their // * conversation file upon perceiving the player. Put [NW_D2_GenCheck] // * in the "Text Seen When" field of the greeting in the conversation // * file. Don't attach any player responses. // * // SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); // * Same as above, but for hostile creatures to make them say // * a line before attacking. // * // SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERS ATION); // * This NPC will attack when its allies call for help // * // SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET ); // * If the NPC has the Hide skill they will go into stealth mode // * while doing WalkWayPoints(). // * // SetSpawnInCondition(NW_FLAG_STEALTH); // * Same, but for Search mode // * // SetSpawnInCondition(NW_FLAG_SEARCH); // * This will set the NPC to give a warning to non-enemies // * before attacking. // * NN -- no clue what this really does yet // * // SetSpawnInCondition(NW_FLAG_SET_WARNINGS); // * Separate the NPC's waypoints into day & night. // * See comment on WalkWayPoints() for use. // * // SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); // * If this is set, the NPC will appear using the "EffectAppear" // * animation instead of fading in, *IF* SetListeningPatterns() // * is called below. // * // SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMAT ION); // * This will cause an NPC to use common animations it possesses, // * and use social ones to any other nearby friendly NPCs. // * // SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMA TIONS); // * Same as above, except NPC will wander randomly around the // * area. // * // SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); // **** Animation Conditions **** // // * These are extra conditions you can put on creatures with ambient // * animations. // * Civilized creatures interact with placeables in // * their area that have the tag "NW_INTERACTIVE" // * and "talk" to each other. // * // * Humanoid races are civilized by default, so only // * set this flag for monster races that you want to // * behave the same way. // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); // * If this flag is set, this creature will constantly // * be acting. Otherwise, creatures will only start // * performing their ambient animations when they // * first perceive a player, and they will stop when // * the player moves away. // SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); // * Civilized creatures with this flag set will // * randomly use a few voicechats. It's a good // * idea to avoid putting this on multiple // * creatures using the same voiceset. // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); // * Creatures with _immobile_ ambient animations // * can have this flag set to make them mobile in a // * close range. They will never leave their immediate // * area, but will move around in it, frequently // * returning to their starting point. // * // * Note that creatures spawned inside interior areas // * that contain a waypoint with one of the tags // * "NW_HOME", "NW_TAVERN", "NW_SHOP" will automatically // * have this condition set. // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE _RANGE); // **** Special Combat Tactics *****// // * These are special flags that can be set on creatures to // * make them follow certain specialized combat tactics. // * NOTE: ONLY ONE OF THESE SHOULD BE SET ON A SINGLE CREATURE. // * Ranged attacker // * Will attempt to stay at ranged distance from their // * target. // SetCombatCondition(X0_COMBAT_FLAG_RANGED); // * Defensive attacker // * Will use defensive combat feats and parry // SetCombatCondition(X0_COMBAT_FLAG_DEFENSIVE); // * Ambusher // * Will go stealthy/invisible and attack, then // * run away and try to go stealthy again before // * attacking anew. // SetCombatCondition(X0_COMBAT_FLAG_AMBUSHER); // * Cowardly // * Cowardly creatures will attempt to flee // * attackers. // SetCombatCondition(X0_COMBAT_FLAG_COWARDLY); // **** Escape Commands ***** // // * NOTE: ONLY ONE OF THE FOLLOWING SHOULD EVER BE SET AT ONE TIME. // * NOTE2: Not clear that these actually work. -- NN // * Flee to a way point and return a short time later. // * // SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // * Flee to a way point and do not return. // * // SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // * Teleport to safety and do not return. // * // SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // * Teleport to safety and return a short time later. // * // SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // ***** CUSTOM USER DEFINED EVENTS ***** / /* If you uncomment any of these conditions, the creature will fire a specific user-defined event number on each event. That will then allow you to write custom code in the "OnUserDefinedEvent" handler script to go on top of the default NPC behaviors for that event. Example: I want to add some custom behavior to my NPC when they are damaged. I uncomment the "NW_FLAG_DAMAGED_EVENT", then create a new user-defined script that has something like this in it: if (GetUserDefinedEventNumber() == 1006) { // Custom code for my NPC to execute when it's damaged } These user-defined events are in the range 1001-1007. */ // * Fire User Defined Event 1001 in the OnHeartbeat // * // SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); // * Fire User Defined Event 1002 // * // SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); // * Fire User Defined Event 1005 // * // SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); // * Fire User Defined Event 1006 // * // SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); // * Fire User Defined Event 1008 // * // SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); // * Fire User Defined Event 1003 // * // SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT ); // * Fire User Defined Event 1004 // * // SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); // ***** DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) ***** // // * Goes through and sets up which shouts the NPC will listen to. // * SetListeningPatterns(); // * Walk among a set of waypoints. // * 1. Find waypoints with the tag "WP_" + NPC TAG + "_##" and walk // * among them in order. // * 2. If the tag of the Way Point is "POST_" + NPC TAG, stay there // * and return to it after combat. // // * Optional Parameters: // * void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) // // * If "NW_FLAG_DAY_NIGHT_POSTING" is set above, you can also // * create waypoints with the tags "WN_" + NPC Tag + "_##" // * and those will be walked at night. (The standard waypoints // * will be walked during the day.) // * The night "posting" waypoint tag is simply "NIGHT_" + NPC tag. WalkWayPoints(); //* Create a small amount of treasure on the creature CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); // ***** ADD ANY SPECIAL ON-SPAWN CODE HERE ***** // ExecuteScript("zombie_feed", OBJECT_SELF); } Neverwinter Script //:://///////////////////////////////////////////////// //:: ZombieOnDeath - Modified X0_C2_DTH_LOOTDC //:: OnDeath handler. //:: Leave a lootable corpse that will decay after a //:: short delay. Modified for zombie feed script. //:: //:: Copyright © 2002 Floodgate Entertainment //:: Created By: Naomi Novik //:: Modified by: Lupin-III (lupin_3rd@hotmail.com) //:://///////////////////////////////////////////////// #include "nw_i0_generic" #include "x0_i0_corpses" void main() { SetLocalInt(OBJECT_SELF, "deceased", 1); SpeakString("NW_I_AM_DEAD", TALKVOLUME_SILENT_TALK); //Shout Attack my target, only works with the On Spawn In setup SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK); if(GetSpawnInCondition(NW_FLAG_DEATH_EVENT)) { SignalEvent(OBJECT_SELF, EventUserDefined(1007)); } // Leave a lootable corpse that will decay after a brief wait KillAndReplaceLootable(OBJECT_SELF, TRUE, TRUE); } Neverwinter Script //:://///////////////////////////////////////////// //:: Zombies feed! 1.2 zombie_feed.nss //:: by Lupin III //:: lupin_3rd@hotmail.com //::////////////////////////////////////////////// /* Zombies will move over to the nearest corpse and start diggin' in. This version requires Shadows of Undrentide. To use place the following line in the OnSpawn script of a creature before the final } ExecuteScript("zombie_feed", OBJECT_SELF); */ //::////////////////////////////////////////////// #include "x0_i0_corpses" void main () { int nRandom = d20(1); object oZombieFood = GetNearestCorpse(); location llocation = GetLocation(GetNearestCorpse()); effect eRegen = EffectRegenerate(1, 4.0); effect eZombieFeed = EffectVisualEffect(VFX_COM_CHUNK_RED_SMALL); if (oZombieFood == OBJECT_INVALID) { switch (d6()) { case 1: ActionWait(5.0); if (nRandom<=14){PlaySound("c_zombtyr_bat1");} break; case 2: if (nRandom<=14){PlaySound("c_zombwar_bat1");} SpeakString("..the.. hunger..."); //comment this line if you don't want random zombie one liners ActionWait(6.0); break; case 3: ActionWait(4.0); if (nRandom<=14){PlaySound("c_zombie_atk1");} SpeakString("...need flesh"); //comment this line if you don't want random zombie one liners ActionWait(2.0); break; case 4: if (nRandom<=14){PlaySound("c_zombie_atk2");} ActionWait(10.0); break; case 5: ActionWait(8.0); if (nRandom<=14){PlaySound("c_zombie_atk3");} break; case 6: ActionWait(1.0); if (nRandom<=14){PlaySound("c_zombie_slct");} ActionWait(2.0); SpeakString("unghh.."); //comment this line if you don't want random zombie one liners break; } ActionRandomWalk(); DelayCommand(19.5, ClearAllActions()); if (nRandom<=10){DelayCommand(20.0, ExecuteScript("zombie_feed", OBJECT_SELF));} if (nRandom>=11){DelayCommand(25.0, ExecuteScript("zombie_feed", OBJECT_SELF));} } else if(GetIsDead(OBJECT_SELF) == FALSE) { ActionForceMoveToObject(oZombieFood, FALSE, 1.0f, 30.0f); SetFacingPoint(GetPosition(oZombieFood)); if (nRandom==2) {DelayCommand(15.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eZombieFeed, oZombieFood, 1.0));} //comment this line if you don't like the visual effects if (nRandom==6) {DelayCommand(10.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eZombieFeed, oZombieFood, 1.0));} //comment this line if you don't like the visual effects if (nRandom<=13){ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW, 1.0,19.0f);} if (nRandom<=13){ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRegen, OBJECT_SELF, 16.0);} if (nRandom>=18){ActionRandomWalk();} switch (d6()) { case 1: ActionWait(5.0); if (nRandom<=14){PlaySound("c_zombtyr_bat1");} break; case 2: if (nRandom<=14){PlaySound("c_zombwar_bat1");} SpeakString("..braaiinss.."); //comment this line if you don't want random zombie one liners ActionWait(6.0); break; case 3: ActionWait(4.0); if (nRandom<=14){PlaySound("c_zombie_atk1");} SpeakString("..fleesshh"); //comment this line if you don't want random zombie one liners ActionWait(2.0); break; case 4: if (nRandom<=14){PlaySound("c_zombie_atk2");} ActionWait(10.0); break; case 5: ActionWait(8.0); if (nRandom<=14){PlaySound("c_zombie_atk3");} break; case 6: ActionWait(1.0); if (nRandom<=14){PlaySound("c_zombie_slct");} ActionWait(2.0); SpeakString("mnauhh..."); //comment this line if you don't want random zombie one liners break; } DelayCommand(19.5, ClearAllActions()); if (nRandom<=10){DelayCommand(20.0, ExecuteScript("zombie_feed", OBJECT_SELF));} if (nRandom>=11){DelayCommand(25.0, ExecuteScript("zombie_feed", OBJECT_SELF));} } } (IMG:style_emoticons/kolobok_light/hunter.gif) |
![]()
Сообщение
#3472
|
|
Level 6 ![]() ![]() Класс: Маг Характер: Lawful Evil Раса: Нежить ![]() |
Первые два скрипта - стандартный OnSpawn-скрипт, включенный в режиме поиска точек патрулирования и генерации сокровищ, к которому приписали вызов зомби-скрипта. Третий - стандартный OnDeath скрипт, к которому приписали ограбляемый труп. Последний скрипт, как следует из описания, заставляет монстра искать ближайшие трупы и рыться в них ("есть"), издавая звуки и отправляя в чат мессаги. Его никуда не надо ставить, вызывается через OnSpawn-скрипт. Подробные комментарии имеются в коде.
|
![]()
Сообщение
#3473
|
|
Level 5 ![]() ![]() Класс: Вор Характер: Neutral Good Раса: Человек ![]() |
ReZkiy, а другие вещи и расы мира LOTR тебя интересуют? (оружие, броня, ортханк) (IMG:http://vnmedia.ign.com/nwvault.ign.com/fms/images/hakpaks/2824/1114980850_thumb.jpg) (IMG:http://vnmedia.ign.com/nwvault.ign.com/fms/images/hakpaks/6322/1130015972_thumb.jpg) (IMG:http://vnmedia.ign.com/nwvault.ign.com/fms/images/hakpaks/2231/1114980529_thumb.jpg) (IMG:http://vnmedia.ign.com/nwvault.ign.com/fms/images/hakpaks/4020/1114981398_thumb.jpg) (IMG:http://vnmedia.ign.com/nwvault.ign.com/fms/images/hakpaks/3584/1114981188_thumb.jpg) Где??? |
![]()
Сообщение
#3474
|
|
Level 5 ![]() ![]() Класс: Паладин Характер: Chaotic Good Раса: Человек ![]() |
|
![]()
Сообщение
#3475
|
|
Level 5 ![]() ![]() Класс: Вор Характер: Neutral Good Раса: Человек ![]() |
http://vnmedia.ign.com/nwvault.ign.com/fms...81188_thumb.jpg
Где ты нашел орка который на ближнем плане? В каком хаке? Сообщение отредактировал ReZkiy - Sep 24 2011, 19:51 |
![]() ![]() |
Текстовая версия | Сейчас: 27th April 2025 - 15:42 |