用户登录  | 
首 页技术文章软件发布广告价格
当前位置:传奇游戏服务端下载站传奇站长论坛资源网站程序技术文章文章资讯游戏架设教程千年技术

神武新章顶级买卖脚本

减小字体 增大字体 作者:佚名  来源:本站整理  发布时间:2014-10-04 10:31:00

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);

var
  nn : Integer;
  JgName : String = '积分点';
  SellItem : String = '_飞刀:1_箭:1_银元:50_金元:5000_生药:10_丹药:5_丸药:5_汤药:5';
  SellItem1 : String = '_粒药:10_粉药:10_药水:10_垫子:25_金钞:2500_银钞:500';
  SellItem2 : String = '';
  SellCount : Integer = 14;

implementation

procedure OnLeftClick (aStr : String);
var
   str, Name : String;
begin
   print ('say 请输入命令‘公告+空格键+你想说的话’');

   Name := callfunc ('getsendername');
   Str := callfunc ('getsenderedu');
   if Str = '1' then begin
      Str := 'sendsenderchatmessage 如:帅哥【' + Name;
      Str := Str + '】诚招年轻美貌温柔贤淑的新娘! 2';
      print (Str);
      exit;
   end;
   if Str = '2' then begin
      Str := 'sendsenderchatmessage 如:美女【' + Name;
      Str := Str + '】要找个世界上最好最好的老公 2';
      print (Str);
      exit;
   end;
end;

procedure OnHear (aStr : String);
var
   Str, Name, rdStr, xStr, yStr, wpmc, shumu, jiage : String;
   i, iCount : Integer;
   rCount : Integer = 0;
begin
   Str := callfunc ('getsenderrace');
   if Str <> '1' then exit;
   SellItem := SellItem + SellItem1;
   if aStr = '卖什么' then begin
      Name := 'say 出售:';
      Str := '';
      yStr := SellItem;
      for i:=1 to SellCount do
      begin
          rdStr := Str;
          yStr := GetToken (yStr, xStr, '_');
          yStr := GetToken (yStr, xStr, ':');
          Str := Str + xStr;
          Str := Str + ',';


          iCount := Length(Str);
          if iCount > 38 then begin
             Str := GetToken (Str, xStr, rdStr);
             xStr := IntToStr(rCount);
             rdStr := Name + rdStr;
             rdStr := rdStr + ' ';
             rdStr := rdStr + xStr;
             print (rdStr);
             rCount := rCount + 100;
          end;
      end;
      xStr := IntToStr(rCount);
      Str := Name + Str;
      Str := Str + ' ';
      Str := Str + xStr;
      print (Str);
      exit;
   end;
   if aStr = '买什么' then begin
      print ('say 我不买物品');
      exit;
   end;

   rdStr := GetToken (aStr, yStr, '_');
   if yStr = '公告' then begin
      Str := callfunc ('getsenderitemexistence 积分点:200');
      if Str = 'false' then begin
         print ('say 需要200积分点才能公告');
         exit;
      end;
      Name := callfunc ('getsendername');
      print ('getsenderitem 积分点:200');
      str := 'sendsendertopmsg ' + Name;
      str := str + '说【';
      str := str + rdstr;
      str := str + '】';
      print (str);
      exit;
   end;

   if yStr = '买' then begin
      yStr := GetToken (rdStr, wpmc, '_');
      yStr := GetToken (yStr, shumu, '个');
      iCount :=strtoint(shumu);
      if iCount < 1 then begin
         print ('say 格式错误!如:买_金元_10个');
         exit;
      end;
      Str := wpmc + ':';
      yStr := GetToken (SellItem, xStr, Str);
      if yStr = '' then begin
         print ('say 不卖此物品');
         exit;
      end;
      yStr := GetToken (yStr, jiage, '_');
      rCount := StrtoInt(jiage);
      rCount := iCount * rCount;
      jiage := InttoStr(rCount);
      Str := 'getsenderitemexistence ' + JgName;
      Str := Str + ':';
      Str := Str + jiage;
      Str := callfunc (Str);
      if Str = 'false' then begin
         Str := 'say 您没那么多' + JgName;
         Str := Str + ',';
         Str := Str + shumu;
         Str := Str + '个';
         Str := Str + wpmc;
         Str := Str + '需要:';
         Str := Str + jiage;
         Str := Str + JgName;
         print (Str);
         exit;
      end;
      Str := 'getsenderitem ' + JgName;
      Str := Str + ':';
      Str := Str + jiage;
      print (Str);
      Str := 'putsendermagicitem ' + wpmc;
      Str := Str + ':';
      Str := Str + shumu;
      print (Str);
      Str := 'say ' + wpmc;
      Str := Str + '已卖出!,收取:';
      Str := Str + jiage;
      Str := Str + JgName;
      print (Str);
      exit;
   end;
end;

procedure OnTimer (aStr : String);
begin
   nn := nn + 1;
   if nn= 18 then begin
      print ('say 给我200积分点,你想说啥我都可以帮你公告出来');
      exit;
   end;
   if nn= 36 then begin
      print ('say 我嗓门可大啦,不相信可以试试');
      exit;
   end;
   if nn= 54 then begin
      print ('say 我夫君不在,有什么事可以找我');
      exit;
   end;
   if nn= 72 then begin
      print ('say 积分点可以以半价购买物品,如:买_金元_10个');
      nn := 0;
      exit;
   end;
end;

end.

商业版发布站程序下载:发布站程序下载:

Tags:

作者:佚名
  • 好的评价 如果您觉得此文章好,就请您
      0%(0)
  • 差的评价 如果您觉得此文章差,就请您
      0%(0)

文章评论评论内容只代表网友观点,与本站立场无关!

   评论摘要(共 0 条,得分 0 分,平均 0 分) 查看完整评论
传奇资源网提供最新传奇开区一条龙版本下载,本站声明:只更新最新最好的传奇服务端分享给大家。