Sie sind auf Seite 1von 4

<<<<<<<<Alarm gdy zostao X potionw>>>>>>>>>> Const tItem = 'mana potions...'; iMin = 5; AlertFrom = 'C:/Windows/Media/Notify.

wav'; <-- cieka do pliku muzycznego Var iItem : integer; procedure Event_Notice(Text: String); begin if Pos(tItem, Text) = 0 then Exit; Delete(Text, 1, 13); iItem := StrToInt(Copy(Text, 1, Pos(' ', Text) - 1)); end; While not terminated do begin iItem := 0; updateworld; ProcessEvents; if iItem <> 0 then begin if iItem < iMin then begin PlaySound(AlertFrom); end; end; end;

Skrypt rzuca wybrane itemki w wyznaczone miejsce.: Const ItemsIDs = [7425,3286,3410,3359,3349,3358,3264,3377,3558,3275, 3056,3073,3 354] X = 32430 Y = 31976 Z = 9 function GetItemFromOpenBackpack(ID: integer): TI tem; var x: integer; y: integer; begin Result := nil; for x := 0 to Self.Contain ers.Count - 1 do begin if x >= Self.Containers.Count then Break; for y := 0 to S elf.Containers.Container[x].Count - 1 do begin if y >= Self.Containers.Container [x].Count then Break; if Self.Containers.Container[x].Item[y].ID = ID then begin Result := Self.Containers.Container[x].Item[y]; Exit; end; end; end; end; while not terminated do begin UpdateWorld; for i := self.containers.count - 1 downto 0 do begin for x1 := self.containers.container[i].count - 1 downto 0 do begin ok := false; for y1 := Low(ItemsIDs) to High(ItemsIDs) do begin if self.containers .container[i].item[x1].id = ItemsIDs[y1] then ok := true; end; if ok then begin self.containers.container[i].item[x1].movetoground(X,Y,Z ,0); Self.DisplayText(s elf.containers.container[i].item[x1].id); sleep(500); end; end; end; sleep(100); Items := 0; for i := low(ItemsIDs) to High(ItemsIDS) do begin Item := GetItemFr omOpenBackpack(ItemsIDs[i]); if Item <> nil then Items := Items + 1; end; end;

Skrypt rzuca wybrane itemki w wyznaczone miejsce. Const ItemsIDs = [7425,3286,3410,3359,3349,3358,3264,3377,3558,3275, 3056,3073, 3354] X = 32430 Y = 31976 Z = 9 function GetItemFromOpenBackpack(ID: integer): T Item; var x: integer; y: integer; begin Result := nil; for x := 0 to Self.Contai ners.Count - 1 do begin if x >= Self.Containers.Count then Break; for y := 0 to Self.Containers.Container[x].Count - 1 do begin if y >= Self.Containers.Containe r[x].Count then Break; if Self.Containers.Container[x].Item[y].ID = ID then begi n Result := Self.Containers.Container[x].Item[y]; Exit; end; end; end; end; whil

e not terminated do begin UpdateWorld; for i := self.containers.count - 1 downto 0 do begin for x1 := self.containers.container[i].count - 1 downto 0 do begin o k := false; for y1 := Low(ItemsIDs) to High(ItemsIDs) do begin if self.container s.container[i].item[x1].id = ItemsIDs[y1] then ok := true; end; if ok then begin self.containers.container[i].item[x1].movetoground(X,Y,Z ,0); Self.DisplayText( self.containers.container[i].item[x1].id); sleep(500); end; end; end; sleep(100) ; Items := 0; for i := low(ItemsIDs) to High(ItemsIDS) do begin Item := GetItemF romOpenBackpack(ItemsIDs[i]); if Item <> nil then Items := Items + 1; end; end;

'Minotaur Mage','Minotaur Archer','Minotaur Guard' - Kolejno potworw ( zmieniamy do wolnie, na dowlone potwory) Const Name=['Minotaur Mage','Minotaur Archer','Minotaur Guard']; SwitchAt=10 function GetPlace(st:string):integer; var x:integer; begin Result:=1000; for x:=Low(Name) To High(Name) do begin if Name[x]=st then Result:=x; end; end; function GetCreatureByID(ID: integer): TCreature; var x: integer; begin Result := nil; for x := 0 to Creatures.Count - 1 do begin if x >= Creatures.Count then Break; if Creatures.Creature[x].ID = ID then begin Result := Creatures.Creature[x]; Exit; end; end; end; function IsCreatureBesideYou(c: TCreature): boolean; begin UpdateWorld; Result := False; if (abs(c.X-self.X) <= 6) and (abs(c.Y-self.Y) <= 6) then begin if c.Z = self.Z then begin Result := True; end; end; end; var x:integer;

b:boolean; begin while not terminated do begin b:=false; updateworld; If (Self.Attacking<>0) then begin Creature:=GetCreatureByID(Self.Attacking); if Creature<>nil then if SwitchAt<Creature.Health then begin for x := 0 to Creatures.Count - 1 do begin updateworld; if b then break; if x >= Creatures.Count then Break; if Creatures.Creature[x].NPC then if Creatures.Creature[x].z=self.z then if Creatures.Creature[x].Name<>self.name then if Creatures.Creature[x].Attacking = false then if IsCreatureBesideYou(Creatures.Creature[x]) then if GetPlace(Creature.Name)>GetPlace(Creatures.Creature[x].Name) then begin sleep(100); updateworld; Creatures.Creature[x].attacking:=true; B:=true; end; end; end; end; Sleep(100); end; end;

Alarm Gdy brak jedzenia Const FoodID = 1111 // WPISZ ID FOODA MusicPath = 'C:\Windows\Media\Notify.wav' while not terminated do begin UpdateWorld; a:=0; For x:= 0 to Self.Containers.Count - 1 do begin for y := 0 to Self.Containers.Container[x].Count - 1 do begin if Self.Containers.Container[x].Item[y].ID = FoodID then a := 1; Sleep(100); end; sleep(100); end; sleep(100); if a = 0 then PlaySound(MusicPath); end;

CAP.................. Const cap = 20 //skrypt pochodzi ze strony www.tibiatool.pl while not terminated do begin UpdateWorld; if self.capacity < cap then PlaySound('C:\Windows\Media\notify.wav'); Sleep(1000); end;

Das könnte Ihnen auch gefallen