Город Мастеров
IPB

Здравствуйте, гость ( Вход | Регистрация )

 Правила этого форума ПРАВИЛА РАЗДЕЛА
147 страниц V  « < 138 139 140 141 142 > »   
Ответить в эту темуОткрыть новую тему
> Скрипты, Все вопросы и ответы по скриптам
wirTUS
сообщение Sep 17 2011, 22:06
Сообщение #3461


Level 5
**

Класс: Убийца
Характер: Lawful Evil
Раса: Человек



Эта тема не случайно существует
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
ReZkiy
сообщение Sep 18 2011, 19:01
Сообщение #3462


Level 5
**

Класс: Вор
Характер: Neutral Good
Раса: Человек



Цитата(wirTUS @ Sep 18 2011, 01:06) *

Здесь такого нет. Или есть но не то.
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
wirTUS
сообщение Sep 18 2011, 19:47
Сообщение #3463


Level 5
**

Класс: Убийца
Характер: Lawful Evil
Раса: Человек



Цитата
Здесь такого нет. Или есть но не то.


Цитата
Люди! Дайте скрипт вот для OnClientInter:
Дает предмет по классу или расе

Цитата
Начем. Самое главное, это начало модуля. Тут все написано, как раздеть игрока, одеть, дать ему денег и отправить дальше. Ставится он на слот модуля OnClientEnter.
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
ReZkiy
сообщение Sep 19 2011, 13:17
Сообщение #3464


Level 5
**

Класс: Вор
Характер: Neutral Good
Раса: Человек



wirTUS, так как в 2да урук-хаев,лошадей и разные дополнения к одежде добавить?
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Ollone5
сообщение Sep 19 2011, 13:24
Сообщение #3465


Level 5
**

Класс: Паладин
Характер: Chaotic Good
Раса: Человек



Цитата
дополнения к одежде добавить? так как в 2да урук-хаев,лошадей и разные

Проще скачать хак.
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
ReZkiy
сообщение Sep 19 2011, 13:48
Сообщение #3466


Level 5
**

Класс: Вор
Характер: Neutral Good
Раса: Человек



Цитата
Проще скачать хак.

Ага. Знаешь как все виснет? И где мне его найти? Один есть - не работает.
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
wirTUS
сообщение Sep 19 2011, 14:07
Сообщение #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
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
ReZkiy
сообщение Sep 19 2011, 15:01
Сообщение #3468


Level 5
**

Класс: Вор
Характер: Neutral Good
Раса: Человек



Цитата
вместо 751, предположим, 751

(IMG:style_emoticons/kolobok_light/scratch_one-s_head.gif) Это как понять?
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
wirTUS
сообщение Sep 19 2011, 15:35
Сообщение #3469


Level 5
**

Класс: Убийца
Характер: Lawful Evil
Раса: Человек



*исправил*
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Ollone5
сообщение Sep 19 2011, 21:22
Сообщение #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
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Ollone5
сообщение Sep 22 2011, 12:03
Сообщение #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)


Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Talarasha
сообщение Sep 22 2011, 16:04
Сообщение #3472


Level 6
**

Класс: Маг
Характер: Lawful Evil
Раса: Нежить



Первые два скрипта - стандартный OnSpawn-скрипт, включенный в режиме поиска точек патрулирования и генерации сокровищ, к которому приписали вызов зомби-скрипта. Третий - стандартный OnDeath скрипт, к которому приписали ограбляемый труп. Последний скрипт, как следует из описания, заставляет монстра искать ближайшие трупы и рыться в них ("есть"), издавая звуки и отправляя в чат мессаги. Его никуда не надо ставить, вызывается через OnSpawn-скрипт. Подробные комментарии имеются в коде.
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
ReZkiy
сообщение Sep 23 2011, 11:41
Сообщение #3473


Level 5
**

Класс: Вор
Характер: Neutral Good
Раса: Человек



Цитата(Ollone5 @ Sep 20 2011, 00:22) *

Где???
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Ollone5
сообщение Sep 23 2011, 12:09
Сообщение #3474


Level 5
**

Класс: Паладин
Характер: Chaotic Good
Раса: Человек



Сюда (IMG:style_emoticons/kolobok_light/declare.gif)
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
ReZkiy
сообщение Sep 24 2011, 19:51
Сообщение #3475


Level 5
**

Класс: Вор
Характер: Neutral Good
Раса: Человек



http://vnmedia.ign.com/nwvault.ign.com/fms...81188_thumb.jpg
Где ты нашел орка который на ближнем плане? В каком хаке?

Сообщение отредактировал ReZkiy - Sep 24 2011, 19:51
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Ollone5
сообщение Sep 24 2011, 20:06
Сообщение #3476


Level 5
**

Класс: Паладин
Характер: Chaotic Good
Раса: Человек



(IMG:http://vnmedia.ign.com/nwvault.ign.com/fms/images/hakpaks/3584/1114981188_thumb.jpg)

Здесь (IMG:style_emoticons/kolobok_light/declare.gif) !
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
ReZkiy
сообщение Sep 24 2011, 20:09
Сообщение #3477


Level 5
**

Класс: Вор
Характер: Neutral Good
Раса: Человек



76 мегабайт (IMG:style_emoticons/kolobok_light/swoon.gif)
Но все равно спасибо!

Сообщение отредактировал ReZkiy - Sep 24 2011, 20:10
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Ollone5
сообщение Sep 24 2011, 21:03
Сообщение #3478


Level 5
**

Класс: Паладин
Характер: Chaotic Good
Раса: Человек



Цитата
76 мегабайт swoon.gif
Но все равно спасибо!

Ты конкретно скажи, (IMG:style_emoticons/kolobok_light/victory.gif) что тебя интересует. Я многое нашёл и ещё найду! (IMG:style_emoticons/kolobok_light/wizard.gif)
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Flaristan
сообщение Oct 15 2011, 04:40
Сообщение #3479


Тролль
****

Класс: Пьяный Мастер
Характер: Chaotic Neutral
Раса: Тварь



Недавно пришлось придумать и использовать описанную ниже конструкцию из цикла с вложенным в него циклом (знаю что это может быть нехорошо, но для решения поставленной задачи другого оптимального варианта не нашел):..
Neverwinter Script
object oArea = OBJECT_SELF;
object oTarget;
int iInt;
string sInt;

iInt = 1;
sInt = IntToString(iInt);
while (GetIsObjectValid(GetWaypointByTag("WP_tag_"+sInt)))
      {
//(тело вложенного цикла)//////
      oTarget = GetFirstObjectInArea(oArea);
      while (GetIsObjectValid(oTarget))
            {
            if (oTarget == GetWaypointByTag("WP_tag_"+sInt))
               {
//-----------------------------
//(блок для тела условия)
//-----------------------------
               }
            oTarget = GetNextObjectInArea(oArea);
            }
///////////////////////////////
      iInt++;
      sInt = IntToString(iInt);
      }

…цикл рассчитан на универсальность использования при работе с последовательностью вейпоинтов переменной длины с заданным шаблоном тагов (WP_tag_1, WP_tag_2, WP_tag_3, WP_tag_iInt…); внутренний цикл отыскивает по тагу среди множества всех объектов на локации текущий (из внешнего цикла) вейпоинт с i-тым тагом и выполняет условие скрипта при нахождении.
Собсно вопрос: конструкция работоспособная, но в лог вызывает сообщение об ошибке (стандартное «СЛИЖКОМ МНОГО ИНСТРУКЦИЙ») – что может вызывать ошибку и в чем она?


Похоже сам себя перемудрил – внутренний цикл лишний и видимо он и вызывает ошибку. (IMG:style_emoticons/kolobok_light/crazy.gif)

Сообщение отредактировал Flaristan - Oct 15 2011, 05:19
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Ilerien
сообщение Oct 15 2011, 12:18
Сообщение #3480


Level 11
Иконки Групп

Класс: Волшебник
Характер: Lawful Evil
Раса: Эльф
NWN: Скриптинг [PW]
Gem of the North



Навскидку ошибки не нашёл (количество операций пропорционально количеству вейпоинтов помножить на количество объектов в локе - вероятно, это слишком дофига), но это извращение.
Neverwinter Script
int i = 2;
object oWP = GetWaypointByTag("WP_tag_1");
while (GetIsObjectValid(oWP))
{
      if(GetArea(oWP) == OBJECT_SELF)
      {
//какой-то код
      }

      oWP = GetWaypointByTag("WP_tag_" + IntToString(i));
      i++;
}
Почему бы не так?..

Сообщение отредактировал Ilerien - Oct 15 2011, 12:20
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Flaristan
сообщение Oct 16 2011, 01:39
Сообщение #3481


Тролль
****

Класс: Пьяный Мастер
Характер: Chaotic Neutral
Раса: Тварь



Да, я так и исправил в посте – внутренний цикл можно просто удалить, а если префикс «tag» менять на уникальный для групп вейпоинтов/локация, то и условие «if(GetArea(oWP) == OBJECT_SELF)» там тоже ненужно. Просто долго извращался над скриптом, чтоб научить работать с переменным числом вейпоинтов и потом упрощал его до минимума слегка коряво. (IMG:style_emoticons/kolobok_light/smile.gif)
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Anakondar
сообщение Oct 27 2011, 23:44
Сообщение #3482


Level 6
**

Класс: Друид
Характер: Chaotic Neutral
Раса: Гном



Чуть призадумался. Подскажите навскидку:

1. Поставил в OnDeath существ проверку:
Код
if (GetIsPC(oKiller)) GiveXPToCreature(oKiller, nXP);
else if (GetIsPC(GetMaster(oKiller)) GiveXPToCreature(GetMaster(oKiller), nXP);

в надежде, что стоящий в безопасной области визард будет качаться, когда на другом конце света фамильяр, которым управляет игрок, мочит монстру. Хрен-то там. Если убивает в той же области,где и отдыхает персонаж - опыт даётся, в другой - нет. Вай?

2. Хотел сделать такую фичу: друид преврящается в жЫвотное, и все окружающие звери начинают дружить его (и его энимал компаньона), друид преврящается в голема (шейпшифтом), и все окружающие големы начинают дружить его (и его энимал компаньона; последнее, конечно не натурально, можно пытаться исправить, но пока не мешает). Трабл в следующем: друид в звероформе и будучи дружественным к фракции энимал пробегает мимо гоблина (естественно врага). Гоблин его естественно тюкает по шкуре своими никчёмными гоблинскими лапами. Но друиду действия гоблина глубоко паралельны, ибо он реально бежит по делам. А вот дикому и ужасному зверю-еното-бобру из фракции энимал совсем не пофиг. Он подбегает к гоблину и говорит: "Ты на кого клешни поднял? На моего друга! Сейчас я тебе клешни твои пообломаю!". "Да ладно, не парься, друг, я не в обиде на него," - говорит друид. "Слушай да, беги куда бежал! Тут уже личное. Я ему точно вмажу!", - говорит боброенот. И вмазал. Гоблин в ответ, и ещё и братков своих позвал. Ну енот тоже не лох, своих друганов позвал. Лосе-черепаху там, чёткого мишку и других. В общем, разборка началась чисто конкретная, клык за клык, все энималы против всех гоблиноидов во всех локациях воюют. Шерсть, пух, чешуя только и летят. Комбат саунд даже в соседних модулях слышен, не то что в соседних локациях. Как с этим беспределом бороться, можно ли навалять одному этому козлу носатому, чтобы со всей бандой отношения не портить?

Сообщение отредактировал Anakondar - Oct 27 2011, 23:47
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Ilerien
сообщение Oct 28 2011, 06:52
Сообщение #3483


Level 11
Иконки Групп

Класс: Волшебник
Характер: Lawful Evil
Раса: Эльф
NWN: Скриптинг [PW]
Gem of the North



1. Навскидку не скажу, посмотри, что вернёт GetMaster(oKiller), когда маг и фам в разных локах.
2. Проблема во флажке Global, нужно его убрать в редакторе фракций, видимо, и для животных, и для гоблиноидов.
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
denis0k
сообщение Oct 28 2011, 07:23
Сообщение #3484


Level 19
Иконки Групп

Класс: Воин
Характер: Lawful Good
Раса: Человек
NWN: Скриптинг [PW]
Gem of the North
Край Лесов



2. Компьютер мой помер, пишу по памяти. Во-первых, помогают только френды, нейтралы (50 реп) в бой не лезут. Во-вторых, смотри скрипты аи, там может быть сдвиг репутации фракции. И, в-третьих, кури мануал, он тоже должен помочь. Про глобал-флаг уже сказали.
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения
Anakondar
сообщение Oct 28 2011, 09:24
Сообщение #3485


Level 6
**

Класс: Друид
Характер: Chaotic Neutral
Раса: Гном



Цитата(Ilerien @ Oct 28 2011, 06:52) *
1. Навскидку не скажу, посмотри, что вернёт GetMaster(oKiller), когда маг и фам в разных локах.

Уже дня три назад добавил индикаторы этих чеков, но нвн запустить пока не удаётся ибо работа.

Цитата(Ilerien @ Oct 28 2011, 06:52) *
Проблема во флажке Global

Даже без него фракции друг друга звереют, в лайн оф сайт как минимум. Но я, пожалуй, готов предъявить жесткие требования к системе: НПС не воюют друг с другом никогда. Если нужно противное - использовать анимацию ударов и эффекты урона.
Вернуться в начало страницы
Скопировать ник в поле быстрого ответа
+Ответить с цитированием данного сообщения

147 страниц V  « < 138 139 140 141 142 > » 
Ответить в эту темуОткрыть новую тему
2 чел. читают эту тему (гостей: 2, скрытых пользователей: 0)
Пользователей: 0

 



Текстовая версия Сейчас: 4th May 2025 - 09:49