• 印度Zensar科技公司卓越实验室正式落户盐城师范学院
  • 在千年游戏中央市场添加NPC的方法

    [ 来源:不详 | 作者:佚名 | 时间:2007-8-18 13:19:58 | 浏览: 人次 ]

    在中央市场添加材料商人NPC

    总共有7个地方要改,写的有误的地方请大家纠正。

    1.在hlep文件夹里加入文件 材料商人.txt
    材料商人.txt 内容如下:
    <pade>
    <title>材料商人</title>
    <image name=z33 value=131>
    <text>
    需要物品就到我这来吧!我出售一些材料
    </text>
    <command send="sell">买 材料</command>
    <command send="sell">买 材料</command>
    <command send="sell">买 材料</command>
    </pade>

    2.在init文件夹npc.sdb文件里加入:
    材料商人,材料商人,-100,,材料商人.txt,TRUE,,TRUE,,,,,14,33,131,150,30,,,,3500,0,0,0,0,,4,,,,,,,,,,,,,,,,

    3.在npcsetting文件夹里加入文件 材料商人.sdb
    材料商人.sdb 内容如下:
    Name,boSelfSay,boMain,MainNumber,HearSping,SaySping,NeedItem,GiveItem,CountLimit,RecoverTime,DelayTime,
    1,TRUE,,,,我出售各种材料,,,,,3000,

    4.在npcsetting文件夹里加入文件 材料商人.txt
    材料商人.txt 内容如下:
    SELLTITLE:材料商人
    SELLCAPTION:要买很多物品吗?
    SELLIMAGE:131
    SELLITEM:普通水石
    SELLITEM:碳酸水石
    SELLITEM:冷却水石
    SELLITEM:温泉水石
    SELLITEM:矿泉水石
    SELLITEM:吸着水石
    SELLITEM:爆裂水石
    SELLITEM:千年水石
    SELLITEM:葛根
    SELLITEM:甘草
    SELLITEM:沙参
    SELLITEM:何首乌
    SELLITEM:地种参
    SELLITEM:天然参
    SELLITEM:牛黄
    SELLITEM:青玉
    SELLITEM:绿玉
    SELLITEM:黄玉
    SELLITEM:白玉
    SELLITEM:黑珍珠
    SELLITEM:千年水晶
    SELLITEM:青铜
    SELLITEM:黄铜
    SELLITEM:砂金
    SELLITEM:黄金
    SELLITEM:白金
    SELLITEM:千年纯金
    SELLITEM:硅石
    SELLITEM:黑石
    SELLITEM:乌矿石
    SELLITEM:月石
    SELLITEM:玄石
    SELLITEM:耀阳石
    SELLITEM:千年金刚石

    5.在script文件夹script.sdb文件里加入:
    138,材料商人.txt,,

    6.在script文件夹里加入文件 材料商人.txt
    材料商人.txt 内容如下:
    unit 材料商人;

    interface

    function  GetToken (aSp, aToken, aSep : Sping) : Sping;
    function  CompareSp (aSp1, aSp2 : Sping) : Boolean;
    function  callfunc (aText: sping): sping;
    procedure print (aText: sping);
    function  Random (aScope: integer): integer;
    function  Length (aText: sping): integer;
    procedure Inc (aInt: integer);
    procedure Dec (aInt: integer);
    function  SpToInt (asp: sping): integer;
    function  IntToSp (aInt: integer): sping;
    procedure exit;

    procedure OnGetResult (aSp : Sping);
    procedure OnLeftClick (aSp : Sping);

    implementation

    procedure OnLeftClick (aSp : Sping);
    var
       Sp : Sping;
       Race : Integer;
    begin
       Sp := callfunc ('getsenderrace');
       Race := SpToInt (Sp);
       if Race = 1 then begin
          Sp := 'showwindow ./help/材料商人.txt 1';
          print (Sp);
          exit;
       end;
    end;

    procedure OnGetResult (aSp : Sping);
    var
       Sp, Name : Sping;
    begin
       if aSp = 'close' then begin
          exit;
       end;
       if aSp = 'sell' then begin
          Name := callfunc ('getsendername');
          Sp := 'padewindow ' + Name;
          Sp := Sp + ' 0';
          print (Sp);
          exit;
       end;
       if aSp = 'buy' then begin
          Name := callfunc ('getsendername');
          Sp := 'padewindow ' + Name;
          Sp := Sp + ' 1';
          print (Sp);
          exit;
       end;
       if aSp = 'log' then begin
          Sp := 'logitemwindow';
          print (Sp);
          exit;
       end;
    end;
    end.


    7.在setting文件夹CreateNpc1.sdb文件里加入:
    98,材料商人,550,488,1,3,13,材料商人.sdb,

    共有 0 位网友发表了评论 ... 查看完整内容