wuduz游戏站

 找回密码
 注册
搜索
无度传奇145z游戏站745v奇迹网
查看: 1342|回复: 0
打印 上一主题 下一主题

[技术教程] 千年防止PK逃跑的回城卷

跳转到指定楼层
楼主
发表于 2022-10-12 21:49:02 |只看该作者 |倒序浏览
tgs10000Init里

item.sdb:
回城卷,回城卷,56,回城卷
双击使用,,,,,,,TRUE,FALSE,573,,,,,,,,,,100000,100000,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,8,,,82,,,


注意红色的字,要对应Script.SDB里你添加的

NPC.sdb
回城移动,回城移动,0,,,,,,,,,,62,81,235,0,0,,,,20000,0,0,0,0,,0,,,,,,,,,,,,,,,TRUE,,


tgs10000Help里 添加回城卷.txt



关闭

"回城卷"使用指南:
使用回城卷时候玩家位置不能在中央市场
不能开境界,上层武功,以及血要满...
否则使用不了!

明白...确定使用...




tgs10000Script里 添加回城卷.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 OnDblClick (aStr : String);
var
   str1,namea, Str, rdStr, xStr, yStr : String;
   x, y, xx, yy : Integer;
   Str : String;
   Race : Integer;
begin
print ('setallowdelete npc 回城移动');

  Str := callfunc ('getsenderposition');
   Str := GetToken (Str, xStr, '_');
   x := StrToInt (xStr);
   Str := GetToken (Str, yStr, '_');
   y := StrToInt (yStr);

   rdStr := 'getnearxy ' + xStr;
   rdStr := rdStr + ' ';
   rdStr := rdStr  + yStr;
   Str := callfunc (rdStr);

   Str := GetToken (Str, xStr, '_');
   xx := StrToInt (xStr);
xstr :=inttostr(xx);
   Str := GetToken (Str, yStr, '_');
   yy := StrToInt (yStr);
ystr :=inttostr(yy);
   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
   str1,namea, Str, rdStr, xStr, yStr, zdsm : String;
   x, y, xx, yy : Integer;
   Str, Name : String;
   nValue : Integer;
ComStr : String = 'mapaddobjbyname NPC ';
   monstername : String = '回城移动';
begin
   if aStr = 'close' then begin
      exit;
   end;
   if aStr = 'protect0' then begin
      Str := callfunc ('checksendercurusemagic 3');
      if Str = 'true' then begin
         print ('sendsenderchatmessage 必须使用普通武功才能传送 2');
         exit;
      end;
      Str := callfunc ('checksendercurusemagic 4');
      if Str = 'true' then begin
         print ('sendsenderchatmessage 必须使用普通武功才能传送 2');
         exit;
      end;
      Str := callfunc ('checksendercurusemagic 5');
      if Str = 'true' then begin
         print ('sendsenderchatmessage 必须使用普通武功才能传送 2');
         exit;
      end;
      Str := callfunc ('checksendercurusemagic 6');
      if Str = 'true' then begin
         print ('sendsenderchatmessage 必须使用普通武功才能传送 2');
         exit;
      end;
      Str := callfunc ('getsendercurpowerlevelname');
      if Str <> '' then begin
         print ('sendsenderchatmessage 不开镜子才能传送 2');
         exit;
      end;
      Str := callfunc ('getsendermaxlife');
      zdsm := callfunc ('getsenderlife');
      if Str <> zdsm then begin
         print ('sendsenderchatmessage 生命必须是满的才可以传送 2');
         exit;
      end;

       Str := ComStr + monstername;
       Str := Str + ' ';
       Str := Str + xStr;
       Str := Str + ' ';
       Str := Str + yStr;
       Str := Str + ' 10 0 TRUE';
     print (str);
       name := callfunc ('getsendername');
       Str := 'movespacebyname ' + Name;
       Str := Str + ' user ';
       Str := Str + '1';
       str :=str +' ';
       str :=str +'527';
       str :=str +' ';
       str :=str +'470';
       str :=str +' ';
       str :=str+monstername;
       str :=str +' ';
       str :=str +'npc';
      print (Str);
       print ('sendsenderchatmessage 传送成功 2');
       print ('getsenderitem 回城卷:1');

     exit;
   end;

end;
end

使用道具 举报

手机版|sitemap|txt|wuduz游戏站

GMT+8, 2026-6-10 17:27

回顶部