admin 发表于 2025-8-12 16:16:39

【千年服务端】一个很好的会员服务脚本

一个很好的会员服务脚本 unit 会员服务;

interface

functionGetToken (aStr, aToken, aSep : String) : String;
functionCompareStr (aStr1, aStr2 : String) : Boolean;
functioncallfunc (aText: string): string;
procedure print (aText: string);
functionRandom (aScope: integer): integer;
functionLength (aText: string): integer;
procedure Inc (aInt: integer);
procedure Dec (aInt: integer);
functionStrToInt (astr: string): integer;
functionIntToStr (aInt: integer): string;
procedure exit;

procedure OnLeftClick (aStr : String);
procedure OnGetResult (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 0';
      print (Str);
      exit;
   end;
end;
procedure OnGetResult (aStr : String);
var
      Str, Name, MapNo, WqName : String;
         iCount, MapID : Integer;
begin
   Name := callfunc ('getsendername');
   if aStr = 'close' then begin
      exit;
   end;
   if aStr = 'xuanzhe' then begin
      Str := 'showwindow .\help\会员服务1.txt 0';
      print (Str);
      exit;
   end;
if aStr = 'lingqu' then begin
   Str := callfunc ('getsenderitemexistence 烈焰金戒:1');//此物品自己可以设
   if Str = 'false' then begin
      print ('say 你不是会员吧');
      exit;
    end;
      Str := callfunc ('checkenoughspace 5');
      if Str = 'false' then begin
         print ('say 物品栏已满需要5个空格!');
         exit;
      end;
       for MapId := 0 to 200 do
       begin
       MapNo := IntToStr (MapID);
       str := 'sendnoticemsgformapuser ' + MapNo;
       Str := Str + ' ';
       Str := Str + '【会员系统】:『';
       Str := Str + Name;
       Str := Str + '』_领取了会员专用修炼物品开始修炼啦! 1';
       print (str);
      end;
    print ('putsendermagicitem 修练枪:1 @会员服务 4');
    print ('putsendermagicitem 修练刀:1 @会员服务 4');   
    print ('putsendermagicitem 修练剑:1 @会员服务 4');
    print ('putsendermagicitem 修练斧:1 @会员服务 4');
    print ('putsendermagicitem 修练拳套:1 @会员服务 4');
    print (Str);      
    exit;
   end;
if aStr = 'chuqu' then begin
   WqName := callfunc ('getsenderwearitemname 9');//检测是不是拿在手上,因为拿在手里就无法删除!
if WqName = '修炼枪' then begin
   print ('say 你不是吧!想带走修炼武器!');
   exit;
end;
if WqName = '修炼剑' then begin
   print ('say 你不是吧!想带走修炼武器!');
   exit;
end;
if WqName = '修炼刀' then begin
   print ('say 你不是吧!想带走修炼武器!');
   exit;
end;
if WqName = '修炼斧' then begin
   print ('say 你不是吧!想带走修炼武器!');
   exit;
end;
if WqName = '修炼拳套' then begin
   print ('say 你不是吧!想带走修炼武器!');
   exit;
end;
      for MapId := 0 to 200 do
      begin
      MapNo := IntToStr (MapID);
       str := 'sendnoticemsgformapuser ' + MapNo;
       Str := Str + ' ';
       Str := Str + '【会员系统】:『';
       Str := Str + Name;
       Str := Str + '』_会员修炼完成.开始闯荡千年江湖! 1';
       print (str);
      end;
      print ('getsenderitem 修练枪:1');//出去就全部删除物品
      print ('getsenderitem 修练刀:1');
      print ('getsenderitem 修练剑:1');
      print ('getsenderitem 修练斧:1');
      print ('getsenderitem 修练拳套:1');
      print (str);
      Str := 'movespace ' + Name;
      Str := Str + ' user 1 500 500';
      print (Str);
    exit;
   end;
end;
end.
页: [1]
查看完整版本: 【千年服务端】一个很好的会员服务脚本