总共有7个地方要改,写的有误的地方请大家纠正。
1.在hlep文件夹里加入文件 材料商人.txt
材料商人.txt 内容如下:
<trade>
<title>材料商人</title>
<image name=z33 value=131>
<text>
需要物品就到我这来吧!我出售一些材料
</text>
<command send=”sell”>买 材料</command>
<command send=”sell”>买 材料</command>
<command send=”sell”>买 材料</command>
</trade>
2.在init文件夹npc.sdb文件里加入:
材料商人,材料商人,-100,,材料商人.txt,TRUE,,TRUE,,,,,14,33,131,150,30,,,,3500,0,0,0,0,,4,,,,,,,,,,,,,,,, 内容来自dedecms
3.在npcsetting文件夹里加入文件 材料商人.sdb
材料商人.sdb 内容如下:
Name,boSelfSay,boMain,MainNumber,HearString,SayString,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 (aStr, aToken, aSep : String) : String;
function CompareStr (aStr1, aStr2 : String) : Boolean;
function callfunc (aText: string): string;
procedure print (aText: string);
function Random (aScope: integer): integer;
function Length (aText: string): integer;
procedure Inc (aInt: integer);
procedure Dec (aInt: integer);
function StrToInt (astr: string): integer;
function IntToStr (aInt: integer): string;
procedure exit; 织梦内容管理系统
织梦好,好织梦
procedure OnGetResult (aStr : String);
procedure OnLeftClick (aStr : String);
implementation
procedure OnLeftClick (aStr : String);
var
Str : String;
Race : Integer;
begin
Str := callfunc (‘getsenderrace’);
Race := StrToInt (Str);
if Race = 1 then begin
Str := ‘showwindow ./help/材料商人.txt 1’;
print (Str);
exit;
end;
end;
procedure OnGetResult (aStr : String);
var
Str, Name : String;
begin
if aStr = ‘close’ then begin
exit;
end;
if aStr = ‘sell’ then begin
Name := callfunc (‘getsendername’);
Str := ‘tradewindow ‘ + Name;
Str := Str + ‘ 0’;
print (Str);
exit;
end;
if aStr = ‘buy’ then begin
Name := callfunc (‘getsendername’);
Str := ‘tradewindow ‘ + Name;
Str := Str + ‘ 1’;
print (Str);
exit;
end;
if aStr = ‘log’ then begin
Str := ‘logitemwindow’;
print (Str); 内容来自dedecms
exit;
end;
end;
end.
7.在setting文件夹CreateNpc1.sdb文件里加入:
98,材料商人,550,488,1,3,13,材料商人.sdb,