吾爱尚玩资源基地

标题: 【千年服务端】一个很好的会员服务脚本 [打印本页]

作者: admin    时间: 4 天前
标题: 【千年服务端】一个很好的会员服务脚本
一个很好的会员服务脚本
  1. unit 会员服务;

  2. interface

  3. function  GetToken (aStr, aToken, aSep : String) : String;
  4. function  CompareStr (aStr1, aStr2 : String) : Boolean;
  5. function  callfunc (aText: string): string;
  6. procedure print (aText: string);
  7. function  Random (aScope: integer): integer;
  8. function  Length (aText: string): integer;
  9. procedure Inc (aInt: integer);
  10. procedure Dec (aInt: integer);
  11. function  StrToInt (astr: string): integer;
  12. function  IntToStr (aInt: integer): string;
  13. procedure exit;

  14. procedure OnLeftClick (aStr : String);
  15. procedure OnGetResult (aStr : String);

  16. implementation
  17. procedure OnLeftClick (aStr : String);
  18. var
  19.    Str : String;
  20.    Race : Integer;
  21. begin
  22.    Str := callfunc ('getsenderrace');
  23.    Race := StrToInt (Str);
  24.    if Race = 1 then begin
  25.       Str := 'showwindow .\help\会员服务.txt 0';
  26.       print (Str);
  27.       exit;
  28.    end;
  29. end;
  30. procedure OnGetResult (aStr : String);
  31. var
  32.       Str, Name, MapNo, WqName : String;
  33.          iCount, MapID : Integer;
  34. begin
  35.    Name := callfunc ('getsendername');
  36.    if aStr = 'close' then begin
  37.       exit;
  38.    end;
  39.    if aStr = 'xuanzhe' then begin
  40.       Str := 'showwindow .\help\会员服务1.txt 0';
  41.       print (Str);
  42.       exit;
  43.    end;
  44.   if aStr = 'lingqu' then begin
  45.    Str := callfunc ('getsenderitemexistence 烈焰金戒:1');//此物品自己可以设
  46.    if Str = 'false' then begin
  47.       print ('say 你不是会员吧');
  48.       exit;
  49.     end;
  50.       Str := callfunc ('checkenoughspace 5');
  51.       if Str = 'false' then begin
  52.          print ('say 物品栏已满需要5个空格!');
  53.          exit;
  54.       end;
  55.        for MapId := 0 to 200 do
  56.        begin
  57.        MapNo := IntToStr (MapID);
  58.        str := 'sendnoticemsgformapuser ' + MapNo;
  59.        Str := Str + ' ';
  60.        Str := Str + '【会员系统】:『';
  61.        Str := Str + Name;
  62.        Str := Str + '』_领取了会员专用修炼物品开始修炼啦! 1';
  63.        print (str);
  64.       end;
  65.     print ('putsendermagicitem 修练枪:1 @会员服务 4');
  66.     print ('putsendermagicitem 修练刀:1 @会员服务 4');   
  67.     print ('putsendermagicitem 修练剑:1 @会员服务 4');
  68.     print ('putsendermagicitem 修练斧:1 @会员服务 4');
  69.     print ('putsendermagicitem 修练拳套:1 @会员服务 4');
  70.     print (Str);      
  71.     exit;
  72.    end;
  73.   if aStr = 'chuqu' then begin
  74.      WqName := callfunc ('getsenderwearitemname 9');//检测是不是拿在手上,因为拿在手里就无法删除!
  75.   if WqName = '修炼枪' then begin
  76.      print ('say 你不是吧!想带走修炼武器!');
  77.      exit;
  78.   end;
  79.   if WqName = '修炼剑' then begin
  80.      print ('say 你不是吧!想带走修炼武器!');
  81.      exit;
  82.   end;
  83.   if WqName = '修炼刀' then begin
  84.      print ('say 你不是吧!想带走修炼武器!');
  85.      exit;
  86.   end;
  87.   if WqName = '修炼斧' then begin
  88.      print ('say 你不是吧!想带走修炼武器!');
  89.      exit;
  90.   end;
  91.   if WqName = '修炼拳套' then begin
  92.      print ('say 你不是吧!想带走修炼武器!');
  93.      exit;
  94.   end;
  95.       for MapId := 0 to 200 do
  96.       begin
  97.       MapNo := IntToStr (MapID);
  98.        str := 'sendnoticemsgformapuser ' + MapNo;
  99.        Str := Str + ' ';
  100.        Str := Str + '【会员系统】:『';
  101.        Str := Str + Name;
  102.        Str := Str + '』_会员修炼完成.开始闯荡千年江湖! 1';
  103.        print (str);
  104.       end;
  105.       print ('getsenderitem 修练枪:1');//出去就全部删除物品
  106.       print ('getsenderitem 修练刀:1');
  107.       print ('getsenderitem 修练剑:1');
  108.       print ('getsenderitem 修练斧:1');
  109.       print ('getsenderitem 修练拳套:1');
  110.       print (str);
  111.       Str := 'movespace ' + Name;
  112.       Str := Str + ' user 1 500 500';
  113.       print (Str);
  114.     exit;
  115.    end;
  116. end;
  117. end.
复制代码
(, 下载次数: 0)






欢迎光临 吾爱尚玩资源基地 (http://bbs.523play.com/) Powered by Discuz! X3.4