Показать сообщение отдельно
Старый 05.11.2009, 11:41   #4
Пользователь
 
Регистрация: 26.08.2008
Сообщений: 30
Сказал Спасибо: 8
Имеет 10 спасибок в 3 сообщенях
ElKornacio пока неопределено
По умолчанию

вообще тут уже делали огромный скриптищще, где бот даже сдавал то что заработал, килял, пил хилки и тп. я давно как то тоже скриптик делал.. делюсь)

delphi Код:
const Fishing=1312; Reeling=1313; RFail=1468; Pumping=1314; PFail=1466; AF=1231; MoveTime=300; MinHP=2200; Name='ElKornacio'; var CharID,MobID,X,Y,Z,tmp,ShotID,SocialID,PuhaID,colv,Udochka,Nazhivka,HealID:integer; stoped,Skill,wh,wh2,wh3,wh4,wh5,First,InFishing,InWar:boolean; LT,AT:TTimer; IDs:TStrings; procedure OnTimer(Sender:TObject); begin if Skill then begin UseItem(ShotID); MagicSkillUse(Reeling); end else begin UseItem(ShotID); MagicSkillUse(Pumping); end; end; procedure StatusUpdate; var i,CurHP:integer; begin for i:=0 to ReadD(6)-1 do if pck[i*8+10]=#$09 then CurHP:=ReadD(i*8+14); if CurHP<=MinHP then UseItem(HealID); end; procedure Init; //Вызывается при включении скрипта begin CharID:=0; MobID:=0; Skill:=true; stoped:=true; LT:=TTimer.Create(nil); LT.Interval:=250; LT.OnTimer:=@OnTimer; LT.Enabled:=false; AT:=TTimer.Create(nil); AT.Interval:=MoveTime; AT.OnTimer:=@OnTimerA; AT.Enabled:=false; wh:=false; wh2:=false; wh3:=false; wh4:=false; InFishing:=false; InWar:=false; IDs:=TStringList.Create; IDs.LoadFromFile('IDs.txt'); ShotID:=StrToInt(IDs[0]); PuhaID:=StrToInt(IDs[1]); Udochka:=StrToInt(IDs[2]); Nazhivka:=StrToInt(IDs[3]); HealID:=StrToInt(IDs[4]); end; procedure OnTimerA(Sender: TObject); begin if InWar then begin MagicSkillUseA(AF);    if colv=12 then begin AT.Enabled:=false; UseItem(Udochka); UseItem(Nazhivka); MagicSkillUse(Fishing); LT.Enabled:=false; InWar:=false; end else colv:=colv+1; end;        end; procedure Free; begin LT.Free; AT.Free; IDs.Clear; IDs.Add(IntToStr(ShotID)); IDs.Add(IntToStr(PuhaID)); IDs.Add(IntToStr(Udochka)); IDs.Add(IntToStr(Nazhivka)); IDs.Add(IntToStr(HealID)); IDs.SaveToFile('IDs.txt'); IDs.Free; end; procedure UseItem(ItemID:integer); begin buf:=#$19; WriteD(ItemID); WriteD(0); SendToServerEx(Name); end; procedure MagicSkillUse(MagicID:integer); begin if stoped=false then begin buf:=#$39; WriteD(MagicID); WriteD(00); WriteC(00); SendToServerEx(Name); end; end; procedure MagicSkillUseA(MagicID:integer); begin buf:=#$39; WriteD(MagicID); WriteD(01); WriteC(00); SendToServerEx(Name); end; procedure TargetAttacker; begin buf:=#$1F; WriteD(MobID); WriteD(X); WriteD(Y); WriteD(Z); WriteC(00); SendToServerEx(Name); end; procedure Say(s:string); begin buf:=#$4A; WriteD(CharID); WriteD(1); WriteS(Name); WriteS(s); SendToClientEx(Name); end; begin   if FromServer and (ConnectName=Name) and (pck[1]=#$33) then begin     tmp:=ReadD(6);     if (CharID=tmp) and (InWar=false) then begin       Say('Нас ударили');          InWar:=true;                                                              if InFishing then MagicSkillUse(Fishing);       LT.Enabled:=false;       UseItem(PuhaID);       MobID:=ReadD(2);       colv:=0;                TargetAttacker;       AT.Enabled:=true;     end;   end else          if FromClient and (ConnectName=Name) and (pck[1]=#$59) then begin     X:=ReadD(2);     Y:=ReadD(6);     Z:=ReadD(10);   end else   if FromServer and (ConnectName=Name) and (pck[1]+pck[2]=#$FE+#$27) then begin   if stoped=false then begin   Skill:=true;   LT.Enabled:=true;            end;   end else          if FromClient and (ConnectName=Name) and (pck[1]=#$34) then begin   SocialID:=ReadD(2);   case SocialID of        6: begin stoped:=false; AT.Enabled:=false; MagicSkillUse(Fishing); pck:=''; end;   5: begin if InFishing then MagicSkillUse(Fishing); stoped:=true; LT.Enabled:=false; AT.Enabled:=false; pck:=''; end;   2: begin wh:=true; pck:=''; end;   3: begin wh2:=true; pck:=''; end;   7: begin wh3:=true; pck:=''; end;   8: begin wh4:=true; pck:=''; end;   9: begin wh5:=true; pck:=''; end;   4: begin pck:=''; stoped:=false; MagicSkillUseA(AF); stoped:=true; end;    end;   end else   if FromClient and (ConnectName=Name) and (pck[1]=#$17) then begin   if (wh) then begin wh:=false; ShotID:=ReadD(2); end else   if (wh3) then begin wh3:=false; Udochka:=ReadD(2); end else   if (wh4) then begin wh4:=false; Nazhivka:=ReadD(2); end else   if (wh5) then begin wh5:=false; HealID:=ReadD(2); end else      if (wh2) then begin wh2:=false; PuhaID:=ReadD(2); end;   end else   if FromServer and (ConnectName=Name) and (pck[1]=#$62) then begin      if (ReadD(2)=RFail) or (ReadD(2)=PFail) then Skill:=not Skill;   end else   if FromServer and (ConnectName=Name) and (pck[1]+pck[2]=#$FE+#$1F) then begin   InFishing:=false;   if InWar=false then begin   LT.Enabled:=false;   Delay(500);   MagicSkillUse(Fishing);   end;   end else   if FromServer and (ConnectName=Name) and (pck[1]+pck[2]=#$FE+#$1E) then InFishing:=true else   if FromServer and (ConnectName=Name) and (pck[1]=#$32) then CharID:=ReadD(18) else   if FromServer and (ConnectName=Name) and (pck[1]=#$18) and (CharID=ReadD(2)) then StatusUpdate; end.
ElKornacio вне форума   Ответить с цитированием
За это сообщение ElKornacio нажился спасибкой от: