Facebook
From Schichtleiter, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 185
  1. --------
  2. ZAKLADANIE RINGA
  3. ---------
  4.          Const
  5.   Ring_ID = 3049
  6.  
  7. function GetItemFromOpenBackpack(ID: integer): TItem;
  8. var
  9.   y: integer;
  10. begin
  11.   Result := nil;
  12.   for x := 0 to Self.Containers.Count - 1 do
  13.   begin
  14.     if x >= Self.Containers.Count then Break;
  15.     for y := 0 to Self.Containers.Container[x].Count - 1 do
  16.     begin
  17.       if y >= Self.Containers.Container[x].Count then Break;
  18.       if Self.Containers.Container[x].Item[y].ID = ID then
  19.       begin
  20.         Result := Self.Containers.Container[x].Item[y];
  21.         Exit;
  22.       end;
  23.     end;
  24.   end;
  25. end;
  26.  
  27. while not terminated do
  28. begin
  29.   UpdateWorld;
  30.   if Self.Ring.ID = 0 then
  31.   begin
  32.     Ring := GetItemFromOpenBackpack(Ring_ID);
  33.     if Ring <> nil then
  34.     Ring.MoveToBody(Self.Ring,0);
  35.     else Self.Displaytext('The wanted ring wasnt found in backpack!');
  36.   end;
  37.   sleep(100);
  38. end;
  39. -------------
  40. ANTY PARAL
  41. ------------
  42. const
  43. minMana = 30;
  44.  
  45. while not Terminated do
  46. begin
  47.   UpdateWorld;
  48.   if Self.Mana > minMana then
  49.   begin
  50.     if Self.Slowed then
  51.     Self.Say('utani hur');
  52.     end;
  53.     Sleep(300);
  54.   end;
  55.   -------------
  56.   ATAKUJ NAJPIERW
  57.   ------------
  58.   Const
  59. Name=['Elf Arcanist']; // Tu zmieniacie nazwÄ™ potworka
  60. SwitchAt=10;// the % of the current attacked monster
  61.             //that if the monster has lass % hp than this, we Will NOt change to the stronger monster.
  62. function GetPlace(st:string):integer;
  63. var
  64. x:integer;
  65. begin
  66. Result:=1000;
  67. for x:=Low(Name) To High(Name) do
  68.   begin
  69.    if Name[x]=st then
  70.    Result:=x;
  71.    end;
  72. end;
  73.  
  74. function GetCreatureByID(ID: integer): TCreature;
  75. var
  76.   x: integer;
  77. begin
  78.   Result := nil;
  79.   for x := 0 to Creatures.Count - 1 do
  80.   begin
  81.     if x >= Creatures.Count then Break;
  82.     if Creatures.Creature[x].ID = ID then
  83.     begin
  84.       Result := Creatures.Creature[x];
  85.       Exit;
  86.     end;
  87.   end;
  88. end;
  89.  
  90. function IsCreatureBesideYou(c: TCreature): boolean;
  91. begin
  92.    UpdateWorld;
  93.    Result := False;
  94.    if (abs(c.X-self.X) <= 6) and (abs(c.Y-self.Y) <= 6) then begin
  95.     if c.Z = self.Z then begin
  96.      Result := True;
  97.     end;
  98.    end;
  99. end;
  100.  
  101. var
  102. x:integer;
  103. b:boolean;
  104. begin
  105. while not terminated do
  106.   begin
  107.     b:=false;
  108.    updateworld;
  109.    If (Self.Attacking<>0) then
  110.     begin
  111.     Creature:=GetCreatureByID(Self.Attacking);
  112.      if Creature<>nil then
  113.       if SwitchAt<Creature.Health then
  114.       begin
  115.        for x := 0 to Creatures.Count - 1 do
  116.         begin
  117.         updateworld;
  118.          if b then break;
  119.          if x >= Creatures.Count then Break;
  120.          if Creatures.Creature[x].NPC then
  121.          if Creatures.Creature[x].z=self.z then
  122.          if Creatures.Creature[x].Name<>self.name then
  123.          if Creatures.Creature[x].Attacking = false then
  124.          if IsCreatureBesideYou(Creatures.Creature[x]) then
  125.          if GetPlace(Creature.Name)>GetPlace(Creatures.Creature[x].Name) then
  126.              begin
  127.                sleep(100);
  128.                 updateworld;
  129.                 Creatures.Creature[x].attacking:=true;
  130.                  B:=true;
  131.               end;
  132.          end;
  133.        end;
  134.       end;
  135.      Sleep(100);
  136.    end;
  137. end;  
  138. -------------
  139. AUTO LOGIN
  140. ------------
  141. const
  142. Account = 'NUMER';
  143. Password = 'HASLO';
  144. Character = 'NICK';
  145. World = 'Spox OTS';
  146.  
  147. while not Terminated do
  148. begin
  149. UpdateWorld;
  150. if not Self.Connected then
  151. begin
  152.   Self.Login(Account, Password, Character, World);
  153.   Sleep(7000);
  154.   if Self.Connected then
  155.   begin
  156.      Self.Backpack.Open;
  157.   end;
  158. end;
  159. Sleep(100);
  160. end;
  161. ------------
  162. UTANI GRAN HUR
  163. -----------
  164. while not terminated do
  165. begin
  166.   UpdateWorld;
  167.   if not Self.hasting then
  168.   begin
  169.     Self.Say('Utani Gran Hur');
  170.     Sleep(2000);
  171.   end;    
  172.   sleep(100);
  173. end;      
  174. -----------
  175. MANARUNE
  176. -----------
  177.       const
  178.   minMana = 9000 // Change this to when you want it to heal.
  179.  
  180. while not terminated do
  181. begin
  182.   UpdateWorld;
  183.   if Self.Mana < minMana then
  184.       Self.Containers.UseItemWithSelf(3157);  
  185.       Sleep(500);
  186. end;
  187. -------------
  188.   MANASOWANIE
  189.   ----------
  190.   Const
  191. Hmm=3157; // enter the ID of HMM rune.
  192. MiniHealth=0;// enter the minimum hp valuse so if your hp is lower then that,
  193.         //it wont shoot hmm so you wont get exusted and will be able to auto uh.
  194. var
  195. Creature:TCreature;
  196. LOCKID:integer;
  197. function GetCreatureByID(ID: integer): TCreature;
  198. var
  199.  x: integer;
  200. begin
  201.  Result := nil;
  202.  for x := 0 to Creatures.Count - 1 do
  203.  begin
  204.    if x >= Creatures.Count then Break;
  205.    if Creatures.Creature[x].ID = ID then
  206.    begin
  207.      Result := Creatures.Creature[x];
  208.      Exit;
  209.    end;
  210.  end;
  211. end;
  212.  
  213. function GetCreatureByName(Name: String): TCreature;
  214. var
  215.  x: integer;
  216. begin
  217.  Result := nil;
  218.  for x := 0 to Creatures.Count - 1 do
  219.  begin
  220.    if x >= Creatures.Count then Break;
  221.    if Creatures.Creature[x].Name = Name then
  222.    begin
  223.      Result := Creatures.Creature[x];
  224.      Exit;
  225.    end;
  226.  end;
  227. end;
  228.  
  229. begin
  230. while not Terminated do
  231.  begin
  232.    updateworld;
  233.    Creature:=GetCreatureByName('Joker') or GetCreatureByName('');
  234.    if Creature<>nil then
  235.       begin
  236.       LOCKID:=Creature.ID;
  237.       While Creature <> nil do
  238.          begin
  239.          If self.Health>MiniHealth then
  240.          Self.Containers.UseItemWithCreature(Hmm, Creature);
  241.          Sleep(100);
  242.          updateworld;
  243.          Creature:=GetCreatureByID(LOCKID);
  244.         end;
  245.       end;
  246.    Sleep(100);
  247.  end;
  248. end;
  249. ----------------
  250. MWALL NA KRATKE
  251. ----------------
  252.   // Script by Kylu =)
  253. Const
  254.         PoyzcjaX = 1510
  255.         PoyzcjaY = 1460
  256.        
  257. while not terminated do
  258.  begin
  259.         UpdateWorld;
  260.         Self.Containers.UseItemWithGround(3180, PoyzcjaX, PoyzcjaY, Self.Z);
  261.  sleep(100);
  262. end;
  263. -----------------
  264. OTWIERANIE DRZWI
  265. -----------------
  266. Const
  267.   X1 = 32319
  268.   Y1 = 32253
  269.  
  270. Var
  271.   Tile:TTile;
  272.  
  273. function GetTileFromXYZ(X, Y, Z: integer): TTile;
  274. begin
  275.   Result := nil;
  276.   if abs((Self.X - 7) - X) > 14 then Exit;
  277.   if abs((Self.Y - 5) - Y) > 11 then Exit;
  278.   if Self.Z <> Z then Exit;
  279.   Result := Screen.Tile[abs((Self.X - 7) - X), abs((Self.Y - 5) - Y)];
  280. end;
  281.  
  282.  
  283. while not terminated do
  284. begin
  285.   UpdateWorld;
  286.   Tile := GetTileFromXYZ(X1,Y1,Self.Z);
  287.   if Tile <> nil then
  288.   if tile.count > 1 then
  289.   if Tile.Item[1].Properties.door then
  290.   if not tile.item[1].properties.walkable then
  291.     Tile.Item[1].Use;
  292.   sleep(1000);  
  293. end;
  294. ------------------------
  295. SD
  296. ----------------------
  297. // By Kylu
  298. const  
  299.   Czas = 0.1 // Co ile ma walic w potwora z sd (dla otsow 0.1 best)
  300.   Potwory = ['Ferumbras', 'Demon', 'Warlock', 'Hydra', 'Dragon Lord', 'Hero', 'Black Knight' , 'Giant Spider' , 'Poison Spider']  // Tablica potworow
  301.   ID_Runy = 3155 // ID Runki
  302.  
  303.  
  304. Function PlayeronScreen : boolean;
  305. var
  306.     x: integer;
  307. begin
  308.     Result := nil;
  309.     updateworld;
  310.     for x := 0 to Creatures.Count - 1 do begin
  311.         if x >= Creatures.Count then Break;
  312.         if Creatures.Creature[x].Z <> Self.Z then Continue;
  313.         if Creatures.Creature[x].Id = Self.Id then Continue;
  314.         if Creatures.Creature[x].Npc = False then begin
  315.             Result := True;
  316.             Exit;
  317.         end;
  318.     end;
  319.     Result := False;
  320. end;
  321.  
  322. function GetCreatureByName(Name: string): TCreature;    
  323. var    
  324.   x: integer;    
  325. begin    
  326.   Result := nil;    
  327.   for x := 0 to Creatures.Count - 1 do    
  328.   begin    
  329.     if x >= Creatures.Count then Break;
  330.     if Creatures.Creature[x].Z <> Self.Z then Continue;
  331.     if Creatures.Creature[x].Name = Name then    
  332.     begin    
  333.       Result := Creatures.Creature[x];    
  334.       Exit;    
  335.     end;    
  336.   end;    
  337. end;    
  338.  
  339. procedure Attack(Name:string);    
  340.  
  341. begin    
  342.   updateworld;    
  343.   Monster :=GetCreatureByName(Name);    
  344.   If Not PlayeronScreen then begin
  345.   if monster <> nil then    
  346.   begin    
  347.     Self.Containers.UseItemWithCreature(ID_Runy, Monster);    
  348.     updateworld;    
  349.   end    
  350. end;    
  351. end;
  352.  
  353. var        
  354.    Z:integer;
  355.    i:integer;
  356.    j:integer;
  357. while not terminated do
  358.  
  359. begin  
  360.   Yes := false;  
  361.   UpdateWorld;  
  362.   for i := 0 to creatures.Count - 1 do
  363.   for j := Low(Potwory) to High(Potwory) do
  364.   begin  
  365.     if creatures.Creature[i].Z <> Self.Z then Continue;  
  366.     If Creatures.Creature[i].Name = Potwory[j] then  
  367.     begin  
  368.       Yes := true;  
  369.       repeat  
  370.         Attack(Potwory[j]);  
  371.         Sleep(Czas * 1000);  
  372.         UpdateWorld;  
  373.         for g := 0 to creatures.Count -1 do  
  374.         begin  
  375.           if creatures.Creature[g].Z = Self.Z then
  376.           If Creatures.Creature[g].Name = Potwory[j] then  
  377.           Yes := True else Yes := false; else Yes := false;  
  378.         end;  
  379.       until Yes = false;  
  380.     end;  
  381.     sleep(10);  
  382.   end;  
  383.   Sleep(10);  
  384. end;
  385. -----------------------
  386. UTAMO VITA
  387. ------------------
  388. while not terminated do
  389. begin
  390.   UpdateWorld;
  391.   if not Self.MagicShield then
  392.   begin
  393.     Self.Say('Utamo Vita');
  394.     Sleep(2000);
  395.   end;    
  396.   sleep(100);
  397. end;      
  398. -----------------
  399. WRACANIE NA MIEJSCE
  400. ------------------
  401.  const
  402. StandX = 32326;
  403. Standy = 31116;
  404. StandZ = 7;
  405.  
  406. while not terminated do
  407. begin
  408.   updateworld;    
  409.   if ((StandX <> Self.X) or (StandY <> Self.Y)) then
  410.   Self.MoveTo(StandX, StandY, StandZ);
  411.   sleep(500);
  412. end;
  413. -----------------
  414. ZAKLADANIE RIGNA (NIE POTRZEBNE)
  415. -------------------------
  416.          Const
  417.   Ring_ID = 3049
  418.  
  419. function GetItemFromOpenBackpack(ID: integer): TItem;
  420. var
  421.   y: integer;
  422. begin
  423.   Result := nil;
  424.   for x := 0 to Self.Containers.Count - 1 do
  425.   begin
  426.     if x >= Self.Containers.Count then Break;
  427.     for y := 0 to Self.Containers.Container[x].Count - 1 do
  428.     begin
  429.       if y >= Self.Containers.Container[x].Count then Break;
  430.       if Self.Containers.Container[x].Item[y].ID = ID then
  431.       begin
  432.         Result := Self.Containers.Container[x].Item[y];
  433.         Exit;
  434.       end;
  435.     end;
  436.   end;
  437. end;
  438.  
  439. while not terminated do
  440. begin
  441.   UpdateWorld;
  442.   if Self.Ring.ID = 0 then
  443.   begin
  444.     Ring := GetItemFromOpenBackpack(Ring_ID);
  445.     if Ring <> nil then
  446.     Ring.MoveToBody(Self.Ring,0);
  447.     else Self.Displaytext('The wanted ring wasnt found in backpack!');
  448.   end;
  449.   sleep(100);
  450. end;