天之炼狱无双炼狱单机版NPC脚本写法

日期:2026-08-05 类别:网游单机GM资料库 作者:网游单机网 浏览:

NPC脚本写法。


数据库triggers表。

各字段翻译

TriggerID                    // 触发脚本ID 值为数字

TriggerType               //脚本类型,值为 NPC,QUEST(任务),MONSTER

NPC                            //NPC名字

QuestID                      //任务ID,可不写

Conditions                 //脚本参数1

Actions                       //脚本参数2


举例:

TriggerID        为28 这里 一直到 35 结束 为1个NPC脚本

Conditions     这里 ConditionType : AtFirst 意思是该NPC脚本开始 ,声明

Actions           这里

   ActionType : SetPosition         // 定义改NPC位置

       ZoneID : 2021    // 所在地图

       X : 43                    // 所在坐标X

       Y : 39                    // 所在坐标Y

       Dir : 1                   // 目录

   ActionType : PrepareShop    // 定义该NPC商店信息

       NPCID : 101       // NPC的ID,对应NPC表

       MarketConditionBuy : 25           //购买

       MarketConditionSell : 100        //出售

29行

Conditions     ConditionType : EveryTime    // 定义时间

       Turn : 546                // 未知


Actions    ActionType : RandomSay          //定义该NPC对话参数2为随机说话多内容

       StartScriptID : 301    //随机说话从301ScriptID开始

       EndScriptID : 305     //随机说话从305ScriptID结束

30行

Conditions      ConditionType : TalkedBy    //对话开始

Actions            ActionType : Ask                      //玩家向NPC说话

       ScriptID : 300         //NPC用ScriptID : 300来答复玩家

31行

Conditions      ConditionType : AnsweredBy     //玩家开始第一条对话

       ScriptID : 300               //执行 300

       AnswerID : 1                //第一条答复

Actions             ActionType : Heal                       //治疗玩家

32行

Conditions         ConditionType : AnsweredBy //玩家开始第二条对话

       ScriptID : 300             //执行300

       AnswerID : 2              //第二条答复

Actions              ActionType : Sell                     //交易命令,出售

33行

Conditions        ConditionType : AnsweredBy    //玩家开始第三条对话

       ScriptID : 300              //执行300

       AnswerID : 3               //第三条答复

Actions            ActionType : Buy       //交易命令,购买

34行

Conditions        ConditionType : AnsweredBy   //玩家开始第四条对话

       ScriptID : 300            //执行300

       AnswerID : 4              //第四条答复

Actions             ActionType : QuitDialogue     //关闭玩家与NPC的对话框

        ActionType : SetResurrectZone   //传送玩家

        ZoneID : 2021                                 //传送至地图ID 2021

35行

Conditions         ConditionType : AnsweredBy   //玩家开始第五条对话

       ScriptID : 300                //执行300

       AnswerID : 5                //第五条答复

Actions        ActionType : QuitDialogue            // 关闭玩家与NPC的对话框(也就是游戏里再见)


------

相关游戏下载:

网单游戏【天之炼狱之无双炼狱】单机版VM一键端天之炼狱下载+视频教程+GM修改工具

https://www.wangdanyouxi.com/thread-2919-1-1.html

天之炼狱之无双炼狱单机版下载,天之炼狱一键端网游游戏

https://www.0du.net/thread-9484-1-1.html

标签:天之炼狱

相关文章